spree_avatax_official 1.7.1 → 1.8.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
  SHA256:
3
- metadata.gz: c11e32278f060728b89bad98e554c869b8751b109ec0d991912160292c950440
4
- data.tar.gz: b5c21921f675f85d46fe99065eeaead6ddbfd0c580b77d35457fdefa1bb4e4a8
3
+ metadata.gz: '0951e79408bcd79f0c83b6c51992c5f00ab9a63d4506e68b8d433fe9468ea46e'
4
+ data.tar.gz: f66d29870ea80cc25f469fd46c35693d11cee832063a702e92e4527431cf286a
5
5
  SHA512:
6
- metadata.gz: 3f598d0d05a4a729b3fc7e2a0a2ae94ef166858ce7aac5c766197644589254d0cdca7aecd041b0679a8537ab9edc4c20fb38f1f7ec0d59b7229e92c62eb10fb0
7
- data.tar.gz: dc9688d27b5d809dadff25212deaed7231d1648fc4c0f7765048c92458d65f344ffb783c4f5ead8a91ad6a6cd828ce5387fc376e29d006d54c126d883ba893c2
6
+ metadata.gz: ddc6f32d43f72327de944e93fc2b25b1daa2f6303f64b05dbb095562fc42a77c0b709e0d30b5320de15625c58b7b44209f9efb881debcf86faeb853b4c80f4e1
7
+ data.tar.gz: d1a18ecb17d7405c7e9b09a316dac2c1753027ec640dcc296a422430b26933a0fc395fcb2d5357aee84b65893597cc7fcd599503b2a141c6e3cfa0d8778bc7b4
@@ -0,0 +1,84 @@
1
+ version: 2.1
2
+
3
+ jobs:
4
+ rspec:
5
+ parameters:
6
+ ruby-version:
7
+ type: string
8
+ gemfile:
9
+ type: string
10
+ database:
11
+ type: string
12
+ docker:
13
+ - image: circleci/ruby:<< parameters.ruby-version >>-node-browsers
14
+ environment:
15
+ DB: << parameters.database >>
16
+ - image: circleci/mysql:5.7-ram
17
+ environment:
18
+ MYSQL_DATABASE: avatax
19
+ MYSQL_USER: avatax
20
+ MYSQL_PASSWORD: password
21
+ - image: circleci/postgres:9.6-alpine
22
+ environment:
23
+ POSTGRES_USER: 'avatax'
24
+ POSTGRES_PASSWORD: 'password'
25
+ POSTGRES_DB: 'avatax'
26
+ steps:
27
+ - checkout
28
+ - when:
29
+ condition:
30
+ equal: ["mysql", << parameters.database >>]
31
+ steps:
32
+ - run:
33
+ name: Configure MySQL2
34
+ # Hack to set environment variable for later steps https://circleci.com/docs/2.0/env-vars/#example-configuration-of-environment-variables
35
+ command: echo 'export DATABASE_URL="mysql2://avatax:password@127.0.0.1/avatax"' >> $BASH_ENV
36
+ - when:
37
+ condition:
38
+ equal: ["postgres", << parameters.database >>]
39
+ steps:
40
+ - run:
41
+ name: Configure Postgres
42
+ command: echo 'export DATABASE_URL="postgresql://avatax:password@127.0.0.1/avatax"' >> $BASH_ENV
43
+ - run:
44
+ name: Configure bundler
45
+ command: bundle config --local path '~/.bundle'
46
+ - run:
47
+ name: Select Gemfile
48
+ command: cp gemfiles/<< parameters.gemfile >>.gemfile gemfiles/ci.gemfile
49
+ - restore_cache:
50
+ keys:
51
+ - bundler-v10-<< parameters.ruby-version >>-<< parameters.gemfile >>-{{ checksum "gemfiles/ci.gemfile" }}
52
+ - bundler-v10-<< parameters.ruby-version >>-<< parameters.gemfile >>
53
+ - run:
54
+ name: Install dependencies
55
+ command: bundle install --gemfile=gemfiles/ci.gemfile
56
+ - save_cache:
57
+ key: bundler-v10-<< parameters.ruby-version >>-<< parameters.gemfile >>-{{ checksum "gemfiles/ci.gemfile" }}
58
+ paths:
59
+ - "~/.bundle"
60
+ - run:
61
+ name: Setup test app
62
+ command: bundle exec --gemfile=gemfiles/ci.gemfile rake test_app
63
+ - run:
64
+ name: Run RSpec
65
+ command: bundle exec --gemfile=gemfiles/ci.gemfile rake spec
66
+ workflows:
67
+ all-specs:
68
+ jobs:
69
+ - rspec:
70
+ matrix:
71
+ parameters:
72
+ database:
73
+ - mysql
74
+ - postgres
75
+ gemfile:
76
+ - spree_4_2
77
+ - spree_4_3
78
+ ruby-version:
79
+ - "3.0"
80
+ - "2.7"
81
+
82
+
83
+
84
+
data/Appraisals CHANGED
@@ -1,36 +1,3 @@
1
- appraise 'spree-3-1' do
2
- gem 'spree_core', '~> 3.1.0'
3
- gem 'spree_backend', '~> 3.1.0'
4
- gem 'pg', '~> 0.18'
5
- gem 'spree_auth_devise', '~> 3.3'
6
- gem 'factory_girl'
7
- gem 'rails_test_params_backport'
8
- end
9
-
10
- appraise 'spree-3-7' do
11
- gem 'spree_core', '~> 3.7.0'
12
- gem 'spree_backend', '~> 3.7.0'
13
- gem 'spree_auth_devise', '~> 3.5'
14
- gem 'rails-controller-testing'
15
- gem 'sass-rails'
16
- end
17
-
18
- appraise 'spree-4-0' do
19
- gem 'spree_core', '~> 4.0.0.rc1'
20
- gem 'spree_backend', '~> 4.0.0'
21
- gem 'spree_auth_devise', '~> 4.0.0.rc2'
22
- gem 'rails-controller-testing'
23
- gem 'rspec-rails', '~> 4.0.0.beta2'
24
- end
25
-
26
- appraise 'spree-4-1' do
27
- gem 'spree_core', '~> 4.1.0'
28
- gem 'spree_backend', '~> 4.1.0'
29
- gem 'spree_auth_devise', '~> 4.1.0'
30
- gem 'rails-controller-testing'
31
- gem 'rspec-rails', '~> 4.0.0.beta2'
32
- end
33
-
34
1
  appraise 'spree-4-2' do
35
2
  gem 'spree_core', '~> 4.2.0.beta'
36
3
  gem 'spree_backend', '~> 4.2.0.beta'
@@ -40,10 +7,15 @@ appraise 'spree-4-2' do
40
7
  gem 'rspec-rails', '~> 4.0.0.beta2'
41
8
  end
42
9
 
43
- appraise 'spree-master' do
44
- gem 'spree_core', github: 'spree/spree', branch: 'master'
45
- gem 'spree_backend', github: 'spree/spree', branch: 'master'
46
- gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: 'master'
10
+ appraise 'spree-4-3' do
11
+ gem 'spree_core', '~> 4.3.0'
12
+ gem 'spree_backend', '~> 4.3.0'
13
+ gem 'spree_frontend', '~> 4.3'
14
+ gem 'spree_auth_devise', '~> 4.3.0'
15
+ gem 'spree_emails', '>= 4.3'
16
+ gem "redis", "~> 4.0"
47
17
  gem 'rails-controller-testing'
18
+ gem 'sass-rails'
48
19
  gem 'rspec-rails', '~> 4.0.0.beta2'
49
20
  end
21
+
data/README.md CHANGED
@@ -46,7 +46,7 @@ For more information, support and guidance on how to implement Spree AvaTax V2 e
46
46
 
