solidus_avatax_certified 2.0.0 → 3.0.0

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
  SHA1:
3
- metadata.gz: 2ba6379569acf61b06167ab217fbb1eca5e472c0
4
- data.tar.gz: b32a50a24a6fad7b76e36f9de281f602a27e7463
3
+ metadata.gz: 5b407d1d1459d4a007f6a0a7b84df7c6c420dfad
4
+ data.tar.gz: df24b1e69eeb5772f1cb25249c6222db2ac368f2
5
5
  SHA512:
6
- metadata.gz: bc1fd526badf9ece163b015df8368f862094da9f505e107e1ea37e731e914f2780d0b65fad326e59b48631da32c44a35d11935b8ffef3b287c025fbebf30cd8d
7
- data.tar.gz: d638aa46c762ad2b656f785d3df01f1068ef090bf3bbe7d6b213820ce27c162ef538fe8566c1fe2b305e6e0dc0f29fb0b657174cdf52b770e8a0cf35ee9dc228
6
+ metadata.gz: 9cf57a151ae1e1d9f0f309bbb327387933ad3f3caf4cc9ab1c46df49dde076957a7bc5e45d21a01fdb27770e9e1de578e061935c64e9a81c37a52b87eafebc34
7
+ data.tar.gz: 95b5fd1b3d0f3acd47284a32f7d6f2ee27edfacefce615db20066dde455cf2500d982656aaff16391468d4eacf92154037d50feb9716fbf80ec0336d231f7bb3
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- branch = 'v2.1'
3
+ branch = 'master'
4
4
  gem "solidus", github: "solidusio/solidus", branch: branch
5
5
  gem "solidus_auth_devise", github: "solidusio/solidus_auth_devise"
6
6
 
@@ -13,7 +13,4 @@ gem "rails-controller-testing", group: :test
13
13
  gem 'pg'
14
14
  gem 'mysql2'
15
15
 
