solidus_easypost 1.0.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +35 -0
- data/.gem_release.yml +5 -0
- data/.github/stale.yml +17 -0
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +71 -0
- data/Gemfile +33 -0
- data/LICENSE +26 -0
- data/README.md +104 -0
- data/Rakefile +6 -0
- data/app/decorators/models/solidus_easypost/spree/address_decorator.rb +30 -0
- data/app/decorators/models/solidus_easypost/spree/shipment_decorator.rb +52 -0
- data/app/decorators/models/solidus_easypost/spree/shipping_rate_decorator.rb +13 -0
- data/app/decorators/models/solidus_easypost/spree/stock/estimator_decorator.rb +15 -0
- data/app/decorators/models/solidus_easypost/spree/stock/package_decorator.rb +27 -0
- data/app/decorators/models/solidus_easypost/spree/stock_location_decorator.rb +26 -0
- data/app/models/solidus_easypost/estimator.rb +51 -0
- data/app/models/solidus_easypost/return_authorization.rb +38 -0
- data/bin/console +17 -0
- data/bin/rails +8 -0
- data/bin/rails-engine +15 -0
- data/bin/rails-sandbox +17 -0
- data/bin/rake +7 -0
- data/bin/sandbox +84 -0
- data/bin/setup +8 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +5 -0
- data/db/migrate/20140515024440_add_easy_post_fields_to_shipping_rate.rb +9 -0
- data/lib/generators/solidus_easypost/install/install_generator.rb +22 -0
- data/lib/solidus_easypost.rb +21 -0
- data/lib/solidus_easypost/configuration.rb +11 -0
- data/lib/solidus_easypost/engine.rb +19 -0
- data/lib/solidus_easypost/factories.rb +24 -0
- data/lib/solidus_easypost/version.rb +5 -0
- data/solidus_easypost.gemspec +38 -0
- data/spec/cassettes/SolidusEasypost_ReturnAuthorization/_easypost_shipment/is_an_EasyPost_Shipment_object.yml +271 -0
- data/spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/has_the_correct_fields.yml +336 -0
- data/spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/is_an_EasyPost_PackageLabel_object.yml +336 -0
- data/spec/cassettes/Spree_Address/_easypost_address/has_the_correct_attributes.yml +69 -0
- data/spec/cassettes/Spree_Address/_easypost_address/is_an_EasyPost_Address_object.yml +69 -0
- data/spec/cassettes/Spree_Order/_refresh_shipment_rates/can_get_rates_from_easy_post.yml +271 -0
- data/spec/cassettes/Spree_Order/_refresh_shipment_rates/create_shipping_methods_for_the_rates.yml +269 -0
- data/spec/cassettes/Spree_Shipment/_buys_a_shipping_rate_after_transitioning_to_ship.yml +403 -0
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml +271 -0
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/calls_the_api.yml +200 -0
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml +334 -0
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/loads_the_existing_shipment.yml +271 -0
- data/spec/cassettes/Spree_StockLocation/_easypost_address/has_the_correct_attributes.yml +69 -0
- data/spec/cassettes/Spree_StockLocation/_easypost_address/is_an_EasyPost_Address_object.yml +69 -0
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/creates_new_shipping_methods.yml +269 -0
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/is_empty.yml +269 -0
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/create_no_new_shipping_methods.yml +269 -0
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_costs.yml +269 -0
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_names.yml +269 -0
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_not_front_end_visible/is_empty.yml +269 -0
- data/spec/cassettes/Spree_Stock_Package/_easypost_parcel/has_the_correct_attributes.yml +68 -0
- data/spec/cassettes/Spree_Stock_Package/_easypost_parcel/is_an_EasyPost_Parcel_object.yml +68 -0
- data/spec/cassettes/Spree_Stock_Package/_easypost_shipment/calls_the_api.yml +200 -0
- data/spec/cassettes/Spree_Stock_Package/_easypost_shipment/is_an_EasyPost_Shipment_object.yml +269 -0
- data/spec/factories/spree_modification.rb +25 -0
- data/spec/models/solidus_easypost/return_authorization_spec.rb +50 -0
- data/spec/models/spree/address_spec.rb +31 -0
- data/spec/models/spree/order_spec.rb +31 -0
- data/spec/models/spree/shipment_spec.rb +80 -0
- data/spec/models/spree/shipping_rate_spec.rb +16 -0
- data/spec/models/spree/stock/estimator_spec.rb +80 -0
- data/spec/models/spree/stock/package_spec.rb +35 -0
- data/spec/models/spree/stock_location_spec.rb +31 -0
- data/spec/solidus_easypost_spec.rb +19 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/support/easypost.rb +3 -0
- data/spec/support/factory_bot.rb +3 -0
- data/spec/support/shipping_method_helpers.rb +43 -0
- data/spec/support/vcr.rb +11 -0
- metadata +145 -170
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Spree::ShippingRate, :vcr do
|
6
|
+
let(:rate) { described_class.new name: name }
|
7
|
+
let(:name) { 'SuperAwesomeCool' }
|
8
|
+
|
9
|
+
describe '#name' do
|
10
|
+
subject { rate.name }
|
11
|
+
|
12
|
+
it 'has the right name' do
|
13
|
+
expect(subject).to eq(name)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Spree::Stock::Estimator, :vcr do
|
6
|
+
if Spree.solidus_gem_version < Gem::Version.new("1.3")
|
7
|
+
let(:estimator) { described_class.new(shipment.order) }
|
8
|
+
else
|
9
|
+
let(:estimator) { described_class.new }
|
10
|
+
end
|
11
|
+
|
12
|
+
let!(:shipment) { create :shipment }
|
13
|
+
let(:package) { shipment.to_package }
|
14
|
+
|
15
|
+
describe '#shipping_rates' do
|
16
|
+
subject { estimator.shipping_rates package }
|
17
|
+
|
18
|
+
context 'when rates are found' do
|
19
|
+
context 'when shipping methods exist' do
|
20
|
+
before { create_shipping_methods }
|
21
|
+
|
22
|
+
it 'create no new shipping methods' do
|
23
|
+
expect { subject }.not_to change(Spree::ShippingMethod, :count)
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'when shipping methods are front end visible' do
|
27
|
+
let(:rate_names) { ["USPS Express", "USPS First", "USPS ParcelSelect", "USPS Priority"] }
|
28
|
+
let(:rate_costs) { [3.82, 6.85, 6.95, 22.74] }
|
29
|
+
|
30
|
+
it 'has the correct names' do
|
31
|
+
names = subject.map(&:name).sort
|
32
|
+
expect(names).to eq rate_names
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'has the correct costs' do
|
36
|
+
costs = subject.map(&:cost).sort
|
37
|
+
expect(costs).to eq rate_costs
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'when shipping methods are not front end visible' do
|
42
|
+
before { Spree::ShippingMethod.find_each { |x| x.update!(available_to_users: false) } }
|
43
|
+
|
44
|
+
it 'is empty' do
|
45
|
+
expect(subject).to be_empty
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context 'when shipping methods dont exist' do
|
51
|
+
# new shipping methods are backend only
|
52
|
+
it 'is empty' do
|
53
|
+
expect(subject).to be_empty
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'creates new shipping methods' do
|
57
|
+
expect { subject }.to change { Spree::ShippingMethod.count }.by 4
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'when no rates are found' do
|
63
|
+
let(:package) do
|
64
|
+
instance_double(Spree::Stock::Package, easypost_shipment: fake_shipment)
|
65
|
+
end
|
66
|
+
|
67
|
+
let(:fake_shipment) do
|
68
|
+
double(EasyPost::Shipment, rates: [])
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'is empty' do
|
72
|
+
expect(subject).to be_empty
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'create no new shipping methods' do
|
76
|
+
expect { subject }.not_to change(Spree::ShippingMethod, :count)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Spree::Stock::Package, :vcr do
|
6
|
+
let(:package) { create(:shipment).to_package }
|
7
|
+
|
8
|
+
describe '#easypost_parcel' do
|
9
|
+
subject { package.easypost_parcel }
|
10
|
+
|
11
|
+
it 'is an EasyPost::Parcel object' do
|
12
|
+
expect(subject).to be_a(EasyPost::Parcel)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'has the correct attributes' do
|
16
|
+
expect(subject).to have_attributes(
|
17
|
+
object: 'Parcel',
|
18
|
+
weight: 10.0
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#easypost_shipment' do
|
24
|
+
subject { package.easypost_shipment }
|
25
|
+
|
26
|
+
it 'is an EasyPost::Shipment object' do
|
27
|
+
expect(subject).to be_a(EasyPost::Shipment)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'calls the api' do
|
31
|
+
expect(EasyPost::Shipment).to receive(:create).with(anything)
|
32
|
+
subject
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Spree::StockLocation, :vcr do
|
6
|
+
let(:stock_location) { create :stock_location }
|
7
|
+
|
8
|
+
describe '#easypost_address' do
|
9
|
+
subject { stock_location.easypost_address }
|
10
|
+
|
11
|
+
it 'is an EasyPost::Address object' do
|
12
|
+
expect(subject).to be_a(EasyPost::Address)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'has the correct attributes' do
|
16
|
+
# combination of original address factory from easy post
|
17
|
+
# and the spree_modification factories
|
18
|
+
expect(subject).to have_attributes(
|
19
|
+
name: 'NY Warehouse',
|
20
|
+
company: 'NY Warehouse',
|
21
|
+
street1: '131 S 8th Ave',
|
22
|
+
street2: nil,
|
23
|
+
city: 'Manville',
|
24
|
+
state: 'NJ',
|
25
|
+
zip: '08835',
|
26
|
+
country: 'US',
|
27
|
+
phone: '2024561111'
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe SolidusEasypost do
|
6
|
+
describe '.configuration' do
|
7
|
+
it 'returns the configuration' do
|
8
|
+
expect(described_class.configuration).to be_instance_of(SolidusEasypost::Configuration)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '.configure' do
|
13
|
+
it 'yields the configuration' do
|
14
|
+
expect { |b| described_class.configure(&b) }.to yield_with_args(
|
15
|
+
an_instance_of(SolidusEasypost::Configuration),
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Configure Rails Environment
|
4
|
+
ENV['RAILS_ENV'] = 'test'
|
5
|
+
|
6
|
+
# Run Coverage report
|
7
|
+
require 'solidus_dev_support/rspec/coverage'
|
8
|
+
|
9
|
+
require(File.expand_path('dummy/config/environment.rb', __dir__).tap { |file|
|
10
|
+
# Create the dummy app if it's still missing.
|
11
|
+
system 'bin/rake extension:test_app' unless File.exist? file
|
12
|
+
})
|
13
|
+
|
14
|
+
# Requires factories and other useful helpers defined in spree_core.
|
15
|
+
require 'solidus_dev_support/rspec/feature_helper'
|
16
|
+
|
17
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
18
|
+
# in spec/support/ and its subdirectories.
|
19
|
+
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
20
|
+
|
21
|
+
# Requires factories defined in lib/solidus_easypost/factories.rb
|
22
|
+
require 'solidus_easypost/factories'
|
23
|
+
|
24
|
+
RSpec.configure do |config|
|
25
|
+
config.infer_spec_type_from_file_location!
|
26
|
+
config.use_transactional_fixtures = false
|
27
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ShippingMethodHelpers
|
4
|
+
FIXTURE_PARAMS = [
|
5
|
+
{
|
6
|
+
name: "USPS First",
|
7
|
+
available_to_users: true,
|
8
|
+
admin_name: "USPS First",
|
9
|
+
code: "First"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
name: "USPS Priority",
|
13
|
+
available_to_users: true,
|
14
|
+
admin_name: "USPS Priority",
|
15
|
+
code: "Priority"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
name: "USPS ParcelSelect",
|
19
|
+
available_to_users: true,
|
20
|
+
admin_name: "USPS ParcelSelect",
|
21
|
+
code: "ParcelSelect"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
name: "USPS Express",
|
25
|
+
available_to_users: true,
|
26
|
+
admin_name: "USPS Express",
|
27
|
+
code: "Express"
|
28
|
+
}
|
29
|
+
].freeze
|
30
|
+
|
31
|
+
def create_shipping_methods
|
32
|
+
shipping_category = create :shipping_category
|
33
|
+
FIXTURE_PARAMS.each do |params|
|
34
|
+
params[:calculator] = Spree::Calculator::Shipping::FlatRate.new
|
35
|
+
params[:shipping_categories] = [shipping_category]
|
36
|
+
Spree::ShippingMethod.create! params
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
RSpec.configure do |config|
|
42
|
+
config.include ShippingMethodHelpers
|
43
|
+
end
|
data/spec/support/vcr.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'vcr'
|
4
|
+
require 'webmock/rspec'
|
5
|
+
|
6
|
+
VCR.configure do |config|
|
7
|
+
config.cassette_library_dir = 'spec/cassettes'
|
8
|
+
config.hook_into :webmock
|
9
|
+
config.configure_rspec_metadata!
|
10
|
+
config.default_cassette_options = { record: :none }
|
11
|
+
end
|
metadata
CHANGED
@@ -1,49 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brendan Deere
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: solidus
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.1'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 3.x
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.1'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 3.x
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: solidus_support
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 0.1.1
|
40
|
-
type: :runtime
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 0.1.1
|
47
13
|
- !ruby/object:Gem::Dependency
|
48
14
|
name: easypost
|
49
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,147 +25,41 @@ dependencies:
|
|
59
25
|
- !ruby/object:Gem::Version
|
60
26
|
version: '0'
|
61
27
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '2.1'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '2.1'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: coffee-rails
|
28
|
+
name: solidus_core
|
77
29
|
requirement: !ruby/object:Gem::Requirement
|
78
30
|
requirements:
|
79
31
|
- - ">="
|
80
32
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
82
|
-
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: database_cleaner
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
33
|
+
version: 2.0.0
|
34
|
+
- - "<"
|
94
35
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
96
|
-
type: :
|
36
|
+
version: '3'
|
37
|
+
type: :runtime
|
97
38
|
prerelease: false
|
98
39
|
version_requirements: !ruby/object:Gem::Requirement
|
99
40
|
requirements:
|
100
41
|
- - ">="
|
101
42
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
43
|
+
version: 2.0.0
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3'
|
103
47
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
48
|
+
name: solidus_support
|
105
49
|
requirement: !ruby/object:Gem::Requirement
|
106
50
|
requirements:
|
107
51
|
- - "~>"
|
108
52
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
110
|
-
type: :
|
53
|
+
version: '0.5'
|
54
|
+
type: :runtime
|
111
55
|
prerelease: false
|
112
56
|
version_requirements: !ruby/object:Gem::Requirement
|
113
57
|
requirements:
|
114
58
|
- - "~>"
|
115
59
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
60
|
+
version: '0.5'
|
117
61
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - ">="
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - ">="
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '0'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: rspec-rails
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - ">="
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: sass-rails
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - ">="
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - ">="
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: selenium-webdriver
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - ">="
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - ">="
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: simplecov
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - ">="
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '0'
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - ">="
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '0'
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: sqlite3
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - ">="
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '0'
|
194
|
-
type: :development
|
195
|
-
prerelease: false
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - ">="
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '0'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: pry
|
62
|
+
name: solidus_dev_support
|
203
63
|
requirement: !ruby/object:Gem::Requirement
|
204
64
|
requirements:
|
205
65
|
- - ">="
|
@@ -245,29 +105,144 @@ email: brendan@stembolt.com
|
|
245
105
|
executables: []
|
246
106
|
extensions: []
|
247
107
|
extra_rdoc_files: []
|
248
|
-
files:
|
108
|
+
files:
|
109
|
+
- ".circleci/config.yml"
|
110
|
+
- ".gem_release.yml"
|
111
|
+
- ".github/stale.yml"
|
112
|
+
- ".gitignore"
|
113
|
+
- ".rspec"
|
114
|
+
- ".rubocop.yml"
|
115
|
+
- ".rubocop_todo.yml"
|
116
|
+
- Gemfile
|
117
|
+
- LICENSE
|
118
|
+
- README.md
|
119
|
+
- Rakefile
|
120
|
+
- app/decorators/models/solidus_easypost/spree/address_decorator.rb
|
121
|
+
- app/decorators/models/solidus_easypost/spree/shipment_decorator.rb
|
122
|
+
- app/decorators/models/solidus_easypost/spree/shipping_rate_decorator.rb
|
123
|
+
- app/decorators/models/solidus_easypost/spree/stock/estimator_decorator.rb
|
124
|
+
- app/decorators/models/solidus_easypost/spree/stock/package_decorator.rb
|
125
|
+
- app/decorators/models/solidus_easypost/spree/stock_location_decorator.rb
|
126
|
+
- app/models/solidus_easypost/estimator.rb
|
127
|
+
- app/models/solidus_easypost/return_authorization.rb
|
128
|
+
- bin/console
|
129
|
+
- bin/rails
|
130
|
+
- bin/rails-engine
|
131
|
+
- bin/rails-sandbox
|
132
|
+
- bin/rake
|
133
|
+
- bin/sandbox
|
134
|
+
- bin/setup
|
135
|
+
- config/locales/en.yml
|
136
|
+
- config/routes.rb
|
137
|
+
- db/migrate/20140515024440_add_easy_post_fields_to_shipping_rate.rb
|
138
|
+
- lib/generators/solidus_easypost/install/install_generator.rb
|
139
|
+
- lib/solidus_easypost.rb
|
140
|
+
- lib/solidus_easypost/configuration.rb
|
141
|
+
- lib/solidus_easypost/engine.rb
|
142
|
+
- lib/solidus_easypost/factories.rb
|
143
|
+
- lib/solidus_easypost/version.rb
|
144
|
+
- solidus_easypost.gemspec
|
145
|
+
- spec/cassettes/SolidusEasypost_ReturnAuthorization/_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
146
|
+
- spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/has_the_correct_fields.yml
|
147
|
+
- spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/is_an_EasyPost_PackageLabel_object.yml
|
148
|
+
- spec/cassettes/Spree_Address/_easypost_address/has_the_correct_attributes.yml
|
149
|
+
- spec/cassettes/Spree_Address/_easypost_address/is_an_EasyPost_Address_object.yml
|
150
|
+
- spec/cassettes/Spree_Order/_refresh_shipment_rates/can_get_rates_from_easy_post.yml
|
151
|
+
- spec/cassettes/Spree_Order/_refresh_shipment_rates/create_shipping_methods_for_the_rates.yml
|
152
|
+
- spec/cassettes/Spree_Shipment/_buys_a_shipping_rate_after_transitioning_to_ship.yml
|
153
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
154
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/calls_the_api.yml
|
155
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
156
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/loads_the_existing_shipment.yml
|
157
|
+
- spec/cassettes/Spree_StockLocation/_easypost_address/has_the_correct_attributes.yml
|
158
|
+
- spec/cassettes/Spree_StockLocation/_easypost_address/is_an_EasyPost_Address_object.yml
|
159
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/creates_new_shipping_methods.yml
|
160
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/is_empty.yml
|
161
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/create_no_new_shipping_methods.yml
|
162
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_costs.yml
|
163
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_names.yml
|
164
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_not_front_end_visible/is_empty.yml
|
165
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_parcel/has_the_correct_attributes.yml
|
166
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_parcel/is_an_EasyPost_Parcel_object.yml
|
167
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_shipment/calls_the_api.yml
|
168
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
169
|
+
- spec/factories/spree_modification.rb
|
170
|
+
- spec/models/solidus_easypost/return_authorization_spec.rb
|
171
|
+
- spec/models/spree/address_spec.rb
|
172
|
+
- spec/models/spree/order_spec.rb
|
173
|
+
- spec/models/spree/shipment_spec.rb
|
174
|
+
- spec/models/spree/shipping_rate_spec.rb
|
175
|
+
- spec/models/spree/stock/estimator_spec.rb
|
176
|
+
- spec/models/spree/stock/package_spec.rb
|
177
|
+
- spec/models/spree/stock_location_spec.rb
|
178
|
+
- spec/solidus_easypost_spec.rb
|
179
|
+
- spec/spec_helper.rb
|
180
|
+
- spec/support/easypost.rb
|
181
|
+
- spec/support/factory_bot.rb
|
182
|
+
- spec/support/shipping_method_helpers.rb
|
183
|
+
- spec/support/vcr.rb
|
249
184
|
homepage: https://github.com/solidusio-contrib/solidus_easypost
|
250
|
-
licenses:
|
251
|
-
|
252
|
-
|
185
|
+
licenses:
|
186
|
+
- BSD-3-Clause
|
187
|
+
metadata:
|
188
|
+
homepage_uri: https://github.com/solidusio-contrib/solidus_easypost
|
189
|
+
source_code_uri: https://github.com/solidusio-contrib/solidus_easypost
|
190
|
+
post_install_message:
|
253
191
|
rdoc_options: []
|
254
192
|
require_paths:
|
255
193
|
- lib
|
256
194
|
required_ruby_version: !ruby/object:Gem::Requirement
|
257
195
|
requirements:
|
258
|
-
- - "
|
196
|
+
- - "~>"
|
259
197
|
- !ruby/object:Gem::Version
|
260
|
-
version: 2.
|
198
|
+
version: '2.5'
|
261
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
262
200
|
requirements:
|
263
201
|
- - ">="
|
264
202
|
- !ruby/object:Gem::Version
|
265
203
|
version: '0'
|
266
|
-
requirements:
|
267
|
-
|
268
|
-
|
269
|
-
rubygems_version: 2.5.1
|
270
|
-
signing_key:
|
204
|
+
requirements: []
|
205
|
+
rubygems_version: 3.0.8
|
206
|
+
signing_key:
|
271
207
|
specification_version: 4
|
272
208
|
summary: Easy post integration for Solidus
|
273
|
-
test_files:
|
209
|
+
test_files:
|
210
|
+
- spec/cassettes/SolidusEasypost_ReturnAuthorization/_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
211
|
+
- spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/has_the_correct_fields.yml
|
212
|
+
- spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/is_an_EasyPost_PackageLabel_object.yml
|
213
|
+
- spec/cassettes/Spree_Address/_easypost_address/has_the_correct_attributes.yml
|
214
|
+
- spec/cassettes/Spree_Address/_easypost_address/is_an_EasyPost_Address_object.yml
|
215
|
+
- spec/cassettes/Spree_Order/_refresh_shipment_rates/can_get_rates_from_easy_post.yml
|
216
|
+
- spec/cassettes/Spree_Order/_refresh_shipment_rates/create_shipping_methods_for_the_rates.yml
|
217
|
+
- spec/cassettes/Spree_Shipment/_buys_a_shipping_rate_after_transitioning_to_ship.yml
|
218
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
219
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/calls_the_api.yml
|
220
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
221
|
+
- spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/loads_the_existing_shipment.yml
|
222
|
+
- spec/cassettes/Spree_StockLocation/_easypost_address/has_the_correct_attributes.yml
|
223
|
+
- spec/cassettes/Spree_StockLocation/_easypost_address/is_an_EasyPost_Address_object.yml
|
224
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/creates_new_shipping_methods.yml
|
225
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/is_empty.yml
|
226
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/create_no_new_shipping_methods.yml
|
227
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_costs.yml
|
228
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_names.yml
|
229
|
+
- spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_not_front_end_visible/is_empty.yml
|
230
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_parcel/has_the_correct_attributes.yml
|
231
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_parcel/is_an_EasyPost_Parcel_object.yml
|
232
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_shipment/calls_the_api.yml
|
233
|
+
- spec/cassettes/Spree_Stock_Package/_easypost_shipment/is_an_EasyPost_Shipment_object.yml
|
234
|
+
- spec/factories/spree_modification.rb
|
235
|
+
- spec/models/solidus_easypost/return_authorization_spec.rb
|
236
|
+
- spec/models/spree/address_spec.rb
|
237
|
+
- spec/models/spree/order_spec.rb
|
238
|
+
- spec/models/spree/shipment_spec.rb
|
239
|
+
- spec/models/spree/shipping_rate_spec.rb
|
240
|
+
- spec/models/spree/stock/estimator_spec.rb
|
241
|
+
- spec/models/spree/stock/package_spec.rb
|
242
|
+
- spec/models/spree/stock_location_spec.rb
|
243
|
+
- spec/solidus_easypost_spec.rb
|
244
|
+
- spec/spec_helper.rb
|
245
|
+
- spec/support/easypost.rb
|
246
|
+
- spec/support/factory_bot.rb
|
247
|
+
- spec/support/shipping_method_helpers.rb
|
248
|
+
- spec/support/vcr.rb
|