Skip to content

Commit

Permalink
Refactor test dependencies (#315)
Browse files Browse the repository at this point in the history
* Move Sidekiq 6 to its own appraisal

* Always test against the latest version of Sidekiq (7 currently)

* Remove Sidekiq 7 appraisal since it's the default
  • Loading branch information
excid3 authored Jun 15, 2023
1 parent 944e499 commit 7fce32f
Show file tree
Hide file tree
Showing 17 changed files with 828 additions and 778 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- rails_6_1
- rails_7
- rails_main
- sidekiq_7
- sidekiq_6
exclude:
- ruby: '3.0'
gemfile: rails_5
Expand Down
4 changes: 2 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ appraise "rails-main" do
end
end

appraise "sidekiq-7" do
gem "sidekiq", "~> 7.0"
appraise "sidekiq-6" do
gem "sidekiq", "~> 6.0"
end
13 changes: 3 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,10 @@ gemspec

gem "rspec", ">=3.0"
gem "rspec-rails"
gem "sqlite3", "~> 1.6.0.rc2"
gem "sidekiq", "~> 6.1", ">= 6.1.2"
gem "sqlite3"
gem "standard"
gem "appraisal"
gem "sidekiq", "~> 7.0"

This comment has been minimized.

Copy link
@nunommc

nunommc Jun 15, 2023

Contributor

I'm not sure I like this, because Sidekiq is now too tangled with acts_as_tenant. In fact, the sidekiq integration, DelayedJob or others, should be separate gems that depend on this one

gem "appraisal", github: "thoughtbot/appraisal"

# To use a debugger
gem "byebug", group: [:development, :test]

# Ruby 3.1+ no longer includes these by default
group :development, :test do
gem "net-imap"
gem "net-pop"
gem "net-smtp"
end
12 changes: 3 additions & 9 deletions gemfiles/rails_5.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ source "https://rubygems.org"

gem "rspec", ">=3.0"
gem "rspec-rails"
gem "sqlite3", "~> 1.6.0.rc2"
gem "sidekiq", "~> 6.1", ">= 6.1.2"
gem "sqlite3"
gem "standard"
gem "appraisal"
gem "sidekiq", "~> 7.0"
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
gem "byebug", group: [:development, :test]
gem "rails", "~> 5.2.0", ">= 5.2.6"

group :development, :test do
gem "net-imap"
gem "net-pop"
gem "net-smtp"
end

gemspec path: "../"
128 changes: 71 additions & 57 deletions gemfiles/rails_5.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/thoughtbot/appraisal.git
revision: b200e636903700098bef25f4f51dbc4c46e4c04c
specs:
appraisal (2.4.1)
bundler
rake
thor (>= 0.14.0)

PATH
remote: ..
specs:
Expand Down Expand Up @@ -49,39 +58,36 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
appraisal (2.4.1)
bundler
rake
thor (>= 0.14.0)
arel (9.0.0)
ast (2.4.2)
builder (3.2.4)
byebug (11.1.3)
concurrent-ruby (1.1.10)
connection_pool (2.3.0)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.3)
diff-lcs (1.5.0)
erubi (1.12.0)
globalid (1.0.0)
globalid (1.1.0)
activesupport (>= 5.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
language_server-protocol (3.17.0.2)
loofah (2.19.1)
language_server-protocol (3.17.0.3)
lint_roller (1.0.0)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.0.1)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.17.0)
net-imap (0.3.4)
minitest (5.18.0)
net-imap (0.3.6)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -90,19 +96,20 @@ GEM
timeout
net-smtp (0.3.3)
net-protocol
nio4r (2.5.8)
nokogiri (1.14.0-arm64-darwin)
nio4r (2.5.9)
nokogiri (1.15.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.0-x86_64-darwin)
nokogiri (1.15.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.0-x86_64-linux)
nokogiri (1.15.2-x86_64-linux)
racc (~> 1.4)
parallel (1.22.1)
parser (3.2.0.0)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc (1.6.2)
rack (2.2.5)
rack-test (2.0.2)
racc
racc (1.7.1)
rack (2.2.7)
rack-test (2.1.0)
rack (>= 1.3)
rails (5.2.8.1)
actioncable (= 5.2.8.1)
Expand All @@ -120,8 +127,9 @@ GEM
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
loofah (~> 2.19, >= 2.19.1)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (5.2.8.1)
actionpack (= 5.2.8.1)
activesupport (= 5.2.8.1)
Expand All @@ -130,21 +138,22 @@ GEM
thor (>= 0.19.0, < 2.0)
rainbow (3.1.1)
rake (13.0.6)
redis (4.8.0)
regexp_parser (2.6.1)
redis-client (0.14.1)
connection_pool
regexp_parser (2.8.1)
request_store (1.5.1)
rack (>= 1.4)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.2)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (5.1.2)
Expand All @@ -156,44 +165,52 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.12.0)
rubocop (1.42.0)
rubocop (1.52.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-performance (1.15.2)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.18.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
sidekiq (6.5.8)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
ruby-progressbar (1.13.0)
sidekiq (7.1.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
redis-client (>= 0.14.0)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.6.0.rc2-arm64-darwin)
sqlite3 (1.6.0.rc2-x86_64-darwin)
sqlite3 (1.6.0.rc2-x86_64-linux)
standard (1.21.1)
sqlite3 (1.6.3-arm64-darwin)
sqlite3 (1.6.3-x86_64-darwin)
sqlite3 (1.6.3-x86_64-linux)
standard (1.29.0)
language_server-protocol (~> 3.17.0.2)
rubocop (= 1.42.0)
rubocop-performance (= 1.15.2)
thor (1.2.1)
lint_roller (~> 1.0)
rubocop (~> 1.52.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.1.0)
standard-custom (1.0.1)
lint_roller (~> 1.0)
standard-performance (1.1.0)
lint_roller (~> 1.0)
rubocop-performance (~> 1.18.0)
thor (1.2.2)
thread_safe (0.3.6)
timeout (0.3.1)
tzinfo (1.2.10)
timeout (0.3.2)
tzinfo (1.2.11)
thread_safe (~> 0.1)
unicode-display_width (2.4.2)
websocket-driver (0.7.5)
Expand All @@ -209,16 +226,13 @@ PLATFORMS

DEPENDENCIES
acts_as_tenant!
appraisal
appraisal!
byebug
net-imap
net-pop
net-smtp
rails (~> 5.2.0, >= 5.2.6)
rspec (>= 3.0)
rspec-rails
sidekiq (~> 6.1, >= 6.1.2)
sqlite3 (~> 1.6.0.rc2)
sidekiq (~> 7.0)
sqlite3
standard

BUNDLED WITH
Expand Down
12 changes: 3 additions & 9 deletions gemfiles/rails_6.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ source "https://rubygems.org"

gem "rspec", ">=3.0"
gem "rspec-rails"
gem "sqlite3", "~> 1.6.0.rc2"
gem "sidekiq", "~> 6.1", ">= 6.1.2"
gem "sqlite3"
gem "standard"
gem "appraisal"
gem "sidekiq", "~> 7.0"
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
gem "byebug", group: [:development, :test]
gem "rails", "~> 6.0.0", ">= 6.0.4.1"

group :development, :test do
gem "net-imap"
gem "net-pop"
gem "net-smtp"
end

gemspec path: "../"
Loading

0 comments on commit 7fce32f

Please sign in to comment.