solidus_tec_estimator 1.0.6 → 2.1.0
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 +4 -4
- data/app/models/solidus_tec_estimator/providers/local_delivery.rb +7 -5
- data/lib/solidus_tec_estimator/engine.rb +0 -7
- data/lib/solidus_tec_estimator/version.rb +1 -1
- data/lib/solidus_tec_estimator.rb +2 -0
- metadata +13 -76
- data/.circleci/config.yml +0 -53
- data/.gem_release.yml +0 -5
- data/.github/stale.yml +0 -1
- data/.github_changelog_generator +0 -2
- data/.gitignore +0 -21
- data/.rubocop.yml +0 -5
- data/CHANGELOG.md +0 -3
- data/Gemfile +0 -48
- data/LICENSE +0 -26
- data/Rakefile +0 -7
- data/bin/console +0 -17
- data/bin/rails +0 -7
- data/bin/rails-engine +0 -13
- data/bin/rails-sandbox +0 -16
- data/bin/rake +0 -7
- data/bin/sandbox +0 -76
- data/bin/setup +0 -8
- data/db/migrate/20240806202950_recreate_min_and_max_delivery_time.rb +0 -9
- data/solidus_tec_estimator.gemspec +0 -36
- data/test/fixtures/solidus_tec_estimator/providers.yml +0 -11
- data/test/models/solidus_tec_estimator/provider_test.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f668f316429685c50bc8a888937d1d5bbc96ba6ca39fe7e09b335b88c1df556e
|
4
|
+
data.tar.gz: 109829e25a0bdf4753aed36e2b633f936bb589854fff5799d186bc65c8595cdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 940b55c81423cda493d7afcd5751bef78a1a4b9ccb7ea142c6eb759ac121766877e8fb216ada0a9147d2cd31daf8e834d6dffc75eb903a6ca6a46766c80cc5d6
|
7
|
+
data.tar.gz: 908f3d4d09ca58b7bbdf14c7ec5aae5efc456e5976a069bfdfce77cf77af2c25cc3b7e7518a6194d549dff1254cbbff2ba692d765e96d876f94c86e1dcff5711
|
@@ -58,7 +58,9 @@ module SolidusTecEstimator
|
|
58
58
|
shipping_method: shipping_method,
|
59
59
|
cost: shipping_method.calculator.compute(package),
|
60
60
|
min_delivery_time: min_delivery_time,
|
61
|
-
max_delivery_time: max_delivery_time
|
61
|
+
max_delivery_time: max_delivery_time,
|
62
|
+
estimate_prose: create_estimate_prose(max_delivery_time),
|
63
|
+
expires_in: Time.now + 2.hours
|
62
64
|
)
|
63
65
|
end
|
64
66
|
|
@@ -69,13 +71,13 @@ module SolidusTecEstimator
|
|
69
71
|
zipcode >= sjbv_ceps.min && zipcode <= sjbv_ceps.max
|
70
72
|
end
|
71
73
|
|
72
|
-
def
|
73
|
-
if
|
74
|
+
def create_estimate_prose delivery_time
|
75
|
+
if delivery_time.today?
|
74
76
|
"Chegará em até 2 horas"
|
75
|
-
elsif
|
77
|
+
elsif delivery_time.tomorrow?
|
76
78
|
"Chegará amanhã até às 10h"
|
77
79
|
else
|
78
|
-
"Chegará em #{ActionController::Base.helpers.pluralize((
|
80
|
+
"Chegará em #{ActionController::Base.helpers.pluralize((delivery_time.to_datetime.end_of_day - DateTime.now).to_i, "dia", plural: "dias")}"
|
79
81
|
end
|
80
82
|
end
|
81
83
|
|
@@ -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
|
metadata
CHANGED
@@ -1,80 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_tec_estimator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ulysses
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: solidus_brazilian_adaptations
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '5'
|
19
|
+
version: '0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
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
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: solidus_dev_support
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '2.9'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '2.9'
|
26
|
+
version: '0'
|
61
27
|
description: ''
|
62
28
|
email: ulyssesh.20@gmail.com
|
63
29
|
executables: []
|
64
30
|
extensions: []
|
65
31
|
extra_rdoc_files: []
|
66
32
|
files:
|
67
|
-
- ".circleci/config.yml"
|
68
|
-
- ".gem_release.yml"
|
69
|
-
- ".github/stale.yml"
|
70
|
-
- ".github_changelog_generator"
|
71
|
-
- ".gitignore"
|
72
|
-
- ".rubocop.yml"
|
73
|
-
- CHANGELOG.md
|
74
|
-
- Gemfile
|
75
|
-
- LICENSE
|
76
33
|
- README.md
|
77
|
-
- Rakefile
|
78
34
|
- app/controllers/spree/admin/solidus_tec_estimator/providers_controller.rb
|
79
35
|
- app/models/solidus_tec_estimator/estimator.rb
|
80
36
|
- app/models/solidus_tec_estimator/provider.rb
|
@@ -83,34 +39,20 @@ files:
|
|
83
39
|
- app/views/spree/admin/solidus_tec_estimator/providers/edit.html.erb
|
84
40
|
- app/views/spree/admin/solidus_tec_estimator/providers/index.html.erb
|
85
41
|
- app/views/spree/admin/solidus_tec_estimator/providers/new.html.erb
|
86
|
-
- bin/console
|
87
|
-
- bin/rails
|
88
|
-
- bin/rails-engine
|
89
|
-
- bin/rails-sandbox
|
90
|
-
- bin/rake
|
91
|
-
- bin/sandbox
|
92
|
-
- bin/setup
|
93
42
|
- config/routes.rb
|
94
43
|
- db/migrate/20240806142636_create_solidus_tec_estimator_providers.rb
|
95
44
|
- db/migrate/20240806165855_add_provider_id_to_shipping_method.rb
|
96
|
-
- db/migrate/20240806202950_recreate_min_and_max_delivery_time.rb
|
97
45
|
- lib/generators/solidus_tec_estimator/install/install_generator.rb
|
98
46
|
- lib/generators/solidus_tec_estimator/install/templates/initializer.rb
|
99
47
|
- lib/solidus_tec_estimator.rb
|
100
48
|
- lib/solidus_tec_estimator/configuration.rb
|
101
49
|
- lib/solidus_tec_estimator/engine.rb
|
102
50
|
- lib/solidus_tec_estimator/version.rb
|
103
|
-
- solidus_tec_estimator.gemspec
|
104
|
-
- test/fixtures/solidus_tec_estimator/providers.yml
|
105
|
-
- test/models/solidus_tec_estimator/provider_test.rb
|
106
51
|
homepage: https://github.com/todasessascoisas/solidus_tec_estimator#readme
|
107
52
|
licenses:
|
108
53
|
- BSD-3-Clause
|
109
|
-
metadata:
|
110
|
-
|
111
|
-
source_code_uri: https://github.com/todasessascoisas/solidus_tec_estimator
|
112
|
-
changelog_uri: https://github.com/todasessascoisas/solidus_tec_estimator/blob/main/CHANGELOG.md
|
113
|
-
post_install_message:
|
54
|
+
metadata: {}
|
55
|
+
post_install_message:
|
114
56
|
rdoc_options: []
|
115
57
|
require_paths:
|
116
58
|
- lib
|
@@ -118,20 +60,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
60
|
requirements:
|
119
61
|
- - ">="
|
120
62
|
- !ruby/object:Gem::Version
|
121
|
-
version: '
|
122
|
-
- - "<"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '4'
|
63
|
+
version: '0'
|
125
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
65
|
requirements:
|
127
66
|
- - ">="
|
128
67
|
- !ruby/object:Gem::Version
|
129
68
|
version: '0'
|
130
69
|
requirements: []
|
131
|
-
rubygems_version: 3.5.
|
132
|
-
signing_key:
|
70
|
+
rubygems_version: 3.5.3
|
71
|
+
signing_key:
|
133
72
|
specification_version: 4
|
134
73
|
summary: ''
|
135
|
-
test_files:
|
136
|
-
- test/fixtures/solidus_tec_estimator/providers.yml
|
137
|
-
- test/models/solidus_tec_estimator/provider_test.rb
|
74
|
+
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
data/.github/stale.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
_extends: .github
|
data/.github_changelog_generator
DELETED
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
data/CHANGELOG.md
DELETED
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
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
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
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,9 +0,0 @@
|
|
1
|
-
class RecreateMinAndMaxDeliveryTime < ActiveRecord::Migration[7.1]
|
2
|
-
def change
|
3
|
-
remove_column :spree_shipping_rates, :min_delivery_time, if_exists: true
|
4
|
-
remove_column :spree_shipping_rates, :max_delivery_time, if_exists: true
|
5
|
-
|
6
|
-
add_column :spree_shipping_rates, :min_delivery_time, :datetime
|
7
|
-
add_column :spree_shipping_rates, :max_delivery_time, :datetime
|
8
|
-
end
|
9
|
-
end
|
@@ -1,36 +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
|
-
|
35
|
-
spec.add_development_dependency 'solidus_dev_support', '~> 2.9'
|
36
|
-
end
|