solidus_dev_support 2.7.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +4 -4
- data/.mergify.yml +2 -2
- data/README.md +2 -2
- data/lib/solidus_dev_support/extension.rb +1 -1
- data/lib/solidus_dev_support/rake_tasks.rb +0 -1
- data/lib/solidus_dev_support/rspec/capybara.rb +0 -2
- data/lib/solidus_dev_support/templates/extension/CONTRIBUTING.md +5 -5
- data/lib/solidus_dev_support/templates/extension/README.md +1 -1
- data/lib/solidus_dev_support/templates/extension/bin/sandbox.tt +17 -19
- data/lib/solidus_dev_support/version.rb +1 -1
- data/solidus_dev_support.gemspec +5 -5
- data/spec/features/create_extension_spec.rb +3 -3
- data/spec/lib/extension_spec.rb +1 -1
- metadata +32 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31cfceed58aa69658323c49f71181de7221d1ac7ea38cabf2c594d1ddee9425c
|
4
|
+
data.tar.gz: cd3642badd5c986016ad378323fd8a60f769f3e02094a3423d2647eacc0db052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4857c91f6144643f7e3309906a3033ec8f4657a2d4755d61ecdf7eced5d8b367d54b0f93bfdf394b4d25bd17e5b658396d9f0aec0bd539755061c7e39340948
|
7
|
+
data.tar.gz: 189659152c79bb73652e85c6ed2afc53ddf48cb11416d1ff8850008e3cdc8d63635391aec0dd56e8231ea930ab82725350d0fd30e984dab84053b27badd0f101
|
data/.circleci/config.yml
CHANGED
@@ -23,22 +23,22 @@ jobs:
|
|
23
23
|
solidus-main:
|
24
24
|
executor:
|
25
25
|
name: solidusio_extensions/sqlite
|
26
|
-
ruby_version: '3.
|
26
|
+
ruby_version: '3.2'
|
27
27
|
steps: ['setup', 'solidusio_extensions/run-tests-solidus-main']
|
28
28
|
solidus-current:
|
29
29
|
executor:
|
30
30
|
name: solidusio_extensions/sqlite
|
31
|
-
ruby_version: '3.
|
31
|
+
ruby_version: '3.1'
|
32
32
|
steps: ['setup', 'solidusio_extensions/run-tests-solidus-current']
|
33
33
|
solidus-older:
|
34
34
|
executor:
|
35
35
|
name: solidusio_extensions/sqlite
|
36
|
-
ruby_version: '
|
36
|
+
ruby_version: '3.0'
|
37
37
|
steps: ['setup', 'solidusio_extensions/run-tests-solidus-older']
|
38
38
|
lint-code:
|
39
39
|
executor:
|
40
40
|
name: solidusio_extensions/sqlite
|
41
|
-
ruby_version: '3.
|
41
|
+
ruby_version: '3.1'
|
42
42
|
steps: ['setup', 'solidusio_extensions/lint-code']
|
43
43
|
|
44
44
|
workflows:
|
data/.mergify.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
pull_request_rules:
|
2
2
|
- name: request changelog labels when a PR is missing them
|
3
3
|
conditions:
|
4
|
-
- base=
|
4
|
+
- base=main
|
5
5
|
- -label=bug
|
6
6
|
- -label=enhancement
|
7
7
|
- -label=documentation
|
@@ -31,7 +31,7 @@ pull_request_rules:
|
|
31
31
|
Once the correct labels have been set, simply remove the `needs changelog label` label from this PR so I can merge it.
|
32
32
|
- name: merge PRs automatically
|
33
33
|
conditions:
|
34
|
-
- base=
|
34
|
+
- base=main
|
35
35
|
- -label="needs changelog label"
|
36
36
|
- -label=blocked
|
37
37
|
- "#approved-reviews-by>=1"
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
[![CircleCI](https://circleci.com/gh/solidusio/solidus_dev_support.svg?style=shield)](https://circleci.com/gh/solidusio/solidus_dev_support)
|
5
|
-
[![codecov](https://codecov.io/gh/solidusio/solidus_dev_support/branch/
|
5
|
+
[![codecov](https://codecov.io/gh/solidusio/solidus_dev_support/branch/main/graph/badge.svg)](https://codecov.io/gh/solidusio/solidus_dev_support)
|
6
6
|
|
7
7
|
This gem contains common development functionality for Solidus extensions.
|
8
8
|
|
@@ -192,7 +192,7 @@ The above command will:
|
|
192
192
|
|
193
193
|
* bump the gem version to the next minor (you can also use `patch`, `major` or a specific version
|
194
194
|
number);
|
195
|
-
* commit the change and push it to `origin/
|
195
|
+
* commit the change and push it to `origin/main`;
|
196
196
|
* create a Git tag;
|
197
197
|
* push the tag to the `origin` remote;
|
198
198
|
* release the new version on RubyGems.
|
@@ -79,7 +79,7 @@ module SolidusDevSupport
|
|
79
79
|
gem.license = 'BSD-3-Clause'
|
80
80
|
|
81
81
|
gem.metadata['homepage_uri'] = gem.homepage = "https://github.com/#{repo}#readme"
|
82
|
-
gem.metadata['changelog_uri'] = "https://github.com/#{repo}/blob/
|
82
|
+
gem.metadata['changelog_uri'] = "https://github.com/#{repo}/blob/main/CHANGELOG.md"
|
83
83
|
gem.metadata['source_code_uri'] = "https://github.com/#{repo}"
|
84
84
|
end
|
85
85
|
end
|
@@ -83,7 +83,6 @@ module SolidusDevSupport
|
|
83
83
|
config.user = repo.owner
|
84
84
|
config.project = repo.name
|
85
85
|
config.future_release = "v#{ENV.fetch('UNRELEASED_VERSION') { gemspec.version }}"
|
86
|
-
|
87
86
|
rescue Octokit::InvalidRepository
|
88
87
|
warn <<~WARN
|
89
88
|
It won't be possible to automatically generate the CHANGELOG for this extension because the
|
@@ -16,13 +16,13 @@ follow so that we can have a chance of keeping on top of things.
|
|
16
16
|
## Making Changes
|
17
17
|
|
18
18
|
* Create a topic branch from where you want to base your work.
|
19
|
-
* This is usually the
|
19
|
+
* This is usually the main branch.
|
20
20
|
* Only target release branches if you are certain your fix must be on that
|
21
21
|
branch.
|
22
|
-
* To quickly create a topic branch based on
|
23
|
-
fix/
|
24
|
-
checkout fix/
|
25
|
-
`
|
22
|
+
* To quickly create a topic branch based on main; `git branch
|
23
|
+
fix/main/my_contribution main` then checkout the new branch with `git
|
24
|
+
checkout fix/main/my_contribution`. Please avoid working directly on the
|
25
|
+
`main` branch.
|
26
26
|
* Make commits of logical units.
|
27
27
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
28
28
|
* Make sure your commit messages are in the proper format.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# <%= class_name.gsub(/(?<=[^A-Z])([A-Z])/, ' \1') %>
|
2
2
|
|
3
3
|
[![CircleCI](https://circleci.com/gh/<%= repo %>.svg?style=shield)](https://circleci.com/gh/<%= repo %>)
|
4
|
-
[![codecov](https://codecov.io/gh/<%= repo %>/branch/
|
4
|
+
[![codecov](https://codecov.io/gh/<%= repo %>/branch/main/graph/badge.svg)](https://codecov.io/gh/<%= repo %>)
|
5
5
|
|
6
6
|
<!-- Explain what your extension does. -->
|
7
7
|
|
@@ -5,48 +5,51 @@ test -z "${DEBUG+empty_string}" || set -x
|
|
5
5
|
|
6
6
|
test "$DB" = "sqlite" && export DB="sqlite3"
|
7
7
|
|
8
|
-
if [ -z "$
|
8
|
+
if [ -z "$PAYMENT_METHOD" ]
|
9
9
|
then
|
10
|
-
|
11
|
-
SOLIDUS_BRANCH="main"
|
10
|
+
PAYMENT_METHOD="none"
|
12
11
|
fi
|
13
|
-
echo "~~> Using branch $SOLIDUS_BRANCH of solidus"
|
14
12
|
|
15
|
-
if [ -z "$
|
13
|
+
if [ -z "$SOLIDUS_BRANCH" ]
|
16
14
|
then
|
17
|
-
echo "~~> Use 'export
|
18
|
-
|
15
|
+
echo "~~> Use 'export SOLIDUS_BRANCH=[main|v4.0|...]' to control the Solidus branch"
|
16
|
+
SOLIDUS_BRANCH="main"
|
19
17
|
fi
|
20
|
-
echo "~~> Using branch $
|
18
|
+
echo "~~> Using branch $SOLIDUS_BRANCH of solidus"
|
21
19
|
|
22
20
|
extension_name="<%= file_name %>"
|
23
21
|
|
24
22
|
# Stay away from the bundler env of the containing extension.
|
25
23
|
function unbundled {
|
26
|
-
ruby -rbundler -e'
|
24
|
+
ruby -rbundler -e'
|
25
|
+
Bundler.with_unbundled_env {system *ARGV}' -- \
|
26
|
+
env BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES=true $@
|
27
27
|
}
|
28
28
|
|
29
|
+
echo "~~~> Removing the old sandbox"
|
29
30
|
rm -rf ./sandbox
|
30
|
-
|
31
|
+
|
32
|
+
echo "~~~> Creating a pristine Rails app"
|
33
|
+
rails new sandbox \
|
31
34
|
--database="${DB:-sqlite3}" \
|
32
|
-
--skip-bundle \
|
33
35
|
--skip-git \
|
34
36
|
--skip-keeps \
|
35
37
|
--skip-rc \
|
36
|
-
--skip-
|
37
|
-
--skip-test
|
38
|
-
--skip-javascript
|
38
|
+
--skip-bootsnap \
|
39
|
+
--skip-test
|
39
40
|
|
40
41
|
if [ ! -d "sandbox" ]; then
|
41
42
|
echo 'sandbox rails application failed'
|
42
43
|
exit 1
|
43
44
|
fi
|
44
45
|
|
46
|
+
echo "~~~> Adding solidus (with i18n) to the Gemfile"
|
45
47
|
cd ./sandbox
|
46
48
|
cat <<RUBY >> Gemfile
|
47
49
|
gem 'solidus', github: 'solidusio/solidus', branch: '$SOLIDUS_BRANCH'
|
48
50
|
gem 'rails-i18n'
|
49
51
|
gem 'solidus_i18n'
|
52
|
+
gem 'solidus_auth_devise'
|
50
53
|
|
51
54
|
gem '$extension_name', path: '..'
|
52
55
|
|
@@ -63,11 +66,6 @@ unbundled bundle exec rake db:drop db:create
|
|
63
66
|
|
64
67
|
unbundled bundle exec rails generate solidus:install \
|
65
68
|
--auto-accept \
|
66
|
-
--user_class=Spree::User \
|
67
|
-
--enforce_available_locales=true \
|
68
|
-
--with-authentication=<%= file_name != 'solidus_auth_devise' %> \
|
69
|
-
--payment-method=none \
|
70
|
-
--frontend=${SOLIDUS_FRONTEND} \
|
71
69
|
$@
|
72
70
|
|
73
71
|
unbundled bundle exec rails generate solidus:auth:install --auto-run-migrations
|
data/solidus_dev_support.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata['changelog_uri'] = 'https://github.com/solidusio/solidus_dev_support/releases'
|
18
18
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
19
19
|
|
20
|
-
spec.required_ruby_version = '>=
|
20
|
+
spec.required_ruby_version = '>= 3.0.0'
|
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.
|
@@ -32,19 +32,19 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_dependency 'capybara', '~> 3.29'
|
33
33
|
spec.add_dependency 'capybara-screenshot', '~> 1.0'
|
34
34
|
spec.add_dependency 'codecov', '~> 0.2'
|
35
|
-
spec.add_dependency 'database_cleaner', '
|
35
|
+
spec.add_dependency 'database_cleaner', ['>= 1.7', '< 3']
|
36
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'
|
40
40
|
spec.add_dependency 'github_changelog_generator', '~> 1.15'
|
41
|
-
spec.add_dependency 'puma', '>= 4.3', '<
|
41
|
+
spec.add_dependency 'puma', '>= 4.3', '< 7.0'
|
42
42
|
spec.add_dependency 'rspec_junit_formatter'
|
43
|
-
spec.add_dependency 'rspec-rails', '>=
|
43
|
+
spec.add_dependency 'rspec-rails', '>= 5.0', '< 7.0'
|
44
44
|
spec.add_dependency 'rubocop', '~> 1.0'
|
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 'selenium-webdriver', '~> 4.11'
|
48
49
|
spec.add_dependency 'solidus_core', ['>= 2.0', '< 5']
|
49
|
-
spec.add_dependency 'webdrivers', '>= 4.4'
|
50
50
|
end
|
@@ -173,11 +173,11 @@ RSpec.describe 'Create extension' do
|
|
173
173
|
output.to_s
|
174
174
|
end
|
175
175
|
|
176
|
-
def with_unbundled_env(
|
176
|
+
def with_unbundled_env(...)
|
177
177
|
if Bundler.respond_to?(:with_unbundled_env)
|
178
|
-
Bundler.with_unbundled_env(
|
178
|
+
Bundler.with_unbundled_env(...)
|
179
179
|
else
|
180
|
-
Bundler.with_clean_env(
|
180
|
+
Bundler.with_clean_env(...)
|
181
181
|
end
|
182
182
|
end
|
183
183
|
|
data/spec/lib/extension_spec.rb
CHANGED
@@ -61,7 +61,7 @@ RSpec.describe SolidusDevSupport::Extension do
|
|
61
61
|
expect(subject.gemspec.description).to eq('TODO: Write a longer description or delete this line.')
|
62
62
|
expect(subject.gemspec.license).to eq('BSD-3-Clause')
|
63
63
|
expect(subject.gemspec.homepage).to eq("https://github.com/solidusio-contrib/solidus_my_ext#readme")
|
64
|
-
expect(subject.gemspec.metadata['changelog_uri']).to eq("https://github.com/solidusio-contrib/solidus_my_ext/blob/
|
64
|
+
expect(subject.gemspec.metadata['changelog_uri']).to eq("https://github.com/solidusio-contrib/solidus_my_ext/blob/main/CHANGELOG.md")
|
65
65
|
expect(subject.gemspec.metadata['source_code_uri']).to eq("https://github.com/solidusio-contrib/solidus_my_ext")
|
66
66
|
end
|
67
67
|
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.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Desantis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -56,16 +56,22 @@ dependencies:
|
|
56
56
|
name: database_cleaner
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.7'
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '3'
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- - "
|
69
|
+
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: '1.7'
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: factory_bot
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -145,7 +151,7 @@ dependencies:
|
|
145
151
|
version: '4.3'
|
146
152
|
- - "<"
|
147
153
|
- !ruby/object:Gem::Version
|
148
|
-
version: '
|
154
|
+
version: '7.0'
|
149
155
|
type: :runtime
|
150
156
|
prerelease: false
|
151
157
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -155,7 +161,7 @@ dependencies:
|
|
155
161
|
version: '4.3'
|
156
162
|
- - "<"
|
157
163
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
164
|
+
version: '7.0'
|
159
165
|
- !ruby/object:Gem::Dependency
|
160
166
|
name: rspec_junit_formatter
|
161
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,20 +182,20 @@ dependencies:
|
|
176
182
|
requirements:
|
177
183
|
- - ">="
|
178
184
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
185
|
+
version: '5.0'
|
180
186
|
- - "<"
|
181
187
|
- !ruby/object:Gem::Version
|
182
|
-
version: '
|
188
|
+
version: '7.0'
|
183
189
|
type: :runtime
|
184
190
|
prerelease: false
|
185
191
|
version_requirements: !ruby/object:Gem::Requirement
|
186
192
|
requirements:
|
187
193
|
- - ">="
|
188
194
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
195
|
+
version: '5.0'
|
190
196
|
- - "<"
|
191
197
|
- !ruby/object:Gem::Version
|
192
|
-
version: '
|
198
|
+
version: '7.0'
|
193
199
|
- !ruby/object:Gem::Dependency
|
194
200
|
name: rubocop
|
195
201
|
requirement: !ruby/object:Gem::Requirement
|
@@ -247,39 +253,39 @@ dependencies:
|
|
247
253
|
- !ruby/object:Gem::Version
|
248
254
|
version: '2.0'
|
249
255
|
- !ruby/object:Gem::Dependency
|
250
|
-
name:
|
256
|
+
name: selenium-webdriver
|
251
257
|
requirement: !ruby/object:Gem::Requirement
|
252
258
|
requirements:
|
253
|
-
- - "
|
254
|
-
- !ruby/object:Gem::Version
|
255
|
-
version: '2.0'
|
256
|
-
- - "<"
|
259
|
+
- - "~>"
|
257
260
|
- !ruby/object:Gem::Version
|
258
|
-
version: '
|
261
|
+
version: '4.11'
|
259
262
|
type: :runtime
|
260
263
|
prerelease: false
|
261
264
|
version_requirements: !ruby/object:Gem::Requirement
|
262
265
|
requirements:
|
263
|
-
- - "
|
264
|
-
- !ruby/object:Gem::Version
|
265
|
-
version: '2.0'
|
266
|
-
- - "<"
|
266
|
+
- - "~>"
|
267
267
|
- !ruby/object:Gem::Version
|
268
|
-
version: '
|
268
|
+
version: '4.11'
|
269
269
|
- !ruby/object:Gem::Dependency
|
270
|
-
name:
|
270
|
+
name: solidus_core
|
271
271
|
requirement: !ruby/object:Gem::Requirement
|
272
272
|
requirements:
|
273
273
|
- - ">="
|
274
274
|
- !ruby/object:Gem::Version
|
275
|
-
version: '
|
275
|
+
version: '2.0'
|
276
|
+
- - "<"
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '5'
|
276
279
|
type: :runtime
|
277
280
|
prerelease: false
|
278
281
|
version_requirements: !ruby/object:Gem::Requirement
|
279
282
|
requirements:
|
280
283
|
- - ">="
|
281
284
|
- !ruby/object:Gem::Version
|
282
|
-
version: '
|
285
|
+
version: '2.0'
|
286
|
+
- - "<"
|
287
|
+
- !ruby/object:Gem::Version
|
288
|
+
version: '5'
|
283
289
|
description:
|
284
290
|
email:
|
285
291
|
- alessandrodesantis@nebulab.it
|
@@ -377,14 +383,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
377
383
|
requirements:
|
378
384
|
- - ">="
|
379
385
|
- !ruby/object:Gem::Version
|
380
|
-
version:
|
386
|
+
version: 3.0.0
|
381
387
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
382
388
|
requirements:
|
383
389
|
- - ">="
|
384
390
|
- !ruby/object:Gem::Version
|
385
391
|
version: '0'
|
386
392
|
requirements: []
|
387
|
-
rubygems_version: 3.4.
|
393
|
+
rubygems_version: 3.4.22
|
388
394
|
signing_key:
|
389
395
|
specification_version: 4
|
390
396
|
summary: Development tools for Solidus extensions.
|