rt-client 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/rt_client.rb +4 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aead08c1c43172ffdbce0aa6016894fd1f9dc60a
4
- data.tar.gz: 58f3886d0d7d3e63c5601743a9c93c426f73ebf4
3
+ metadata.gz: 154c218a74ea4924dd43ab4fd0566691a0c31acf
4
+ data.tar.gz: 4bad29a83cc4c31c16fabff585d5c05957574f4f
5
5
  SHA512:
6
- metadata.gz: 70037fb84293b987ddb83c119a4f9faa7dc7f32a991d44d4ab9dc0d207d10d40398ddc1e71954dec62333509c017ff16c8c1c772b41eae2fc3e6ffe4bcb02dde
7
- data.tar.gz: '094bc0ed8e68c291918c906742c632a804fc01dbf06d1cf3dbcc69226d213b910eb9b84ed8b6545f5403a283a4debd9ef1d08cddc7ef4b60c8eb121fe152bd90'
6
+ metadata.gz: 3ad778ff1f2d433a0017d40b960d91db6111dba95cbc1c64178214f138b0a4e98b1c047bee031287a256a579ddd68aa038a9a4636b2ae499b2286adde6279c7b
7
+ data.tar.gz: 394719076c4cf0ebcd2221b91a966d94fc6bab01ceee6101930daaaecda0901701aa6e873172fe230e3dc710effde3e32220d89eddeb45adb743bdc34b527fd2
@@ -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.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
- @boundary = "----xYzZY#{rand(1000000).to_s}xYzZY"
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
- 'Content-Type' => "multipart/form-data; boundary=#{@boundary}",
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!(/RT\/\d+\.\d+\.\d+\s\d{3}\s.*\n\n/,"") # toss the HTTP response
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rt-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lahti