solidus_tec_estimator 2.0.0 → 2.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5e4dc99244ea1042793e9040e0e9e7e21aba0e95299c20c0723a2795cc2298a
4
- data.tar.gz: 39eee3390a6e1536306f79fb3a6a4882b9c4de073a64cf8ba9fc5f3cfa0e892f
3
+ metadata.gz: 01f391cb4bb52df6f01250564d8982d2b58f646236d1a2dabe6e90558f27b285
4
+ data.tar.gz: 993c715f555ae3de46a8ff9272c8ea40398511a6acea331cb4b6ea92f4660753
5
5
  SHA512:
6
- metadata.gz: e2b9ce9dffb0e046b438a060b92133a278e7e32d36ec56dc189b7a1acbbe0602b5cefbb15daf073302dd3d3710909f4bd7817dfd96ec3603a322c5cff19ca8c3
7
- data.tar.gz: e51d4827b3e2e57344ea1eaa7941bb582754946355d60c4097f9b53bf4a17a5a9ad387102c69b8de10cd692b99dcd7a52c47783dec6cfde63560ebbdb8cb0bc2
6
+ metadata.gz: 7256f7b0993700d345240c197a0b57d39ffc99dbbb3f001d324cb8de081971b1e7de2d202270129cbc37f67a01b6d5a0f77d358fb9621d62d437c5ac0a77ea93
7
+ data.tar.gz: 82650da43a3a7041cd722a2a53e9a4dfdb6e1dc7139a30d2792f23d37496acefa6cecc9a18fd955a1fbb083ce75d92a2e0ba43e8fcfb0a530a24aa49555905f6
@@ -1,8 +1,6 @@
1
1
  module SolidusTecEstimator
2
2
  class Estimator
3
-
4
3
  def shipping_rates(package, _frontend_only = true)
5
-
6
4
  rates = shipping_methods(package).map do |shipping_method|
7
5
  cost = shipping_method.calculator.compute(package)
8
6
  if cost
@@ -47,10 +45,9 @@ module SolidusTecEstimator
47
45
 
48
46
  def remove_unavailable_methods shipping_methods:, package:
49
47
  shipping_methods.available_to_store(package.shipment.order.store)
50
- .available_in_stock_location(package.stock_location)
51
- .available_for_address(package.shipment.order.ship_address)
52
- .where(available_to_users: true)
48
+ .available_in_stock_location(package.stock_location)
49
+ .available_for_address(package.shipment.order.ship_address)
50
+ .where(available_to_users: true)
53
51
  end
54
-
55
52
  end
56
53
  end
@@ -1,35 +1,35 @@
1
1
  module SolidusTecEstimator
2
2
  module Providers
3
3
  class LocalDelivery
4
-
5
4
  attr_accessor :package, :shipping_methods
5
+
6
6
  def initialize package, shipping_methods
7
7
  @package = package
8
8
  @shipping_methods = shipping_methods
9
9
  end
10
10
 
11
11
  def self.install
12
- Spree::ShippingMethod.find_or_create_by(code: self.name.underscore) do |shipping_method|
12
+ Spree::ShippingMethod.find_or_create_by(code: name.underscore) do |shipping_method|
13
13
  shipping_method.name = "Entrega de moto"
14
14
  shipping_method.carrier = "Entrega local"
15
- shipping_method.code = self.name.underscore
15
+ shipping_method.code = name.underscore
16
16
  shipping_method.calculator = Spree::Calculator::Shipping::FlatRate.create
17
17
  shipping_method.shipping_categories = [Spree::ShippingCategory.first]
18
18
  shipping_method.available_to_users = false
19
- shipping_method.provider_id = SolidusTecEstimator::Provider.find_by(class_name: self.to_s).id
19
+ shipping_method.provider_id = SolidusTecEstimator::Provider.find_by(class_name: to_s).id
20
20
  end
21
21
  end
22
22
 
23
23
  def shipping_rates
24
24
  shipping_rates = []
25
- if cep_de_sjbv? && tem_estoque_na_f1? && package.weight <= 10000
25
+ if cep_de_sjbv? && tem_estoque_na_f1? && package.weight <= 40_000
26
26
  shipping_rates << build_shipping_rate(package)
27
27
  end
28
28
  shipping_rates.select { |rate| shipping_methods.include?(rate.shipping_method) }
29
29
  end
30
30
 
31
31
  def tem_estoque_na_f1?
32
- package_quantity = package.contents.map {|c| c.inventory_unit.variant_id }.tally
32
+ package_quantity = package.contents.map { |c| c.inventory_unit.variant_id }.tally
33
33
  variants = package.contents.map(&:variant)
34
34
  variants.all? do |variant|
35
35
  product_stock = ProductStock.find_by(sku: variant.sku.strip)
@@ -41,7 +41,7 @@ module SolidusTecEstimator
41
41
  def build_shipping_rate(package)
42
42
  shipping_method = Spree::ShippingMethod.find_by(code: self.class.to_s.underscore)
43
43
 
44
- time_now = Time.now.in_time_zone('America/Sao_Paulo')
44
+ time_now = Time.now.in_time_zone("America/Sao_Paulo")
45
45
  if time_now < time_now.change({hour: 16}) && time_now.on_weekday?
46
46
  min_delivery_time = (time_now + 30.minutes)
47
47
  max_delivery_time = (time_now + 2.hours)
@@ -80,7 +80,6 @@ module SolidusTecEstimator
80
80
  "Chegará em #{ActionController::Base.helpers.pluralize((delivery_time.to_datetime.end_of_day - DateTime.now).to_i, "dia", plural: "dias")}"
81
81
  end
82
82
  end
83
-
84
83
  end
85
84
  end
86
85
  end
@@ -1,13 +1,6 @@
1
- require 'solidus_core'
2
- require 'solidus_support'
3
-
4
1
  module SolidusTecEstimator
5
2
  class Engine < Rails::Engine
6
- include SolidusSupport::EngineExtensions
7
-
8
3
  isolate_namespace ::SolidusTecEstimator
9
-
10
4
  engine_name 'solidus_tec_estimator'
11
-
12
5
  end
13
6
  end
@@ -1,3 +1,3 @@
1
1
  module SolidusTecEstimator
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.1'
3
3
  end
metadata CHANGED
@@ -1,49 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_tec_estimator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-11 00:00:00.000000000 Z
10
+ date: 2025-06-20 00:00:00.000000000 Z
12
11
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: solidus_core
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 2.0.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '5'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 2.0.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '5'
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.5'
40
- type: :runtime
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '0.5'
47
12
  - !ruby/object:Gem::Dependency
48
13
  name: solidus_brazilian_adaptations
49
14
  requirement: !ruby/object:Gem::Requirement
@@ -58,37 +23,13 @@ dependencies:
58
23
  - - ">="
59
24
  - !ruby/object:Gem::Version
60
25
  version: '0'
61
- - !ruby/object:Gem::Dependency
62
- name: solidus_dev_support
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '2.9'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '2.9'
75
26
  description: ''
76
27
  email: ulyssesh.20@gmail.com
77
28
  executables: []
78
29
  extensions: []
79
30
  extra_rdoc_files: []
80
31
  files:
81
- - ".circleci/config.yml"
82
- - ".gem_release.yml"
83
- - ".github/stale.yml"
84
- - ".github_changelog_generator"
85
- - ".gitignore"
86
- - ".rubocop.yml"
87
- - CHANGELOG.md
88
- - Gemfile
89
- - LICENSE
90
32
  - README.md
91
- - Rakefile
92
33
  - app/controllers/spree/admin/solidus_tec_estimator/providers_controller.rb
93
34
  - app/models/solidus_tec_estimator/estimator.rb
94
35
  - app/models/solidus_tec_estimator/provider.rb
@@ -97,13 +38,6 @@ files:
97
38
  - app/views/spree/admin/solidus_tec_estimator/providers/edit.html.erb
98
39
  - app/views/spree/admin/solidus_tec_estimator/providers/index.html.erb
99
40
  - app/views/spree/admin/solidus_tec_estimator/providers/new.html.erb
100
- - bin/console
101
- - bin/rails
102
- - bin/rails-engine
103
- - bin/rails-sandbox
104
- - bin/rake
105
- - bin/sandbox
106
- - bin/setup
107
41
  - config/routes.rb
108
42
  - db/migrate/20240806142636_create_solidus_tec_estimator_providers.rb
109
43
  - db/migrate/20240806165855_add_provider_id_to_shipping_method.rb
@@ -113,17 +47,10 @@ files:
113
47
  - lib/solidus_tec_estimator/configuration.rb
114
48
  - lib/solidus_tec_estimator/engine.rb
115
49
  - lib/solidus_tec_estimator/version.rb
116
- - solidus_tec_estimator.gemspec
117
- - test/fixtures/solidus_tec_estimator/providers.yml
118
- - test/models/solidus_tec_estimator/provider_test.rb
119
50
  homepage: https://github.com/todasessascoisas/solidus_tec_estimator#readme
