solidus_bling 3.4.7 โ 3.5.2
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_bling/order.rb +6 -1
- data/app/models/solidus_bling/seller.rb +5 -1
- data/lib/solidus_bling/engine.rb +0 -5
- data/lib/solidus_bling/version.rb +1 -1
- metadata +6 -81
- data/.circleci/config.yml +0 -53
- data/.gem_release.yml +0 -5
- data/.gitattributes +0 -2
- data/.github/stale.yml +0 -1
- data/.github/workflows/publish_gem.yml +0 -25
- data/.github_changelog_generator +0 -2
- data/.gitignore +0 -21
- data/.rspec +0 -2
- data/.rubocop.yml +0 -5
- data/CHANGELOG.md +0 -3
- data/Gemfile +0 -47
- data/LICENSE +0 -26
- data/Rakefile +0 -7
- data/bin/console +0 -17
- data/bin/meu_sandbox +0 -67
- 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 -78
- data/bin/setup +0 -8
- data/lib/solidus_bling/testing_support/factories.rb +0 -4
- data/solidus_bling.gemspec +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 839a34b72b6e7f33d03e5eeb6de8ff0e18b923902b72b465fa8e460369abe9dd
|
4
|
+
data.tar.gz: e9c8d2e89b243a07d8b6e3349d3bbe364b6f3cfd2dc6a7c02bc66f24984c9c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1576e931cf2b22a7c843d311086052d3224288cff30c99945f833ac93623ecf7e3b9a67bd64a783f8327023baec72f3fc2961720be24d7d47f5ae2707ff398f
|
7
|
+
data.tar.gz: fe7d2e29ec0e3997457908d09ae821eca889689ad491a3417d1567322d63c35065b57b7f17239ecf56bc22fefe5d14592321130cf7d987b5d108bdb59c35bfb3
|
@@ -139,7 +139,12 @@ module SolidusBling
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def seller_external_id
|
142
|
-
|
142
|
+
seller = SolidusBling::Seller.find_by_id(@order.solidus_bling_seller_id)
|
143
|
+
if seller&.active_from_api?
|
144
|
+
seller.external_id
|
145
|
+
else
|
146
|
+
SolidusBling::Seller.default.external_id
|
147
|
+
end
|
143
148
|
end
|
144
149
|
|
145
150
|
def build_customer
|
@@ -10,7 +10,7 @@ module SolidusBling
|
|
10
10
|
BlingApi.configure { |config| config.access_token = account.access_token }
|
11
11
|
|
12
12
|
sellers = BlingApi::Seller.get_sellers
|
13
|
-
upsert_sellers = sellers.map { |seller| {
|
13
|
+
upsert_sellers = sellers.map { |seller| {name: seller[:nome], external_id: seller[:id], account_id: account.id, active: true} }
|
14
14
|
SolidusBling::Seller.upsert_all(upsert_sellers, unique_by: :external_id)
|
15
15
|
inactivate_sellers(sellers)
|
16
16
|
end
|
@@ -23,6 +23,10 @@ module SolidusBling
|
|
23
23
|
where(active: true)
|
24
24
|
end
|
25
25
|
|
26
|
+
def active_from_api?
|
27
|
+
BlingApi::Seller.find_by_id(external_id).try(:situacao) == "A"
|
28
|
+
end
|
29
|
+
|
26
30
|
def self.inactivate_sellers sellers_bling
|
27
31
|
ids_sellers_bling = sellers_bling.pluck(:id)
|
28
32
|
ids_sellers_store = pluck(:external_id).map(&:to_i)
|
data/lib/solidus_bling/engine.rb
CHANGED
metadata
CHANGED
@@ -1,49 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_bling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todas Essas Coisas
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
12
|
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
13
|
- !ruby/object:Gem::Dependency
|
48
14
|
name: solidus_brazilian_adaptations
|
49
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,40 +38,13 @@ dependencies:
|
|
72
38
|
- - ">="
|
73
39
|
- !ruby/object:Gem::Version
|
74
40
|
version: '0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: solidus_dev_support
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '2.7'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '2.7'
|
89
41
|
description:
|
90
42
|
email: hamiltontubo@gmail.com
|
91
43
|
executables: []
|
92
44
|
extensions: []
|
93
45
|
extra_rdoc_files: []
|
94
46
|
files:
|
95
|
-
- ".circleci/config.yml"
|
96
|
-
- ".gem_release.yml"
|
97
|
-
- ".gitattributes"
|
98
|
-
- ".github/stale.yml"
|
99
|
-
- ".github/workflows/publish_gem.yml"
|
100
|
-
- ".github_changelog_generator"
|
101
|
-
- ".gitignore"
|
102
|
-
- ".rspec"
|
103
|
-
- ".rubocop.yml"
|
104
|
-
- CHANGELOG.md
|
105
|
-
- Gemfile
|
106
|
-
- LICENSE
|
107
47
|
- README.md
|
108
|
-
- Rakefile
|
109
48
|
- app/controllers/spree/admin/orders/sellers_controller.rb
|
110
49
|
- app/controllers/spree/admin/solidus_bling/accounts_controller.rb
|
111
50
|
- app/controllers/spree/admin/solidus_bling/orders_controller.rb
|
@@ -131,14 +70,6 @@ files:
|
|
131
70
|
- app/views/spree/admin/solidus_bling/accounts/index.html.erb
|
132
71
|
- app/views/spree/admin/solidus_bling/accounts/new.html.erb
|
133
72
|
- app/views/spree/admin/solidus_bling/accounts/show.html.erb
|
134
|
-
- bin/console
|
135
|
-
- bin/meu_sandbox
|
136
|
-
- bin/rails
|
137
|
-
- bin/rails-engine
|
138
|
-
- bin/rails-sandbox
|
139
|
-
- bin/rake
|
140
|
-
- bin/sandbox
|
141
|
-
- bin/setup
|
142
73
|
- config/locales/en.yml
|
143
74
|
- config/locales/pt-BR.yml
|
144
75
|
- config/routes.rb
|
@@ -158,16 +89,10 @@ files:
|
|
158
89
|
- lib/solidus_bling.rb
|
159
90
|
- lib/solidus_bling/configuration.rb
|
160
91
|
- lib/solidus_bling/engine.rb
|
161
|
-
- lib/solidus_bling/testing_support/factories.rb
|
162
92
|
- lib/solidus_bling/version.rb
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
- BSD-3-Clause
|
167
|
-
metadata:
|
168
|
-
homepage_uri: https://github.com/hamiltontborges/solidus_bling#readme
|
169
|
-
source_code_uri: https://github.com/todasessascoisas/solidus_bling
|
170
|
-
changelog_uri: https://github.com/todasessascoisas/solidus_bling/blob/master/CHANGELOG.md
|
93
|
+
homepage: https://github.com/todasessascoisas/solidus_bling
|
94
|
+
licenses: []
|
95
|
+
metadata: {}
|
171
96
|
post_install_message:
|
172
97
|
rdoc_options: []
|
173
98
|
require_paths:
|
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/.gitattributes
DELETED
data/.github/stale.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
_extends: .github
|
@@ -1,25 +0,0 @@
|
|
1
|
-
name: Publish Gem
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches:
|
5
|
-
- main
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
push:
|
9
|
-
runs-on: ubuntu-latest
|
10
|
-
|
11
|
-
permissions:
|
12
|
-
contents: write
|
13
|
-
id-token: write
|
14
|
-
|
15
|
-
steps:
|
16
|
-
# Set up
|
17
|
-
- uses: actions/checkout@v4
|
18
|
-
- name: Set up Ruby
|
19
|
-
uses: ruby/setup-ruby@v1
|
20
|
-
with:
|
21
|
-
bundler-cache: true
|
22
|
-
ruby-version: ruby
|
23
|
-
|
24
|
-
# Release
|
25
|
-
- uses: rubygems/release-gem@v1
|
data/.github_changelog_generator
DELETED
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/CHANGELOG.md
DELETED
data/Gemfile
DELETED
@@ -1,47 +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
|
-
# Provides basic authentication functionality for testing parts of your engine
|
24
|
-
gem "solidus_auth_devise"
|
25
|
-
|
26
|
-
case ENV.fetch("DB", nil)
|
27
|
-
when "mysql"
|
28
|
-
gem "mysql2"
|
29
|
-
when "postgresql"
|
30
|
-
gem "pg"
|
31
|
-
else
|
32
|
-
gem "sqlite3"
|
33
|
-
end
|
34
|
-
|
35
|
-
# While we still support Ruby < 3 we need to workaround a limitation in
|
36
|
-
# the 'async' gem that relies on the latest ruby, since RubyGems doesn't
|
37
|
-
# resolve gems based on the required ruby version.
|
38
|
-
gem "async", "< 3" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3")
|
39
|
-
|
40
|
-
gemspec
|
41
|
-
|
42
|
-
# Use a local Gemfile to include development dependencies that might not be
|
43
|
-
# relevant for the project or for other contributors, e.g. pry-byebug.
|
44
|
-
#
|
45
|
-
# We use `send` instead of calling `eval_gemfile` to work around an issue with
|
46
|
-
# how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658.
|
47
|
-
send(:eval_gemfile, "Gemfile-local") if File.exist? "Gemfile-local"
|
data/LICENSE
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
Copyright (c) 2023 Hamilton Tumenas Borges
|
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_bling"
|
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/meu_sandbox
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
bin/rails db:environment:set RAILS_ENV=development
|
4
|
-
|
5
|
-
set -e
|
6
|
-
test -z "${DEBUG+empty_string}" || set -x
|
7
|
-
|
8
|
-
if [ -z "$SOLIDUS_BRANCH" ]
|
9
|
-
then
|
10
|
-
echo "~~> Use 'export SOLIDUS_BRANCH=[main|v3.2|...]' to control the Solidus branch"
|
11
|
-
SOLIDUS_BRANCH="main"
|
12
|
-
fi
|
13
|
-
echo "~~> Using branch $SOLIDUS_BRANCH of solidus"
|
14
|
-
|
15
|
-
extension_name="solidus_bling"
|
16
|
-
|
17
|
-
# Stay away from the bundler env of the containing extension.
|
18
|
-
function unbundled {
|
19
|
-
ruby -rbundler -e'b = proc {system *ARGV}; Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&b) : Bundler.with_clean_env(&b)' -- $@
|
20
|
-
}
|
21
|
-
|
22
|
-
rm -rf ./sandbox
|
23
|
-
unbundled bundle exec rails new sandbox \
|
24
|
-
--database=postgresql \
|
25
|
-
--skip-bundle \
|
26
|
-
--skip-git \
|
27
|
-
--skip-keeps \
|
28
|
-
--skip-rc \
|
29
|
-
--skip-spring \
|
30
|
-
--skip-test \
|
31
|
-
--skip-javascript
|
32
|
-
|
33
|
-
if [ ! -d "sandbox" ]; then
|
34
|
-
echo 'sandbox rails application failed'
|
35
|
-
exit 1
|
36
|
-
fi
|
37
|
-
|
38
|
-
cd ./sandbox
|
39
|
-
cat <<RUBY >> Gemfile
|
40
|
-
gem 'solidus', github: 'solidusio/solidus', branch: '$SOLIDUS_BRANCH'
|
41
|
-
gem 'rails-i18n'
|
42
|
-
gem 'solidus_i18n'
|
43
|
-
|
44
|
-
gem '$extension_name', path: '..'
|
45
|
-
|
46
|
-
group :test, :development do
|
47
|
-
platforms :mri do
|
48
|
-
gem 'pry-byebug'
|
49
|
-
end
|
50
|
-
end
|
51
|
-
RUBY
|
52
|
-
|
53
|
-
unbundled bundle install --gemfile Gemfile
|
54
|
-
|
55
|
-
unbundled bundle exec rake db:drop db:create
|
56
|
-
|
57
|
-
unbundled bundle exec rails generate solidus:install \
|
58
|
-
--auto-accept \
|
59
|
-
--payment-method=none \
|
60
|
-
--frontend=starter \
|
61
|
-
$@
|
62
|
-
|
63
|
-
unbundled bundle exec rails generate ${extension_name}:install --auto-run-migrations
|
64
|
-
|
65
|
-
echo
|
66
|
-
echo "๐ Sandbox app successfully created for $extension_name!"
|
67
|
-
echo "๐งช This app is intended for test purposes."
|
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_bling/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,78 +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 "$SOLIDUS_BRANCH" ]
|
9
|
-
then
|
10
|
-
echo "~~> Use 'export SOLIDUS_BRANCH=[main|v3.2|...]' to control the Solidus branch"
|
11
|
-
SOLIDUS_BRANCH="main"
|
12
|
-
fi
|
13
|
-
echo "~~> Using branch $SOLIDUS_BRANCH of solidus"
|
14
|
-
|
15
|
-
if [ -z "$SOLIDUS_FRONTEND" ]
|
16
|
-
then
|
17
|
-
echo "~~> Use 'export SOLIDUS_FRONTEND=[solidus_frontend|solidus_starter_frontend]' to control the Solidus frontend"
|
18
|
-
SOLIDUS_FRONTEND="solidus_frontend"
|
19
|
-
fi
|
20
|
-
echo "~~> Using branch $SOLIDUS_FRONTEND as the solidus frontend"
|
21
|
-
|
22
|
-
extension_name="solidus_bling"
|
23
|
-
|
24
|
-
# Stay away from the bundler env of the containing extension.
|
25
|
-
function unbundled {
|
26
|
-
ruby -rbundler -e'b = proc {system *ARGV}; Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&b) : Bundler.with_clean_env(&b)' -- $@
|
27
|
-
}
|
28
|
-
|
29
|
-
rm -rf ./sandbox
|
30
|
-
unbundled bundle exec rails new sandbox \
|
31
|
-
--database="${DB:-sqlite3}" \
|
32
|
-
--skip-bundle \
|
33
|
-
--skip-git \
|
34
|
-
--skip-keeps \
|
35
|
-
--skip-rc \
|
36
|
-
--skip-spring \
|
37
|
-
--skip-test \
|
38
|
-
--skip-javascript
|
39
|
-
|
40
|
-
if [ ! -d "sandbox" ]; then
|
41
|
-
echo 'sandbox rails application failed'
|
42
|
-
exit 1
|
43
|
-
fi
|
44
|
-
|
45
|
-
cd ./sandbox
|
46
|
-
cat <<RUBY >> Gemfile
|
47
|
-
gem 'solidus', github: 'solidusio/solidus', branch: '$SOLIDUS_BRANCH'
|
48
|
-
gem 'rails-i18n'
|
49
|
-
gem 'solidus_i18n'
|
50
|
-
|
51
|
-
gem '$extension_name', path: '..'
|
52
|
-
|
53
|
-
group :test, :development do
|
54
|
-
platforms :mri do
|
55
|
-
gem 'pry-byebug'
|
56
|
-
end
|
57
|
-
end
|
58
|
-
RUBY
|
59
|
-
|
60
|
-
unbundled bundle install --gemfile Gemfile
|
61
|
-
|
62
|
-
unbundled bundle exec rake db:drop db:create
|
63
|
-
|
64
|
-
unbundled bundle exec rails generate solidus:install \
|
65
|
-
--auto-accept \
|
66
|
-
--user_class=Spree::User \
|
67
|
-
--enforce_available_locales=true \
|
68
|
-
--with-authentication=true \
|
69
|
-
--payment-method=none \
|
70
|
-
--frontend=${SOLIDUS_FRONTEND} \
|
71
|
-
$@
|
72
|
-
|
73
|
-
unbundled bundle exec rails generate solidus:auth:install --auto-run-migrations
|
74
|
-
unbundled bundle exec rails generate ${extension_name}:install --auto-run-migrations
|
75
|
-
|
76
|
-
echo
|
77
|
-
echo "๐ Sandbox app successfully created for $extension_name!"
|
78
|
-
echo "๐งช This app is intended for test purposes."
|
data/bin/setup
DELETED
data/solidus_bling.gemspec
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "lib/solidus_bling/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "solidus_bling"
|
7
|
-
spec.version = SolidusBling::VERSION
|
8
|
-
spec.authors = ["Todas Essas Coisas"]
|
9
|
-
spec.email = "hamiltontubo@gmail.com"
|
10
|
-
|
11
|
-
spec.summary = "Solidus extension to integrate with the Bling"
|
12
|
-
spec.homepage = "https://github.com/hamiltontborges/solidus_bling#readme"
|
13
|
-
spec.license = "BSD-3-Clause"
|
14
|
-
|
15
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
-
spec.metadata["source_code_uri"] = "https://github.com/todasessascoisas/solidus_bling"
|
17
|
-
spec.metadata["changelog_uri"] = "https://github.com/todasessascoisas/solidus_bling/blob/master/CHANGELOG.md"
|
18
|
-
|
19
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.5", "< 4")
|
20
|
-
|
21
|
-
# Specify which files should be added to the gem when it is released.
|
22
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
-
files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
|
24
|
-
|
25
|
-
spec.files = files.grep_v(%r{^(test|spec|features)/})
|
26
|
-
spec.bindir = "exe"
|
27
|
-
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
-
spec.require_paths = ["lib"]
|
29
|
-
|
30
|
-
spec.add_dependency "solidus_core", [">= 2.0.0", "< 5"]
|
31
|
-
spec.add_dependency "solidus_support", "~> 0.5"
|
32
|
-
spec.add_dependency "solidus_brazilian_adaptations"
|
33
|
-
spec.add_dependency "bling_api"
|
34
|
-
|
35
|
-
spec.add_development_dependency "solidus_dev_support", "~> 2.7"
|
36
|
-
end
|