friendly_shipping 0.4.9 → 0.4.10

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: c7315eaa32f0429125e0c992d06d2093d324416e0bf36ac79bb5e2a0d1fc7135
4
- data.tar.gz: e7a15a667a37321ff006da9c5f2d3478bf9f3089a35ae84db4227a775178438c
3
+ metadata.gz: 8c75e81bbcef45d76dadd8e02683a43797c06f88712adb09fd5f185219364c83
4
+ data.tar.gz: 6c0aa8348d4468c564a35026afed777041f42ffc905f21a6559df363d5784ea5
5
5
  SHA512:
6
- metadata.gz: f460abf860b45f6079d364a770f1035778ecc0c5d98dcf5409c5a9f4b244326d954dad6ee3d881927470dbcde089114e767fed5a1e884d56133c419af77e9e8d
7
- data.tar.gz: b0e92858e9922f8f85b1f93d22d9b5cc13c5af55f864acc6d6e30caddae110b6a65f73c840b12129c1bd34ba65f67f195dcbf0bc756ead50dbd429cc8e184871
6
+ metadata.gz: a46dae2ab3fb93a90e0d2d8d97a70a0fa0147b700662de40d3e31ce84856634e744d8531b3d75ff4559b8a5eb759a419af41165172440b4eb8238a7935a075c1
7
+ data.tar.gz: b2316af744ca94fae7db521cf7dc52899acb726e3b4803440928b9ba516fc53e3284043d9e7114893d09ff58fa24b786ab99896ab7b67a169fc14212e6dc0d41
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ 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.10] - 2020-01-10
8
+
9
+ ### Changed
10
+ - USPS Service: Gracefully handle missing timing estimates for Alaska/Hawaii (#70)
11
+
7
12
  ## [0.4.9] - 2020-01-09
8
13
 
9
14
  ### Changed
@@ -67,12 +67,17 @@ module FriendlyShipping
67
67
  # We cannot find a shipping method for Mail Classes 4 and 5 because USPS' docs are not clear
68
68
  next unless shipping_method
69
69
 
70
+ warning_text = commitment_node.xpath('HFPU//NonExpeditedTransMsg/Msg')&.text
71
+ warning = warning_text unless warning_text.empty?
72
+
70
73
  properties = {
71
- commitment: commitment_node.at('SvcStdMsg').text,
72
- destination_type: NON_EXPEDITED_DESTINATION_TYPES[commitment_node.at('NonExpeditedDestType').text]
73
- }
74
- scheduled_delivery_date = commitment_node.at('SchedDlvryDate').text
75
- parsed_delivery_time = Time.parse(scheduled_delivery_date)
74
+ commitment: commitment_node.at('SvcStdMsg')&.text,
75
+ destination_type: NON_EXPEDITED_DESTINATION_TYPES[commitment_node.at('NonExpeditedDestType').text],
76
+ warning: warning
77
+ }.compact
78
+
79
+ scheduled_delivery_date = commitment_node.at('SchedDlvryDate')&.text
80
+ parsed_delivery_time = Time.parse(scheduled_delivery_date) if scheduled_delivery_date
76
81
  effective_acceptance_date = Time.parse(commitment_node.at('EAD').text)
77
82
 
78
83
  FriendlyShipping::Timing.new(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FriendlyShipping
4
- VERSION = "0.4.9"
4
+ VERSION = "0.4.10"
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.9
4
+ version: 0.4.10
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-09 00:00:00.000000000 Z
11
+ date: 2020-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: data_uri