easypost 2.0.10 → 2.0.11
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.
- data/CHANGELOG +6 -0
- data/VERSION +1 -1
- data/lib/easypost/event.rb +6 -1
- data/spec/shipment_spec.rb +3 -8
- data/spec/spec_helper.rb +2 -3
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
=== 2.0.11 2013-12-16
|
2
|
+
|
3
|
+
* Added Event.receive method for parsing events sent by webhook.
|
4
|
+
* Fixed tests to account for the tracking code returning and array of details instead of a Hash
|
5
|
+
|
6
|
+
|
1
7
|
=== 2.0.10 2013-10-03
|
2
8
|
|
3
9
|
* API Addition: Event resource added for webhook consumption.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.11
|
data/lib/easypost/event.rb
CHANGED
data/spec/shipment_spec.rb
CHANGED
@@ -40,7 +40,6 @@ describe EasyPost::Shipment do
|
|
40
40
|
to_address = address_canada
|
41
41
|
from_address = address_california
|
42
42
|
expect(to_address).to be_an_instance_of(EasyPost::Address)
|
43
|
-
expect(from_address).to be_an_instance_of(EasyPost::Address)
|
44
43
|
|
45
44
|
parcel = parcel_dimensions
|
46
45
|
expect(parcel).to be_an_instance_of(EasyPost::Parcel)
|
@@ -65,7 +64,6 @@ describe EasyPost::Shipment do
|
|
65
64
|
it 'purchases postage for a domestic shipment' do
|
66
65
|
to_address = address_california
|
67
66
|
from_address = address_missouri
|
68
|
-
expect(to_address).to be_an_instance_of(EasyPost::Address)
|
69
67
|
expect(from_address).to be_an_instance_of(EasyPost::Address)
|
70
68
|
|
71
69
|
parcel = parcel_dimensions
|
@@ -89,7 +87,6 @@ describe EasyPost::Shipment do
|
|
89
87
|
it 'returns a stamp for a domestic shipment' do
|
90
88
|
to_address = address_california
|
91
89
|
from_address = address_missouri
|
92
|
-
expect(to_address).to be_an_instance_of(EasyPost::Address)
|
93
90
|
expect(from_address).to be_an_instance_of(EasyPost::Address)
|
94
91
|
|
95
92
|
parcel = parcel_dimensions
|
@@ -116,7 +113,6 @@ describe EasyPost::Shipment do
|
|
116
113
|
it 'returns a barcode for a domestic shipment' do
|
117
114
|
to_address = address_california
|
118
115
|
from_address = address_missouri
|
119
|
-
expect(to_address).to be_an_instance_of(EasyPost::Address)
|
120
116
|
expect(from_address).to be_an_instance_of(EasyPost::Address)
|
121
117
|
|
122
118
|
parcel = parcel_dimensions
|
@@ -163,10 +159,9 @@ describe EasyPost::Shipment do
|
|
163
159
|
:carrier => 'usps',
|
164
160
|
:tracking_code => '9499907123456123456781'
|
165
161
|
})
|
166
|
-
|
167
|
-
expect(tracking).to
|
168
|
-
expect(tracking[:
|
169
|
-
expect(tracking[:status].length).to be > 0
|
162
|
+
expect(tracking).to be_an_instance_of(Array)
|
163
|
+
expect(tracking[0][:status].length).to be > 0
|
164
|
+
expect(tracking[0][:message].length).to be > 0
|
170
165
|
end
|
171
166
|
end
|
172
167
|
|
data/spec/spec_helper.rb
CHANGED
@@ -16,7 +16,7 @@ def address_canada
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def address_california
|
19
|
-
|
19
|
+
{
|
20
20
|
:company => 'Simpler Postage Inc',
|
21
21
|
:street1 => '388 Townsend Street',
|
22
22
|
:street2 => 'Apt 20',
|
@@ -24,8 +24,7 @@ def address_california
|
|
24
24
|
:state => 'CA',
|
25
25
|
:zip => '94107',
|
26
26
|
:phone => '415-456-7890'
|
27
|
-
|
28
|
-
return address
|
27
|
+
}
|
29
28
|
end
|
30
29
|
|
31
30
|
def address_missouri
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|