16
- gem 'pg'
17
- gem 'mysql2'
18
-
19
16
  gemspec
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/boomerdigital/solidus_avatax_certified.svg?branch=master)](https://travis-ci.org/boomerdigital/solidus_avatax_certified)
1
+ [![Build Status](https://travis-ci.org/boomerdigital/solidus_avatax_certified.svg?branch=v2.1)](https://travis-ci.org/boomerdigital/solidus_avatax_certified)
2
2
 
3
3
  SolidusAvataxCertified
4
4
  ===========
@@ -13,10 +13,17 @@ From Avalara's own explanation of the certification program:
13
13
 
14
14
  > Avalara’s partners who have created certified integrations for AvaTax have demonstrated that those integrations contain elements which are essential to providing customers with easy-to-use software that gives accurate sales tax calculations. The certification criteria used to demonstrate these elements are based on Avalara’s years of experience integrating into ERP, ecommerce and point-of-sale applications.
15
15
 
16
+ **[For Installation and Setup instructions, please visit our wiki.](https://github.com/boomerdigital/solidus_avatax_certified/wiki)**
16
17
 
17
- **For Solidus versions v2.1 and up, please use branch v2.1**
18
+ Version Compatibility Chart
19
+ ---------------------------
20
+
21
+ | Solidus Version | Avatax Branch | Latest Avatax Version |
22
+ |:---------------:|:-------------:|:---------------------:|
23
+ | v1.0 - v2.0 | v1.0-v2.0 | 1.1.0 |
24
+ | v2.1 - v2.2 | master | 2.0.0 |
25
+ | v2.3 | v2.3 | 3.0.0 |
18
26
 
19
- **[For Installation and Setup instructions, please visit our wiki.](https://github.com/boomerdigital/solidus_avatax_certified/wiki)**
20
27
 
21
28
  Testing
22
29
  -------
@@ -37,7 +37,7 @@ AddressValidator.prototype = {
37
37
 
38
38
  $.each(["Line1", "Line2", "City", "PostalCode"], function(index, value){
39
39
  var keyVal = controller.getKeyByValue(value);
40
- $(wrapper + " input[id*='" + keyVal + "']").val(data.result.Address[value]);
40
+ $(wrapper + " input[id*='" + keyVal + "']").val(data.Address[value]);
41
41
  }.bind(address));
42
42
 
43
43
  this.showFlash(data);
@@ -39,7 +39,7 @@ AddressValidator.prototype = {
39
39
 
40
40
  $.each(["Line1", "Line2", "City", "PostalCode"], function(index, value){
41
41
  var keyVal = controller.getKeyByValue(value);
42
- $(wrapper + " input[id*='" + keyVal + "']").val(data.result.Address[value]);
42
+ $(wrapper + " input[id*='" + keyVal + "']").val(data.Address[value]);
43
43
  }.bind(address));
44
44
 
45
45
  this.showFlash(data);
@@ -1,4 +1,5 @@
1
1
  Spree::Adjustment.class_eval do
2
+
2
3
  def avatax_cache_key
3
4
  key = ['Spree::Adjustment']
4
5
  key << self.id
@@ -59,7 +59,7 @@ module Spree
59
59
 
60
60
  def long_cache_key(order)
61
61
  key = order.avatax_cache_key
62
- key << (order.ship_address.try(:cache_key) || order.bill_address.try(:cache_key)).to_s
62
+ key << order.tax_address.try(:cache_key)
63
63
  order.line_items.each do |line_item|
64
64
  key << line_item.avatax_cache_key
65
65
  end
@@ -142,7 +142,6 @@ class TaxSvc
142
142
  JSON.parse(res)
143
143
  rescue => e
144
144
  logger.error(e, 'RestClient')
145
- e
146
145
  end
147
146
  end
148
147
 
@@ -1,3 +1,3 @@
1
1
  module SolidusAvataxCertified
2
- VERSION = '2.0.0'
2
+ VERSION = '3.0.0'
3
3
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.require_path = "lib"
22
22
  s.requirements << "none"
23
23
 
24
- s.add_dependency "solidus_core", [">= 2.1.0", "< 2.3.0"]
24
+ s.add_dependency "solidus_core", [">= 2.3.0.alpha", "< 3.0.0"]
25
25
  s.add_dependency "json", "~> 1.8"
26
26
  s.add_dependency "addressable", "~> 2.4"
27
27
  s.add_dependency "rest-client", "~> 1.7"
@@ -25,9 +25,9 @@ FactoryGirl.define do
25
25
  create(:global_zone, default_tax: true)
26
26
  end
27
27
  if Spree::TaxCategory.first.nil?
28
- create(:clothing_tax_rate, tax_category: create(:tax_category), included_in_price: evaluator.tax_included)
28
+ create(:clothing_tax_rate, tax_categories: [create(:tax_category)], included_in_price: evaluator.tax_included)
29
29
  else
30
- create(:clothing_tax_rate, tax_category: Spree::TaxCategory.first, included_in_price: evaluator.tax_included)
30
+ create(:clothing_tax_rate, tax_categories: [Spree::TaxCategory.first], included_in_price: evaluator.tax_included)
31
31
  end
32
32
  end
33
33
 
@@ -14,7 +14,7 @@ FactoryGirl.define do
14
14
  create(:country)
15
15
  end
16
16
  shipping_tax_rate = create(:shipping_tax_rate, included_in_price: evaluator.tax_included)
17
- shipping_method.tax_category = shipping_tax_rate.tax_category
17
+ shipping_method.tax_category = shipping_tax_rate.tax_categories.first
18
18
  if shipping_method.shipping_categories.empty?
19
19
  shipping_method.shipping_categories << (Spree::ShippingCategory.first || create(:shipping_category))
20
20
  end
@@ -2,7 +2,7 @@ FactoryGirl.define do
2
2
  factory :clothing_tax_rate, class: Spree::TaxRate do
3
3
  name 'Tax'
4
4
  amount 0.0
5
- tax_category { Spree::TaxCategory.find_by(tax_code: 'PC030000') || create(:tax_category) }
5
+ tax_categories {[ Spree::TaxCategory.find_by(tax_code: 'PC030000') || create(:tax_category) ]}
6
6
  association(:calculator, factory: :avalara_transaction_calculator)
7
7
  zone { Spree::Zone.find_or_create_by(name: 'GlobalZone') }
8
8
  show_rate_in_label false
@@ -11,7 +11,7 @@ FactoryGirl.define do
11
11
  factory :shipping_tax_rate, class: Spree::TaxRate do
12
12
  name 'Shipping Tax'
13
13
  amount 0.0
14
- tax_category { Spree::TaxCategory.find_by(tax_code: 'FR000000') || create(:tax_category, tax_code: 'FR000000') }
14
+ tax_categories {[ Spree::TaxCategory.find_by(tax_code: 'FR000000') || create(:tax_category, tax_code: 'FR000000') ]}
15
15
  association(:calculator, factory: :avalara_transaction_calculator)
16
16
  zone { Spree::Zone.find_or_create_by(name: 'GlobalZone') }
17
17
  show_rate_in_label false
@@ -114,7 +114,7 @@ describe Spree::AvalaraTransaction, :vcr do
114
114
  end
115
115
 
116
116
  subject do
117
- VCR.use_cassette('capture_with_customer_usage_type', allow_playback_repeats: true) do
117
+ VCR.use_cassette('capture_with_customer_usage_type') do
118
118
  order.avalara_transaction.commit_avatax('SalesInvoice')
119
119
  end
120
120
  end
@@ -15,7 +15,7 @@ describe Spree::Order, :vcr do
15
15
 
16
16
  describe '#cancel_avalara' do
17
17
  subject do
18
- VCR.use_cassette('order_cancel', allow_playback_repeats: true) do
18
+ VCR.use_cassette("order_cancel") do
19
19
  avalara_order.avalara_capture_finalize
20
20
  avalara_order.cancel_avalara
21
21
  end
@@ -54,7 +54,7 @@ describe Spree::Refund, :vcr do
54
54
 
55
55
  describe '#avalara_capture_finalize' do
56
56
  subject do
57
- VCR.use_cassette('order_return_capture', allow_playback_repeats: true) do
57
+ VCR.use_cassette('order_return_capture') do
58
58
  refund.save
59
59
  end
60
60
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Spree::ShippingRate, type: :model do
4
4
  let!(:shipping_tax_category) { create(:tax_category, name: 'Shipping', tax_code: 'FR000000') }
5
5
  let!(:zone) { create(:zone, name: 'North America', default_tax: true, zone_members: []) }
6
- let!(:tax_rate) { create(:tax_rate, tax_category: shipping_tax_category, amount: 0.00, included_in_price: false, zone: zone) }
6
+ let!(:tax_rate) { create(:tax_rate, tax_categories: [shipping_tax_category], amount: 0.00, included_in_price: false, zone: zone) }
7
7
 
8
8
  let(:shipment) { build(:shipment) }
9
9
  let(:shipping_method) { build(:shipping_method) }
@@ -70,7 +70,7 @@ RSpec.configure do |config|
70
70
  DatabaseCleaner.clean_with :truncation
71
71
  end
72
72
 
73
- config.before :each do
73
+ config.before :each do |example|
74
74
  DatabaseCleaner.strategy = :truncation
75
75
  DatabaseCleaner.start
76
76
  MyConfigPreferences.set_preferences
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_avatax_certified
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allison Reilly
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.1.0
19
+ version: 2.3.0.alpha
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 2.3.0
22
+ version: 3.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 2.1.0
29
+ version: 2.3.0.alpha
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 2.3.0
32
+ version: 3.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: json
35
35
  requirement: !ruby/object:Gem::Requirement