gotransverse-tract-api 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fceec5debc29dd90850d8f84ffea81b46270f0db
4
- data.tar.gz: acfd5e386f10c83c36e7a91b1c0106e4a5b1a2e3
3
+ metadata.gz: 88250c8ad973dce0f0fb946c95afffd4464108ae
4
+ data.tar.gz: 0dbf4570be311926880524c37b79755f96ac9603
5
5
  SHA512:
6
- metadata.gz: 2b730b1e88e04848428de3e9506f583287fe8f2018bad59cd881481da020a897414671b05450aa4d0ce77e9b28ad525df76001eb5bf8231d85e61a907e37af16
7
- data.tar.gz: ecdd1375ed305d537f7828b13a287e3920fb3d0da3ed3608c8467e2a4f82c2fd402434902b9a1bc52b2a99473cb5e4b508ea49d66c7a8f2b588903aa2b465308
6
+ metadata.gz: 07b58279cdeca0554c2cfad92e88f643dee4ce3415dea0c3d74027ed6a533e53639b721e7683c61a86fb7525409be315dee2f5d3e4f3e41fd2ea5f3fdf0922a5
7
+ data.tar.gz: 50c56299d1d8af06f8a64308e9e9fc5c9c12b9c5173166b2ba4454826237dede5cfdad2a85d800b8286f80e6860abbd9852db7e4424aa115f7c3dcf87c8b97db
@@ -176,7 +176,8 @@ module GoTransverseTractApi
176
176
  #
177
177
  def self.call(api_url, api_params={}, method=:get, request_body="")
178
178
 
179
- # TODO: Camelize all keys in api_params Hash.
179
+ # Camelize parameters
180
+ api_params = camelize_keys(api_params)
180
181
 
181
182
  http_client = HTTPClient.new
182
183
  http_client.set_auth(nil, GoTransverseTractApi.configuration.username, GoTransverseTractApi.configuration.password)
@@ -193,4 +194,18 @@ module GoTransverseTractApi
193
194
  Nokogiri::XML(response.body.to_s)
194
195
  end
195
196
 
197
+ #
198
+ # self.camelize_keys
199
+ #
200
+ # @param {hash} hsh
201
+ #
202
+ def self.camelize_keys hsh
203
+ hsh.keys.each do |k|
204
+ new_key = k.to_s.camelize(:lower)
205
+ new_key = new_key.to_sym if k.is_a? Symbol
206
+ hsh[new_key] = hsh.delete(k)
207
+ end
208
+ hsh
209
+ end
210
+
196
211
  end
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.1.10"
3
+ VERSION = "0.1.11"
4
4
  TARGET_API_VERSION = "1.28"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotransverse-tract-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance