rt-client 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/rt_client.rb +4 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 154c218a74ea4924dd43ab4fd0566691a0c31acf
|
4
|
+
data.tar.gz: 4bad29a83cc4c31c16fabff585d5c05957574f4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ad778ff1f2d433a0017d40b960d91db6111dba95cbc1c64178214f138b0a4e98b1c047bee031287a256a579ddd68aa038a9a4636b2ae499b2286adde6279c7b
|
7
|
+
data.tar.gz: 394719076c4cf0ebcd2221b91a966d94fc6bab01ceee6101930daaaecda0901701aa6e873172fe230e3dc710effde3e32220d89eddeb45adb743bdc34b527fd2
|
data/rt_client.rb
CHANGED
@@ -38,7 +38,7 @@ require 'pp'
|
|
38
38
|
|
39
39
|
class RT_Client
|
40
40
|
|
41
|
-
UA = "Mozilla/5.0 ruby RT Client Interface 1.0.
|
41
|
+
UA = "Mozilla/5.0 ruby RT Client Interface 1.0.2"
|
42
42
|
attr_reader :status, :site, :version, :cookies, :server, :user, :cookie
|
43
43
|
|
44
44
|
# Create a new RT_Client object. Load up our stored cookie and check it.
|
@@ -70,8 +70,7 @@ class RT_Client
|
|
70
70
|
# pass=<RT password>
|
71
71
|
# cookies=<directory>
|
72
72
|
def initialize(*params)
|
73
|
-
@
|
74
|
-
@version = "1.0.0"
|
73
|
+
@version = "1.0.2"
|
75
74
|
@status = "Not connected"
|
76
75
|
@server = "http://localhost/"
|
77
76
|
@user = "rt_user"
|
@@ -138,8 +137,7 @@ class RT_Client
|
|
138
137
|
end
|
139
138
|
|
140
139
|
headers = { 'User-Agent' => UA,
|
141
|
-
|
142
|
-
'Cookie' => @cookie }
|
140
|
+
'Cookie' => @cookie }
|
143
141
|
@site = RestClient::Resource.new(@resource, :headers => headers, :verify_ssl => false)
|
144
142
|
@status = data
|
145
143
|
self.untaint
|
@@ -783,7 +781,7 @@ class RT_Client
|
|
783
781
|
|
784
782
|
# helper to convert responses from RT REST to a hash
|
785
783
|
def response_to_h(resp) # :nodoc:
|
786
|
-
resp.gsub
|
784
|
+
resp = resp.body.gsub(/RT\/\d+\.\d+\.\d+\s\d{3}\s.*\n\n/,"") # toss the HTTP response
|
787
785
|
|
788
786
|
# unfold folded fields
|
789
787
|
# A newline followed by one or more spaces is treated as a
|