solidus_dev_support 2.10.0 → 2.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 788f71717b021055e787d2c6674185edfc3f0c8154f282909193dd8d6b3f1340
4
- data.tar.gz: a2c3bc4da0c08605d5119b3d2470996f6acc953c687124ac086543036fd96544
3
+ metadata.gz: dd75ebe4df69cf2b6d4c2e874a5deb5d93ca3c1bef800b31968efde6df303624
4
+ data.tar.gz: 9758dc413b673999b078062aba5bc0f775dfd9652e2a1501160b396c9daf0400
5
5
  SHA512:
6
- metadata.gz: 870e124775746c0c9b0f5b1a26e116c72e646b6eb44d9586278cfc2b26462d7ce38c0b93637ea149576234d6e2d6adf41a3f423752f90707b58a98ed42330e24
7
- data.tar.gz: 3feabe8e96ff3d15f5f03bc02512e7000c69188717c85b3d3991435a40049954c3cc070784e5cb6c35f250b1238a973cb6741cb4363b606ad55d716e266ab2ef
6
+ metadata.gz: 2db945c0e777987b64af4870bc84aa092f8ef4753bb0b6e594b0b9d42c0d0b025ae390ad7ec5b126ada636617e88bb80f58a49800fd5da72d72305194f4159a3
7
+ data.tar.gz: 93611280af0387fb39da8128057a12cddb231ab13b48f546384e967b1c2a65b4fdf6ddeb5e4ce75a8608315238c03cb6af7bc0aa8902b2df0fae94a9bcbce0d0
@@ -0,0 +1,25 @@
1
+ name: Lint
2
+
3
+ on: [pull_request]
4
+
5
+ concurrency:
6
+ group: lint-${{ github.ref_name }}
7
+ cancel-in-progress: ${{ github.ref_name != 'main' }}
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ ruby:
14
+ name: Check Ruby
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v3
19
+ - name: Install Ruby and gems
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: "3.2"
23
+ bundler-cache: true
24
+ - name: Lint Ruby files
25
+ run: bundle exec rubocop -ESP
@@ -0,0 +1,64 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ schedule:
9
+ - cron: "0 0 * * 4" # every Thursday
10
+
11
+ concurrency:
12
+ group: test-${{ github.ref_name }}
13
+ cancel-in-progress: ${{ github.ref_name != 'main' }}
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ rspec:
20
+ name: Solidus ${{ matrix.solidus-branch }}, Rails ${{ matrix.rails-version }} and Ruby ${{ matrix.ruby-version }} on ${{ matrix.database }}
21
+ runs-on: ubuntu-24.04
22
+ strategy:
23
+ fail-fast: true
24
+ matrix:
25
+ rails-version:
26
+ - "7.1"
27
+ - "7.2"
28
+ - "8.0"
29
+ ruby-version:
30
+ - "3.1"
31
+ - "3.4"
32
+ solidus-branch:
33
+ - "v4.3"
34
+ - "v4.4"
35
+ - "v4.5"
36
+ - "main"
37
+ database:
38
+ - "postgresql"
39
+ - "mysql"
40
+ - "sqlite"
41
+ exclude:
42
+ - rails-version: "7.2"
43
+ solidus-branch: "v4.3"
44
+ - ruby-version: "3.1"
45
+ rails-version: "8.0"
46
+ - solidus-branch: "v4.3"
47
+ rails-version: "8.0"
48
+ - solidus-branch: "v4.4"
49
+ rails-version: "8.0"
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - name: Run extension tests
53
+ uses: solidusio/test-solidus-extension@main
54
+ with:
55
+ database: ${{ matrix.database }}
56
+ rails-version: ${{ matrix.rails-version }}
57
+ ruby-version: ${{ matrix.ruby-version }}
58
+ solidus-branch: ${{ matrix.solidus-branch }}
59
+ - name: Upload coverage reports to Codecov
60
+ uses: codecov/codecov-action@v5
61
+ continue-on-error: true
62
+ with:
63
+ token: ${{ secrets.CODECOV_TOKEN }}
64
+ files: ./coverage/coverage.xml
data/Gemfile CHANGED
@@ -10,8 +10,8 @@ gemspec
10
10
  branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
