Re: [rt-users] rt-client ruby gem update

2013-07-25 Thread Tom Lahti
Wow did I mess up.

Robert Vinson's fork did not have all the methods reproduced, and I didn't 
notice.  0.6.0 is almost unusable as a result, if you used anything beyond the 
couple of methods implemented there.

I've re-introduced all the missing methods back into 0.6.1 and pushed it.  
Please let me know if there's any issues.

--
Tom Lahti


On Jul 4, 2013, at 5:09 PM, Tom Lahti tla...@dmsolutions.com wrote:

 I have shamelessly and unapologetically stolen Robert Vinson's excellent work 
 on his fork, for the most part.  I did refactor slightly to maintain 
 compatibility with the previous API, but otherwise it's identical and pushed 
 as rt-client 0.6.0.  It is working for me on ruby 1.9.3p374 on Windows and 
 ruby 1.8.3p327 on Linux, which is what I need for right now.



[rt-users] rt-client ruby gem update

2013-07-04 Thread Tom Lahti
I have shamelessly and unapologetically stolen Robert Vinson's excellent work 
on his fork, for the most part.  I did refactor slightly to maintain 
compatibility with the previous API, but otherwise it's identical and pushed as 
rt-client 0.6.0.  It is working for me on ruby 1.9.3p374 on Windows and ruby 
1.8.3p327 on Linux, which is what I need for right now.

The prerequisites for the gem have been whittled down to a single other gem, 
rest_client.  So as long as that works on ruby 2.0, I see no reason why 
rt-client 0.6.0 won't either.

If anyone has issues with rt-client 0.6.0 on any version of ruby or any 
platform, please let me know directly at t...@dmsolutions.com.  Unfortunately I 
don't have time to read rt-users as frequently as I'd like.

--
Tom





This e-mail message is confidential and is intended solely for the use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible to deliver it to the recipient, you are hereby advised that any 
dissemination, distribution or copying of this communication is prohibited. If 
you have received this e-mail in error, please notify the sender by return 
e-mail. Thank you.


Re: [rt-users] rt-client ruby gem update

2013-07-04 Thread Eli Boaz
Tom,

Thanks for the updated rt-client, i will be testing this in the next few weeks. 

Thanks,

Eli

On Jul 4, 2013, at 7:05 PM, Tom Lahti tla...@dmsolutions.com wrote:

 I have shamelessly and unapologetically stolen Robert Vinson's excellent work 
 on his fork, for the most part.  I did refactor slightly to maintain 
 compatibility with the previous API, but otherwise it's identical and pushed 
 as rt-client 0.6.0.  It is working for me on ruby 1.9.3p374 on Windows and 
 ruby 1.8.3p327 on Linux, which is what I need for right now.
 
 The prerequisites for the gem have been whittled down to a single other gem, 
 rest_client.  So as long as that works on ruby 2.0, I see no reason why 
 rt-client 0.6.0 won't either.
 
 If anyone has issues with rt-client 0.6.0 on any version of ruby or any 
 platform, please let me know directly at t...@dmsolutions.com.  Unfortunately 
 I don't have time to read rt-users as frequently as I'd like.
 
 --
 Tom
 
 
 
 
 
 This e-mail message is confidential and is intended solely for the use of the 
 addressee(s) named above. If you are not the intended recipient, or the 
 person responsible to deliver it to the recipient, you are hereby advised 
 that any dissemination, distribution or copying of this communication is 
 prohibited. If you have received this e-mail in error, please notify the 
 sender by return e-mail. Thank you.


Re: [rt-users] rt-client ruby gem - getting started

2013-05-06 Thread Jim Brandt
What is it you are trying to do that isn't working? Looking at the 
methods available, it seems they mirror the RT CLI methods:


http://rt-client.rubyforge.org/

So if you want to show a ticket like your example, it seems you would 
call rt.show and pass the ticket id.


On 5/4/13 1:33 PM, Peter Roosakos wrote:

I'm playing around with the rt-client ruby gem, and running into some
difficulty.  After adding to my rails app and creating a .rtclientrc
file in my project directory, I can successfully access the objects and
methods in the console using RT_Client.new.

rt = RT_Client.new

rt.user
= peter

returns my user name, so it's successfully accessing the configuration
options in my config file.

rt.status
= RT/3.8.7 200 Ok\n\n# Invalid object specification:
'index.html'\n\nid: index.html\n\n

it appears that credentials aren't being passed?

rt.cookie
returns the contents of the cookie file, which is being created and can
be found in the correct specified directory as per the .rtclientrc file.

rt.server
= https://myserverdomain.com/rt/

and going directly to

https://myserverdomain.com/rt/REST.1.0/ticket/1/show?user=usernamepass=password


Using the same username and password successfully displays the first
ticket, so my credentials are correct

I'm on Ruby 1.9.3-p286

Any thoughts on what I might be missing?  Using the latest gem, 0.4.1




--



Re: [rt-users] rt-client ruby gem - getting started

2013-05-06 Thread Eli Boaz
Peter,

I had slightly more success with an older version of Ruby and the
rt/client gem. Here's the info from RVM:

   ruby-1.8.7-p371 [ i686 ]
 
I was also encountering problems with manipulating objects despite this.
If you find a solution, there are others interested.
In the interest of expediency and time constraints, I had to switch to
Perl to get our initial integration between ticketing (RT) and bug
tracking (Rally) back on schedule.

Regards,

Eli Boaz



On 5/4/13 12:33 PM, Peter Roosakos proosa...@yahoo.com wrote:

I'm playing around with the rt-client ruby gem, and running into some
difficulty.  After adding to my rails app and creating a .rtclientrc
file in my project directory, I can successfully access the objects and
methods in the console using RT_Client.new.