120
51
  licenses:
121
52
  - BSD-3-Clause
122
- metadata:
123
- homepage_uri: https://github.com/todasessascoisas/solidus_tec_estimator#readme
124
- source_code_uri: https://github.com/todasessascoisas/solidus_tec_estimator
125
- changelog_uri: https://github.com/todasessascoisas/solidus_tec_estimator/blob/main/CHANGELOG.md
126
- post_install_message:
53
+ metadata: {}
127
54
  rdoc_options: []
128
55
  require_paths:
129
56
  - lib
@@ -131,20 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
58
  requirements:
132
59
  - - ">="
133
60
  - !ruby/object:Gem::Version
134
- version: '2.5'
135
- - - "<"
136
- - !ruby/object:Gem::Version
137
- version: '4'
61
+ version: '0'
138
62
  required_rubygems_version: !ruby/object:Gem::Requirement
139
63
  requirements:
140
64
  - - ">="
141
65
  - !ruby/object:Gem::Version
142
66
  version: '0'
143
67
  requirements: []
144
- rubygems_version: 3.5.11
145
- signing_key:
68
+ rubygems_version: 3.6.2
146
69
  specification_version: 4
147
70
  summary: ''
148
- test_files:
149
- - test/fixtures/solidus_tec_estimator/providers.yml
150
- - test/models/solidus_tec_estimator/provider_test.rb
71
+ test_files: []
data/.circleci/config.yml DELETED
@@ -1,53 +0,0 @@
1
- version: 2.1
2
-
3
- orbs:
4
- # Required for feature specs.
5
- browser-tools: circleci/browser-tools@1.1
6
-
7
- # Always take the latest version of the orb, this allows us to
8
- # run specs against Solidus supported versions only without the need
9
- # to change this configuration every time a Solidus version is released
10
- # or goes EOL.
11
- solidusio_extensions: solidusio/extensions@volatile
12
-
13
- jobs:
14
- run-specs-with-sqlite:
15
- executor: solidusio_extensions/sqlite
16
- steps:
17
- - browser-tools/install-chrome
18
- - solidusio_extensions/run-tests
19
- run-specs-with-postgres:
20
- executor: solidusio_extensions/postgres
21
- steps:
22
- - browser-tools/install-chrome
23
- - solidusio_extensions/run-tests
24
- run-specs-with-mysql:
25
- executor: solidusio_extensions/mysql
26
- steps:
27
- - browser-tools/install-chrome
28
- - solidusio_extensions/run-tests
29
- lint-code:
30
- executor: solidusio_extensions/sqlite-memory
31
- steps:
32
- - solidusio_extensions/lint-code
33
-
34
- workflows:
35
- "Run specs on supported Solidus versions":
36
- jobs:
37
- - run-specs-with-sqlite
38
- - run-specs-with-postgres
39
- - run-specs-with-mysql
40
- - lint-code
41
-
42
- "Weekly run specs against main":
43
- triggers:
44
- - schedule:
45
- cron: "0 0 * * 4" # every Thursday
46
- filters:
47
- branches:
48
- only:
49
- - main
50
- jobs:
51
- - run-specs-with-sqlite
52
- - run-specs-with-postgres
53
- - run-specs-with-mysql
data/.gem_release.yml DELETED
@@ -1,5 +0,0 @@
1
- bump:
2
- recurse: false
3
- file: 'lib/solidus_tec_estimator/version.rb'
4
- message: Bump SolidusTecEstimator to %{version}
5
- tag: true
data/.github/stale.yml DELETED
@@ -1 +0,0 @@
1
- _extends: .github
@@ -1,2 +0,0 @@
1
- issues=false
2
- exclude-labels=infrastructure
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- *.gem
2
- \#*
3
- *~
4
- .#*
5
- .DS_Store
6
- .idea
7
- .project
8
- .sass-cache
9
- coverage
10
- Gemfile.lock
11
- Gemfile-local
12
- tmp
13
- nbproject
14
- pkg
15
- *.swp
16
- spec/dummy
17
- spec/examples.txt
18
- /sandbox
19
- .rvmrc
20
- .ruby-version
21
- .ruby-gemset
data/.rubocop.yml DELETED
@@ -1,5 +0,0 @@
1
- require:
2
- - solidus_dev_support/rubocop
3
-
4
- AllCops:
5
- NewCops: disable
data/CHANGELOG.md DELETED
@@ -1,3 +0,0 @@
1
- # Changelog
2
-
3
- See https://github.com/solidusio-contrib/solidus_tec_estimator/releases or OLD_CHANGELOG.md for older versions.
data/Gemfile DELETED
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
-
6
- branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
7
- gem 'solidus', github: 'solidusio/solidus', branch: branch
8
-
9
- # The solidus_frontend gem has been pulled out since v3.2
10
- if branch >= 'v3.2'
11
- gem 'solidus_frontend'
12
- elsif branch == 'main'
13
- gem 'solidus_frontend', github: 'solidusio/solidus_frontend'
14
- else
15
- gem 'solidus_frontend', github: 'solidusio/solidus', branch: branch
16
- end
17
-
18
- # Needed to help Bundler figure out how to resolve dependencies,
19
- # otherwise it takes forever to resolve them.
20
- # See https://github.com/bundler/bundler/issues/6677
21
- gem 'rails', '>0.a'
22
-
23
-
24
- # Provides basic authentication functionality for testing parts of your engine
25
- gem 'solidus_auth_devise'
26
-
27
- case ENV.fetch('DB', nil)
28
- when 'mysql'
29
- gem 'mysql2'
30
- when 'postgresql'
31
- gem 'pg'
32
- else
33
- gem 'sqlite3'
34
- end
35
-
36
- # While we still support Ruby < 3 we need to workaround a limitation in
37
- # the 'async' gem that relies on the latest ruby, since RubyGems doesn't
38
- # resolve gems based on the required ruby version.
39
- gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
40
-
41
- gemspec
42
-
43
- # Use a local Gemfile to include development dependencies that might not be
44
- # relevant for the project or for other contributors, e.g. pry-byebug.
45
- #
46
- # We use `send` instead of calling `eval_gemfile` to work around an issue with
47
- # how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658.
48
- send(:eval_gemfile, 'Gemfile-local') if File.exist? 'Gemfile-local'
data/LICENSE DELETED
@@ -1,26 +0,0 @@
1
- Copyright (c) 2024 ulysses
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification,
5
- are permitted provided that the following conditions are met:
6
-
7
- * Redistributions of source code must retain the above copyright notice,
8
- this list of conditions and the following disclaimer.
9
- * Redistributions in binary form must reproduce the above copyright notice,
10
- this list of conditions and the following disclaimer in the documentation
11
- and/or other materials provided with the distribution.
12
- * Neither the name Solidus nor the names of its contributors may be used to
13
- endorse or promote products derived from this software without specific
14
- prior written permission.
15
-
16
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require 'solidus_dev_support/rake_tasks'
5
- SolidusDevSupport::RakeTasks.install
6
-
7
- task default: 'extension:specs'
data/bin/console DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # frozen_string_literal: true
4
-
5
- require "bundler/setup"
6
- require "solidus_tec_estimator"
7
-
8
- # You can add fixtures and/or initialization code here to make experimenting
9
- # with your gem easier. You can also use a different console, if you like.
10
- $LOAD_PATH.unshift(*Dir["#{__dir__}/../app/*"])
11
-
12
- # (If you use this, don't forget to add pry to your Gemfile!)
13
- # require "pry"
14
- # Pry.start
15
-
16
- require "irb"
17
- IRB.start(__FILE__)
data/bin/rails DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- if %w[g generate].include? ARGV.first
4
- exec "#{__dir__}/rails-engine", *ARGV
5
- else
6
- exec "#{__dir__}/rails-sandbox", *ARGV
7
- end
data/bin/rails-engine DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails gems
3
- # installed from the root of your application.
4
-
5
- ENGINE_ROOT = File.expand_path('..', __dir__)
6
- ENGINE_PATH = File.expand_path('../lib/solidus_tec_estimator/engine', __dir__)
7
-
8
- # Set up gems listed in the Gemfile.
9
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
10
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
11
-
12
- require 'rails/all'
13
- require 'rails/engine/commands'
data/bin/rails-sandbox DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- app_root = 'sandbox'
4
-
5
- unless File.exist? "#{app_root}/bin/rails"
6
- warn 'Creating the sandbox app...'
7
- Dir.chdir "#{__dir__}/.." do
8
- system "#{__dir__}/sandbox" or begin
9
- warn 'Automatic creation of the sandbox app failed'
10
- exit 1
11
- end
12
- end
13
- end
14
-
15
- Dir.chdir app_root
16
- exec 'bin/rails', *ARGV
data/bin/rake DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "rubygems"
5
- require "bundler/setup"
6
-
7
- load Gem.bin_path("rake", "rake")
data/bin/sandbox DELETED
@@ -1,76 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -e
4
- test -z "${DEBUG+empty_string}" || set -x
5
-
6
- test "$DB" = "sqlite" && export DB="sqlite3"
7
-
8
- if [ -z "$PAYMENT_METHOD" ]
9
- then
10
- PAYMENT_METHOD="none"
11
- fi
12
-
13
- if [ -z "$SOLIDUS_BRANCH" ]
14
- then
15
- echo "~~> Use 'export SOLIDUS_BRANCH=[main|v4.0|...]' to control the Solidus branch"
16
- SOLIDUS_BRANCH="main"
17
- fi
18
- echo "~~> Using branch $SOLIDUS_BRANCH of solidus"
19
-
20
- extension_name="solidus_tec_estimator"
21
-
22
- # Stay away from the bundler env of the containing extension.
23
- function unbundled {
24
- ruby -rbundler -e'
25
- Bundler.with_unbundled_env {system *ARGV}' -- \
26
- env BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES=true $@
27
- }
28
-
29
- echo "~~~> Removing the old sandbox"
30
- rm -rf ./sandbox
31
-
32
- echo "~~~> Creating a pristine Rails app"
33
- rails new sandbox \
34
- --database="${DB:-sqlite3}" \
35
- --skip-git \
36
- --skip-keeps \
37
- --skip-rc \
38
- --skip-bootsnap \
39
- --skip-test
40
-
41
- if [ ! -d "sandbox" ]; then
42
- echo 'sandbox rails application failed'
43
- exit 1
44
- fi
45
-
46
- echo "~~~> Adding solidus (with i18n) to the Gemfile"
47
- cd ./sandbox
48
- cat <<RUBY >> Gemfile
49
- gem 'solidus', github: 'solidusio/solidus', branch: '$SOLIDUS_BRANCH'
50
- gem 'rails-i18n'
51
- gem 'solidus_i18n'
52
- gem 'solidus_auth_devise'
53
-
54
- gem '$extension_name', path: '..'
55
-
56
- group :test, :development do
57
- platforms :mri do
58
- gem 'pry-byebug'
59
- end
60
- end
61
- RUBY
62
-
63
- unbundled bundle install --gemfile Gemfile
64
-
65
- unbundled bundle exec rake db:drop db:create
66
-
67
- unbundled bundle exec rails generate solidus:install \
68
- --auto-accept \
69
- $@
70
-
71
- unbundled bundle exec rails generate solidus:auth:install --auto-run-migrations
72
- unbundled bundle exec rails generate ${extension_name}:install --auto-run-migrations
73
-
74
- echo
75
- echo "🚀 Sandbox app successfully created for $extension_name!"
76
- echo "🧪 This app is intended for test purposes."
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- gem install bundler --conservative
7
- bundle update
8
- bin/rake clobber
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/solidus_tec_estimator/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'solidus_tec_estimator'
7
- spec.version = SolidusTecEstimator::VERSION
8
- spec.authors = ['ulysses']
9
- spec.email = 'ulyssesh.20@gmail.com'
10
-
11
- spec.summary = ''
12
- spec.description = ''
13
- spec.homepage = 'https://github.com/todasessascoisas/solidus_tec_estimator#readme'
14
- spec.license = 'BSD-3-Clause'
15
-
16
- spec.metadata['homepage_uri'] = spec.homepage
17
- spec.metadata['source_code_uri'] = 'https://github.com/todasessascoisas/solidus_tec_estimator'
18
- spec.metadata['changelog_uri'] = 'https://github.com/todasessascoisas/solidus_tec_estimator/blob/main/CHANGELOG.md'
19
-
20
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')
21
-
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
25
-
26
- spec.files = files.grep_v(%r{^(test|spec|features)/})
27
- spec.test_files = files.grep(%r{^(test|spec|features)/})
28
- spec.bindir = "exe"
29
- spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
30
- spec.require_paths = ["lib"]
31
-
32
- spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 5']
33
- spec.add_dependency 'solidus_support', '~> 0.5'
34
- spec.add_dependency "solidus_brazilian_adaptations"
35
-
36
- spec.add_development_dependency 'solidus_dev_support', '~> 2.9'
37
- end
@@ -1,11 +0,0 @@
1
- # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
-
3
- one:
4
- name: MyString
5
- type:
6
- active: false
7
-
8
- two:
9
- name: MyString
10
- type:
11
- active: false
@@ -1,9 +0,0 @@
1
- require "test_helper"
2
-
3
- module SolidusTecEstimator
4
- class ProviderTest < ActiveSupport::TestCase
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end