11
11
  gem 'solidus', github: 'solidusio/solidus', branch: branch
12
12
 
13
- # A workaround for https://github.com/bundler/bundler/issues/6677
14
- gem 'rails', '>0.a'
13
+ rails_version = ENV.fetch("RAILS_VERSION", "7.0")
14
+ gem 'rails', "~> #{rails_version}"
15
15
 
16
16
  gem 'bundler'
17
17
  gem 'rake'
@@ -21,9 +21,13 @@ group :test do
21
21
  gem 'mysql2'
22
22
  gem 'pg'
23
23
  gem 'solidus_auth_devise'
24
- gem 'sqlite3', '~> 1.4'
24
+ gem 'sqlite3', rails_version < '7.2' ? '~> 1.4' : '~> 2.0'
25
25
  end
26
26
 
27
27
  # Use a local Gemfile to include development dependencies that might not be
28
28
  # relevant for the project or for other contributors, e.g.: `gem 'pry-debug'`.
29
29
  eval_gemfile 'Gemfile-local' if File.exist? 'Gemfile-local'
30
+
31
+ if rails_version == "7.0"
32
+ gem 'concurrent-ruby', '< 1.3.5'
33
+ end
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # solidus_dev_support
2
2
 
3
3
 
4
- [![CircleCI](https://circleci.com/gh/solidusio/solidus_dev_support.svg?style=shield)](https://circleci.com/gh/solidusio/solidus_dev_support)
4
+ [![Test](https://github.com/solidusio/solidus_dev_support/actions/workflows/test.yml/badge.svg)](https://github.com/solidusio/solidus_dev_support/actions/workflows/test.yml)
5
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.
@@ -138,10 +138,32 @@ require 'solidus_dev_support/rspec/coverage'
138
138
  **Note: Make sure to add this at the VERY TOP of your spec_helper, otherwise you'll get skewed
139
139
  coverage reports!**
140
140
 
141
- If your extension is in a public repo and being tested on Travis or CircleCI, there's nothing else
141
+ If your extension is in a public repo and being tested on GitHub actions, there's nothing else
142
142
  you need to do! If your setup is more complex, look at the
143
143
  [SimpleCov](https://github.com/colszowka/simplecov)
144
- and [codecov-ruby](https://github.com/codecov/codecov-ruby) docs.
144
+ and [codecov](https://about.codecov.io/language/ruby/) docs.
145
+
146
+ #### Using GitHub Actions
147
+
148
+ The recommended way to upload coverage reports to Codecov with GitHub Actions is to use the `solidusio/test-solidus-extension`
149
+ workflow.
150
+
151
+ ```yaml
152
+ jobs:
153
+ RSpec:
154
+ env:
155
+ CODECOV_COVERAGE_PATH: ./coverage/coverage.xml
156
+ steps:
157
+ - uses: actions/checkout@v4
158
+ - name: Run extension tests
159
+ uses: solidusio/test-solidus-extension@main
160
+ - name: Upload coverage reports to Codecov
161
+ uses: codecov/codecov-action@v5
162
+ continue-on-error: true
163
+ with:
164
+ token: ${{ secrets.CODECOV_TOKEN }}
165
+ files: ${{ env.CODECOV_COVERAGE_PATH }}
166
+ ```
145
167
 
146
168
  ### RuboCop configuration
147
169
 
@@ -19,6 +19,14 @@ end
19
19
  if ENV['CODECOV_TOKEN']
20
20
  require 'codecov'
21
21
  SimpleCov.formatter = SimpleCov::Formatter::Codecov
22
+ warn <<~WARN
23
+ DEPRECATION WARNING: The Codecov ruby uploader is deprecated.
24
+ Please use the Codecov CLI uploader to upload code coverage reports.
25
+ See https://docs.codecov.com/docs/deprecated-uploader-migration-guide#ruby-uploader for more information on upgrading.
26
+ WARN
27
+ elsif ENV['CODECOV_COVERAGE_PATH']
28
+ require 'simplecov-cobertura'
29
+ SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
22
30
  else
23
- warn "Provide a CODECOV_TOKEN environment variable to enable Codecov uploads"
31
+ warn "Provide a CODECOV_COVERAGE_PATH environment variable to enable Codecov uploads"
24
32
  end
@@ -0,0 +1,25 @@
1
+ name: Lint
2
+
3
+ on: [pull_request]
4
+
5
+ concurrency:
6
+ group: lint-${{ github.ref_name }}
7
+ cancel-in-progress: ${{ github.ref_name != 'main' }}
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ ruby:
14
+ name: Check Ruby
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v3
19
+ - name: Install Ruby and gems
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: "3.2"
23
+ bundler-cache: true
24
+ - name: Lint Ruby files
25
+ run: bundle exec rubocop -ESP
@@ -0,0 +1,71 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ schedule:
9
+ - cron: "0 0 * * 4" # every Thursday
10
+
11
+ concurrency:
12
+ group: test-${{ github.ref_name }}
13
+ cancel-in-progress: ${{ github.ref_name != 'main' }}
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ rspec:
20
+ name: Solidus ${{ matrix.solidus-branch }}, Rails ${{ matrix.rails-version }} and Ruby ${{ matrix.ruby-version }} on ${{ matrix.database }}
21
+ runs-on: ubuntu-24.04
22
+ strategy:
23
+ fail-fast: true
24
+ matrix:
25
+ rails-version:
26
+ - "7.0"
27
+ - "7.1"
28
+ - "7.2"
29
+ ruby-version:
30
+ - "3.1"
31
+ - "3.4"
32
+ solidus-branch:
33
+ - "v4.1"
34
+ - "v4.2"
35
+ - "v4.3"
36
+ - "v4.4"
37
+ - "v4.5"
38
+ database:
39
+ - "postgresql"
40
+ - "mysql"
41
+ - "sqlite"
42
+ exclude:
43
+ - rails-version: "7.2"
44
+ solidus-branch: "v4.3"
45
+ - rails-version: "7.2"
46
+ solidus-branch: "v4.2"
47
+ - rails-version: "7.2"
48
+ solidus-branch: "v4.1"
49
+ - rails-version: "7.1"
50
+ solidus-branch: "v4.2"
51
+ - rails-version: "7.1"
52
+ solidus-branch: "v4.1"
53
+ - ruby-version: "3.4"
54
+ rails-version: "7.0"
55
+ env:
56
+ CODECOV_COVERAGE_PATH: ./coverage/coverage.xml
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - name: Run extension tests
60
+ uses: solidusio/test-solidus-extension@main
61
+ with:
62
+ database: ${{ matrix.database }}
63
+ rails-version: ${{ matrix.rails-version }}
64
+ ruby-version: ${{ matrix.ruby-version }}
65
+ solidus-branch: ${{ matrix.solidus-branch }}
66
+ - name: Upload coverage reports to Codecov
67
+ uses: codecov/codecov-action@v5
68
+ continue-on-error: true
69
+ with:
70
+ token: ${{ secrets.CODECOV_TOKEN }}
71
+ files: ${{ env.CODECOV_COVERAGE_PATH }}
@@ -15,10 +15,8 @@ else
15
15
  gem 'solidus_frontend', github: 'solidusio/solidus', branch: branch
16
16
  end
17
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'
18
+ rails_version = ENV.fetch('RAILS_VERSION', '7.0')
19
+ gem 'rails', "~> #{rails_version}"
22
20
 
23
21
  case ENV.fetch('DB', nil)
24
22
  when 'mysql'
@@ -26,7 +24,16 @@ when 'mysql'
26
24
  when 'postgresql'
27
25
  gem 'pg'
28
26
  else
29
- gem 'sqlite3', '~> 1.4'
27
+ gem 'sqlite3', rails_version < '7.2' ? '~> 1.4' : '~> 2.0'
28
+ end
29
+
30
+ if rails_version == '7.0'
31
+ gem 'concurrent-ruby', '< 1.3.5'
32
+ end
33
+
34
+ if RUBY_VERSION >= '3.4'
35
+ # Solidus Promotions uses CSV but does not have it as dependency yet.
36
+ gem 'csv'
30
37
  end
31
38
 
32
39
  # While we still support Ruby < 3 we need to workaround a limitation in
@@ -61,6 +61,14 @@ group :test, :development do
61
61
  end
62
62
  RUBY
63
63
 
64
+ echo "Generating manifest file"
65
+ mkdir -p app/assets/config
66
+ cat <<MANIFESTJS > app/assets/config/manifest.js
67
+ //= link_tree ../images
68
+ //= link_directory ../javascripts .js
69
+ //= link_directory ../stylesheets .css
70
+ MANIFESTJS
71
+
64
72
  unbundled bundle install --gemfile Gemfile
65
73
 
66
74
  unbundled bundle exec rake db:drop db:create
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.require_paths = ["lib"]
31
31
 
32
32
  spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 5']
33
- spec.add_dependency 'solidus_support', '~> 0.5'
33
+ spec.add_dependency 'solidus_support', '>= 0.12.0'
34
34
 
35
35
  spec.add_development_dependency 'solidus_dev_support', '<%= SolidusDevSupport.gem_version.approximate_recommendation %>'
36
36
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusDevSupport
4
- VERSION = "2.10.0"
4
+ VERSION = "2.11.0"
5
5
 
6
6
  def self.gem_version
7
7
  Gem::Version.new(VERSION)
@@ -46,5 +46,6 @@ Gem::Specification.new do |spec|
46
46
  spec.add_dependency 'rubocop-rails', '~> 2.3'
47
47
  spec.add_dependency 'rubocop-rspec', '~> 2.0'
48
48
  spec.add_dependency 'selenium-webdriver', '~> 4.11'
49
+ spec.add_dependency 'simplecov-cobertura', '~> 2.1'
49
50
  spec.add_dependency 'solidus_core', ['>= 2.0', '< 5']
50
51
  end
@@ -131,7 +131,7 @@ RSpec.describe 'Create extension' do
131
131
  output = sh('bundle exec rspec')
132
132
  expect(output).to include('loading test_extension factories')
133
133
  expect(output).to include('1 example, 0 failures')
134
- expect(output).to include(ENV['CODECOV_TOKEN'] ? 'Coverage reports upload successfully' : 'Provide a CODECOV_TOKEN environment variable to enable Codecov uploads')
134
+ expect(output).to include(ENV['CODECOV_TOKEN'] ? 'Coverage reports upload successfully' : 'Provide a CODECOV_COVERAGE_PATH environment variable to enable Codecov uploads')
135
135
  end
136
136
  end
137
137
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_dev_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-12-05 00:00:00.000000000 Z
10
+ date: 2025-02-26 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: capybara
@@ -266,6 +265,20 @@ dependencies:
266
265
  - - "~>"
267
266
  - !ruby/object:Gem::Version
268
267
  version: '4.11'
268
+ - !ruby/object:Gem::Dependency
269
+ name: simplecov-cobertura
270
+ requirement: !ruby/object:Gem::Requirement
271
+ requirements:
272
+ - - "~>"
273
+ - !ruby/object:Gem::Version
274
+ version: '2.1'
275
+ type: :runtime
276
+ prerelease: false
277
+ version_requirements: !ruby/object:Gem::Requirement
278
+ requirements:
279
+ - - "~>"
280
+ - !ruby/object:Gem::Version
281
+ version: '2.1'
269
282
  - !ruby/object:Gem::Dependency
270
283
  name: solidus_core
271
284
  requirement: !ruby/object:Gem::Requirement
@@ -286,7 +299,6 @@ dependencies:
286
299
  - - "<"
287
300
  - !ruby/object:Gem::Version
288
301
  version: '5'
289
- description:
290
302
  email:
291
303
  - alessandrodesantis@nebulab.it
292
304
  executables:
@@ -294,9 +306,10 @@ executables:
294
306
  extensions: []
295
307
  extra_rdoc_files: []
296
308
  files:
297
- - ".circleci/config.yml"
298
309
  - ".gem_release.yml"
299
310
  - ".github/stale.yml"
311
+ - ".github/workflows/lint.yml"
312
+ - ".github/workflows/test.yml"
300
313
  - ".github_changelog_generator"
301
314
  - ".gitignore"
302
315
  - ".mergify.yml"
@@ -327,6 +340,8 @@ files:
327
340
  - lib/solidus_dev_support/solidus_command.rb
328
341
  - lib/solidus_dev_support/templates/extension/.circleci/config.yml
329
342
  - lib/solidus_dev_support/templates/extension/.github/stale.yml
343
+ - lib/solidus_dev_support/templates/extension/.github/workflows/lint.yml
344
+ - lib/solidus_dev_support/templates/extension/.github/workflows/test.yml
330
345
  - lib/solidus_dev_support/templates/extension/CHANGELOG.md.tt
331
346
  - lib/solidus_dev_support/templates/extension/CONTRIBUTING.md
332
347
  - lib/solidus_dev_support/templates/extension/Gemfile.tt
@@ -375,7 +390,6 @@ metadata:
375
390
  source_code_uri: https://github.com/solidusio/solidus_dev_support
376
391
  changelog_uri: https://github.com/solidusio/solidus_dev_support/releases
377
392
  rubygems_mfa_required: 'true'
378
- post_install_message:
379
393
  rdoc_options: []
380
394
  require_paths:
381
395
  - lib
@@ -390,8 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
404
  - !ruby/object:Gem::Version
391
405
  version: '0'
392
406
  requirements: []
393
- rubygems_version: 3.5.22
394
- signing_key:
407
+ rubygems_version: 3.6.5
395
408
  specification_version: 4
396
409
  summary: Development tools for Solidus extensions.
397
410
  test_files:
data/.circleci/config.yml DELETED
@@ -1,63 +0,0 @@
1
- version: 2.1
2
-
3
- orbs:
4
- # Always take the latest version of the orb, this allows us to
5
- # run specs against Solidus supported versions only without the need
6
- # to change this configuration every time a Solidus version is released
7
- # or goes EOL.
8
- solidusio_extensions: solidusio/extensions@volatile
9
-
10
- commands:
11
- setup:
12
- steps:
13
- - checkout
14
- - run:
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
21
-
22
- jobs:
23
- solidus-main:
24
- executor:
25
- name: solidusio_extensions/sqlite
26
- ruby_version: '3.2'
27
- steps: ['setup', 'solidusio_extensions/run-tests-solidus-main']
28
- solidus-current:
29
- executor:
30
- name: solidusio_extensions/sqlite
31
- ruby_version: '3.1'
32
- steps: ['setup', 'solidusio_extensions/run-tests-solidus-current']
33
- solidus-older:
34
- executor:
35
- name: solidusio_extensions/sqlite
36
- ruby_version: '3.0'
37
- steps: ['setup', 'solidusio_extensions/run-tests-solidus-older']
38
- lint-code:
39
- executor:
40
- name: solidusio_extensions/sqlite
41
- ruby_version: '3.1'
42
- steps: ['setup', 'solidusio_extensions/lint-code']
43
-
44
- workflows:
45
- "Run specs on supported Solidus versions":
46
- jobs:
47
- - solidus-main
48
- - solidus-current
49
- - solidus-older
50
- - lint-code
51
-
52
- "Weekly run specs against main":
53
- triggers:
54
- - schedule:
55
- cron: "0 0 * * 4" # every Thursday
56
- filters:
57
- branches:
58
- only:
59
- - main
60
- jobs:
61
- - solidus-main
62
- - solidus-current
63
- - solidus-older