47
47
  1. Add this extension to your `Gemfile` with this line:
48
48
  ```ruby
49
- gem 'spree_avatax_official', github: 'spree-contrib/spree_avatax_official'
49
+ gem 'spree_avatax_official'
50
50
  ```
51
51
 
52
52
  2. Install the gem using Bundler:
@@ -5,10 +5,13 @@ source "https://rubygems.org"
5
5
  gem "rails-controller-testing"
6
6
  gem "rubocop", "~> 0.63.0", require: false
7
7
  gem "rubocop-rspec", require: false
8
- gem "spree_auth_devise", "~> 4.0.0.rc2"
9
- gem "spree_backend", "~> 4.0.0"
10
- gem "spree_core", "~> 4.0.0.rc1"
8
+ gem "spree_auth_devise", "~> 4.3.0"
9
+ gem "spree_backend", "~> 4.3.0"
10
+ gem "spree_core", "~> 4.3.0"
11
11
  gem "sass-rails"
12
+ gem "spree_frontend", "~> 4.3"
13
+ gem "spree_emails", ">= 4.3"
14
+ gem "redis", "~> 4.0"
12
15
  gem "rspec-rails", "~> 4.0.0.beta2"
13
16
 
14
17
  gemspec path: "../"
@@ -1,9 +1,11 @@
1
- # Optional configuration fields
2
- SpreeAvataxOfficial::Config.log = true
3
- SpreeAvataxOfficial::Config.log_to_stdout = false
4
- SpreeAvataxOfficial::Config.log_file_name = 'avatax.log'
5
- SpreeAvataxOfficial::Config.log_frequency = 'weekly'
6
- SpreeAvataxOfficial::Config.max_retries = 2
7
- SpreeAvataxOfficial::Config.open_timeout = 2.0
8
- SpreeAvataxOfficial::Config.read_timeout = 6.0
9
- SpreeAvataxOfficial::Config.show_rate_in_label = false
1
+ Rails.application.config.after_initialize do
2
+ # Optional configuration fields
3
+ SpreeAvataxOfficial::Config.log = true
4
+ SpreeAvataxOfficial::Config.log_to_stdout = false
5
+ SpreeAvataxOfficial::Config.log_file_name = 'avatax.log'
6
+ SpreeAvataxOfficial::Config.log_frequency = 'weekly'
7
+ SpreeAvataxOfficial::Config.max_retries = 2
8
+ SpreeAvataxOfficial::Config.open_timeout = 2.0
9
+ SpreeAvataxOfficial::Config.read_timeout = 6.0
10
+ SpreeAvataxOfficial::Config.show_rate_in_label = false
11
+ end
@@ -0,0 +1,20 @@
1
+ module SpreeAvataxOfficial
2
+ class Configuration < ::Spree::Preferences::Configuration
3
+ preference :address_validation_enabled, :boolean, default: false
4
+ preference :company_code, :string, default: ''
5
+ preference :enabled, :boolean, default: false
6
+ preference :ship_from_address, :hash, default: {}
7
+ preference :log, :boolean, default: true
8
+ preference :log_to_stdout, :boolean, default: false
9
+ preference :log_file_name, :string, default: 'avatax.log'
10
+ preference :log_frequency, :string, default: 'weekly'
11
+ preference :max_retries, :integer, default: 2
12
+ preference :open_timeout, :decimal, default: 2.0
13
+ preference :read_timeout, :decimal, default: 6.0
14
+ preference :show_rate_in_label, :boolean, default: false
15
+ preference :account_number, :string, default: ''
16
+ preference :endpoint, :string, default: Rails.env.production? ? 'https://rest.avatax.com' : 'https://sandbox-rest.avatax.com'
17
+ preference :license_key, :string, default: ''
18
+ preference :commit_transaction_enabled, :boolean, default: true
19
+ end
20
+ end
@@ -1,3 +1,5 @@
1
+ require_relative 'configuration'
2
+
1
3
  module SpreeAvataxOfficial
