rally_rest_api 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -125,7 +125,9 @@ class RestQuery
125
125
 
126
126
  private
127
127
  def de_underscore(s)
128
- s.to_s.gsub("_", "")
128
+ words = s.to_s.split(/_/).map { |w| w.capitalize }
129
+ words[0].downcase!
130
+ words.join
129
131
  end
130
132
  end
131
133
 
@@ -79,13 +79,13 @@ class RestBuilder # :nodoc:
79
79
  end
80
80
 
81
81
  def send_request(url, req, username, password)
82
- debug "RestBuilder#send_request req = #{req.inspect}"
83
82
  req.basic_auth username, password
84
83
  req.content_type = 'text/xml'
85
84
  proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new
86
85
  http = Net::HTTP.new(url.host, url.port, proxy.host, proxy.port, proxy.username, proxy.password)
87
86
  http.use_ssl = true if url.scheme == "https"
88
87
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
88
+ debug "RestBuilder#send_request req = #{req.inspect} -- #{url}"
89
89
  body = http.start { |http| http.request(req) }.body
90
90
  debug "RestBuilder#send_request result = #{body}"
91
91
  check_for_errors(body)
@@ -2,7 +2,7 @@ module RallyRestVersion #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 7
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -191,7 +191,7 @@ class TestRestQuery < Test::Unit::TestCase
191
191
  def test_new_with_options_with_underscores
192
192
  query_string = RestQuery.new(:artifact,
193
193
  :project_scope_up => false) { equal :name, "name"}.to_q
194
- assert_equal("query=(Name = name)&projectscopeup=false", URI.unescape(query_string) )
194
+ assert_equal("query=(Name = name)&projectScopeUp=false", URI.unescape(query_string) )
195
195
  end
196
196
 
197
197
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: rally_rest_api
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.3
7
- date: 2007-08-30 00:00:00 -06:00
6
+ version: 0.7.4
7
+ date: 2007-10-17 00:00:00 -06:00
8
8
  summary: A ruby-ized interface to Rally's REST webservices API
9
9
  require_paths:
10
10
  - lib