Skip to content

Commit f8af8fe

Browse files
committed
⬆️ Upgrade dependencies
1 parent 6281a55 commit f8af8fe

31 files changed

+258
-110
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
*.gem
1515
/.idea/
1616

17-
*.gemfile.lock
17+
# gemfile locks for CI
18+
/gemfiles/*.lock
19+
Appraisal.*.gemfile.lock
1820

1921
# rspec failure tracking
2022
.rspec_status

.rubocop_gradual.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"README.md:527065615": [
3-
[167, 3, 100, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3592044714]
2+
"README.md:767349837": [
3+
[203, 3, 100, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3592044714]
4+
],
5+
"Rakefile:746406378": [
6+
[93, 3, 11, "Rake/DuplicateTask: Task `spec` is defined at both Rakefile:85 and Rakefile:93.", 2701974006]
47
],
58
"bin/bundle:247448467": [
69
[64, 5, 20, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2485198147]

Appraisal.root.gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ source "https://rubygems.org"
88
# We do not load the standard Gemfile, as it is tailored for local development.
99

1010
gemspec
11+
12+
gem "appraisal", github: "pboling/appraisal", branch: "galtzo"

Appraisals

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,27 @@ appraise "sequel-5.86" do
234234
gem "mutex_m", "~> 0.1"
235235
gem "stringio", ">= 0.0.2"
236236
end
237+
238+
# Only run security audit on latest Ruby version
239+
appraise "audit" do
240+
gem "mutex_m", "~> 0.2"
241+
gem "stringio", "~> 3.0"
242+
eval_gemfile "modular/audit.gemfile"
243+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
244+
end
245+
246+
# Only run coverage on latest Ruby version
247+
appraise "coverage" do
248+
gem "mutex_m", "~> 0.2"
249+
gem "stringio", "~> 3.0"
250+
eval_gemfile "modular/coverage.gemfile"
251+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
252+
end
253+
254+
# Only run linter on latest Ruby version (but, in support of oldest supported Ruby version)
255+
appraise "style" do
256+
gem "mutex_m", "~> 0.2"
257+
gem "stringio", "~> 3.0"
258+
eval_gemfile "modular/style.gemfile"
259+
remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch
260+
end

CONTRIBUTING.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,22 @@ To refresh the `reek` list:
3737
bundle exec reek > REEK
3838
```
3939

40-
## Appraisal
40+
## Appraisals
4141

42-
### Generate a new set of Appraisal gemfiles:
42+
From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
43+
They are created and updated with the commands:
4344

44-
```bash
45-
BUNDLE_GEMFILE=Appraisal.root.gemfile appraisal update
45+
NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
46+
47+
Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
48+
49+
```shell
50+
BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
51+
BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
4652
```
4753

54+
When adding an appraisal to CI check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
55+
4856
## Run Tests
4957

5058
NOTE: In order to run *all* the tests you will need to have the following databases installed, configured, and running.
@@ -119,7 +127,7 @@ bundle exec rake
119127

120128
Or just run the linter.
121129
```bash
122-
bundle exec rubocop_gradual:autocorrect
130+
bundle exec rake rubocop_gradual:autocorrect
123131
```
124132

125133
## Release

Gemfile

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,14 @@ gemspec
1414
gem "mutex_m", "~> 0.2"
1515
gem "stringio", "~> 3.1", ">= 3.1.2"
1616

17+
### Security Audit
18+
eval_gemfile "gemfiles/modular/audit.gemfile"
19+
1720
### Documentation
18-
gem "yard", "~> 0.9.34", require: false
19-
gem "yard-junk", "~> 0.0.10"
20-
gem "github-markup"
21-
gem "redcarpet"
22-
gem "rdoc", "~> 6.10"
21+
eval_gemfile "gemfiles/modular/documentation.gemfile"
2322

2423
### Linting
25-
gem "rubocop-lts", "~> 12.1", ">= 12.1.1"
26-
gem "rubocop-minitest"
27-
gem "rubocop-packaging", "~> 0.5", ">= 0.5.2"
28-
gem "rubocop-rspec", "~> 3.2"
29-
gem "rubocop-sequel"
30-
gem "standard", ">= 1.35.1", "!= 1.41.1", "!= 1.42.0"
31-
gem "reek"
24+
eval_gemfile "gemfiles/modular/style.gemfile"
3225

3326
### ORMs
3427
gem "couch_potato", "~> 1.17", require: false
@@ -44,10 +37,11 @@ gem "guard-bundler"
4437
gem "guard-rspec"
4538
gem "rb-fsevent"
4639

47-
### Coverage
48-
gem "kettle-soup-cover", "~> 1.0", ">= 1.0.4"
40+
# Code Coverage
41+
eval_gemfile "gemfiles/modular/coverage.gemfile"
4942

5043
### Testing
44+
gem "appraisal", github: "pboling/appraisal", branch: "galtzo"
5145
gem "test-unit", ">= 3.0"
5246

5347
platform :mri do

Gemfile.lock

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
1+
GIT
2+
remote: https://github.com/pboling/appraisal
3+
revision: a3a3e4b7db67d9b085f96b2ffddd2b51bd8a1196
4+
branch: galtzo
5+
specs:
6+
appraisal (3.0.0.rc1)
7+
bundler (>= 1.17.3)
8+
rake (>= 10)
9+
thor (>= 0.14)
10+
11+
GIT
12+
remote: https://github.com/pboling/yard-junk
13+
revision: 54ccebabbfa9a9cd44d0b991687ebbfd22c32b55
14+
branch: next
15+
specs:
16+
yard-junk (0.0.10)
17+
backports (>= 3.18)
18+
benchmark
19+
ostruct
20+
rainbow
21+
yard
22+
123
PATH
224
remote: .
325
specs:
426
omniauth-identity (3.1.1)
527
bcrypt (~> 3.1)
628
mutex_m (~> 0.3, >= 0.3.0)
729
omniauth (>= 1)
8-
version_gem (~> 1.1, >= 1.1.4)
30+
version_gem (~> 1.1, >= 1.1.8)
931

1032
GEM
1133
remote: https://rubygems.org/
@@ -33,17 +55,16 @@ GEM
3355
activesupport (>= 5)
3456
version_gem (~> 1.1, >= 1.1.4)
3557
ansi (1.5.0)
36-
appraisal (2.5.0)
37-
bundler
38-
rake
39-
thor (>= 0.14.0)
4058
ast (2.4.3)
4159
backports (3.25.1)
4260
base64 (0.2.0)
4361
bcrypt (3.1.20)
4462
benchmark (0.4.0)
4563
bigdecimal (3.1.9)
4664
bson (5.0.2)
65+
bundler-audit (0.9.2)
66+
bundler (>= 1.2.0, < 3)
67+
thor (~> 1.0)
4768
byebug (12.0.0)
4869
coderay (1.1.3)
4970
concurrent-ruby (1.3.5)
@@ -355,11 +376,6 @@ GEM
355376
unicode-emoji (4.0.4)
356377
version_gem (1.1.8)
357378
yard (0.9.37)
358-
yard-junk (0.0.10)
359-
backports (>= 3.18)
360-
ostruct
361-
rainbow
362-
yard
363379
zeitwerk (2.7.2)
364380

365381
PLATFORMS
@@ -381,15 +397,17 @@ PLATFORMS
381397
DEPENDENCIES
382398
activerecord (>= 5)
383399
anonymous_active_record (~> 1.0, >= 1.0.9)
384-
appraisal (~> 2.5)
400+
appraisal!
401+
benchmark (~> 0.4)
402+
bundler-audit (~> 0.9.2)
385403
byebug (>= 11)
386404
couch_potato (~> 1.17)
387-
github-markup
405+
github-markup (~> 5.0, >= 5.0.1)
388406
growl
389407
guard
390408
guard-bundler
391409
guard-rspec
392-
kettle-soup-cover (~> 1.0, >= 1.0.4)
410+
kettle-soup-cover (~> 1.0, >= 1.0.6)
393411
mongoid (>= 7)
394412
mongoid-rspec (~> 4.2)
395413
mutex_m (~> 0.2)
@@ -398,8 +416,8 @@ DEPENDENCIES
398416
rack-test (~> 1)
399417
rake (~> 13)
400418
rb-fsevent
401-
rdoc (~> 6.10)
402-
redcarpet
419+
rdoc (~> 6.11)
420+
redcarpet (~> 3.6)
403421
reek
404422
rspec (~> 3)
405423
rspec-block_is_expected (~> 1.0, >= 1.0.6)
@@ -413,8 +431,8 @@ DEPENDENCIES
413431
standard (>= 1.35.1, != 1.42.0, != 1.41.1)
414432
stringio (~> 3.1, >= 3.1.2)
415433
test-unit (>= 3.0)
416-
yard (~> 0.9.34)
417-
yard-junk (~> 0.0.10)
434+
yard (~> 0.9, >= 0.9.37)
435+
yard-junk (~> 0.0, >= 0.0.10)!
418436

419437
BUNDLED WITH
420438
2.6.2

Rakefile

Lines changed: 81 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,47 @@
22

33
require "bundler/gem_tasks"
44

5+
defaults = []
6+
7+
# See: https://docs.gitlab.com/ci/variables/predefined_variables/
8+
is_gitlab = ENV.fetch("GITLAB_CI", "false").casecmp("true") == 0
9+
10+
### DEVELOPMENT TASKS
11+
# Setup Kettle Soup Cover
12+
begin
13+
require "kettle-soup-cover"
14+
15+
Kettle::Soup::Cover.install_tasks
16+
# NOTE: Coverage on CI is configured independent of this task.
17+
# This task is for local development, as it opens results in browser
18+
defaults << "coverage" unless Kettle::Soup::Cover::IS_CI
19+
rescue LoadError
20+
desc("(stub) coverage is unavailable")
21+
task("coverage") do
22+
warn("NOTE: kettle-soup-cover isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
23+
end
24+
end
25+
26+
# Setup Bundle Audit
27+
begin
28+
require "bundler/audit/task"
29+
30+
Bundler::Audit::Task.new
31+
defaults.push("bundle:audit:update", "bundle:audit")
32+
rescue LoadError
33+
desc("(stub) bundle:audit is unavailable")
34+
task("bundle:audit") do
35+
warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
36+
end
37+
desc("(stub) bundle:audit:update is unavailable")
38+
task("bundle:audit:update") do
39+
warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
40+
end
41+
end
42+
543
begin
644
require "rspec/core/rake_task"
45+
746
# Define a default test task which will run only specs which work on sqlite3 because,
847
# when running sqlite3-based tests you don't need any additional services running.
948
%w(active_record sequel).each do |orm|
@@ -51,52 +90,70 @@ begin
5190
spec_orm_sequel
5291
])
5392
rescue LoadError
54-
task(:test) do
55-
warn("RSpec is disabled")
93+
task(:spec) do
94+
warn("NOTE: rspec isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
5695
end
5796
end
5897

98+
# Setup RuboCop-LTS
5999
begin
60-
require "reek/rake/task"
61-
Reek::Rake::Task.new do |t|
62-
t.fail_on_error = true
63-
t.verbose = false
64-
t.source_files = "{spec,spec_ignored,spec_orms,lib}/**/*.rb"
65-
end
100+
require "rubocop/lts"
101+
102+
Rubocop::Lts.install_tasks
103+
defaults << "rubocop_gradual"
66104
rescue LoadError
67-
task(:reek) do
68-
warn("reek is disabled")
105+
desc("(stub) rubocop_gradual is unavailable")
106+
task(:rubocop_gradual) do
107+
warn("NOTE: rubocop-lts isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
69108
end
70109
end
71110

111+
# Setup Yard
72112
begin
73-
require "yard-junk/rake"
113+
require "yard"
74114

75-
YardJunk::Rake.define_task
115+
YARD::Rake::YardocTask.new(:yard) do |t|
116+
t.files = [
117+
# Splats (alphabetical)
118+
"lib/**/*.rb",
119+
]
120+
end
121+
defaults << "yard"
76122
rescue LoadError
77-
task("yard:junk") do
78-
warn("yard:junk is disabled")
123+
desc("(stub) yard is unavailable")
124+
task(:yard) do
125+
warn("NOTE: yard isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
79126
end
80127
end
81128

129+
# Setup Reek
82130
begin
83-
require "yard"
131+
require "reek/rake/task"
84132

85-
YARD::Rake::YardocTask.new(:yard)
133+
Reek::Rake::Task.new do |t|
134+
t.fail_on_error = true
135+
t.verbose = false
136+
t.source_files = "{spec,spec_ignored,spec_orms,lib}/**/*.rb"
137+
end
138+
defaults << "reek" unless is_gitlab
86139
rescue LoadError
87-
task(:yard) do
88-
warn("yard is disabled")
140+
desc("(stub) reek is unavailable")
141+
task(:reek) do
142+
warn("NOTE: reek isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
89143
end
90144
end
91145

146+
### RELEASE TASKS
147+
# Setup stone_checksums
92148
begin
93-
require "rubocop/lts"
94-
Rubocop::Lts.install_tasks
149+
require "stone_checksums"
150+
151+
GemChecksums.install_tasks
95152
rescue LoadError
96-
task(:rubocop_gradual) do
97-
warn("RuboCop (Gradual) is disabled")
153+
desc("(stub) build:generate_checksums is unavailable")
154+
task("build:generate_checksums") do
155+
warn("NOTE: stone_checksums isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
98156
end
99157
end
100158

101-
# These tests do not require any services to be running, so this is what we run as default
102-
task default: %i[spec:orm:all rubocop_gradual:autocorrect yard yard:junk]
159+
task default: defaults

gemfiles/ar_5_0.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
source "https://rubygems.org"
44

5+
gem "appraisal", :branch => "galtzo", :git => "https://github.com/pboling/appraisal"
56
gem "activerecord", "~> 5.0.7.2"
67
gem "mutex_m", "~> 0.1"
78
gem "stringio", ">= 0.0.2"
89
gem "sqlite3", "~> 1.3"
910

10-
gemspec path: "../"
11+
gemspec :path => "../"

0 commit comments

Comments
 (0)