2
4
  class Engine < Rails::Engine
3
5
  require 'spree/core'
@@ -12,8 +14,8 @@ module SpreeAvataxOfficial
12
14
  SpreeAvataxOfficial::Config = SpreeAvataxOfficial::Configuration.new
13
15
  end
14
16
 
15
- initializer 'spree.avatax_certified.calculators', after: 'spree.register.calculators' do |_app|
16
- Rails.application.config.spree.calculators.tax_rates << SpreeAvataxOfficial::Calculator::AvataxTransactionCalculator
17
+ config.after_initialize do |app|
18
+ app.config.spree.calculators.tax_rates << SpreeAvataxOfficial::Calculator::AvataxTransactionCalculator
17
19
  end
18
20
 
19
21
  # use rspec for tests
@@ -1,5 +1,5 @@
1
1
  module SpreeAvataxOfficial
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.8.0'.freeze
3
3
 
4
4
  module_function
5
5
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
19
19
  s.metadata = {
20
20
  "bug_tracker_uri" => "https://github.com/spree/spree_avatax_official/issues",
21
21
  "changelog_uri" => "https://github.com/spree/spree_avatax_official/releases/tag/v#{s.version}",
22
- "documentation_uri" => "https://guides.spreecommerce.org/",
22
+ "documentation_uri" => "https://github.com/spree-contrib/spree_avatax_official",
23
23
  "source_code_uri" => "https://github.com/spree/spree_avatax_official/tree/v#{s.version}",
24
24
  }
25
25
 
@@ -28,9 +28,9 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
28
28
  s.require_path = 'lib'
29
29
  s.requirements << 'none'
30
30
 
31
- s.add_dependency 'avatax', '~> 19.3'
31
+ s.add_dependency 'avatax', '>= 19.3'
32
32
 
33
- spree_version = '>= 2.1.0', '< 5.0'
33
+ spree_version = '>= 2.1.0'
34
34
 
35
35
  s.add_dependency 'spree_backend', spree_version
36
36
  s.add_dependency 'spree_core', spree_version
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_avatax_official
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spark Solutions
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-28 00:00:00.000000000 Z
11
+ date: 2022-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avatax
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '19.3'
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: '19.3'
27
27
  - !ruby/object:Gem::Dependency
@@ -31,9 +31,6 @@ dependencies:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.1.0
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '5.0'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -41,9 +38,6 @@ dependencies:
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
40
  version: 2.1.0
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '5.0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: spree_core
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -51,9 +45,6 @@ dependencies:
51
45
  - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: 2.1.0
54
- - - "<"
55
- - !ruby/object:Gem::Version
56
- version: '5.0'
57
48
  type: :runtime
58
49
  prerelease: false
59
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -61,9 +52,6 @@ dependencies:
61
52
  - - ">="
62
53
  - !ruby/object:Gem::Version
63
54
  version: 2.1.0
64
- - - "<"
65
- - !ruby/object:Gem::Version
66
- version: '5.0'
67
55
  - !ruby/object:Gem::Dependency
68
56
  name: spree_extension
69
57
  requirement: !ruby/object:Gem::Requirement
@@ -141,6 +129,7 @@ executables: []
141
129
  extensions: []
142
130
  extra_rdoc_files: []
143
131
  files:
132
+ - ".circleci/config.yml"
144
133
  - ".env-sample"
145
134
  - ".gitignore"
146
135
  - ".rspec"
@@ -219,15 +208,12 @@ files:
219
208
  - db/migrate/20191001085458_remove_spree_avalara_entity_use_codes_table.rb
220
209
  - db/migrate/20191001092353_create_spree_avatax_official_entity_use_codes_table.rb
221
210
  - db/seeds.rb
