friendly_shipping 0.4.13 → 0.4.14

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: 1003d74ec50b026b72f4aee61e1c3ebfbdda0e99740ec0f766cb4c64a9333ad3
4
- data.tar.gz: 72bb7de71cde4aae5d7b202fbf56dc2d8b2e31f04c2950d5bc17b8405d45139b
3
+ metadata.gz: d43e668240fd5d6edb702b48b28e7a886abf53843f3963feb44fcff17a7f498a
4
+ data.tar.gz: 84e4efa1108768940d25493ba816197879c5dd9ad51ce64d5c1f5be8d2f5c92f
5
5
  SHA512:
6
- metadata.gz: 6a3feda8a0cc788d23318d61c9a90f9628ea1323f2e9a4208f23376f7efb768c6b732c9d6af462c18763a261ec22fc0ebe75bcdefe0656e7a9fbe38750a0ea92
7
- data.tar.gz: 01042d8c994b18598ea9acfa4ce20a4c11190beeb43bf342a72d25d76040be65bddb2883a2e3d240c3502811cc89bfeb620ed397e681c05d7ab5efb89e3ce533
6
+ metadata.gz: d0f0c826feea1c9f9396785049f07c7635f7be2386619d3b3c217339da7f363e43842a2b3eceef2204556868be082b01f76cc96dc36b4849649cd09baa924a79
7
+ data.tar.gz: 0c56d00886b43ac1d4a272c36d7dd90b3eb791315dcedcd689fe95450a6f23e0c76fb9d1e7c2c26f7a146bb418e27296c5911bcee6e698de287b53427926c05c
data/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.4.14] - 2020-01-21
8
+
9
+ ### Changed
10
+ - Code Style: Move development dependencies to Gemspec (#76)
11
+ - USPS Service: Fix documentation (#76)
12
+ - USPS Service: Use "Acceptance Date" if "Effective Acceptance Date" invalid (#79)
13
+
7
14
  ## [0.4.13] - 2020-01-18
8
15
 
9
16
  ### Changed
data/Gemfile CHANGED
@@ -6,12 +6,3 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in friendly_shipping.gemspec
8
8
  gemspec
9
-
10
- gem 'dotenv'
11
- gem 'factory_bot'
12
- gem 'pry'
13
- gem 'rspec_junit_formatter'
14
- gem 'rubocop'
15
- gem 'simplecov', require: false
16
- gem 'vcr'
17
- gem 'webmock'
@@ -31,6 +31,14 @@ Gem::Specification.new do |spec|
31
31
  spec.required_ruby_version = '>= 2.4'
32
32
 
33
33
  spec.add_development_dependency "bundler"
34
+ spec.add_development_dependency "dotenv"
35
+ spec.add_development_dependency "factory_bot", "~> 5.0"
36
+ spec.add_development_dependency "pry"
34
37
  spec.add_development_dependency "rake", "~> 10.0"
35
38
  spec.add_development_dependency "rspec", "~> 3.0"
39
+ spec.add_development_dependency "rspec_junit_formatter", "~> 0.4"
40
+ spec.add_development_dependency "rubocop"
41
+ spec.add_development_dependency "simplecov"
42
+ spec.add_development_dependency "vcr"
43
+ spec.add_development_dependency "webmock"
36
44
  end
@@ -37,7 +37,11 @@ module FriendlyShipping
37
37
  return [] if expedited_commitment_nodes.empty?
38
38
 
39
39
  # All Expedited Commitments have the same acceptance date
40
- effective_acceptance_date = Time.parse(expedited_commitment_nodes.at('EAD').text)
40
+ # However, sometimes that date is invalid.
41
+ effective_acceptance_date = [
42
+ Time.parse(expedited_commitment_nodes.at('EAD').text),
43
+ Time.parse(expedited_commitment_nodes.document.at('AcceptDate').text)
44
+ ].max
41
45
  expedited_commitment_nodes.xpath('Commitment').map do |commitment_node|
42
46
  shipping_method = SHIPPING_METHODS.detect do |potential_shipping_method|
43
47
  potential_shipping_method.name == MAIL_CLASSES[commitment_node.at('MailClass').text]
@@ -10,10 +10,10 @@ module FriendlyShipping
10
10
 
11
11
  class << self
12
12
  # @param [Physical::Shipment] shipment The shipment we want to get rates for
13
- # shipment.packages[0].properties[:box_code] Can be :rectangular, :variable,
13
+ # shipment.packages[0].properties[:box_name] Can be :rectangular, :variable,
14
14
  # or a flat rate container defined in CONTAINERS.
15
15
  # @param [String] login The USPS login code
16
- # @param [FriendlyShipping::ShippingMethod] service The shipping methods we want to get rates
16
+ # @param [FriendlyShipping::ShippingMethod] shipping_method The shipping method we want to get rates
17
17
  # for. If empty, we get all of them
18
18
  # @return Array<[FriendlyShipping::Rate]> A set of Rates that this package may be sent with
19
19
  def call(shipment:, login:, shipping_method: nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FriendlyShipping
4
- VERSION = "0.4.13"
4
+ VERSION = "0.4.14"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: friendly_shipping
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-18 00:00:00.000000000 Z
11
+ date: 2020-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: data_uri
@@ -108,6 +108,48 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: dotenv
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: factory_bot
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '5.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '5.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pry
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
111
153
  - !ruby/object:Gem::Dependency
112
154
  name: rake
113
155
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +178,76 @@ dependencies:
136
178
  - - "~>"
137
179
  - !ruby/object:Gem::Version
138
180
  version: '3.0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rspec_junit_formatter
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '0.4'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '0.4'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: simplecov
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: vcr
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: webmock
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
139
251
  description: Allows you to quote or ship a Physical::Shipment object
140
252
  email:
141
253
  - mamhoff@gmail.com