me_api 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: f05ebe3cbc84189e5046360b1681461bc3ef70d9e0be1b1b9e5d93b9f89684b1
4
- data.tar.gz: 54c73b7354f873f111874be5cdb70ef8354eee784aa46584acc48db85de9e629
3
+ metadata.gz: 07abf381290c99a8f08bbc257aff0d0dd899299cf46008ef117aff4de9c2e3c7
4
+ data.tar.gz: a78c3d5f7d2573f53052b8242c6a06922e186d63a27ef69bab5fc78b05e4a95d
5
5
  SHA512:
6
- metadata.gz: c4ca78216dff73609ef612c8b69c8c4046986bde3b07de6cd5271ff9ace99d99679f549ad5fa8373c44edf06442c6918fc67eaad5acb642285f8953f6ff07e8e
7
- data.tar.gz: 3ea393fc78dda10fb1e7398dacbe738cc74a3ac8c2adc551acfe0a473884939404416f78a9ccdd3e40d38a2cc92363d6b8674a252212394d1ea89293b915dc68
6
+ metadata.gz: 890eec00504370ddb8f5484fb1fadd689b27f5a5cf3126b9782c2c572b8db170772dae42966fa54f53007909b759b1ed79e9e28ecdf66b5879967d85680d3b6f
7
+ data.tar.gz: b0f96fe34d3986fa3fa9157fad80c0b0c062182a6b1b449739435efb1fd1ed13dd08337160dff21dec4c0bff3da174acde2d565c04f58304bfc9a05158c52f4c
data/lib/me_api/client.rb CHANGED
@@ -32,12 +32,7 @@ module MeApi
32
32
  }
33
33
  }
34
34
  response = post "api/v2/me/shipment/calculate", body: JSON.dump(body)
35
- if response.json.is_a?(Array)
36
- rates = response.json
37
- else
38
- rates = [response.json]
39
- end
40
- rates.map do |rate|
35
+ response.json.map do |rate|
41
36
  Rate.new(
42
37
  from: from,
43
38
  to: to,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MeApi
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: me_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses-bull