222
- - gemfiles/spree_3_1.gemfile
223
- - gemfiles/spree_3_7.gemfile
224
- - gemfiles/spree_4_0.gemfile
225
- - gemfiles/spree_4_1.gemfile
226
211
  - gemfiles/spree_4_2.gemfile
227
- - gemfiles/spree_master.gemfile
212
+ - gemfiles/spree_4_3.gemfile
228
213
  - lib/generators/spree_avatax_official/install/install_generator.rb
229
214
  - lib/generators/spree_avatax_official/install/templates/config/initializers/spree_avatax_official.rb
230
215
  - lib/spree_avatax_official.rb
216
+ - lib/spree_avatax_official/configuration.rb
231
217
  - lib/spree_avatax_official/engine.rb
232
218
  - lib/spree_avatax_official/factories.rb
233
219
  - lib/spree_avatax_official/seeder.rb
@@ -350,9 +336,9 @@ licenses:
350
336
  - BSD-3-Clause
351
337
  metadata:
352
338
  bug_tracker_uri: https://github.com/spree/spree_avatax_official/issues
353
- changelog_uri: https://github.com/spree/spree_avatax_official/releases/tag/v1.7.1
354
- documentation_uri: https://guides.spreecommerce.org/
355
- source_code_uri: https://github.com/spree/spree_avatax_official/tree/v1.7.1
339
+ changelog_uri: https://github.com/spree/spree_avatax_official/releases/tag/v1.8.0
340
+ documentation_uri: https://github.com/spree-contrib/spree_avatax_official
341
+ source_code_uri: https://github.com/spree/spree_avatax_official/tree/v1.8.0
356
342
  post_install_message:
357
343
  rdoc_options: []
358
344
  require_paths:
@@ -369,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
355
  version: '0'
370
356
  requirements:
371
357
  - none
372
- rubygems_version: 3.2.3
358
+ rubygems_version: 3.0.9
373
359
  signing_key:
374
360
  specification_version: 4
375
361
  summary: The official certified Spree Avatax
@@ -1,16 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails-controller-testing"
6
- gem "rubocop", "~> 0.63.0", require: false
7
- gem "rubocop-rspec", require: false
8
- gem "spree_auth_devise", "~> 3.3"
9
- gem "spree_backend", "~> 3.1.0"
10
- gem "spree_core", "~> 3.1.0"
11
- gem "sass-rails"
12
- gem "pg", "~> 0.18"
13
- gem "factory_girl"
14
- gem "rails_test_params_backport"
15
-
16
- gemspec path: "../"
@@ -1,13 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails-controller-testing"
6
- gem "rubocop", "~> 0.63.0", require: false
7
- gem "rubocop-rspec", require: false
8
- gem "spree_auth_devise", "~> 3.5"
9
- gem "spree_backend", "~> 3.7.0"
10
- gem "spree_core", "~> 3.7.0"
11
- gem "sass-rails"
12
-
13
- gemspec path: "../"
@@ -1,14 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails-controller-testing"
6
- gem "rubocop", "~> 0.63.0", require: false
7
- gem "rubocop-rspec", require: false
8
- gem "spree_auth_devise", "~> 4.1.0"
9
- gem "spree_backend", "~> 4.1.0"
10
- gem "spree_core", "~> 4.1.0"
11
- gem "sass-rails"
12
- gem "rspec-rails", "~> 4.0.0.beta2"
13
-
14
- gemspec path: "../"
@@ -1,14 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails-controller-testing"
6
- gem "rubocop", "~> 0.63.0", require: false
7
- gem "rubocop-rspec", require: false
8
- gem "spree_auth_devise", branch: "master", git: "https://github.com/spree/spree_auth_devise.git"
9
- gem "spree_backend", branch: "master", git: "https://github.com/spree/spree.git"
10
- gem "spree_core", branch: "master", git: "https://github.com/spree/spree.git"
11
- gem "sass-rails"
12
- gem "rspec-rails", "~> 4.0.0.beta2"
13
-
14
- gemspec path: "../"