easypost 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -0
- data/VERSION +1 -1
- data/easypost.gemspec +1 -1
- data/spec/shipment_spec.rb +33 -13
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67ae6ddf6e3bdb7a926de241245aff55792b0281
|
4
|
+
data.tar.gz: 818f5cfead41f0ac5ec25214884249d232164cc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed752b2c794b8ece0f10f83ca5d554a33963bc5dbf3bf75cd1ac5f400ccd1d421f3ddbb421586d731b332c39826ffa285561d01967306a0d04cbb95eab271263
|
7
|
+
data.tar.gz: 731107bae2e07e53ef5ff2540a8df9ab59c37765976dabda1a7a2ef9094fee56855233dd849a474156f871ceab720c27af246b16a237dee08df60af754e639a3
|
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
data/easypost.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'rest-client', '
|
21
|
+
spec.add_dependency 'rest-client', '>= 1.4'
|
22
22
|
spec.add_dependency 'multi_json', '>= 1.3.0'
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
24
24
|
spec.add_development_dependency 'rake', '~> 10.0'
|
data/spec/shipment_spec.rb
CHANGED
@@ -45,22 +45,42 @@ describe EasyPost::Shipment do
|
|
45
45
|
)
|
46
46
|
expect(shipment.postage_label.label_url.length).to be > 0
|
47
47
|
end
|
48
|
-
end
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
49
|
+
it 'creates and returns a tracker with shipment purchase' do
|
50
|
+
shipment = EasyPost::Shipment.create(
|
51
|
+
:to_address => ADDRESS[:missouri],
|
52
|
+
:from_address => ADDRESS[:california],
|
53
|
+
:parcel => PARCEL[:dimensions]
|
54
|
+
)
|
55
|
+
expect(shipment).to be_an_instance_of(EasyPost::Shipment)
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
shipment.buy(
|
58
|
+
:rate => shipment.lowest_rate("usps")
|
59
|
+
)
|
60
|
+
|
61
|
+
tracker = shipment.tracker
|
62
|
+
expect(tracker.shipment_id).to eq(shipment.id)
|
63
|
+
end
|
61
64
|
|
62
|
-
|
63
|
-
|
65
|
+
it 'purchases postage when only a rate id is provided' do
|
66
|
+
shipment = EasyPost::Shipment.create(
|
67
|
+
:to_address => ADDRESS[:missouri],
|
68
|
+
:from_address => ADDRESS[:california],
|
69
|
+
:parcel => PARCEL[:dimensions]
|
70
|
+
)
|
71
|
+
expect(shipment).to be_an_instance_of(EasyPost::Shipment)
|
72
|
+
|
73
|
+
rate = shipment.rates.first
|
74
|
+
rate_hash = {id: rate.id}
|
75
|
+
|
76
|
+
shipment.buy(
|
77
|
+
:rate => rate_hash
|
78
|
+
)
|
79
|
+
|
80
|
+
expect(shipment.postage_label.label_url.length).to be > 0
|
81
|
+
tracker = shipment.tracker
|
82
|
+
expect(tracker.shipment_id).to eq(shipment.id)
|
83
|
+
end
|
64
84
|
end
|
65
85
|
|
66
86
|
describe '#insure' do
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sawyer Bateman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|