Skip to content

Commit b01e813

Browse files
authored
Merge pull request #327 from SuperGoodSoft/overdue-maintenance
Overdue Maintenance
2 parents 3ec1eff + 5896fdc commit b01e813

115 files changed

Lines changed: 1418 additions & 1329 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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

.git-blame-ignore-revs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# See `git help blame` for more information.
2+
# Use `git config blame.ignoreRevsFile .git-blame-ignore-revs` to enable.
3+
4+
# Reformat project
5+
f94afca4

.github/stale.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
# Number of days of inactivity before an issue becomes stale
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

.github/workflows/test.yml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
schedule:
99
- cron: "0 0 * * 4" # every Thursday
10+
workflow_call:
1011

1112
concurrency:
1213
group: test-${{ github.ref_name }}
@@ -23,36 +24,55 @@ jobs:
2324
fail-fast: true
2425
matrix:
2526
rails-version:
26-
- "7.0"
2727
- "7.1"
2828
- "7.2"
29+
- "8.0"
2930
ruby-version:
3031
- "3.1"
3132
- "3.4"
3233
solidus-branch:
33-
- "v4.1"
34-
- "v4.2"
3534
- "v4.3"
3635
- "v4.4"
36+
- "v4.5"
37+
- "main"
3738
database:
3839
- "postgresql"
3940
- "mysql"
4041
- "sqlite"
4142
exclude:
43+
- solidus-branch: "main"
44+
ruby-version: "3.1"
4245
- rails-version: "7.2"
4346
solidus-branch: "v4.3"
44-
- rails-version: "7.2"
45-
solidus-branch: "v4.2"
46-
- rails-version: "7.2"
47-
solidus-branch: "v4.1"
48-
- rails-version: "7.1"
49-
solidus-branch: "v4.2"
50-
- rails-version: "7.1"
51-
solidus-branch: "v4.1"
52-
- ruby-version: "3.4"
53-
rails-version: "7.0"
54-
env:
55-
TEST_RESULTS_PATH: coverage/coverage.xml
47+
- ruby-version: "3.1"
48+
rails-version: "8.0"
49+
- solidus-branch: "v4.3"
50+
rails-version: "8.0"
51+
- solidus-branch: "v4.4"
52+
rails-version: "8.0"
53+
services:
54+
postgres:
55+
image: postgres:16
56+
env:
57+
POSTGRES_HOST_AUTH_METHOD: trust
58+
options: >-
59+
--health-cmd="pg_isready"
60+
--health-interval=10s
61+
--health-timeout=5s
62+
--health-retries=5
63+
ports:
64+
- 5432:5432
65+
mysql:
66+
image: mysql:8
67+
env:
68+
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
69+
options: >-
70+
--health-cmd="mysqladmin ping"
71+
--health-interval=10s
72+
--health-timeout=5s
73+
--health-retries=5
74+
ports:
75+
- 3306:3306
5676
steps:
5777
- uses: actions/checkout@v4
5878
- name: Run extension tests
@@ -67,4 +87,4 @@ jobs:
6787
continue-on-error: true
6888
with:
6989
token: ${{ secrets.CODECOV_TOKEN }}
70-
files: ${{ env.TEST_RESULTS_PATH }}
90+
files: ./coverage/coverage.xml

.rubocop.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
inherit_from: .rubocop_todo.yml
2-
31
require:
42
- solidus_dev_support/rubocop
53

6-
RSpec/DescribeClass:
7-
Exclude:
8-
- spec/requests/**/*
9-
- spec/features/**/*
10-
11-
Rails/SkipsModelValidations:
12-
Enabled: false
13-
144
AllCops:
155
NewCops: disable

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Changelog
22

3-
See https://github.com/solidusio/solidus_subscriptions/releases or [OLD_CHANGELOG.md](OLD_CHANGELOG.md) for older versions.
3+
See https://github.com/solidusio/solidus_subscriptions/releases or OLD_CHANGELOG.md for older versions.

Gemfile

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,55 @@
11
# frozen_string_literal: true
22

3-
source 'https://rubygems.org'
3+
source "https://rubygems.org"
44
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
55

6-
branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
7-
gem 'solidus', github: 'solidusio/solidus', branch: branch
6+
branch = ENV.fetch("SOLIDUS_BRANCH", "main")
7+
gem "solidus", github: "solidusio/solidus", branch: branch
88

99
# The solidus_frontend gem has been pulled out since v3.2
10-
gem 'solidus_frontend'
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
1117

12-
rails_version = ENV.fetch('RAILS_VERSION', '7.2')
13-
gem 'rails', "~> #{rails_version}"
18+
if branch <= "v4.5" || branch == "main"
19+
gem "state_machines", "<= 0.6"
20+
end
1421

15-
case ENV['DB']
16-
when 'mysql'
17-
gem 'mysql2'
18-
when 'postgresql'
19-
gem 'pg'
22+
rails_version = ENV.fetch("RAILS_VERSION", "7.0")
23+
gem "rails", "~> #{rails_version}"
24+
25+
case ENV.fetch("DB", nil)
26+
when "mysql"
27+
gem "mysql2"
28+
when "postgresql"
29+
gem "pg"
2030
else
21-
if rails_version <= "7.2"
22-
gem 'sqlite3', "~> 1.7"
23-
else
24-
gem 'sqlite3', "~> 2.0"
25-
end
31+
gem "sqlite3", (rails_version < "7.2") ? "~> 1.4" : "~> 2.0"
2632
end
2733

34+
if rails_version == "7.0"
35+
gem "concurrent-ruby", "< 1.3.5"
36+
end
37+
38+
if RUBY_VERSION >= "3.4"
39+
# Solidus Promotions uses CSV but does not have it as dependency yet.
40+
gem "csv"
41+
end
42+
43+
# While we still support Ruby < 3 we need to workaround a limitation in
44+
# the 'async' gem that relies on the latest ruby, since RubyGems doesn't
45+
# resolve gems based on the required ruby version.
46+
gem "async", "< 3" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3")
47+
2848
gemspec
2949

3050
# Use a local Gemfile to include development dependencies that might not be
3151
# relevant for the project or for other contributors, e.g. pry-byebug.
3252
#
3353
# We use `send` instead of calling `eval_gemfile` to work around an issue with
3454
# how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658.
35-
send(:eval_gemfile, 'Gemfile-local') if File.exist? 'Gemfile-local'
55+
send(:eval_gemfile, "Gemfile-local") if File.exist? "Gemfile-local"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016 Stembolt
1+
Copyright (c) 2026 Solidus Team
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

Rakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3-
require 'bundler/gem_tasks'
3+
require "bundler/gem_tasks"
44

5-
require 'solidus_dev_support/rake_tasks'
5+
require "solidus_dev_support/rake_tasks"
66
SolidusDevSupport::RakeTasks.install
77

8-
task default: 'extension:specs'
8+
task default: "extension:specs"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Placeholder manifest file.
2+
// the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/frontend/all.js'

0 commit comments

Comments
 (0)