solidus_dev_support 2.5.4 → 2.5.6
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/.circleci/config.yml +16 -6
- data/.github/stale.yml +1 -0
- data/CHANGELOG.md +32 -2
- data/Gemfile +3 -0
- data/README.md +4 -4
- data/lib/solidus_dev_support/rake_tasks.rb +0 -1
- data/lib/solidus_dev_support/rspec/capybara.rb +6 -0
- data/lib/solidus_dev_support/rspec/feature_helper.rb +4 -10
- data/lib/solidus_dev_support/templates/extension/.circleci/config.yml +9 -3
- data/lib/solidus_dev_support/templates/extension/.github/stale.yml +1 -17
- data/lib/solidus_dev_support/templates/extension/{Gemfile → Gemfile.tt} +11 -1
- data/lib/solidus_dev_support/templates/extension/LICENSE +1 -1
- data/lib/solidus_dev_support/templates/extension/README.md +2 -13
- data/lib/solidus_dev_support/templates/extension/bin/sandbox.tt +21 -29
- data/lib/solidus_dev_support/templates/extension/extension.gemspec.tt +1 -1
- data/lib/solidus_dev_support/templates/extension/gitignore +1 -0
- data/lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/install_generator.rb.tt +4 -0
- data/lib/solidus_dev_support/version.rb +1 -1
- data/solidus_dev_support.gemspec +2 -5
- data/spec/features/create_extension_spec.rb +17 -12
- metadata +13 -41
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a256697ae6d1f388aeabf3bb92518d06656d898ffa5b843dd0c75f9b4998615e
|
4
|
+
data.tar.gz: eee6cf88c1bdf7dbe42ff1aa0354503250537d30ad00983e3b442a4eae4252f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62cf34cab1efaa87e55bc217602fb5b511efb2b2ad9b164e3844c5503a5359fbbd29e4cf861f4035ed092f7cab8354bfdc39d0849af3bccfde975c30e675b37d
|
7
|
+
data.tar.gz: f708bf5e2de29af086d0890629e12cf9d233790cf86792762cdc6cb3b2060c068114c41570a43c27a5c24d7490ea8cd2d591b7a3b29c0a28801d71c5a589d230
|
data/.circleci/config.yml
CHANGED
@@ -12,21 +12,31 @@ commands:
|
|
12
12
|
steps:
|
13
13
|
- checkout
|
14
14
|
- run:
|
15
|
-
|
16
|
-
|
15
|
+
name: "Update bundler"
|
16
|
+
command: |
|
17
|
+
sudo gem update --system
|
18
|
+
gem --version
|
19
|
+
gem install bundler -v '>=2.3.21' --conservative
|
20
|
+
bundle --version
|
17
21
|
|
18
22
|
jobs:
|
19
23
|
solidus-master:
|
20
|
-
executor:
|
24
|
+
executor:
|
25
|
+
name: solidusio_extensions/sqlite
|
26
|
+
ruby_version: '3.1'
|
21
27
|
steps: ['setup', 'solidusio_extensions/run-tests-solidus-master']
|
22
28
|
solidus-current:
|
23
|
-
executor:
|
29
|
+
executor:
|
30
|
+
name: solidusio_extensions/sqlite
|
31
|
+
ruby_version: '3.0'
|
24
32
|
steps: ['setup', 'solidusio_extensions/run-tests-solidus-current']
|
25
33
|
solidus-older:
|
26
|
-
executor:
|
34
|
+
executor:
|
35
|
+
name: solidusio_extensions/sqlite
|
36
|
+
ruby_version: '2.7'
|
27
37
|
steps: ['setup', 'solidusio_extensions/run-tests-solidus-older']
|
28
38
|
lint-code:
|
29
|
-
executor: solidusio_extensions/sqlite
|
39
|
+
executor: solidusio_extensions/sqlite
|
30
40
|
steps: ['setup', 'solidusio_extensions/lint-code']
|
31
41
|
|
32
42
|
workflows:
|
data/.github/stale.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
_extends: .github
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,38 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [2.5.
|
3
|
+
## [2.5.6](https://github.com/solidusio/solidus_dev_support/tree/2.5.6) (2023-04-24)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.5.
|
5
|
+
[Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.5.5...2.5.6)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Allow Solidus 4 [\#203](https://github.com/solidusio/solidus_dev_support/pull/203) ([elia](https://github.com/elia))
|
10
|
+
- Update proposed defaults [\#191](https://github.com/solidusio/solidus_dev_support/pull/191) ([elia](https://github.com/elia))
|
11
|
+
|
12
|
+
**Fixed bugs:**
|
13
|
+
|
14
|
+
- Fix sandbox default solidus branch [\#192](https://github.com/solidusio/solidus_dev_support/pull/192) ([RyanofWoods](https://github.com/RyanofWoods))
|
15
|
+
|
16
|
+
**Merged pull requests:**
|
17
|
+
|
18
|
+
- Remove Slack notifications for CI failures [\#199](https://github.com/solidusio/solidus_dev_support/pull/199) ([waiting-for-dev](https://github.com/waiting-for-dev))
|
19
|
+
|
20
|
+
## [v2.5.5](https://github.com/solidusio/solidus_dev_support/tree/v2.5.5) (2022-09-08)
|
21
|
+
|
22
|
+
[Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.5.4...v2.5.5)
|
23
|
+
|
24
|
+
**Implemented enhancements:**
|
25
|
+
|
26
|
+
- Configure solidus\_chrome\_headless as capybara-screenshot driver [\#190](https://github.com/solidusio/solidus_dev_support/pull/190) ([tvdeyen](https://github.com/tvdeyen))
|
27
|
+
- Misc: auth-devise, extracted frontend gem, sqlite [\#188](https://github.com/solidusio/solidus_dev_support/pull/188) ([elia](https://github.com/elia))
|
28
|
+
|
29
|
+
**Fixed bugs:**
|
30
|
+
|
31
|
+
- Revert temporary fix for Octokit [\#186](https://github.com/solidusio/solidus_dev_support/pull/186) ([waiting-for-dev](https://github.com/waiting-for-dev))
|
32
|
+
|
33
|
+
## [v2.5.4](https://github.com/solidusio/solidus_dev_support/tree/v2.5.4) (2022-05-31)
|
34
|
+
|
35
|
+
[Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.5.2...v2.5.4)
|
6
36
|
|
7
37
|
**Fixed bugs:**
|
8
38
|
|
data/Gemfile
CHANGED
@@ -13,6 +13,9 @@ gem 'solidus', github: 'solidusio/solidus', branch: branch
|
|
13
13
|
# A workaround for https://github.com/bundler/bundler/issues/6677
|
14
14
|
gem 'rails', '>0.a'
|
15
15
|
|
16
|
+
gem 'bundler'
|
17
|
+
gem 'rake'
|
18
|
+
|
16
19
|
# These gems will be used by the temporary extensions generated by tests
|
17
20
|
group :test do
|
18
21
|
gem 'mysql2'
|
data/README.md
CHANGED
@@ -38,11 +38,11 @@ in solidus_dev_support.
|
|
38
38
|
|
39
39
|
#### Updating existing extensions
|
40
40
|
|
41
|
-
If you have an existing extension and want to update it to use
|
42
|
-
you can run the following in the extension's directory:
|
41
|
+
If you have an existing extension generated with `solidus_dev_support` and want to update it to use
|
42
|
+
the latest standards from this gem, you can run the following in the extension's directory:
|
43
43
|
|
44
44
|
```console
|
45
|
-
$ solidus extension .
|
45
|
+
$ bundle exec solidus extension .
|
46
46
|
```
|
47
47
|
|
48
48
|
In case of conflicting files, you will be prompted for an action. You can overwrite the files with
|
@@ -238,7 +238,7 @@ To release a new version:
|
|
238
238
|
|
239
239
|
1. update the version number in `version.rb`
|
240
240
|
2. update the changelog with `bin/rake changelog`
|
241
|
-
3. commit the changes using `
|
241
|
+
3. commit the changes using `Release SolidusDevSupport v1.2.3` as the message
|
242
242
|
3. run `bin/rake release`
|
243
243
|
|
244
244
|
The last command will create a git tag for the version, push git commits and tags, and push the `.gem` file to
|
@@ -78,7 +78,6 @@ module SolidusDevSupport
|
|
78
78
|
|
79
79
|
GitHubChangelogGenerator::RakeTask.new(:changelog) do |config|
|
80
80
|
require 'octokit'
|
81
|
-
require 'octokit/repository'
|
82
81
|
repo = Octokit::Repository.from_url(gemspec.metadata['source_code_uri'] || gemspec.homepage)
|
83
82
|
|
84
83
|
config.user = repo.owner
|
@@ -21,4 +21,10 @@ Capybara.drivers[:selenium_chrome_headless].tap do |original_driver|
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
require 'capybara-screenshot/rspec'
|
25
|
+
|
26
|
+
Capybara::Screenshot.register_driver(:solidus_chrome_headless) do |driver, path|
|
27
|
+
driver.browser.save_screenshot(path)
|
28
|
+
end
|
29
|
+
|
24
30
|
require 'spree/testing_support/capybara_ext'
|
@@ -8,11 +8,9 @@
|
|
8
8
|
#
|
9
9
|
|
10
10
|
require 'solidus_dev_support/rspec/rails_helper'
|
11
|
-
|
12
|
-
require 'capybara-screenshot/rspec'
|
13
11
|
require 'solidus_dev_support/rspec/capybara'
|
14
12
|
|
15
|
-
|
13
|
+
dev_support_assets_preload = ->(*) {
|
16
14
|
if Rails.application.respond_to?(:precompiled_assets)
|
17
15
|
Rails.application.precompiled_assets
|
18
16
|
else
|
@@ -21,18 +19,14 @@ def dev_support_assets_preload
|
|
21
19
|
Rails.application.assets.find_asset(asset)
|
22
20
|
end
|
23
21
|
end
|
24
|
-
|
22
|
+
}
|
25
23
|
|
26
24
|
RSpec.configure do |config|
|
27
25
|
config.when_first_matching_example_defined(type: :feature) do
|
28
|
-
config.before :suite
|
29
|
-
dev_support_assets_preload
|
30
|
-
end
|
26
|
+
config.before :suite, &dev_support_assets_preload
|
31
27
|
end
|
32
28
|
|
33
29
|
config.when_first_matching_example_defined(type: :system) do
|
34
|
-
config.before :suite
|
35
|
-
dev_support_assets_preload
|
36
|
-
end
|
30
|
+
config.before :suite, &dev_support_assets_preload
|
37
31
|
end
|
38
32
|
end
|
@@ -11,25 +11,30 @@ orbs:
|
|
11
11
|
solidusio_extensions: solidusio/extensions@volatile
|
12
12
|
|
13
13
|
jobs:
|
14
|
+
run-specs-with-sqlite:
|
15
|
+
executor: solidusio_extensions/sqlite
|
16
|
+
steps:
|
17
|
+
- browser-tools/install-chrome
|
18
|
+
- solidusio_extensions/run-tests
|
14
19
|
run-specs-with-postgres:
|
15
20
|
executor: solidusio_extensions/postgres
|
16
21
|
steps:
|
17
|
-
- browser-tools/install-
|
22
|
+
- browser-tools/install-chrome
|
18
23
|
- solidusio_extensions/run-tests
|
19
24
|
run-specs-with-mysql:
|
20
25
|
executor: solidusio_extensions/mysql
|
21
26
|
steps:
|
22
|
-
- browser-tools/install-
|
27
|
+
- browser-tools/install-chrome
|
23
28
|
- solidusio_extensions/run-tests
|
24
29
|
lint-code:
|
25
30
|
executor: solidusio_extensions/sqlite-memory
|
26
31
|
steps:
|
27
|
-
- browser-tools/install-browser-tools
|
28
32
|
- solidusio_extensions/lint-code
|
29
33
|
|
30
34
|
workflows:
|
31
35
|
"Run specs on supported Solidus versions":
|
32
36
|
jobs:
|
37
|
+
- run-specs-with-sqlite
|
33
38
|
- run-specs-with-postgres
|
34
39
|
- run-specs-with-mysql
|
35
40
|
- lint-code
|
@@ -43,5 +48,6 @@ workflows:
|
|
43
48
|
only:
|
44
49
|
- master
|
45
50
|
jobs:
|
51
|
+
- run-specs-with-sqlite
|
46
52
|
- run-specs-with-postgres
|
47
53
|
- run-specs-with-mysql
|
@@ -1,17 +1 @@
|
|
1
|
-
|
2
|
-
daysUntilStale: 60
|
3
|
-
# Number of days of inactivity before a stale issue is closed
|
4
|
-
daysUntilClose: false
|
5
|
-
# Issues with these labels will never be considered stale
|
6
|
-
exemptLabels:
|
7
|
-
- pinned
|
8
|
-
- security
|
9
|
-
# Label to use when marking an issue as stale
|
10
|
-
staleLabel: stale
|
11
|
-
# Comment to post when marking an issue as stale. Set to `false` to disable
|
12
|
-
markComment: >
|
13
|
-
This issue has been automatically marked as stale because it has not had
|
14
|
-
recent activity. It might be closed if no further activity occurs. Thank you
|
15
|
-
for your contributions.
|
16
|
-
# Comment to post when closing a stale issue. Set to `false` to disable
|
17
|
-
closeComment: false
|
1
|
+
_extends: .github
|
@@ -6,14 +6,19 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
6
6
|
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
|
7
7
|
gem 'solidus', github: 'solidusio/solidus', branch: branch
|
8
8
|
|
9
|
+
# The solidus_frontend gem has been pulled out since v3.2
|
10
|
+
gem 'solidus_frontend', github: 'solidusio/solidus_frontend' if branch == 'master'
|
11
|
+
gem 'solidus_frontend' if branch >= 'v3.2' # rubocop:disable Bundler/DuplicatedGem
|
12
|
+
|
9
13
|
# Needed to help Bundler figure out how to resolve dependencies,
|
10
14
|
# otherwise it takes forever to resolve them.
|
11
15
|
# See https://github.com/bundler/bundler/issues/6677
|
12
16
|
gem 'rails', '>0.a'
|
13
17
|
|
18
|
+
<% if file_name != 'solidus_auth_devise' %>
|
14
19
|
# Provides basic authentication functionality for testing parts of your engine
|
15
20
|
gem 'solidus_auth_devise'
|
16
|
-
|
21
|
+
<% end %>
|
17
22
|
case ENV.fetch('DB', nil)
|
18
23
|
when 'mysql'
|
19
24
|
gem 'mysql2'
|
@@ -23,6 +28,11 @@ else
|
|
23
28
|
gem 'sqlite3'
|
24
29
|
end
|
25
30
|
|
31
|
+
# While we still support Ruby < 3 we need to workaround a limitation in
|
32
|
+
# the 'async' gem that relies on the latest ruby, since RubyGems doesn't
|
33
|
+
# resolve gems based on the required ruby version.
|
34
|
+
gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
|
35
|
+
|
26
36
|
gemspec
|
27
37
|
|
28
38
|
# Use a local Gemfile to include development dependencies that might not be
|
@@ -71,21 +71,10 @@ $ bin/rails server
|
|
71
71
|
Use Ctrl-C to stop
|
72
72
|
```
|
73
73
|
|
74
|
-
### Updating the changelog
|
75
|
-
|
76
|
-
Before and after releases the changelog should be updated to reflect the up-to-date status of
|
77
|
-
the project:
|
78
|
-
|
79
|
-
```shell
|
80
|
-
bin/rake changelog
|
81
|
-
git add CHANGELOG.md
|
82
|
-
git commit -m "Update the changelog"
|
83
|
-
```
|
84
|
-
|
85
74
|
### Releasing new versions
|
86
75
|
|
87
|
-
Please refer to the dedicated
|
76
|
+
Please refer to the [dedicated page](https://github.com/solidusio/solidus/wiki/How-to-release-extensions) in the Solidus wiki.
|
88
77
|
|
89
78
|
## License
|
90
79
|
|
91
|
-
Copyright (c) <%= Time.now.year %>
|
80
|
+
Copyright (c) <%= Time.now.year %> <%= gemspec.authors.join ', ' %>, released under the New BSD License.
|
@@ -1,29 +1,23 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
set -e
|
4
|
+
test -z "${DEBUG+empty_string}" || set -x
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
RAILSDB="sqlite3"
|
14
|
-
;;
|
15
|
-
*)
|
16
|
-
echo "Invalid DB specified: $DB"
|
17
|
-
exit 1
|
18
|
-
;;
|
19
|
-
esac
|
6
|
+
test "$DB" = "sqlite" && export DB="sqlite3"
|
7
|
+
|
8
|
+
if [ -z "$SOLIDUS_BRANCH" ]
|
9
|
+
then
|
10
|
+
echo "~~> Use 'export SOLIDUS_BRANCH=[master|v3.2|...]' to control the Solidus branch"
|
11
|
+
SOLIDUS_BRANCH="master"
|
12
|
+
fi
|
13
|
+
echo "~~> Using branch $SOLIDUS_BRANCH of solidus"
|
20
14
|
|
21
|
-
if [
|
15
|
+
if [ -z "$SOLIDUS_FRONTEND" ]
|
22
16
|
then
|
23
|
-
|
24
|
-
|
25
|
-
BRANCH="master"
|
17
|
+
echo "~~> Use 'export SOLIDUS_FRONTEND=[solidus_frontend|solidus_starter_frontend]' to control the Solidus frontend"
|
18
|
+
SOLIDUS_FRONTEND="solidus_frontend"
|
26
19
|
fi
|
20
|
+
echo "~~> Using branch $SOLIDUS_FRONTEND as the solidus frontend"
|
27
21
|
|
28
22
|
extension_name="<%= file_name %>"
|
29
23
|
|
@@ -33,7 +27,8 @@ function unbundled {
|
|
33
27
|
}
|
34
28
|
|
35
29
|
rm -rf ./sandbox
|
36
|
-
unbundled bundle exec rails new sandbox
|
30
|
+
unbundled bundle exec rails new sandbox \
|
31
|
+
--database="${DB:-sqlite3}" \
|
37
32
|
--skip-bundle \
|
38
33
|
--skip-git \
|
39
34
|
--skip-keeps \
|
@@ -49,8 +44,7 @@ fi
|
|
49
44
|
|
50
45
|
cd ./sandbox
|
51
46
|
cat <<RUBY >> Gemfile
|
52
|
-
gem 'solidus', github: 'solidusio/solidus', branch: '$
|
53
|
-
gem 'solidus_auth_devise', '>= 2.1.0'
|
47
|
+
gem 'solidus', github: 'solidusio/solidus', branch: '$SOLIDUS_BRANCH'
|
54
48
|
gem 'rails-i18n'
|
55
49
|
gem 'solidus_i18n'
|
56
50
|
|
@@ -71,16 +65,14 @@ unbundled bundle exec rails generate solidus:install \
|
|
71
65
|
--auto-accept \
|
72
66
|
--user_class=Spree::User \
|
73
67
|
--enforce_available_locales=true \
|
74
|
-
--with-authentication
|
68
|
+
--with-authentication=<%= file_name != 'solidus_auth_devise' %> \
|
75
69
|
--payment-method=none \
|
70
|
+
--frontend=${SOLIDUS_FRONTEND} \
|
76
71
|
$@
|
77
72
|
|
78
|
-
unbundled bundle exec rails generate solidus:auth:install
|
79
|
-
unbundled bundle exec rails generate ${extension_name}:install
|
73
|
+
unbundled bundle exec rails generate solidus:auth:install --auto-run-migrations
|
74
|
+
unbundled bundle exec rails generate ${extension_name}:install --auto-run-migrations
|
80
75
|
|
81
76
|
echo
|
82
77
|
echo "🚀 Sandbox app successfully created for $extension_name!"
|
83
|
-
echo "
|
84
|
-
echo "🚀 Use 'export DB=[postgres|mysql|sqlite]' to control the DB adapter"
|
85
|
-
echo "🚀 Use 'export SOLIDUS_BRANCH=<BRANCH-NAME>' to control the Solidus version"
|
86
|
-
echo "🚀 This app is intended for test purposes."
|
78
|
+
echo "🧪 This app is intended for test purposes."
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata['source_code_uri'] = '<%= gemspec.metadata["source_code_uri"] %>'
|
18
18
|
spec.metadata['changelog_uri'] = '<%= gemspec.metadata["changelog_uri"] %>'
|
19
19
|
|
20
|
-
spec.required_ruby_version = Gem::Requirement.new('
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')
|
21
21
|
|
22
22
|
# Specify which files should be added to the gem when it is released.
|
23
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -6,6 +6,10 @@ module <%= class_name %>
|
|
6
6
|
class_option :auto_run_migrations, type: :boolean, default: false
|
7
7
|
source_root File.expand_path('templates', __dir__)
|
8
8
|
|
9
|
+
def self.exit_on_failure?
|
10
|
+
true
|
11
|
+
end
|
12
|
+
|
9
13
|
def copy_initializer
|
10
14
|
template 'initializer.rb', 'config/initializers/<%= file_name %>.rb'
|
11
15
|
end
|
data/solidus_dev_support.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_dependency 'capybara-screenshot', '~> 1.0'
|
34
34
|
spec.add_dependency 'codecov', '~> 0.2'
|
35
35
|
spec.add_dependency 'database_cleaner', '~> 1.7'
|
36
|
-
spec.add_dependency 'factory_bot', '
|
36
|
+
spec.add_dependency 'factory_bot', '>= 4.8'
|
37
37
|
spec.add_dependency 'factory_bot_rails'
|
38
38
|
spec.add_dependency 'ffaker', '~> 2.13'
|
39
39
|
spec.add_dependency 'gem-release', '~> 2.1'
|
@@ -45,9 +45,6 @@ Gem::Specification.new do |spec|
|
|
45
45
|
spec.add_dependency 'rubocop-performance', '~> 1.5'
|
46
46
|
spec.add_dependency 'rubocop-rails', '~> 2.3'
|
47
47
|
spec.add_dependency 'rubocop-rspec', '~> 2.0'
|
48
|
-
spec.add_dependency 'solidus_core', ['>= 2.0', '<
|
48
|
+
spec.add_dependency 'solidus_core', ['>= 2.0', '< 5']
|
49
49
|
spec.add_dependency 'webdrivers', '>= 4.4'
|
50
|
-
|
51
|
-
spec.add_development_dependency 'bundler'
|
52
|
-
spec.add_development_dependency 'rake'
|
53
50
|
end
|
@@ -155,18 +155,22 @@ RSpec.describe 'Create extension' do
|
|
155
155
|
|
156
156
|
def sh(*args)
|
157
157
|
command = args.size == 1 ? args.first : args.shelljoin
|
158
|
-
output, status = with_unbundled_env
|
158
|
+
output, status = with_unbundled_env do
|
159
|
+
Open3.capture2e({ 'CI' => nil }, command)
|
160
|
+
end
|
159
161
|
|
160
|
-
if
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
162
|
+
if $DEBUG || ENV['DEBUG']
|
163
|
+
warn '~' * 80
|
164
|
+
warn "$ #{command}"
|
165
|
+
warn output.to_s
|
166
|
+
warn "$ #{command} ~~~~> EXIT STATUS: #{status.exitstatus}"
|
167
|
+
end
|
168
|
+
|
169
|
+
unless status.success?
|
168
170
|
raise(command_failed_error, "command failed: #{command}\n#{output}")
|
169
171
|
end
|
172
|
+
|
173
|
+
output.to_s
|
170
174
|
end
|
171
175
|
|
172
176
|
def with_unbundled_env(&block)
|
@@ -182,11 +186,12 @@ RSpec.describe 'Create extension' do
|
|
182
186
|
# variables doesn't help because commands are run with a clean env.
|
183
187
|
bundle_path = "#{gem_root}/vendor/bundle"
|
184
188
|
|
185
|
-
|
186
|
-
|
189
|
+
if File.exist?(bundle_path)
|
190
|
+
sh "bundle config set --local path #{bundle_path.shellescape}"
|
191
|
+
end
|
187
192
|
|
188
193
|
output = nil
|
189
|
-
cd(install_path) { output = sh
|
194
|
+
cd(install_path) { output = sh 'bundle install' }
|
190
195
|
output
|
191
196
|
end
|
192
197
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_dev_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Desantis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
name: factory_bot
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '4.8'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '4.8'
|
83
83
|
- !ruby/object:Gem::Dependency
|
@@ -255,7 +255,7 @@ dependencies:
|
|
255
255
|
version: '2.0'
|
256
256
|
- - "<"
|
257
257
|
- !ruby/object:Gem::Version
|
258
|
-
version: '
|
258
|
+
version: '5'
|
259
259
|
type: :runtime
|
260
260
|
prerelease: false
|
261
261
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -265,7 +265,7 @@ dependencies:
|
|
265
265
|
version: '2.0'
|
266
266
|
- - "<"
|
267
267
|
- !ruby/object:Gem::Version
|
268
|
-
version: '
|
268
|
+
version: '5'
|
269
269
|
- !ruby/object:Gem::Dependency
|
270
270
|
name: webdrivers
|
271
271
|
requirement: !ruby/object:Gem::Requirement
|
@@ -280,35 +280,7 @@ dependencies:
|
|
280
280
|
- - ">="
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '4.4'
|
283
|
-
|
284
|
-
name: bundler
|
285
|
-
requirement: !ruby/object:Gem::Requirement
|
286
|
-
requirements:
|
287
|
-
- - ">="
|
288
|
-
- !ruby/object:Gem::Version
|
289
|
-
version: '0'
|
290
|
-
type: :development
|
291
|
-
prerelease: false
|
292
|
-
version_requirements: !ruby/object:Gem::Requirement
|
293
|
-
requirements:
|
294
|
-
- - ">="
|
295
|
-
- !ruby/object:Gem::Version
|
296
|
-
version: '0'
|
297
|
-
- !ruby/object:Gem::Dependency
|
298
|
-
name: rake
|
299
|
-
requirement: !ruby/object:Gem::Requirement
|
300
|
-
requirements:
|
301
|
-
- - ">="
|
302
|
-
- !ruby/object:Gem::Version
|
303
|
-
version: '0'
|
304
|
-
type: :development
|
305
|
-
prerelease: false
|
306
|
-
version_requirements: !ruby/object:Gem::Requirement
|
307
|
-
requirements:
|
308
|
-
- - ">="
|
309
|
-
- !ruby/object:Gem::Version
|
310
|
-
version: '0'
|
311
|
-
description:
|
283
|
+
description:
|
312
284
|
email:
|
313
285
|
- alessandrodesantis@nebulab.it
|
314
286
|
executables:
|
@@ -318,7 +290,7 @@ extra_rdoc_files: []
|
|
318
290
|
files:
|
319
291
|
- ".circleci/config.yml"
|
320
292
|
- ".gem_release.yml"
|
321
|
-
- ".github/
|
293
|
+
- ".github/stale.yml"
|
322
294
|
- ".github_changelog_generator"
|
323
295
|
- ".gitignore"
|
324
296
|
- ".mergify.yml"
|
@@ -351,7 +323,7 @@ files:
|
|
351
323
|
- lib/solidus_dev_support/templates/extension/.github/stale.yml
|
352
324
|
- lib/solidus_dev_support/templates/extension/CHANGELOG.md
|
353
325
|
- lib/solidus_dev_support/templates/extension/CONTRIBUTING.md
|
354
|
-
- lib/solidus_dev_support/templates/extension/Gemfile
|
326
|
+
- lib/solidus_dev_support/templates/extension/Gemfile.tt
|
355
327
|
- lib/solidus_dev_support/templates/extension/LICENSE
|
356
328
|
- lib/solidus_dev_support/templates/extension/README.md
|
357
329
|
- lib/solidus_dev_support/templates/extension/Rakefile
|
@@ -397,7 +369,7 @@ metadata:
|
|
397
369
|
source_code_uri: https://github.com/solidusio/solidus_dev_support
|
398
370
|
changelog_uri: https://github.com/solidusio/solidus_dev_support/blob/master/CHANGELOG.md
|
399
371
|
rubygems_mfa_required: 'true'
|
400
|
-
post_install_message:
|
372
|
+
post_install_message:
|
401
373
|
rdoc_options: []
|
402
374
|
require_paths:
|
403
375
|
- lib
|
@@ -412,8 +384,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
412
384
|
- !ruby/object:Gem::Version
|
413
385
|
version: '0'
|
414
386
|
requirements: []
|
415
|
-
rubygems_version: 3.
|
416
|
-
signing_key:
|
387
|
+
rubygems_version: 3.4.12
|
388
|
+
signing_key:
|
417
389
|
specification_version: 4
|
418
390
|
summary: Development tools for Solidus extensions.
|
419
391
|
test_files:
|