impact_radius_api 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cb63ae521f9b8516c02aadad9af2ef82c258e4d
4
- data.tar.gz: 8f187faef5bc9cee53f4138473400630fea30107
3
+ metadata.gz: dc5945e3c5ec69bc9d7e9e8a745cc3f65ee7ac4d
4
+ data.tar.gz: 31f5c2add44d3e951d4278c94b7b87082e9a4932
5
5
  SHA512:
6
- metadata.gz: ea8aab2b8c12bea08078b0dca9b2fb26582f4928af34987694fe78549e2ebdb9b8f4e065c062f49b85f17b5cb04e2a8ee7c8910a82517750b3e388cbd2901d51
7
- data.tar.gz: 562538dd9e8c3eb484f7509a9bf0e8f16ad9018c5fad8ca4d5465136b5699b00f789efc9e5e0fb0b5821e57693b9aa1b7e21bfb2a242ad9d263058bce0cefe18
6
+ metadata.gz: 0b06e8babfaac7d9a24dcdc695f3f913b40b54e571353ef24e4ff1d81fb27f6dd702355bd0ac1dd26efd175ec25678597fbb048109777b3269805021ddb5a923
7
+ data.tar.gz: ee5a9955439d50f633eae647844217ee2e8d46437abca2a6361facc969c5c3163eb3c55027a55b19d17eefa23bb503dcdb8d4521ad496b32ac87b5a21d271b68
@@ -67,13 +67,14 @@ module ImpactRadiusAPI
67
67
  private
68
68
 
69
69
  def process(response)
70
+
70
71
  case response.code
71
72
  when 200, 201, 204
72
73
  APIResponse.new(response, @resource)
73
74
  when 400, 404
74
75
  raise InvalidRequestError.new(response["ImpactRadiusResponse"]["Message"], response.code)
75
76
  when 401
76
- raise AuthenticationError.new(response["ImpactRadiusResponse"]["Message"], response.code)
77
+ raise AuthenticationError.new(response.body, response.code)
77
78
  else
78
79
  raise Error.new(response["ImpactRadiusResponse"]["Message"], response.code)
79
80
  end
@@ -20,7 +20,7 @@ module ImpactRadiusAPI
20
20
  class_name = uri.path.match(/^\/[a-z]+\//i)[0].gsub("/","")
21
21
  params = uri.query_values
22
22
  params.merge!({ 'Page' => "#{page.to_i + 1}" })
23
- next_page_response = ImpactRadiusAPI.const_get(class_name).new.request( uri.origin + uri.path, params )
23
+ next_page_response = ImpactRadiusAPI.const_get(class_name).new.request( "https://" + uri.authority + uri.path, params )
24
24
  page = next_page_response.page
25
25
  @data += next_page_response.data
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module ImpactRadiusAPI
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: impact_radius_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirk Jarvis