gotransverse-tract-api 0.6.5 → 0.6.6

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: ae751ac1292aea1df59c996efba439f3f220fd4c
4
- data.tar.gz: 1027a7ccb0878e64b2cefbab0e1359dc5905618c
3
+ metadata.gz: 25f10860ad89fa5f3dae30427dd15979a337ecb2
4
+ data.tar.gz: 1e2e57e4dcf799e18879e571776ca56565f5b641
5
5
  SHA512:
6
- metadata.gz: e7db5d308b35d4feea3a291ecf2edf89ce07cdebbf07286bf03108d81b526683a3785249bf3dc7a128e6711930aebf7e57900e708e6227feee86f859709042d7
7
- data.tar.gz: a17ce150c5ad9bbc29fd4ee4ec546361e7f7499480893ecc080b55b07a0e86843567d1591a4832e7133a88d9fafe8541cb25e52b11a502a11dc73374537f8c0d
6
+ metadata.gz: 340b5deaf83bdc7765ead44857e7952bd8039dae0fd87dd2e0c4f7bbec0b2a27e31ed59a52900916a1f589488ea005049dccffa51fe8ef0b7f937366d2695887
7
+ data.tar.gz: 7b2f19a942804c34bd7d3fc1b1cd1bad3993a935b2c775b3a4fbe8630c55eb9e561795340a8f489066cb428cf48aed7e4c1b027f8a5a08e3d7333ae220da736d
@@ -141,7 +141,6 @@ module GoTransverseTractApi
141
141
  def self.get_response_for(klass, api_params={})
142
142
 
143
143
  api_url = GoTransverseTractApi.get_api_url_for(klass)
144
- pp "api_url: " + api_url
145
144
 
146
145
  if GoTransverseTractApi.configuration.cache_enabled
147
146
  return self.get_cached_response_from(klass, api_params)
@@ -269,13 +268,16 @@ module GoTransverseTractApi
269
268
  when :put
270
269
  response = http_client.put(api_url, request_body, api_params)
271
270
  when :delete
272
- response = http_client.delete(api_url, request_body, api_params)
271
+ api_url = api_url + "/#{api_params[:eid]}"
272
+ response = http_client.delete(api_url, request_body, {'Content-Type' => 'application/xml', 'Accept' => 'application/xml'})
273
273
  end
274
274
 
275
+ return nil unless response.body.to_s.present?
276
+
275
277
  xml_response = Nokogiri::XML(response.body.to_s)
276
278
 
277
279
  klass = klass.to_s.split("::").last
278
- hsh = Hash.from_xml(xml_response.to_s).recursive_symbolize_keys! if (response.body.to_s.present?)
280
+ hsh = Hash.from_xml(xml_response.to_s).recursive_symbolize_keys!
279
281
 
280
282
  if method == :get
281
283
  hsh = hsh[klass.pluralize.camelize(:lower).to_sym] rescue Hash.from_xml(xml_response.to_s)[klass.camelize(:lower).to_sym]
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.6.5"
3
+ VERSION = "0.6.6"
4
4
  TARGET_API_VERSION = "1.29"
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.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance