Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
franlocus | c831a5d854 | |
Matheus Sales | 09bc2609d7 | |
Masato Ohba | 1b949d12d5 | |
Pedro Paiva | f029d2601e | |
Pedro Paiva | 035822f4ec | |
Pedro Paiva | 958a9fec66 |
|
@ -28,9 +28,9 @@ jobs:
|
|||
matrix:
|
||||
ruby:
|
||||
- 3.1.2
|
||||
- 3.0.3
|
||||
- 2.7.5
|
||||
- 2.6.9
|
||||
- 3.0.4
|
||||
- 2.7.6
|
||||
- 2.6.10
|
||||
appraisal:
|
||||
- rails_7_0
|
||||
- rails_6_1
|
||||
|
@ -41,10 +41,10 @@ jobs:
|
|||
- postgresql
|
||||
exclude:
|
||||
- { ruby: 3.1.2, appraisal: rails_5_2 }
|
||||
- { ruby: 3.0.3, appraisal: rails_5_2 }
|
||||
- { ruby: 3.0.3, appraisal: rails_7_0 }
|
||||
- { ruby: 2.7.5, appraisal: rails_7_0 }
|
||||
- { ruby: 2.6.9, appraisal: rails_7_0 }
|
||||
- { ruby: 3.0.4, appraisal: rails_5_2 }
|
||||
- { ruby: 3.0.4, appraisal: rails_7_0 }
|
||||
- { ruby: 2.7.6, appraisal: rails_7_0 }
|
||||
- { ruby: 2.6.10, appraisal: rails_7_0 }
|
||||
env:
|
||||
DATABASE_ADAPTER: ${{ matrix.adapter }}
|
||||
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
|
||||
|
|
|
@ -30,7 +30,7 @@ Layout/LineLength:
|
|||
- '^[ ]*#.+$'
|
||||
- '^[ ]*''.+?'' => ''.+?'',?$'
|
||||
- '^[ ]*".+?" => ".+?",?$'
|
||||
Max: 80
|
||||
Max: 100
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
EnforcedStyle: indented
|
||||
Layout/ParameterAlignment:
|
||||
|
@ -104,6 +104,8 @@ Naming/MemoizedInstanceVariableName:
|
|||
EnforcedStyleForLeadingUnderscores: required
|
||||
Naming/PredicateName:
|
||||
Enabled: false
|
||||
Naming/VariableNumber:
|
||||
Enabled: false
|
||||
Naming/RescuedExceptionsVariableName:
|
||||
Enabled: false
|
||||
Rails/Date:
|
||||
|
|
|
@ -1 +1 @@
|
|||
3.0.3
|
||||
3.1.2
|
||||
|
|
|
@ -1 +1 @@
|
|||
ruby 3.0.3
|
||||
ruby 3.1.2
|
||||
|
|
|
@ -27,7 +27,7 @@ appraise 'rails_5_2' do
|
|||
instance_eval(&shared_dependencies)
|
||||
instance_eval(&controller_test_dependency)
|
||||
|
||||
gem 'rails', '5.2.6'
|
||||
gem 'rails', '5.2.8.1'
|
||||
gem 'puma', '~> 3.11'
|
||||
gem 'bootsnap', '>= 1.1.0', require: false
|
||||
gem 'sass-rails', '~> 5.0'
|
||||
|
@ -49,7 +49,7 @@ appraise 'rails_6_0' do
|
|||
instance_eval(&shared_dependencies)
|
||||
instance_eval(&controller_test_dependency)
|
||||
|
||||
gem 'rails', '6.0.4.4'
|
||||
gem 'rails', '6.0.6'
|
||||
gem 'puma', '~> 4.1'
|
||||
gem 'bootsnap', '>= 1.4.2', require: false
|
||||
gem 'sass-rails', '>= 6'
|
||||
|
@ -73,7 +73,7 @@ appraise 'rails_6_1' do
|
|||
instance_eval(&shared_dependencies)
|
||||
instance_eval(&controller_test_dependency)
|
||||
|
||||
gem 'rails', '6.1.4.4'
|
||||
gem 'rails', '6.1.7'
|
||||
gem 'puma', '~> 5.0'
|
||||
gem 'bootsnap', '>= 1.4.2', require: false
|
||||
gem 'sass-rails', '>= 6'
|
||||
|
|
65
Gemfile.lock
65
Gemfile.lock
|
@ -1,28 +1,28 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (6.0.3.4)
|
||||
activesupport (7.0.4)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
zeitwerk (~> 2.2, >= 2.2.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
appraisal (2.2.0)
|
||||
bundler
|
||||
rake
|
||||
thor (>= 0.14.0)
|
||||
ast (2.4.1)
|
||||
ast (2.4.2)
|
||||
byebug (11.1.3)
|
||||
coderay (1.1.3)
|
||||
concurrent-ruby (1.1.7)
|
||||
concurrent-ruby (1.1.10)
|
||||
diff-lcs (1.3)
|
||||
fssm (0.2.10)
|
||||
i18n (1.8.5)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (2.6.2)
|
||||
method_source (1.0.0)
|
||||
minitest (5.15.0)
|
||||
parallel (1.19.2)
|
||||
parser (2.7.2.0)
|
||||
minitest (5.16.3)
|
||||
parallel (1.22.1)
|
||||
parser (3.1.2.1)
|
||||
ast (~> 2.4.1)
|
||||
pry (0.13.1)
|
||||
coderay (~> 1.1)
|
||||
|
@ -30,12 +30,12 @@ GEM
|
|||
pry-byebug (3.9.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.13.0)
|
||||
rack (2.2.3)
|
||||
rainbow (3.0.0)
|
||||
rack (3.0.0)
|
||||
rainbow (3.1.1)
|
||||
rake (13.0.1)
|
||||
redcarpet (3.5.0)
|
||||
regexp_parser (1.8.2)
|
||||
rexml (3.2.4)
|
||||
regexp_parser (2.5.0)
|
||||
rexml (3.2.5)
|
||||
rouge (3.22.0)
|
||||
rspec (3.9.0)
|
||||
rspec-core (~> 3.9.0)
|
||||
|
@ -50,32 +50,31 @@ GEM
|
|||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-support (3.9.0)
|
||||
rubocop (1.0.0)
|
||||
rubocop (1.36.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.7.1.5)
|
||||
parser (>= 3.1.2.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8)
|
||||
rexml
|
||||
rubocop-ast (>= 0.6.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.20.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 2.0)
|
||||
rubocop-ast (1.1.0)
|
||||
parser (>= 2.7.1.5)
|
||||
rubocop-packaging (0.5.1)
|
||||
rubocop (>= 0.89, < 2.0)
|
||||
rubocop-rails (2.8.1)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.21.0)
|
||||
parser (>= 3.1.1.0)
|
||||
rubocop-packaging (0.5.2)
|
||||
rubocop (>= 1.33, < 2.0)
|
||||
rubocop-rails (2.16.1)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 0.87.0)
|
||||
ruby-progressbar (1.10.1)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
thor (0.20.0)
|
||||
thread_safe (0.3.6)
|
||||
tzinfo (1.2.7)
|
||||
thread_safe (~> 0.1)
|
||||
unicode-display_width (1.7.0)
|
||||
tzinfo (2.0.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
unicode-display_width (2.3.0)
|
||||
warnings_logger (0.1.1)
|
||||
yard (0.9.25)
|
||||
zeitwerk (2.4.0)
|
||||
zeus (0.15.14)
|
||||
method_source (>= 0.6.7)
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ gem "spring-commands-rspec"
|
|||
gem "rspec-rails", "~> 4.0"
|
||||
gem "shoulda-context", "~> 1.2.0"
|
||||
gem "rails-controller-testing", ">= 1.0.1"
|
||||
gem "rails", "5.2.6"
|
||||
gem "rails", "5.2.8.1"
|
||||
gem "puma", "~> 3.11"
|
||||
gem "bootsnap", ">= 1.1.0", require: false
|
||||
gem "sass-rails", "~> 5.0"
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (5.2.6)
|
||||
actionpack (= 5.2.6)
|
||||
actioncable (5.2.8.1)
|
||||
actionpack (= 5.2.8.1)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailer (5.2.6)
|
||||
actionpack (= 5.2.6)
|
||||
actionview (= 5.2.6)
|
||||
activejob (= 5.2.6)
|
||||
actionmailer (5.2.8.1)
|
||||
actionpack (= 5.2.8.1)
|
||||
actionview (= 5.2.8.1)
|
||||
activejob (= 5.2.8.1)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (5.2.6)
|
||||
actionview (= 5.2.6)
|
||||
activesupport (= 5.2.6)
|
||||
actionpack (5.2.8.1)
|
||||
actionview (= 5.2.8.1)
|
||||
activesupport (= 5.2.8.1)
|
||||
rack (~> 2.0, >= 2.0.8)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||
actionview (5.2.6)
|
||||
activesupport (= 5.2.6)
|
||||
actionview (5.2.8.1)
|
||||
activesupport (= 5.2.8.1)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
activejob (5.2.6)
|
||||
activesupport (= 5.2.6)
|
||||
activejob (5.2.8.1)
|
||||
activesupport (= 5.2.8.1)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (5.2.6)
|
||||
activesupport (= 5.2.6)
|
||||
activerecord (5.2.6)
|
||||
activemodel (= 5.2.6)
|
||||
activesupport (= 5.2.6)
|
||||
activemodel (5.2.8.1)
|
||||
activesupport (= 5.2.8.1)
|
||||
activerecord (5.2.8.1)
|
||||
activemodel (= 5.2.8.1)
|
||||
activesupport (= 5.2.8.1)
|
||||
arel (>= 9.0)
|
||||
activestorage (5.2.6)
|
||||
actionpack (= 5.2.6)
|
||||
activerecord (= 5.2.6)
|
||||
activestorage (5.2.8.1)
|
||||
actionpack (= 5.2.8.1)
|
||||
activerecord (= 5.2.8.1)
|
||||
marcel (~> 1.0.0)
|
||||
activesupport (5.2.6)
|
||||
activesupport (5.2.8.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
addressable (2.8.1)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
appraisal (2.2.0)
|
||||
bundler
|
||||
rake
|
||||
|
@ -52,9 +52,9 @@ GEM
|
|||
io-like (~> 0.3.0)
|
||||
arel (9.0.0)
|
||||
ast (2.4.2)
|
||||
bcrypt (3.1.16)
|
||||
bootsnap (1.9.3)
|
||||
msgpack (~> 1.0)
|
||||
bcrypt (3.1.18)
|
||||
bootsnap (1.13.0)
|
||||
msgpack (~> 1.2)
|
||||
builder (3.2.4)
|
||||
byebug (11.1.3)
|
||||
capybara (3.1.1)
|
||||
|
@ -64,44 +64,44 @@ GEM
|
|||
rack (>= 1.6.0)
|
||||
rack-test (>= 0.6.3)
|
||||
xpath (~> 3.0)
|
||||
childprocess (3.0.0)
|
||||
childprocess (4.1.0)
|
||||
chromedriver-helper (2.1.1)
|
||||
archive-zip (~> 0.10)
|
||||
nokogiri (~> 1.8)
|
||||
coderay (1.1.3)
|
||||
concurrent-ruby (1.1.9)
|
||||
concurrent-ruby (1.1.10)
|
||||
crass (1.0.6)
|
||||
diff-lcs (1.4.4)
|
||||
erubi (1.10.0)
|
||||
ffi (1.15.0)
|
||||
diff-lcs (1.5.0)
|
||||
erubi (1.11.0)
|
||||
ffi (1.15.5)
|
||||
fssm (0.2.10)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
i18n (1.8.10)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
io-like (0.3.1)
|
||||
jbuilder (2.11.2)
|
||||
jbuilder (2.11.5)
|
||||
actionview (>= 5.0.0)
|
||||
activesupport (>= 5.0.0)
|
||||
json (2.6.2)
|
||||
listen (3.0.8)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
loofah (2.10.0)
|
||||
loofah (2.19.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
marcel (1.0.1)
|
||||
marcel (1.0.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.0)
|
||||
mini_portile2 (2.5.3)
|
||||
minitest (5.14.4)
|
||||
msgpack (1.4.2)
|
||||
nio4r (2.5.7)
|
||||
nokogiri (1.11.7)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
mini_mime (1.1.2)
|
||||
minitest (5.16.3)
|
||||
msgpack (1.5.6)
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.8-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
parallel (1.20.1)
|
||||
parser (3.0.0.0)
|
||||
parallel (1.22.1)
|
||||
parser (3.1.2.1)
|
||||
ast (~> 2.4.1)
|
||||
pg (0.21.0)
|
||||
pry (0.13.1)
|
||||
|
@ -110,24 +110,24 @@ GEM
|
|||
pry-byebug (3.9.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.13.0)
|
||||
public_suffix (4.0.6)
|
||||
public_suffix (5.0.0)
|
||||
puma (3.12.6)
|
||||
racc (1.5.2)
|
||||
rack (2.2.3)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (5.2.6)
|
||||
actioncable (= 5.2.6)
|
||||
actionmailer (= 5.2.6)
|
||||
actionpack (= 5.2.6)
|
||||
actionview (= 5.2.6)
|
||||
activejob (= 5.2.6)
|
||||
activemodel (= 5.2.6)
|
||||
activerecord (= 5.2.6)
|
||||
activestorage (= 5.2.6)
|
||||
activesupport (= 5.2.6)
|
||||
racc (1.6.0)
|
||||
rack (2.2.4)
|
||||
rack-test (2.0.2)
|
||||
rack (>= 1.3)
|
||||
rails (5.2.8.1)
|
||||
actioncable (= 5.2.8.1)
|
||||
actionmailer (= 5.2.8.1)
|
||||
actionpack (= 5.2.8.1)
|
||||
actionview (= 5.2.8.1)
|
||||
activejob (= 5.2.8.1)
|
||||
activemodel (= 5.2.8.1)
|
||||
activerecord (= 5.2.8.1)
|
||||
activestorage (= 5.2.8.1)
|
||||
activesupport (= 5.2.8.1)
|
||||
bundler (>= 1.3.0)
|
||||
railties (= 5.2.6)
|
||||
railties (= 5.2.8.1)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
|
@ -136,35 +136,35 @@ GEM
|
|||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
rails-html-sanitizer (1.4.3)
|
||||
loofah (~> 2.3)
|
||||
railties (5.2.6)
|
||||
actionpack (= 5.2.6)
|
||||
activesupport (= 5.2.6)
|
||||
railties (5.2.8.1)
|
||||
actionpack (= 5.2.8.1)
|
||||
activesupport (= 5.2.8.1)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.19.0, < 2.0)
|
||||
rainbow (3.0.0)
|
||||
rainbow (3.1.1)
|
||||
rake (13.0.1)
|
||||
rb-fsevent (0.10.4)
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.1)
|
||||
regexp_parser (2.1.1)
|
||||
rexml (3.2.4)
|
||||
rouge (3.26.0)
|
||||
rspec (3.10.0)
|
||||
rspec-core (~> 3.10.0)
|
||||
rspec-expectations (~> 3.10.0)
|
||||
rspec-mocks (~> 3.10.0)
|
||||
rspec-core (3.10.1)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-expectations (3.10.1)
|
||||
regexp_parser (2.5.0)
|
||||
rexml (3.2.5)
|
||||
rouge (3.30.0)
|
||||
rspec (3.11.0)
|
||||
rspec-core (~> 3.11.0)
|
||||
rspec-expectations (~> 3.11.0)
|
||||
rspec-mocks (~> 3.11.0)
|
||||
rspec-core (3.11.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-expectations (3.11.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-mocks (3.10.2)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-mocks (3.11.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-rails (4.1.2)
|
||||
actionpack (>= 4.2)
|
||||
activesupport (>= 4.2)
|
||||
|
@ -173,26 +173,27 @@ GEM
|
|||
rspec-expectations (~> 3.10)
|
||||
rspec-mocks (~> 3.10)
|
||||
rspec-support (~> 3.10)
|
||||
rspec-support (3.10.2)
|
||||
rubocop (1.10.0)
|
||||
rspec-support (3.11.1)
|
||||
rubocop (1.36.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.0.0.0)
|
||||
parser (>= 3.1.2.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml
|
||||
rubocop-ast (>= 1.2.0, < 2.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.20.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.4.1)
|
||||
parser (>= 2.7.1.5)
|
||||
rubocop-packaging (0.5.1)
|
||||
rubocop (>= 0.89, < 2.0)
|
||||
rubocop-rails (2.9.1)
|
||||
rubocop-ast (1.21.0)
|
||||
parser (>= 3.1.1.0)
|
||||
rubocop-packaging (0.5.2)
|
||||
rubocop (>= 1.33, < 2.0)
|
||||
rubocop-rails (2.16.1)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 0.90.0, < 2.0)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
rubyzip (2.3.0)
|
||||
rubyzip (2.3.2)
|
||||
sass (3.7.4)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
|
@ -204,8 +205,9 @@ GEM
|
|||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (>= 1.1, < 3)
|
||||
selenium-webdriver (3.142.7)
|
||||
childprocess (>= 0.5, < 4.0)
|
||||
selenium-webdriver (4.1.0)
|
||||
childprocess (>= 0.5, < 5.0)
|
||||
rexml (~> 3.2, >= 3.2.5)
|
||||
rubyzip (>= 1.2.2)
|
||||
shoulda-context (1.2.2)
|
||||
spring (2.1.1)
|
||||
|
@ -217,32 +219,34 @@ GEM
|
|||
sprockets (3.7.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.2.2)
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets-rails (3.4.2)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
sqlite3 (1.4.2)
|
||||
thor (1.1.0)
|
||||
sqlite3 (1.5.0-x86_64-linux)
|
||||
thor (1.2.1)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
tilt (2.0.11)
|
||||
turbolinks (5.2.1)
|
||||
turbolinks-source (~> 5.2)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (1.2.9)
|
||||
tzinfo (1.2.10)
|
||||
thread_safe (~> 0.1)
|
||||
unicode-display_width (2.0.0)
|
||||
unicode-display_width (2.3.0)
|
||||
warnings_logger (0.1.1)
|
||||
webrick (1.7.0)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
yard (0.9.26)
|
||||
yard (0.9.28)
|
||||
webrick (~> 1.7.0)
|
||||
zeus (0.15.14)
|
||||
method_source (>= 0.6.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
appraisal (= 2.2.0)
|
||||
|
@ -258,7 +262,7 @@ DEPENDENCIES
|
|||
pry
|
||||
pry-byebug
|
||||
puma (~> 3.11)
|
||||
rails (= 5.2.6)
|
||||
rails (= 5.2.8.1)
|
||||
rails-controller-testing (>= 1.0.1)
|
||||
rake (= 13.0.1)
|
||||
redcarpet
|
||||
|
@ -281,4 +285,4 @@ DEPENDENCIES
|
|||
zeus
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.22
|
||||
2.3.22
|
||||
|
|
|
@ -22,7 +22,7 @@ gem "spring-commands-rspec"
|
|||
gem "rspec-rails", "~> 4.0"
|
||||
gem "shoulda-context", "~> 1.2.0"
|
||||
gem "rails-controller-testing", ">= 1.0.1"
|
||||
gem "rails", "6.0.4.4"
|
||||
gem "rails", "6.0.6"
|
||||
gem "puma", "~> 4.1"
|
||||
gem "bootsnap", ">= 1.4.2", require: false
|
||||
gem "sass-rails", ">= 6"
|
||||
|
|
|
@ -1,70 +1,70 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (6.0.4.4)
|
||||
actionpack (= 6.0.4.4)
|
||||
actioncable (6.0.6)
|
||||
actionpack (= 6.0.6)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (6.0.4.4)
|
||||
actionpack (= 6.0.4.4)
|
||||
activejob (= 6.0.4.4)
|
||||
activerecord (= 6.0.4.4)
|
||||
activestorage (= 6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
actionmailbox (6.0.6)
|
||||
actionpack (= 6.0.6)
|
||||
activejob (= 6.0.6)
|
||||
activerecord (= 6.0.6)
|
||||
activestorage (= 6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
mail (>= 2.7.1)
|
||||
actionmailer (6.0.4.4)
|
||||
actionpack (= 6.0.4.4)
|
||||
actionview (= 6.0.4.4)
|
||||
activejob (= 6.0.4.4)
|
||||
actionmailer (6.0.6)
|
||||
actionpack (= 6.0.6)
|
||||
actionview (= 6.0.6)
|
||||
activejob (= 6.0.6)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (6.0.4.4)
|
||||
actionview (= 6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
actionpack (6.0.6)
|
||||
actionview (= 6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
rack (~> 2.0, >= 2.0.8)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (6.0.4.4)
|
||||
actionpack (= 6.0.4.4)
|
||||
activerecord (= 6.0.4.4)
|
||||
activestorage (= 6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
actiontext (6.0.6)
|
||||
actionpack (= 6.0.6)
|
||||
activerecord (= 6.0.6)
|
||||
activestorage (= 6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
actionview (6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activejob (6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
activejob (6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
activerecord (6.0.4.4)
|
||||
activemodel (= 6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
activestorage (6.0.4.4)
|
||||
actionpack (= 6.0.4.4)
|
||||
activejob (= 6.0.4.4)
|
||||
activerecord (= 6.0.4.4)
|
||||
marcel (~> 1.0.0)
|
||||
activesupport (6.0.4.4)
|
||||
activemodel (6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
activerecord (6.0.6)
|
||||
activemodel (= 6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
activestorage (6.0.6)
|
||||
actionpack (= 6.0.6)
|
||||
activejob (= 6.0.6)
|
||||
activerecord (= 6.0.6)
|
||||
marcel (~> 1.0)
|
||||
activesupport (6.0.6)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
zeitwerk (~> 2.2, >= 2.2.2)
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
addressable (2.8.1)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
appraisal (2.2.0)
|
||||
bundler
|
||||
rake
|
||||
thor (>= 0.14.0)
|
||||
ast (2.4.2)
|
||||
bcrypt (3.1.16)
|
||||
bootsnap (1.10.2)
|
||||
bcrypt (3.1.18)
|
||||
bootsnap (1.13.0)
|
||||
msgpack (~> 1.2)
|
||||
builder (3.2.4)
|
||||
byebug (11.1.3)
|
||||
|
@ -79,24 +79,25 @@ GEM
|
|||
xpath (~> 3.2)
|
||||
childprocess (4.1.0)
|
||||
coderay (1.1.3)
|
||||
concurrent-ruby (1.1.9)
|
||||
concurrent-ruby (1.1.10)
|
||||
crass (1.0.6)
|
||||
diff-lcs (1.5.0)
|
||||
digest (3.1.0)
|
||||
erubi (1.10.0)
|
||||
erubi (1.11.0)
|
||||
ffi (1.15.5)
|
||||
fssm (0.2.10)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
i18n (1.9.1)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jbuilder (2.11.5)
|
||||
actionview (>= 5.0.0)
|
||||
activesupport (>= 5.0.0)
|
||||
json (2.6.2)
|
||||
listen (3.3.4)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
loofah (2.13.0)
|
||||
loofah (2.19.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
|
@ -105,9 +106,8 @@ GEM
|
|||
matrix (0.4.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.2)
|
||||
mini_portile2 (2.7.1)
|
||||
minitest (5.15.0)
|
||||
msgpack (1.4.4)
|
||||
minitest (5.16.3)
|
||||
msgpack (1.5.6)
|
||||
net-protocol (0.1.3)
|
||||
timeout
|
||||
net-smtp (0.3.1)
|
||||
|
@ -115,41 +115,40 @@ GEM
|
|||
net-protocol
|
||||
timeout
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.1)
|
||||
mini_portile2 (~> 2.7.0)
|
||||
nokogiri (1.13.8-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
parallel (1.21.0)
|
||||
parser (3.1.0.0)
|
||||
parallel (1.22.1)
|
||||
parser (3.1.2.1)
|
||||
ast (~> 2.4.1)
|
||||
pg (1.3.0)
|
||||
pg (1.4.3)
|
||||
pry (0.13.1)
|
||||
coderay (~> 1.1)
|
||||
method_source (~> 1.0)
|
||||
pry-byebug (3.9.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.13.0)
|
||||
psych (3.3.2)
|
||||
public_suffix (4.0.6)
|
||||
puma (4.3.10)
|
||||
psych (3.3.3)
|
||||
public_suffix (5.0.0)
|
||||
puma (4.3.12)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.6.0)
|
||||
rack (2.2.3)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (6.0.4.4)
|
||||
actioncable (= 6.0.4.4)
|
||||
actionmailbox (= 6.0.4.4)
|
||||
actionmailer (= 6.0.4.4)
|
||||
actionpack (= 6.0.4.4)
|
||||
actiontext (= 6.0.4.4)
|
||||
actionview (= 6.0.4.4)
|
||||
activejob (= 6.0.4.4)
|
||||
activemodel (= 6.0.4.4)
|
||||
activerecord (= 6.0.4.4)
|
||||
activestorage (= 6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
rack (2.2.4)
|
||||
rack-test (2.0.2)
|
||||
rack (>= 1.3)
|
||||
rails (6.0.6)
|
||||
actioncable (= 6.0.6)
|
||||
actionmailbox (= 6.0.6)
|
||||
actionmailer (= 6.0.6)
|
||||
actionpack (= 6.0.6)
|
||||
actiontext (= 6.0.6)
|
||||
actionview (= 6.0.6)
|
||||
activejob (= 6.0.6)
|
||||
activemodel (= 6.0.6)
|
||||
activerecord (= 6.0.6)
|
||||
activestorage (= 6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
bundler (>= 1.3.0)
|
||||
railties (= 6.0.4.4)
|
||||
railties (= 6.0.6)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
|
@ -158,35 +157,35 @@ GEM
|
|||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.4.2)
|
||||
rails-html-sanitizer (1.4.3)
|
||||
loofah (~> 2.3)
|
||||
railties (6.0.4.4)
|
||||
actionpack (= 6.0.4.4)
|
||||
activesupport (= 6.0.4.4)
|
||||
railties (6.0.6)
|
||||
actionpack (= 6.0.6)
|
||||
activesupport (= 6.0.6)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.20.3, < 2.0)
|
||||
rainbow (3.1.1)
|
||||
rake (13.0.1)
|
||||
rb-fsevent (0.11.0)
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.1)
|
||||
regexp_parser (2.2.0)
|
||||
regexp_parser (2.6.0)
|
||||
rexml (3.2.5)
|
||||
rouge (3.27.0)
|
||||
rspec (3.10.0)
|
||||
rspec-core (~> 3.10.0)
|
||||
rspec-expectations (~> 3.10.0)
|
||||
rspec-mocks (~> 3.10.0)
|
||||
rspec-core (3.10.2)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-expectations (3.10.2)
|
||||
rouge (3.30.0)
|
||||
rspec (3.11.0)
|
||||
rspec-core (~> 3.11.0)
|
||||
rspec-expectations (~> 3.11.0)
|
||||
rspec-mocks (~> 3.11.0)
|
||||
rspec-core (3.11.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-expectations (3.11.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-mocks (3.10.3)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-mocks (3.11.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-rails (4.1.2)
|
||||
actionpack (>= 4.2)
|
||||
activesupport (>= 4.2)
|
||||
|
@ -195,24 +194,25 @@ GEM
|
|||
rspec-expectations (~> 3.10)
|
||||
rspec-mocks (~> 3.10)
|
||||
rspec-support (~> 3.10)
|
||||
rspec-support (3.10.3)
|
||||
rubocop (1.25.0)
|
||||
rspec-support (3.11.1)
|
||||
rubocop (1.36.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.1.0.0)
|
||||
parser (>= 3.1.2.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml
|
||||
rubocop-ast (>= 1.15.1, < 2.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.20.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.15.1)
|
||||
parser (>= 3.0.1.1)
|
||||
rubocop-packaging (0.5.1)
|
||||
rubocop (>= 0.89, < 2.0)
|
||||
rubocop-rails (2.13.2)
|
||||
rubocop-ast (1.21.0)
|
||||
parser (>= 3.1.1.0)
|
||||
rubocop-packaging (0.5.2)
|
||||
rubocop (>= 1.33, < 2.0)
|
||||
rubocop-rails (2.16.1)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
rubyzip (2.3.2)
|
||||
sass-rails (6.0.0)
|
||||
|
@ -236,26 +236,26 @@ GEM
|
|||
spring-watcher-listen (2.0.1)
|
||||
listen (>= 2.7, < 4.0)
|
||||
spring (>= 1.2, < 3.0)
|
||||
sprockets (4.0.2)
|
||||
sprockets (4.1.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.4.2)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
sqlite3 (1.4.2)
|
||||
sqlite3 (1.5.0-x86_64-linux)
|
||||
thor (1.2.1)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
tilt (2.0.11)
|
||||
timeout (0.3.0)
|
||||
turbolinks (5.2.1)
|
||||
turbolinks-source (~> 5.2)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (1.2.9)
|
||||
tzinfo (1.2.10)
|
||||
thread_safe (~> 0.1)
|
||||
unicode-display_width (2.1.0)
|
||||
unicode-display_width (2.3.0)
|
||||
warnings_logger (0.1.1)
|
||||
webdrivers (5.0.0)
|
||||
webdrivers (5.1.0)
|
||||
nokogiri (~> 1.6)
|
||||
rubyzip (>= 1.3.0)
|
||||
selenium-webdriver (~> 4.0)
|
||||
|
@ -265,14 +265,14 @@ GEM
|
|||
websocket-extensions (0.1.5)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
yard (0.9.27)
|
||||
yard (0.9.28)
|
||||
webrick (~> 1.7.0)
|
||||
zeitwerk (2.5.4)
|
||||
zeitwerk (2.6.0)
|
||||
zeus (0.15.14)
|
||||
method_source (>= 0.6.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
appraisal (= 2.2.0)
|
||||
|
@ -289,7 +289,7 @@ DEPENDENCIES
|
|||
pry-byebug
|
||||
psych (~> 3.0)
|
||||
puma (~> 4.1)
|
||||
rails (= 6.0.4.4)
|
||||
rails (= 6.0.6)
|
||||
rails-controller-testing (>= 1.0.1)
|
||||
rake (= 13.0.1)
|
||||
redcarpet
|
||||
|
@ -313,4 +313,4 @@ DEPENDENCIES
|
|||
zeus
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.19
|
||||
2.3.22
|
||||
|
|
|
@ -22,7 +22,7 @@ gem "spring-commands-rspec"
|
|||
gem "rspec-rails", "~> 4.0"
|
||||
gem "shoulda-context", "~> 1.2.0"
|
||||
gem "rails-controller-testing", ">= 1.0.1"
|
||||
gem "rails", "6.1.4.4"
|
||||
gem "rails", "6.1.7"
|
||||
gem "puma", "~> 5.0"
|
||||
gem "bootsnap", ">= 1.4.2", require: false
|
||||
gem "sass-rails", ">= 6"
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (6.1.4.4)
|
||||
actionpack (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
actioncable (6.1.7)
|
||||
actionpack (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (6.1.4.4)
|
||||
actionpack (= 6.1.4.4)
|
||||
activejob (= 6.1.4.4)
|
||||
activerecord (= 6.1.4.4)
|
||||
activestorage (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
actionmailbox (6.1.7)
|
||||
actionpack (= 6.1.7)
|
||||
activejob (= 6.1.7)
|
||||
activerecord (= 6.1.7)
|
||||
activestorage (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
mail (>= 2.7.1)
|
||||
actionmailer (6.1.4.4)
|
||||
actionpack (= 6.1.4.4)
|
||||
actionview (= 6.1.4.4)
|
||||
activejob (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
actionmailer (6.1.7)
|
||||
actionpack (= 6.1.7)
|
||||
actionview (= 6.1.7)
|
||||
activejob (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (6.1.4.4)
|
||||
actionview (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
actionpack (6.1.7)
|
||||
actionview (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
rack (~> 2.0, >= 2.0.9)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (6.1.4.4)
|
||||
actionpack (= 6.1.4.4)
|
||||
activerecord (= 6.1.4.4)
|
||||
activestorage (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
actiontext (6.1.7)
|
||||
actionpack (= 6.1.7)
|
||||
activerecord (= 6.1.7)
|
||||
activestorage (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
actionview (6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activejob (6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
activejob (6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
activerecord (6.1.4.4)
|
||||
activemodel (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
activestorage (6.1.4.4)
|
||||
actionpack (= 6.1.4.4)
|
||||
activejob (= 6.1.4.4)
|
||||
activerecord (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
marcel (~> 1.0.0)
|
||||
activemodel (6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
activerecord (6.1.7)
|
||||
activemodel (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
activestorage (6.1.7)
|
||||
actionpack (= 6.1.7)
|
||||
activejob (= 6.1.7)
|
||||
activerecord (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
marcel (~> 1.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (6.1.4.4)
|
||||
activesupport (6.1.7)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
|
@ -83,16 +83,16 @@ GEM
|
|||
xpath (~> 3.2)
|
||||
childprocess (4.1.0)
|
||||
coderay (1.1.3)
|
||||
concurrent-ruby (1.1.9)
|
||||
concurrent-ruby (1.1.10)
|
||||
crass (1.0.6)
|
||||
diff-lcs (1.5.0)
|
||||
digest (3.1.0)
|
||||
erubi (1.10.0)
|
||||
erubi (1.11.0)
|
||||
ffi (1.15.5)
|
||||
fssm (0.2.10)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
i18n (1.9.1)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jbuilder (2.11.5)
|
||||
actionview (>= 5.0.0)
|
||||
|
@ -100,7 +100,7 @@ GEM
|
|||
listen (3.5.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
loofah (2.13.0)
|
||||
loofah (2.19.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
|
@ -109,8 +109,8 @@ GEM
|
|||
matrix (0.4.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.2)
|
||||
mini_portile2 (2.7.1)
|
||||
minitest (5.15.0)
|
||||
mini_portile2 (2.8.0)
|
||||
minitest (5.16.3)
|
||||
msgpack (1.4.4)
|
||||
net-protocol (0.1.3)
|
||||
timeout
|
||||
|
@ -119,8 +119,8 @@ GEM
|
|||
net-protocol
|
||||
timeout
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.1)
|
||||
mini_portile2 (~> 2.7.0)
|
||||
nokogiri (1.13.8)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
parallel (1.21.0)
|
||||
parser (3.1.0.0)
|
||||
|
@ -137,25 +137,25 @@ GEM
|
|||
puma (5.6.1)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.6.0)
|
||||
rack (2.2.3)
|
||||
rack (2.2.4)
|
||||
rack-mini-profiler (2.0.4)
|
||||
rack (>= 1.2.0)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (6.1.4.4)
|
||||
actioncable (= 6.1.4.4)
|
||||
actionmailbox (= 6.1.4.4)
|
||||
actionmailer (= 6.1.4.4)
|
||||
actionpack (= 6.1.4.4)
|
||||
actiontext (= 6.1.4.4)
|
||||
actionview (= 6.1.4.4)
|
||||
activejob (= 6.1.4.4)
|
||||
activemodel (= 6.1.4.4)
|
||||
activerecord (= 6.1.4.4)
|
||||
activestorage (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
rack-test (2.0.2)
|
||||
rack (>= 1.3)
|
||||
rails (6.1.7)
|
||||
actioncable (= 6.1.7)
|
||||
actionmailbox (= 6.1.7)
|
||||
actionmailer (= 6.1.7)
|
||||
actionpack (= 6.1.7)
|
||||
actiontext (= 6.1.7)
|
||||
actionview (= 6.1.7)
|
||||
activejob (= 6.1.7)
|
||||
activemodel (= 6.1.7)
|
||||
activerecord (= 6.1.7)
|
||||
activestorage (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 6.1.4.4)
|
||||
railties (= 6.1.7)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
|
@ -164,13 +164,13 @@ GEM
|
|||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.4.2)
|
||||
rails-html-sanitizer (1.4.3)
|
||||
loofah (~> 2.3)
|
||||
railties (6.1.4.4)
|
||||
actionpack (= 6.1.4.4)
|
||||
activesupport (= 6.1.4.4)
|
||||
railties (6.1.7)
|
||||
actionpack (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
method_source
|
||||
rake (>= 0.13)
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
rainbow (3.1.1)
|
||||
rake (13.0.1)
|
||||
|
@ -242,7 +242,7 @@ GEM
|
|||
spring-watcher-listen (2.0.1)
|
||||
listen (>= 2.7, < 4.0)
|
||||
spring (>= 1.2, < 3.0)
|
||||
sprockets (4.0.2)
|
||||
sprockets (4.1.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.4.2)
|
||||
|
@ -256,7 +256,7 @@ GEM
|
|||
turbolinks (5.2.1)
|
||||
turbolinks-source (~> 5.2)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (2.0.4)
|
||||
tzinfo (2.0.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
unicode-display_width (2.1.0)
|
||||
warnings_logger (0.1.1)
|
||||
|
@ -272,7 +272,7 @@ GEM
|
|||
nokogiri (~> 1.8)
|
||||
yard (0.9.27)
|
||||
webrick (~> 1.7.0)
|
||||
zeitwerk (2.5.4)
|
||||
zeitwerk (2.6.0)
|
||||
zeus (0.15.14)
|
||||
method_source (>= 0.6.7)
|
||||
|
||||
|
@ -295,7 +295,7 @@ DEPENDENCIES
|
|||
psych (~> 3.0)
|
||||
puma (~> 5.0)
|
||||
rack-mini-profiler (~> 2.0.0)
|
||||
rails (= 6.1.4.4)
|
||||
rails (= 6.1.7)
|
||||
rails-controller-testing (>= 1.0.1)
|
||||
rake (= 13.0.1)
|
||||
redcarpet
|
||||
|
@ -319,4 +319,4 @@ DEPENDENCIES
|
|||
zeus
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.32
|
||||
2.3.22
|
||||
|
|
|
@ -1,67 +1,67 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (7.0.1)
|
||||
actionpack (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
actioncable (7.0.4)
|
||||
actionpack (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (7.0.1)
|
||||
actionpack (= 7.0.1)
|
||||
activejob (= 7.0.1)
|
||||
activerecord (= 7.0.1)
|
||||
activestorage (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
actionmailbox (7.0.4)
|
||||
actionpack (= 7.0.4)
|
||||
activejob (= 7.0.4)
|
||||
activerecord (= 7.0.4)
|
||||
activestorage (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
mail (>= 2.7.1)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
actionmailer (7.0.1)
|
||||
actionpack (= 7.0.1)
|
||||
actionview (= 7.0.1)
|
||||
activejob (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
actionmailer (7.0.4)
|
||||
actionpack (= 7.0.4)
|
||||
actionview (= 7.0.4)
|
||||
activejob (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (7.0.1)
|
||||
actionview (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
actionpack (7.0.4)
|
||||
actionview (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (7.0.1)
|
||||
actionpack (= 7.0.1)
|
||||
activerecord (= 7.0.1)
|
||||
activestorage (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
actiontext (7.0.4)
|
||||
actionpack (= 7.0.4)
|
||||
activerecord (= 7.0.4)
|
||||
activestorage (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
globalid (>= 0.6.0)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
actionview (7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activejob (7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
activejob (7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
activerecord (7.0.1)
|
||||
activemodel (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
activestorage (7.0.1)
|
||||
actionpack (= 7.0.1)
|
||||
activejob (= 7.0.1)
|
||||
activerecord (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
activemodel (7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
activerecord (7.0.4)
|
||||
activemodel (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
activestorage (7.0.4)
|
||||
actionpack (= 7.0.4)
|
||||
activejob (= 7.0.4)
|
||||
activerecord (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
marcel (~> 1.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (7.0.1)
|
||||
activesupport (7.0.4)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
|
@ -89,30 +89,28 @@ GEM
|
|||
xpath (~> 3.2)
|
||||
childprocess (4.1.0)
|
||||
coderay (1.1.3)
|
||||
concurrent-ruby (1.1.9)
|
||||
concurrent-ruby (1.1.10)
|
||||
crass (1.0.6)
|
||||
debug (1.4.0)
|
||||
irb (>= 1.3.6)
|
||||
reline (>= 0.2.7)
|
||||
diff-lcs (1.5.0)
|
||||
digest (3.1.0)
|
||||
erubi (1.10.0)
|
||||
erubi (1.11.0)
|
||||
fssm (0.2.10)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
i18n (1.8.11)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
importmap-rails (1.0.2)
|
||||
actionpack (>= 6.0.0)
|
||||
railties (>= 6.0.0)
|
||||
io-console (0.5.11)
|
||||
io-wait (0.2.1)
|
||||
irb (1.4.1)
|
||||
reline (>= 0.3.0)
|
||||
jbuilder (2.11.5)
|
||||
actionview (>= 5.0.0)
|
||||
activesupport (>= 5.0.0)
|
||||
loofah (2.13.0)
|
||||
loofah (2.19.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
|
@ -121,27 +119,20 @@ GEM
|
|||
matrix (0.4.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.2)
|
||||
mini_portile2 (2.7.1)
|
||||
minitest (5.15.0)
|
||||
mini_portile2 (2.8.0)
|
||||
minitest (5.16.3)
|
||||
msgpack (1.4.4)
|
||||
net-imap (0.2.3)
|
||||
digest
|
||||
net-imap (0.3.1)
|
||||
net-protocol
|
||||
strscan
|
||||
net-pop (0.1.1)
|
||||
digest
|
||||
net-pop (0.1.2)
|
||||
net-protocol
|
||||
net-protocol (0.1.3)
|
||||
timeout
|
||||
net-protocol (0.1.2)
|
||||
io-wait
|
||||
timeout
|
||||
net-smtp (0.3.1)
|
||||
digest
|
||||
net-smtp (0.3.2)
|
||||
net-protocol
|
||||
timeout
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.1)
|
||||
mini_portile2 (~> 2.7.0)
|
||||
nokogiri (1.13.8)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
parallel (1.21.0)
|
||||
parser (3.1.0.0)
|
||||
|
@ -157,23 +148,23 @@ GEM
|
|||
puma (5.5.2)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.6.0)
|
||||
rack (2.2.3)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (7.0.1)
|
||||
actioncable (= 7.0.1)
|
||||
actionmailbox (= 7.0.1)
|
||||
actionmailer (= 7.0.1)
|
||||
actionpack (= 7.0.1)
|
||||
actiontext (= 7.0.1)
|
||||
actionview (= 7.0.1)
|
||||
activejob (= 7.0.1)
|
||||
activemodel (= 7.0.1)
|
||||
activerecord (= 7.0.1)
|
||||
activestorage (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
rack (2.2.4)
|
||||
rack-test (2.0.2)
|
||||
rack (>= 1.3)
|
||||
rails (7.0.4)
|
||||
actioncable (= 7.0.4)
|
||||
actionmailbox (= 7.0.4)
|
||||
actionmailer (= 7.0.4)
|
||||
actionpack (= 7.0.4)
|
||||
actiontext (= 7.0.4)
|
||||
actionview (= 7.0.4)
|
||||
activejob (= 7.0.4)
|
||||
activemodel (= 7.0.4)
|
||||
activerecord (= 7.0.4)
|
||||
activestorage (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 7.0.1)
|
||||
railties (= 7.0.4)
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
actionview (>= 5.0.1.rc1)
|
||||
|
@ -181,11 +172,11 @@ GEM
|
|||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.4.2)
|
||||
rails-html-sanitizer (1.4.3)
|
||||
loofah (~> 2.3)
|
||||
railties (7.0.1)
|
||||
actionpack (= 7.0.1)
|
||||
activesupport (= 7.0.1)
|
||||
railties (7.0.4)
|
||||
actionpack (= 7.0.4)
|
||||
activesupport (= 7.0.4)
|
||||
method_source
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
|
@ -257,13 +248,12 @@ GEM
|
|||
sqlite3 (1.4.2)
|
||||
stimulus-rails (1.0.2)
|
||||
railties (>= 6.0.0)
|
||||
strscan (3.0.1)
|
||||
thor (1.2.1)
|
||||
timeout (0.2.0)
|
||||
timeout (0.3.0)
|
||||
turbo-rails (1.0.1)
|
||||
actionpack (>= 6.0.0)
|
||||
railties (>= 6.0.0)
|
||||
tzinfo (2.0.4)
|
||||
tzinfo (2.0.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
unicode-display_width (2.1.0)
|
||||
warnings_logger (0.1.1)
|
||||
|
@ -279,7 +269,7 @@ GEM
|
|||
nokogiri (~> 1.8)
|
||||
yard (0.9.27)
|
||||
webrick (~> 1.7.0)
|
||||
zeitwerk (2.5.3)
|
||||
zeitwerk (2.6.0)
|
||||
zeus (0.15.14)
|
||||
method_source (>= 0.6.7)
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ require 'shoulda/matchers/active_model/numericality_matchers/comparison_matcher'
|
|||
require 'shoulda/matchers/active_model/numericality_matchers/odd_number_matcher'
|
||||
require 'shoulda/matchers/active_model/numericality_matchers/even_number_matcher'
|
||||
require 'shoulda/matchers/active_model/numericality_matchers/only_integer_matcher'
|
||||
require 'shoulda/matchers/active_model/numericality_matchers/range_matcher'
|
||||
require 'shoulda/matchers/active_model/numericality_matchers/submatchers'
|
||||
require 'shoulda/matchers/active_model/errors'
|
||||
require 'shoulda/matchers/active_model/have_secure_password_matcher'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'active_support/core_ext/module/delegation'
|
||||
|
||||
module Shoulda
|
||||
module Matchers
|
||||
module ActiveModel
|
||||
|
@ -31,6 +33,8 @@ module Shoulda
|
|||
},
|
||||
}.freeze
|
||||
|
||||
delegate :failure_message, :failure_message_when_negated, to: :submatchers
|
||||
|
||||
def initialize(numericality_matcher, value, operator)
|
||||
super(nil)
|
||||
unless numericality_matcher.respond_to? :diff_to_compare
|
||||
|
@ -72,49 +76,24 @@ module Shoulda
|
|||
|
||||
def matches?(subject)
|
||||
@subject = subject
|
||||
all_bounds_correct?
|
||||
end
|
||||
|
||||
def failure_message
|
||||
last_failing_submatcher.failure_message
|
||||
end
|
||||
|
||||
def failure_message_when_negated
|
||||
last_failing_submatcher.failure_message_when_negated
|
||||
submatchers.matches?(subject)
|
||||
end
|
||||
|
||||
def comparison_description
|
||||
"#{comparison_expectation} #{@value}"
|
||||
end
|
||||
|
||||
def submatchers
|
||||
@_submatchers ||= NumericalityMatchers::Submatchers.new(build_submatchers)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def all_bounds_correct?
|
||||
failing_submatchers.empty?
|
||||
end
|
||||
|
||||
def failing_submatchers
|
||||
submatchers_and_results.
|
||||
select { |x| !x[:matched] }.
|
||||
map { |x| x[:matcher] }
|
||||
end
|
||||
|
||||
def last_failing_submatcher
|
||||
failing_submatchers.last
|
||||
end
|
||||
|
||||
def submatchers
|
||||
@_submatchers ||=
|
||||
comparison_combos.map do |diff, submatcher_method_name|
|
||||
matcher = __send__(submatcher_method_name, diff, nil)
|
||||
matcher.with_message(@message, values: { count: @value })
|
||||
matcher
|
||||
end
|
||||
end
|
||||
|
||||
def submatchers_and_results
|
||||
@_submatchers_and_results ||= submatchers.map do |matcher|
|
||||
{ matcher: matcher, matched: matcher.matches?(@subject) }
|
||||
def build_submatchers
|
||||
comparison_combos.map do |diff, submatcher_method_name|
|
||||
matcher = __send__(submatcher_method_name, diff, nil)
|
||||
matcher.with_message(@message, values: { count: @value })
|
||||
matcher
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -55,11 +55,9 @@ module Shoulda
|
|||
private
|
||||
|
||||
def disallow_value_matcher
|
||||
@_disallow_value_matcher ||= begin
|
||||
DisallowValueMatcher.new(disallowed_value).tap do |matcher|
|
||||
matcher.for(attribute)
|
||||
wrap_disallow_value_matcher(matcher)
|
||||
end
|
||||
@_disallow_value_matcher ||= DisallowValueMatcher.new(disallowed_value).tap do |matcher|
|
||||
matcher.for(attribute)
|
||||
wrap_disallow_value_matcher(matcher)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
require 'active_support/core_ext/module/delegation'
|
||||
|
||||
module Shoulda
|
||||
module Matchers
|
||||
module ActiveModel
|
||||
module NumericalityMatchers
|
||||
# @private
|
||||
class RangeMatcher < ValidationMatcher
|
||||
OPERATORS = [:>=, :<=].freeze
|
||||
|
||||
delegate :failure_message, to: :submatchers
|
||||
|
||||
def initialize(numericality_matcher, attribute, range)
|
||||
super(attribute)
|
||||
unless numericality_matcher.respond_to? :diff_to_compare
|
||||
raise ArgumentError, 'numericality_matcher is invalid'
|
||||
end
|
||||
|
||||
@numericality_matcher = numericality_matcher
|
||||
@range = range
|
||||
@attribute = attribute
|
||||
end
|
||||
|
||||
def matches?(subject)
|
||||
@subject = subject
|
||||
submatchers.matches?(subject)
|
||||
end
|
||||
|
||||
def simple_description
|
||||
description = ''
|
||||
|
||||
if expects_strict?
|
||||
description << ' strictly'
|
||||
end
|
||||
|
||||
description +
|
||||
"disallow :#{attribute} from being a number that is not " +
|
||||
range_description
|
||||
end
|
||||
|
||||
def range_description
|
||||
"from #{Shoulda::Matchers::Util.inspect_range(@range)}"
|
||||
end
|
||||
|
||||
def submatchers
|
||||
@_submatchers ||= NumericalityMatchers::Submatchers.new(build_submatchers)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def build_submatchers
|
||||
submatcher_combos.map do |value, operator|
|
||||
build_comparison_submatcher(value, operator)
|
||||
end
|
||||
end
|
||||
|
||||
def submatcher_combos
|
||||
@range.minmax.zip(OPERATORS)
|
||||
end
|
||||
|
||||
def build_comparison_submatcher(value, operator)
|
||||
NumericalityMatchers::ComparisonMatcher.new(@numericality_matcher, value, operator).
|
||||
for(@attribute).
|
||||
with_message(@message).
|
||||
on(@context)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
module Shoulda
|
||||
module Matchers
|
||||
module ActiveModel
|
||||
module NumericalityMatchers
|
||||
# @private
|
||||
class Submatchers
|
||||
def initialize(submatchers)
|
||||
@submatchers = submatchers
|
||||
end
|
||||
|
||||
def matches?(subject)
|
||||
@subject = subject
|
||||
failing_submatchers.empty?
|
||||
end
|
||||
|
||||
def failure_message
|
||||
last_failing_submatcher.failure_message
|
||||
end
|
||||
|
||||
def failure_message_when_negated
|
||||
last_failing_submatcher.failure_message_when_negated
|
||||
end
|
||||
|
||||
def add(submatcher)
|
||||
@submatchers << submatcher
|
||||
end
|
||||
|
||||
def last_failing_submatcher
|
||||
failing_submatchers.last
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def failing_submatchers
|
||||
@_failing_submatchers ||= @submatchers.reject do |submatcher|
|
||||
submatcher.matches?(@subject)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -108,7 +108,7 @@ module Shoulda
|
|||
obj
|
||||
end
|
||||
elsif array_column?
|
||||
['an arbitary value']
|
||||
['an arbitrary value']
|
||||
elsif enum_column?
|
||||
enum_values.first
|
||||
else
|
||||
|
|
|
@ -33,9 +33,9 @@ module Shoulda
|
|||
#
|
||||
# class Game
|
||||
# include ActiveModel::Model
|
||||
# attr_accessor :supported_os
|
||||
# attr_accessor :floors_with_enemies
|
||||
#
|
||||
# validates_exclusion_of :supported_os, in: 5..8
|
||||
# validates_exclusion_of :floors_with_enemies, in: 5..8
|
||||
# end
|
||||
#
|
||||
# # RSpec
|
||||
|
|
|
@ -276,6 +276,33 @@ module Shoulda
|
|||
# should validate_numericality_of(:birth_day).odd
|
||||
# end
|
||||
#
|
||||
# ##### is_in
|
||||
#
|
||||
# Use `is_in` to test usage of the `:in` option.
|
||||
# This asserts that the attribute can take a number which is contained
|
||||
# in the given range.
|
||||
#
|
||||
# class Person
|
||||
# include ActiveModel::Model
|
||||
# attr_accessor :legal_age
|
||||
#
|
||||
# validates_numericality_of :birth_month, in: 1..12
|
||||
# end
|
||||
#
|
||||
# # RSpec
|
||||
# RSpec.describe Person, type: :model do
|
||||
# it do
|
||||
# should validate_numericality_of(:birth_month).
|
||||
# is_in(1..12)
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# # Minitest (Shoulda)
|
||||
# class PersonTest < ActiveSupport::TestCase
|
||||
# should validate_numericality_of(:birth_month).
|
||||
# is_in(1..12)
|
||||
# end
|
||||
#
|
||||
# ##### with_message
|
||||
#
|
||||
# Use `with_message` if you are using a custom validation message.
|
||||
|
@ -426,6 +453,13 @@ module Shoulda
|
|||
self
|
||||
end
|
||||
|
||||
def is_in(range)
|
||||
prepare_submatcher(
|
||||
NumericalityMatchers::RangeMatcher.new(self, @attribute, range),
|
||||
)
|
||||
self
|
||||
end
|
||||
|
||||
def with_message(message)
|
||||
@expects_custom_validation_message = true
|
||||
@expected_message = message
|
||||
|
@ -457,6 +491,10 @@ module Shoulda
|
|||
description << "validate that :#{@attribute} looks like "
|
||||
description << Shoulda::Matchers::Util.a_or_an(full_allowed_type)
|
||||
|
||||
if range_description.present?
|
||||
description << " #{range_description}"
|
||||
end
|
||||
|
||||
if comparison_descriptions.present?
|
||||
description << " #{comparison_descriptions}"
|
||||
end
|
||||
|
@ -673,6 +711,14 @@ module Shoulda
|
|||
end
|
||||
end
|
||||
|
||||
def range_description
|
||||
range_submatcher = @submatchers.detect do |submatcher|
|
||||
submatcher.respond_to? :range_description
|
||||
end
|
||||
|
||||
range_submatcher&.range_description
|
||||
end
|
||||
|
||||
def model
|
||||
@subject.class
|
||||
end
|
||||
|
|
|
@ -25,8 +25,8 @@ module Shoulda
|
|||
Gem::Version.new('0')
|
||||
end
|
||||
|
||||
def active_model_gte_7?
|
||||
Gem::Requirement.new('>= 7').satisfied_by?(active_model_version)
|
||||
def active_model_st_6_1?
|
||||
Gem::Requirement.new('< 6.1').satisfied_by?(active_model_version)
|
||||
end
|
||||
|
||||
def active_model_lt_7?
|
||||
|
|
|
@ -92,7 +92,7 @@ module Shoulda
|
|||
if line.list_item?
|
||||
combined_lines << line
|
||||
else
|
||||
combined_lines.last << (" #{line}").squeeze(' ')
|
||||
combined_lines.last << " #{line}".squeeze(' ')
|
||||
end
|
||||
|
||||
combined_lines
|
||||
|
|
|
@ -10,5 +10,9 @@ module UnitTests
|
|||
def rails_version
|
||||
Tests::Version.new(Rails::VERSION::STRING)
|
||||
end
|
||||
|
||||
def rails_oldest_version_supported
|
||||
5.2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -104,7 +104,7 @@ module UnitTests
|
|||
end
|
||||
|
||||
def inspect
|
||||
middle = '%s:0x%014x%s' % [ # rubocop:disable Style/FormatStringToken
|
||||
middle = '%s:0x%014x%s' % [
|
||||
self.class,
|
||||
object_id * 2,
|
||||
" #{inspected_attributes.join(' ')}",
|
||||
|
|
|
@ -26,6 +26,7 @@ module UnitTests
|
|||
def load
|
||||
load_environment
|
||||
|
||||
add_active_storage_migration
|
||||
add_action_text_migration if rails_version >= 6.0
|
||||
|
||||
run_migrations
|
||||
|
@ -150,6 +151,12 @@ end
|
|||
end
|
||||
end
|
||||
|
||||
def add_active_storage_migration
|
||||
fs.within_project do
|
||||
run_command! 'bundle exec rake active_storage:install:migrations'
|
||||
end
|
||||
end
|
||||
|
||||
def add_initializer_for_time_zone_aware_types
|
||||
path = 'config/initializers/configure_time_zone_aware_types.rb'
|
||||
fs.write(path, <<-TEXT)
|
||||
|
|
|
@ -69,26 +69,34 @@ describe Shoulda::Matchers::ActiveModel::ValidateNumericalityOfMatcher, type: :m
|
|||
validation_name: :on,
|
||||
validation_value: :customizable,
|
||||
},
|
||||
{
|
||||
category: :range,
|
||||
name: :is_in,
|
||||
argument: 1..10,
|
||||
validation_name: :in,
|
||||
validation_value: 1..10,
|
||||
rails_version: 7.0,
|
||||
},
|
||||
]
|
||||
end
|
||||
|
||||
def qualifiers_under(category)
|
||||
all_qualifiers.select do |qualifier|
|
||||
all_available_qualifiers.select do |qualifier|
|
||||
qualifier[:category] == category
|
||||
end
|
||||
end
|
||||
|
||||
def mutually_exclusive_qualifiers
|
||||
qualifiers_under(:cardinality) + qualifiers_under(:comparison)
|
||||
qualifiers_under(:cardinality) + qualifiers_under(:comparison) + qualifiers_under(:range)
|
||||
end
|
||||
|
||||
def non_mutually_exclusive_qualifiers
|
||||
all_qualifiers - mutually_exclusive_qualifiers
|
||||
all_available_qualifiers - mutually_exclusive_qualifiers
|
||||
end
|
||||
|
||||
def validations_by_qualifier
|
||||
all_qualifiers.each_with_object({}) do |qualifier, hash|
|
||||
hash[qualifier[:name]] = qualifier[:validation_name]
|
||||
def all_available_qualifiers
|
||||
all_qualifiers.filter do |qualifier|
|
||||
rails_version >= qualifier.fetch(:rails_version, rails_oldest_version_supported)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -2065,6 +2073,144 @@ could not be proved.
|
|||
end
|
||||
end
|
||||
|
||||
if rails_version >= 7.0
|
||||
context 'qualified with in' do
|
||||
context 'validating with in' do
|
||||
it 'accepts' do
|
||||
record = build_record_validating_numericality(
|
||||
in: 1..10,
|
||||
)
|
||||
expect(record).to validate_numericality.is_in(1..10)
|
||||
end
|
||||
|
||||
it 'rejects when used in the negative' do
|
||||
record = build_record_validating_numericality(
|
||||
in: 1..10,
|
||||
)
|
||||
|
||||
assertion = lambda do
|
||||
expect(record).not_to validate_numericality.is_in(1..10)
|
||||
end
|
||||
|
||||
expect(&assertion).to fail_with_message(<<~MESSAGE)
|
||||
Expected Example not to validate that :attr looks like a number from ‹1›
|
||||
to ‹10›, but this could not be proved.
|
||||
After setting :attr to ‹"abcd"›, the matcher expected the Example to
|
||||
be valid, but it was invalid instead, producing these validation
|
||||
errors:
|
||||
|
||||
* attr: ["is not a number"]
|
||||
MESSAGE
|
||||
end
|
||||
|
||||
it_supports(
|
||||
'ignoring_interference_by_writer',
|
||||
tests: {
|
||||
reject_if_qualified_but_changing_value_interferes: {
|
||||
model_name: 'Example',
|
||||
attribute_name: :attr,
|
||||
changing_values_with: :next_value,
|
||||
expected_message: <<-MESSAGE.strip,
|
||||
Expected Example to validate that :attr looks like a number from ‹1› to
|
||||
‹10›, but this could not be proved.
|
||||
After setting :attr to ‹"10"› -- which was read back as ‹"11"› -- the
|
||||
matcher expected the Example to be valid, but it was invalid instead,
|
||||
producing these validation errors:
|
||||
|
||||
* attr: ["must be in 1..10"]
|
||||
|
||||
As indicated in the message above, :attr seems to be changing certain
|
||||
values as they are set, and this could have something to do with why
|
||||
this test is failing. If you've overridden the writer method for this
|
||||
attribute, then you may need to change it to make this test pass, or
|
||||
do something else entirely.
|
||||
MESSAGE
|
||||
},
|
||||
},
|
||||
) do
|
||||
def validation_matcher_scenario_args
|
||||
super.deep_merge(
|
||||
validation_options: { in: 1..10 },
|
||||
)
|
||||
end
|
||||
|
||||
def configure_validation_matcher(matcher)
|
||||
matcher.is_in(1..10)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the attribute is a virtual attribute in an ActiveRecord model' do
|
||||
it 'accepts' do
|
||||
record = build_record_validating_numericality_of_virtual_attribute(
|
||||
in: 1..10,
|
||||
)
|
||||
expect(record).to validate_numericality.
|
||||
is_in(1..10)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the column is an integer column' do
|
||||
it 'accepts (and does not raise an error)' do
|
||||
record = build_record_validating_numericality(
|
||||
column_type: :integer,
|
||||
in: 1..10,
|
||||
)
|
||||
|
||||
expect(record).
|
||||
to validate_numericality.
|
||||
is_in(1..10)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the column is a float column' do
|
||||
it 'accepts (and does not raise an error)' do
|
||||
record = build_record_validating_numericality(
|
||||
column_type: :float,
|
||||
in: 1..10,
|
||||
)
|
||||
|
||||
expect(record).
|
||||
to validate_numericality.
|
||||
is_in(1..10)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the column is a decimal column' do
|
||||
it 'accepts (and does not raise an error)' do
|
||||
record = build_record_validating_numericality(
|
||||
column_type: :decimal,
|
||||
in: 1..10,
|
||||
)
|
||||
|
||||
expect(record).
|
||||
to validate_numericality.
|
||||
is_in(1..10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'not validating with in' do
|
||||
it 'rejects since it does not disallow numbers that are not in the range specified' do
|
||||
record = build_record_validating_numericality
|
||||
|
||||
assertion = lambda do
|
||||
expect(record).to validate_numericality.
|
||||
is_in(1..10)
|
||||
end
|
||||
|
||||
message = <<-MESSAGE
|
||||
Expected Example to validate that :attr looks like a number from ‹1› to
|
||||
‹10›, but this could not be proved.
|
||||
After setting :attr to ‹"11"›, the matcher expected the Example to be
|
||||
invalid, but it was valid instead.
|
||||
MESSAGE
|
||||
|
||||
expect(&assertion).to fail_with_message(message)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def build_validation_options(args)
|
||||
combination = args.fetch(:for)
|
||||
|
||||
|
@ -2080,7 +2226,11 @@ could not be proved.
|
|||
|
||||
combination.each do |qualifier|
|
||||
args = self.class.default_qualifier_arguments.fetch(qualifier[:name])
|
||||
matcher.__send__(qualifier[:name], *args)
|
||||
if args
|
||||
matcher.__send__(qualifier[:name], args)
|
||||
else
|
||||
matcher.__send__(qualifier[:name])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -860,19 +860,7 @@ validation exception on failure, but this could not be proved.
|
|||
end
|
||||
|
||||
context 'against a pre-set password in a model that has_secure_password' do
|
||||
if Shoulda::Matchers::RailsShim.active_model_gte_7?
|
||||
it 'does not raises a CouldNotSetPasswordError' do
|
||||
user_class = define_model :user, password_digest: :string do
|
||||
has_secure_password :password, validations: false
|
||||
validates_presence_of :password
|
||||
end
|
||||
|
||||
user = user_class.new
|
||||
user.password = 'something'
|
||||
|
||||
expect(user).to validate_presence_of(:password)
|
||||
end
|
||||
else
|
||||
if Shoulda::Matchers::RailsShim.active_model_st_6_1?
|
||||
it 'raises a CouldNotSetPasswordError' do
|
||||
user_class = define_model :user, password_digest: :string do
|
||||
has_secure_password validations: false
|
||||
|
|
|
@ -845,8 +845,7 @@ Expected Parent to have a has_many association called children through conceptio
|
|||
it 'rejects an association that has the wrong :through option' do
|
||||
define_model :child
|
||||
|
||||
define_model :conception, child_id: :integer,
|
||||
parent_id: :integer do
|
||||
define_model :conception, child_id: :integer, parent_id: :integer do
|
||||
belongs_to :child
|
||||
end
|
||||
|
||||
|
@ -1183,7 +1182,7 @@ Expected Parent to have a has_many association called children through conceptio
|
|||
|
||||
it 'accepts a valid association with an :as option' do
|
||||
define_model :detail, detailable_id: :integer,
|
||||
detailable_type: :string
|
||||
detailable_type: :string
|
||||
define_model :person do
|
||||
has_one :detail, as: :detailable
|
||||
end
|
||||
|
@ -1226,7 +1225,7 @@ Expected Parent to have a has_many association called children through conceptio
|
|||
|
||||
it 'rejects an association with a bad :as option' do
|
||||
define_model :detail, detailable_id: :integer,
|
||||
detailable_type: :string
|
||||
detailable_type: :string
|
||||
define_model :person do
|
||||
has_one :detail, as: :describable
|
||||
end
|
||||
|
@ -1524,7 +1523,7 @@ Expected Parent to have a has_many association called children through conceptio
|
|||
define_model :relative
|
||||
define_model :person
|
||||
define_model :people_relative, id: false, person_id: :integer,
|
||||
relative_id: :integer
|
||||
relative_id: :integer
|
||||
|
||||
expect(Person.new).not_to have_and_belong_to_many(:relatives)
|
||||
end
|
||||
|
@ -1980,7 +1979,7 @@ Expected Person to have a has_and_belongs_to_many association called relatives (
|
|||
define_association_with_conditions(model, :has_and_belongs_to_many, :relatives, adopted: true)
|
||||
end
|
||||
define_model :people_relative, id: false, person_id: :integer,
|
||||
relative_id: :integer
|
||||
relative_id: :integer
|
||||
|
||||
expect(Person.new).to have_and_belong_to_many(:relatives).conditions(adopted: true)
|
||||
end
|
||||
|
@ -1991,7 +1990,7 @@ Expected Person to have a has_and_belongs_to_many association called relatives (
|
|||
has_and_belongs_to_many :relatives
|
||||
end
|
||||
define_model :people_relative, id: false, person_id: :integer,
|
||||
relative_id: :integer
|
||||
relative_id: :integer
|
||||
|
||||
expect(Person.new).not_to have_and_belong_to_many(:relatives).conditions(adopted: true)
|
||||
end
|
||||
|
@ -2008,7 +2007,7 @@ Expected Person to have a has_and_belongs_to_many association called relatives (
|
|||
end
|
||||
|
||||
define_model :people_person_relative, person_id: :integer,
|
||||
person_relative_id: :integer
|
||||
person_relative_id: :integer
|
||||
|
||||
expect(Person.new).to have_and_belong_to_many(:relatives).class_name('PersonRelative')
|
||||
end
|
||||
|
@ -2081,7 +2080,7 @@ Expected Person to have a has_and_belongs_to_many association called relatives (
|
|||
has_and_belongs_to_many :relatives, autosave: true
|
||||
end
|
||||
define_model :people_relative, person_id: :integer,
|
||||
relative_id: :integer
|
||||
relative_id: :integer
|
||||
expect(Person.new).to have_and_belong_to_many(:relatives).autosave(true)
|
||||
end
|
||||
|
||||
|
@ -2091,7 +2090,7 @@ Expected Person to have a has_and_belongs_to_many association called relatives (
|
|||
has_and_belongs_to_many :relatives
|
||||
end
|
||||
define_model :people_relative, person_id: :integer,
|
||||
relative_id: :integer
|
||||
relative_id: :integer
|
||||
|
||||
message = 'Expected Person to have a has_and_belongs_to_many association called relatives (relatives should have autosave set to true)'
|
||||
expect {
|
||||
|
@ -2124,7 +2123,7 @@ Expected Person to have a has_and_belongs_to_many association called relatives (
|
|||
def having_and_belonging_to_many_relatives(_options = {})
|
||||
define_model :relative
|
||||
define_model :people_relative, id: false, person_id: :integer,
|
||||
relative_id: :integer
|
||||
relative_id: :integer
|
||||
define_model :person do
|
||||
has_and_belongs_to_many :relatives
|
||||
end.new
|
||||
|
|
|
@ -1,35 +1,6 @@
|
|||
require 'unit_spec_helper'
|
||||
|
||||
describe Shoulda::Matchers::ActiveRecord::HaveAttachedMatcher, type: :model do
|
||||
before do
|
||||
create_table :active_storage_blobs do |t|
|
||||
t.string :key, null: false
|
||||
t.string :filename, null: false
|
||||
t.string :content_type
|
||||
t.text :metadata
|
||||
t.bigint :byte_size, null: false
|
||||
t.string :checksum, null: false
|
||||
t.datetime :created_at, null: false
|
||||
|
||||
t.index [:key], unique: true
|
||||
end
|
||||
|
||||
create_table :active_storage_attachments do |t|
|
||||
t.string :name, null: false
|
||||
t.references :record, null: false, polymorphic: true, index: false
|
||||
t.references :blob, null: false
|
||||
|
||||
t.datetime :created_at, null: false
|
||||
|
||||
t.index [:record_type, :record_id, :name, :blob_id],
|
||||
name: 'index_active_storage_attachments_uniqueness', unique: true
|
||||
|
||||
# The original rails migration has a foreign key.
|
||||
# Since this messes up the clearing of the database, it's removed here.
|
||||
# t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
end
|
||||
|
||||
describe 'have_one_attached' do
|
||||
describe '#description' do
|
||||
it 'returns the message with the name of the association' do
|
||||
|
|
Loading…
Reference in New Issue