rt = RT_Client.new

rt.user
= peter

returns my user name, so it's successfully accessing the configuration
options in my config file.

rt.status
= RT/3.8.7 200 Ok\n\n# Invalid object specification:
'index.html'\n\nid: index.html\n\n

it appears that credentials aren't being passed?

rt.cookie
returns the contents of the cookie file, which is being created and can
be found in the correct specified directory as per the .rtclientrc file.

rt.server
= https://myserverdomain.com/rt/

and going directly to

https://myserverdomain.com/rt/REST.1.0/ticket/1/show?user=usernamepass=pa
ssword

Using the same username and password successfully displays the first
ticket, so my credentials are correct

I'm on Ruby 1.9.3-p286

Any thoughts on what I might be missing?  Using the latest gem, 0.4.1







[rt-users] rt-client ruby gem 0.4.0

2011-08-23 Thread Tom Lahti
I just pushed version 0.4.0 as a bug fix for 0.3.9

* fixed usersearch method to actually work ^^
* documented usersearch method and added it to the rtxmlsrv.rb XML-RPC service

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117





RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26  27, 2011
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Melbourne VIC, Australia  November 28  29, 2011
*  Barcelona, Spain  November 28  29, 2011


[rt-users] rt-client ruby gem 0.3.9 released

2011-08-22 Thread Tom Lahti
I have just pushed rt-client 0.3.9 to rubygems.org.

Changes:  

* applied patch from Brian McArdle to deal with spaces in Custom Field names.
* works properly with RT having more than one digit in version strings (e.g. RT 
3.8.10)
* new method usersearch, supply a hash with key :EMailAddress to lookup an RT 
user by email.  Get back a hash with keys corresponding to fields on user edit 
page in RT.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117


RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26  27, 2011
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Melbourne VIC, Australia  November 28  29, 2011
*  Barcelona, Spain  November 28  29, 2011


Re: [rt-users] rt-client ruby gem

2011-01-10 Thread Jesse Vincent



On Mon, Jan 10, 2011 at 03:57:46PM -0800, Tom Lahti wrote:
 I've filed a bug report.  
 http://issues.bestpractical.com/Ticket/Display.html?id=16418
 
 This is probably the 3rd time its come up.  I've discussed it with Jesse on 
 the RT user's list and he recommended filing a bug report the last time it 
 came up.  The problem isn't really with rt-client, its with RT.  This 
 non-compliance with RFC 822 when that was intended will cause not only 
 rt-client to fail, but other similar libraries as well that use a 3rd party 
 RFC 822 parser.  Having a space in the field name of an RFC 822 header is not 
 compliant with the RFC.
 

I don't think we've ever claimed to be RFC 822 compliant. Have we?


Re: [rt-users] rt-client ruby gem

2011-01-10 Thread Tom Lahti
It was in something I read somewhere regarding the REST interface.  Maybe it 
was in the wiki and someone else wrote it.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117

 I've filed a bug report.  
 http://issues.bestpractical.com/Ticket/Display.html?id=16418
 
 This is probably the 3rd time its come up.  I've discussed it with Jesse on 
 the RT user's list and he recommended filing a bug report the last time it 
 came up.  The problem isn't really with rt-client, its with RT.  This 
 non-compliance with RFC 822 when that was intended will cause not only 
 rt-client to fail, but other similar libraries as well that use a 3rd party 
 RFC 822 parser.  Having a space in the field name of an RFC 822 header is 
 not compliant with the RFC.
 
 I don't think we've ever claimed to be RFC 822 compliant. Have we?



smime.p7s
Description: S/MIME cryptographic signature


Re: [rt-users] rt-client ruby gem

2011-01-10 Thread Tom Lahti
Surely you remember this thread as well?

http://www.mail-archive.com/rt-users@lists.bestpractical.com/msg28493.html

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117




On Jan 10, 2011, at 4:27 PM, Tom Lahti wrote:

 It was in something I read somewhere regarding the REST interface.  Maybe it 
 was in the wiki and someone else wrote it.
 
 --
 Tom Lahti, SCMDBA, LPIC-1, CLA
 BIT LLC
 425-251-0833 x 117
 
 I've filed a bug report.  
 http://issues.bestpractical.com/Ticket/Display.html?id=16418
 
 This is probably the 3rd time its come up.  I've discussed it with Jesse on 
 the RT user's list and he recommended filing a bug report the last time it 
 came up.  The problem isn't really with rt-client, its with RT.  This 
 non-compliance with RFC 822 when that was intended will cause not only 
 rt-client to fail, but other similar libraries as well that use a 3rd party 
 RFC 822 parser.  Having a space in the field name of an RFC 822 header is 
 not compliant with the RFC.
 
 I don't think we've ever claimed to be RFC 822 compliant. Have we?
 



smime.p7s
Description: S/MIME cryptographic signature


Re: [rt-users] rt-client ruby gem

2011-01-10 Thread Tom Lahti
Ah, I know where I got the idea.  RT::Client::REST on CPAN uses 
Mail::RFC822::Address from CPAN, I believe.  

The evilness of spaces in field-names is far less than the one back in October, 
with null lines preceeding and after a header in the metadata, which is how the 
body is supposed to be separated from the metadata.  Not sure how that one 
happens, but it makes parsing rather difficult.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117


On Jan 10, 2011, at 4:34 PM, Tom Lahti wrote:

 Surely you remember this thread as well?
 
 http://www.mail-archive.com/rt-users@lists.bestpractical.com/msg28493.html



smime.p7s
Description: S/MIME cryptographic signature