chore: upgrade to rails 7.1.

upgrade rspec

fix failing tests

upgrade devise
rpp-main
rebuilt 2 years ago
parent 2fd56047d4
commit 18ab51c860

@ -7,7 +7,7 @@ git_source(:github) do |repo_name|
end end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem "rails", "~> 7.0.4" gem "rails", "~> 7.1.0"
gem "sprockets-rails" gem "sprockets-rails"
gem "pg" gem "pg"
@ -36,7 +36,7 @@ gem "friendly_id", "~> 5.1.0"
gem "newrelic_rpm" gem "newrelic_rpm"
gem "devise" gem "devise", git: "https://github.com/heartcombo/devise"
gem "omniauth" gem "omniauth"
@ -66,7 +66,7 @@ group :development, :test do
gem "factory_bot_rails" gem "factory_bot_rails"
gem "parallel_tests" gem "parallel_tests"
gem "rack-mini-profiler" gem "rack-mini-profiler"
gem "rspec-rails", "~> 5.1.0" gem "rspec-rails", "~> 6.0.3"
end end
group :development do group :development do

@ -1,77 +1,97 @@
GIT
remote: https://github.com/heartcombo/devise
revision: 9064ecbf15bffc9ec70ec8ff4061a974e7621156
specs:
devise (4.9.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (7.0.6) actioncable (7.1.0)
actionpack (= 7.0.6) actionpack (= 7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
actionmailbox (7.0.6) zeitwerk (~> 2.6)
actionpack (= 7.0.6) actionmailbox (7.1.0)
activejob (= 7.0.6) actionpack (= 7.1.0)
activerecord (= 7.0.6) activejob (= 7.1.0)
activestorage (= 7.0.6) activerecord (= 7.1.0)
activesupport (= 7.0.6) activestorage (= 7.1.0)
activesupport (= 7.1.0)
mail (>= 2.7.1) mail (>= 2.7.1)
net-imap net-imap
net-pop net-pop
net-smtp net-smtp
actionmailer (7.0.6) actionmailer (7.1.0)
actionpack (= 7.0.6) actionpack (= 7.1.0)
actionview (= 7.0.6) actionview (= 7.1.0)
activejob (= 7.0.6) activejob (= 7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
net-imap net-imap
net-pop net-pop
net-smtp net-smtp
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
actionpack (7.0.6) actionpack (7.1.0)
actionview (= 7.0.6) actionview (= 7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
rack (~> 2.0, >= 2.2.4) nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.0, >= 1.2.0) rails-html-sanitizer (~> 1.6)
actiontext (7.0.6) actiontext (7.1.0)
actionpack (= 7.0.6) actionpack (= 7.1.0)
activerecord (= 7.0.6) activerecord (= 7.1.0)
activestorage (= 7.0.6) activestorage (= 7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
globalid (>= 0.6.0) globalid (>= 0.6.0)
nokogiri (>= 1.8.5) nokogiri (>= 1.8.5)
actionview (7.0.6) actionview (7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.11)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.1, >= 1.2.0) rails-html-sanitizer (~> 1.6)
activejob (7.0.6) activejob (7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (7.0.6) activemodel (7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
activerecord (7.0.6) activerecord (7.1.0)
activemodel (= 7.0.6) activemodel (= 7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
activerecord-import (1.4.1) timeout (>= 0.4.0)
activerecord-import (1.5.0)
activerecord (>= 4.2) activerecord (>= 4.2)
activestorage (7.0.6) activestorage (7.1.0)
actionpack (= 7.0.6) actionpack (= 7.1.0)
activejob (= 7.0.6) activejob (= 7.1.0)
activerecord (= 7.0.6) activerecord (= 7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
marcel (~> 1.0) marcel (~> 1.0)
mini_mime (>= 1.1.0) activesupport (7.1.0)
activesupport (7.0.6) base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2) i18n (>= 1.6, < 2)
minitest (>= 5.1) minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0) tzinfo (~> 2.0)
addressable (2.8.4) addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2) ast (2.4.2)
backport (1.2.0) backport (1.2.0)
base64 (0.1.1)
bcrypt (3.1.19) bcrypt (3.1.19)
bcrypt_pbkdf (1.1.0) bcrypt_pbkdf (1.1.0)
benchmark (0.2.1) benchmark (0.2.1)
@ -82,11 +102,12 @@ GEM
erubi (~> 1.4) erubi (~> 1.4)
parser (>= 2.4) parser (>= 2.4)
smart_properties smart_properties
bigdecimal (3.1.4)
bootsnap (1.16.0) bootsnap (1.16.0)
msgpack (~> 1.2) msgpack (~> 1.2)
brakeman (6.0.0) brakeman (6.0.1)
builder (3.2.4) builder (3.2.4)
bullet (7.0.7) bullet (7.1.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
uniform_notifier (~> 1.11) uniform_notifier (~> 1.11)
byebug (11.1.3) byebug (11.1.3)
@ -101,13 +122,14 @@ GEM
xpath (~> 3.2) xpath (~> 3.2)
coderay (1.1.3) coderay (1.1.3)
concurrent-ruby (1.2.2) concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6) crass (1.0.6)
cssbundling-rails (1.2.0) cssbundling-rails (1.3.3)
railties (>= 6.0.0) railties (>= 6.0.0)
cuprite (0.14.3) cuprite (0.14.3)
capybara (~> 3.0) capybara (~> 3.0)
ferrum (~> 0.13.0) ferrum (~> 0.13.0)
cypress-rails (0.6.0) cypress-rails (0.6.1)
puma (>= 3.8.0) puma (>= 3.8.0)
railties (>= 5.2.0) railties (>= 5.2.0)
database_cleaner (2.0.2) database_cleaner (2.0.2)
@ -117,34 +139,30 @@ GEM
database_cleaner-core (~> 2.0.0) database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1) database_cleaner-core (2.0.1)
date (3.3.3) date (3.3.3)
devise (4.9.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.5.0) diff-lcs (1.5.0)
docile (1.4.0) docile (1.4.0)
dotenv (2.8.1) dotenv (2.8.1)
dotenv-rails (2.8.1) dotenv-rails (2.8.1)
dotenv (= 2.8.1) dotenv (= 2.8.1)
railties (>= 3.2) railties (>= 3.2)
drb (2.1.1)
ruby2_keywords
e2mmap (0.1.0) e2mmap (0.1.0)
ed25519 (1.3.0) ed25519 (1.3.0)
em-websocket (0.5.3) em-websocket (0.5.3)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0) http_parser.rb (~> 0)
erb_lint (0.4.0) erb_lint (0.5.0)
activesupport activesupport
better_html (>= 2.0.1) better_html (>= 2.0.1)
parser (>= 2.7.1.4) parser (>= 2.7.1.4)
rainbow rainbow
rubocop rubocop
smart_properties smart_properties
erblint-github (0.4.1) erblint-github (0.5.0)
erubi (1.12.0) erubi (1.12.0)
eventmachine (1.2.7) eventmachine (1.2.7)
execjs (2.8.1) execjs (2.9.1)
factory_bot (6.2.1) factory_bot (6.2.1)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
factory_bot_rails (6.2.0) factory_bot_rails (6.2.0)
@ -155,13 +173,13 @@ GEM
concurrent-ruby (~> 1.1) concurrent-ruby (~> 1.1)
webrick (~> 1.7) webrick (~> 1.7)
websocket-driver (>= 0.6, < 0.8) websocket-driver (>= 0.6, < 0.8)
ffi (1.15.5) ffi (1.16.3)
formatador (1.1.0) formatador (1.1.0)
friendly_id (5.1.0) friendly_id (5.1.0)
activerecord (>= 4.0.0) activerecord (>= 4.0.0)
globalid (1.1.0) globalid (1.2.1)
activesupport (>= 5.0) activesupport (>= 6.1)
guard (2.18.0) guard (2.18.1)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (>= 2.7, < 4.0) listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0) lumberjack (>= 1.0.12, < 2.0)
@ -180,7 +198,7 @@ GEM
guard (~> 2.1) guard (~> 2.1)
guard-compat (~> 1.1) guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0) rspec (>= 2.99.0, < 4.0)
haml (6.1.1) haml (6.2.3)
temple (>= 0.8.2) temple (>= 0.8.2)
thor thor
tilt tilt
@ -189,6 +207,9 @@ GEM
i18n (1.14.1) i18n (1.14.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
io-console (0.6.0) io-console (0.6.0)
irb (1.8.1)
rdoc
reline (>= 0.3.8)
jaro_winkler (1.5.6) jaro_winkler (1.5.6)
jbuilder (2.11.5) jbuilder (2.11.5)
actionview (>= 5.0.0) actionview (>= 5.0.0)
@ -197,7 +218,7 @@ GEM
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jsbundling-rails (1.1.2) jsbundling-rails (1.2.1)
railties (>= 6.0.0) railties (>= 6.0.0)
json (2.6.3) json (2.6.3)
kramdown (2.4.0) kramdown (2.4.0)
@ -211,10 +232,10 @@ GEM
listen (3.8.0) listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.21.3) loofah (2.21.4)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.12.0)
lumberjack (1.2.8) lumberjack (1.2.9)
mail (2.8.1) mail (2.8.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
net-imap net-imap
@ -223,13 +244,14 @@ GEM
marcel (1.0.2) marcel (1.0.2)
matrix (0.4.2) matrix (0.4.2)
method_source (1.0.0) method_source (1.0.0)
mini_mime (1.1.2) mini_mime (1.1.5)
minitest (5.18.1) minitest (5.20.0)
msgpack (1.7.2) msgpack (1.7.2)
multi_json (1.15.0) multi_json (1.15.0)
mutex_m (0.1.2)
nenv (0.3.0) nenv (0.3.0)
nested_scaffold (1.1.0) nested_scaffold (1.1.0)
net-imap (0.3.6) net-imap (0.4.0)
date date
net-protocol net-protocol
net-pop (0.1.2) net-pop (0.1.2)
@ -240,8 +262,8 @@ GEM
net-ssh (>= 5.0.0, < 8.0.0) net-ssh (>= 5.0.0, < 8.0.0)
net-smtp (0.3.3) net-smtp (0.3.3)
net-protocol net-protocol
net-ssh (7.1.0) net-ssh (7.2.0)
newrelic_rpm (9.3.1) newrelic_rpm (9.5.0)
nio4r (2.5.9) nio4r (2.5.9)
nokogiri (1.15.3-arm64-darwin) nokogiri (1.15.3-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
@ -258,42 +280,49 @@ GEM
rack-protection rack-protection
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.23.0) parallel (1.23.0)
parallel_tests (4.2.1) parallel_tests (4.2.2)
parallel parallel
parser (3.2.2.3) parser (3.2.2.4)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
pg (1.5.3) pg (1.5.4)
pry (0.14.2) pry (0.14.2)
coderay (~> 1.1) coderay (~> 1.1)
method_source (~> 1.0) method_source (~> 1.0)
psych (5.1.1)
stringio
public_suffix (5.0.3) public_suffix (5.0.3)
puma (6.3.0) puma (6.4.0)
nio4r (~> 2.0) nio4r (~> 2.0)
racc (1.7.1) racc (1.7.1)
rack (2.2.7) rack (3.0.8)
rack-livereload (0.5.1) rack-livereload (0.5.1)
rack rack
rack-mini-profiler (3.1.0) rack-mini-profiler (3.1.1)
rack (>= 1.2.0) rack (>= 1.2.0)
rack-protection (3.0.6) rack-protection (3.0.6)
rack rack
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0) rack-test (2.1.0)
rack (>= 1.3) rack (>= 1.3)
rails (7.0.6) rackup (2.1.0)
actioncable (= 7.0.6) rack (>= 3)
actionmailbox (= 7.0.6) webrick (~> 1.8)
actionmailer (= 7.0.6) rails (7.1.0)
actionpack (= 7.0.6) actioncable (= 7.1.0)
actiontext (= 7.0.6) actionmailbox (= 7.1.0)
actionview (= 7.0.6) actionmailer (= 7.1.0)
activejob (= 7.0.6) actionpack (= 7.1.0)
activemodel (= 7.0.6) actiontext (= 7.1.0)
activerecord (= 7.0.6) actionview (= 7.1.0)
activestorage (= 7.0.6) activejob (= 7.1.0)
activesupport (= 7.0.6) activemodel (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
bundler (>= 1.15.0) bundler (>= 1.15.0)
railties (= 7.0.6) railties (= 7.1.0)
rails-controller-testing (1.0.5) rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1) actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1)
@ -305,33 +334,36 @@ GEM
rails-html-sanitizer (1.6.0) rails-html-sanitizer (1.6.0)
loofah (~> 2.21) loofah (~> 2.21)
nokogiri (~> 1.14) nokogiri (~> 1.14)
railties (7.0.6) railties (7.1.0)
actionpack (= 7.0.6) actionpack (= 7.1.0)
activesupport (= 7.0.6) activesupport (= 7.1.0)
method_source irb
rackup (>= 1.0.0)
rake (>= 12.2) rake (>= 12.2)
thor (~> 1.0) thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.5) zeitwerk (~> 2.6)
rainbow (3.1.1) rainbow (3.1.1)
rake (13.0.6) rake (13.0.6)
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
rbs (2.8.4) rbs (2.8.4)
rdoc (6.5.0)
psych (>= 4.0.0)
redis (3.3.5) redis (3.3.5)
reek (6.1.4) reek (6.1.4)
kwalify (~> 0.7.0) kwalify (~> 0.7.0)
parser (~> 3.2.0) parser (~> 3.2.0)
rainbow (>= 2.0, < 4.0) rainbow (>= 2.0, < 4.0)
regexp_parser (2.8.1) regexp_parser (2.8.1)
reline (0.3.6) reline (0.3.9)
io-console (~> 0.5) io-console (~> 0.5)
responders (3.1.0) responders (3.1.0)
actionpack (>= 5.2) actionpack (>= 5.2)
railties (>= 5.2) railties (>= 5.2)
reverse_markdown (2.1.1) reverse_markdown (2.1.1)
nokogiri nokogiri
rexml (3.2.5) rexml (3.2.6)
rspec (3.12.0) rspec (3.12.0)
rspec-core (~> 3.12.0) rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0) rspec-expectations (~> 3.12.0)
@ -344,16 +376,17 @@ GEM
rspec-mocks (3.12.6) rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0) rspec-support (~> 3.12.0)
rspec-rails (5.1.2) rspec-rails (6.0.3)
actionpack (>= 5.2) actionpack (>= 6.1)
activesupport (>= 5.2) activesupport (>= 6.1)
railties (>= 5.2) railties (>= 6.1)
rspec-core (~> 3.10) rspec-core (~> 3.12)
rspec-expectations (~> 3.10) rspec-expectations (~> 3.12)
rspec-mocks (~> 3.10) rspec-mocks (~> 3.12)
rspec-support (~> 3.10) rspec-support (~> 3.12)
rspec-support (3.12.1) rspec-support (3.12.1)
rubocop (1.54.2) rubocop (1.56.4)
base64 (~> 0.1.1)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0) language_server-protocol (>= 3.17.0)
parallel (~> 1.10) parallel (~> 1.10)
@ -361,17 +394,18 @@ GEM
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0) regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0) rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0) rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0) rubocop-ast (1.29.0)
parser (>= 3.2.1.0) parser (>= 3.2.1.0)
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2) rubyzip (2.3.2)
seed_dump (3.3.1) seed_dump (3.3.1)
activerecord (>= 4) activerecord (>= 4)
activesupport (>= 4) activesupport (>= 4)
selenium-webdriver (4.10.0) selenium-webdriver (4.13.1)
rexml (~> 3.2, >= 3.2.5) rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0) rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0) websocket (~> 1.0)
@ -403,7 +437,7 @@ GEM
reek (>= 5.0) reek (>= 5.0)
solargraph (~> 0.38) solargraph (~> 0.38)
spring (4.1.1) spring (4.1.1)
sprockets (4.2.0) sprockets (4.2.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4) rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2) sprockets-rails (3.4.2)
@ -411,12 +445,13 @@ GEM
activesupport (>= 5.2) activesupport (>= 5.2)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
standard_deviation (1.0.3) standard_deviation (1.0.3)
stimulus-rails (1.2.1) stimulus-rails (1.2.2)
railties (>= 6.0.0) railties (>= 6.0.0)
temple (0.10.2) stringio (3.0.8)
temple (0.10.3)
thor (1.2.2) thor (1.2.2)
tilt (2.2.0) tilt (2.3.0)
timecop (0.9.6) timecop (0.9.8)
timeout (0.4.0) timeout (0.4.0)
turbo-rails (1.4.0) turbo-rails (1.4.0)
actionpack (>= 6.0.0) actionpack (>= 6.0.0)
@ -426,22 +461,22 @@ GEM
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
uglifier (4.2.0) uglifier (4.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unicode-display_width (2.4.2) unicode-display_width (2.5.0)
uniform_notifier (1.16.0) uniform_notifier (1.16.0)
warden (1.2.9) warden (1.2.9)
rack (>= 2.0.9) rack (>= 2.0.9)
watir (7.2.2) watir (7.3.0)
regexp_parser (>= 1.2, < 3) regexp_parser (>= 1.2, < 3)
selenium-webdriver (~> 4.2) selenium-webdriver (~> 4.2)
webrick (1.8.1) webrick (1.8.1)
websocket (1.2.9) websocket (1.2.10)
websocket-driver (0.7.5) websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
xpath (3.2.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
yard (0.9.34) yard (0.9.34)
zeitwerk (2.6.8) zeitwerk (2.6.12)
PLATFORMS PLATFORMS
arm64-darwin-21 arm64-darwin-21
@ -460,7 +495,7 @@ DEPENDENCIES
cuprite cuprite
cypress-rails cypress-rails
database_cleaner database_cleaner
devise devise!
dotenv-rails dotenv-rails
ed25519 ed25519
erb_lint erb_lint
@ -486,11 +521,11 @@ DEPENDENCIES
puma (>= 5.6.4) puma (>= 5.6.4)
rack-livereload rack-livereload
rack-mini-profiler rack-mini-profiler
rails (~> 7.0.4) rails (~> 7.1.0)
rails-controller-testing rails-controller-testing
redis (~> 3.0) redis (~> 3.0)
reline (~> 0.3.2) reline (~> 0.3.2)
rspec-rails (~> 5.1.0) rspec-rails (~> 6.0.3)
rubocop rubocop
seed_dump seed_dump
simplecov simplecov

@ -8,9 +8,10 @@ class SurveyItemResponse < ActiveRecord::Base
belongs_to :school belongs_to :school
belongs_to :survey_item, counter_cache: true belongs_to :survey_item, counter_cache: true
belongs_to :student, foreign_key: :student_id, optional: true belongs_to :student, foreign_key: :student_id, optional: true
belongs_to :gender belongs_to :gender, optional: true belongs_to :gender, optional: true
belongs_to :income belongs_to :income, optional: true
belongs_to :ell belongs_to :ell, optional: true
belongs_to :sped, optional: true
has_one :measure, through: :survey_item has_one :measure, through: :survey_item
@ -45,3 +46,4 @@ class SurveyItemResponse < ActiveRecord::Base
} }
end end

@ -0,0 +1,13 @@
module Analyze
module Group
class Sped
def name
"Special Education"
end
def slug
"sped"
end
end
end
end

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'csv' require "csv"
class EnrollmentLoader class EnrollmentLoader
def self.load_data(filepath:) def self.load_data(filepath:)
@ -57,75 +57,75 @@ class EnrollmentRowValues
def school def school
@school ||= begin @school ||= begin
dese_id = row['DESE ID'].try(:strip).to_i dese_id = row["DESE ID"].try(:strip).to_i
School.find_by_dese_id(dese_id) School.find_by_dese_id(dese_id)
end end
end end
def academic_year def academic_year
@academic_year ||= begin @academic_year ||= begin
year = row['Academic Year'] year = row["Academic Year"]
AcademicYear.find_by_range(year) AcademicYear.find_by_range(year)
end end
end end
def pk def pk
row['PK'] || row['pk'] row["PK"] || row["pk"]
end end
def k def k
row['K'] || row['k'] row["K"] || row["k"]
end end
def one def one
row['1'] row["1"]
end end
def two def two
row['2'] row["2"]
end end
def three def three
row['3'] row["3"]
end end
def four def four
row['4'] row["4"]
end end
def five def five
row['5'] row["5"]
end end
def six def six
row['6'] row["6"]
end end
def seven def seven
row['7'] row["7"]
end end
def eight def eight
row['8'] row["8"]
end end
def nine def nine
row['9'] row["9"]
end end
def ten def ten
row['10'] row["10"]
end end
def eleven def eleven
row['11'] row["11"]
end end
def twelve def twelve
row['12'] row["12"]
end end
def total_students def total_students
row['Total'].gsub(',', '').to_i row["Total"].delete(",").to_i
end end
end end

@ -1,7 +1,7 @@
require_relative 'boot' require_relative "boot"
require 'csv' require "csv"
require 'rails/all' require "rails/all"
# Require the gems listed in Gemfile, including any gems # Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production. # you've limited to :test, :development, or :production.
@ -9,9 +9,10 @@ Bundler.require(*Rails.groups)
module Edcontext module Edcontext
class Application < Rails::Application class Application < Rails::Application
config.load_defaults 7.1
# Settings in config/environments/* take precedence over those specified here. # Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers # Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded. # -- all .rb files in that directory are automatically loaded.
config.active_record.legacy_connection_handling = false config.active_support.cache_format_version 6.1
end end
end end

@ -1,22 +0,0 @@
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rails secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
development:
secret_key_base: ca26427fb2b33e6bece85b12fed0097d3ee4cce91c5ca8514d0f849a8c69aee0e611c62d0feab522a3d7977bdf48b6b18abc4b05ee916afdb8fac941ede5fc12
test:
secret_key_base: 5d55aa31e1a50c4299d0791f05535204a061d520214cc62d74b7e093bf6af8ac73f28df259932047a1e51a386e06686051453e36c2ec62835cbf041c4d543157
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_09_12_223701) do ActiveRecord::Schema[7.1].define(version: 2023_09_12_223701) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -461,8 +461,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_12_223701) do
t.integer "grade" t.integer "grade"
t.bigint "gender_id" t.bigint "gender_id"
t.datetime "recorded_date" t.datetime "recorded_date"
t.bigint "ell_id"
t.bigint "income_id" t.bigint "income_id"
t.bigint "ell_id"
t.index ["academic_year_id"], name: "index_survey_item_responses_on_academic_year_id" t.index ["academic_year_id"], name: "index_survey_item_responses_on_academic_year_id"
t.index ["ell_id"], name: "index_survey_item_responses_on_ell_id" t.index ["ell_id"], name: "index_survey_item_responses_on_ell_id"
t.index ["gender_id"], name: "index_survey_item_responses_on_gender_id" t.index ["gender_id"], name: "index_survey_item_responses_on_gender_id"

@ -1,10 +1,11 @@
require 'rails_helper' require "rails_helper"
describe SubcategoryPresenter do describe SubcategoryPresenter do
let(:academic_year) { create(:academic_year, range: '1989-90') } let(:academic_year) { create(:academic_year, range: "1989-90") }
let(:school) { create(:school, name: 'Best School') } let(:school) { create(:school, name: "Best School") }
let(:worst_school) { create(:school, name: "Worst School", dese_id: 2) }
let(:subcategory) do let(:subcategory) do
create(:subcategory, name: 'A great subcategory', subcategory_id: 'A', description: 'A great description') create(:subcategory, name: "A great subcategory", subcategory_id: "A", description: "A great description")
end end
let(:measure_of_only_admin_data) { create(:measure, subcategory:) } let(:measure_of_only_admin_data) { create(:measure, subcategory:) }
let(:scale_of_only_admin_data) { create(:scale, measure: measure_of_only_admin_data) } let(:scale_of_only_admin_data) { create(:scale, measure: measure_of_only_admin_data) }
@ -52,95 +53,95 @@ describe SubcategoryPresenter do
create(:respondent, school:, academic_year:, one: 40) create(:respondent, school:, academic_year:, one: 40)
end end
it 'returns the name of the subcategory' do it "returns the name of the subcategory" do
expect(subcategory_presenter.name).to eq 'A great subcategory' expect(subcategory_presenter.name).to eq "A great subcategory"
end end
it 'returns the description of the subcategory' do it "returns the description of the subcategory" do
expect(subcategory_presenter.description).to eq 'A great description' expect(subcategory_presenter.description).to eq "A great description"
end end
it 'returns the id of the subcategory' do it "returns the id of the subcategory" do
expect(subcategory_presenter.id).to eq 'A' expect(subcategory_presenter.id).to eq "A"
end end
it 'returns a gauge presenter responsible for the aggregate admin data and survey item response likert scores' do it "returns a gauge presenter responsible for the aggregate admin data and survey item response likert scores" do
expect(subcategory_presenter.gauge_presenter.title).to eq 'Growth' expect(subcategory_presenter.gauge_presenter.title).to eq "Growth"
end end
it 'returns the student response rate' do it "returns the student response rate" do
expect(subcategory_presenter.student_response_rate).to eq '25%' expect(subcategory_presenter.student_response_rate).to eq "25%"
end end
it 'returns the teacher response rate' do it "returns the teacher response rate" do
expect(subcategory_presenter.teacher_response_rate).to eq '50%' expect(subcategory_presenter.teacher_response_rate).to eq "50%"
end end
it 'returns the admin collection rate' do it "returns the admin collection rate" do
expect(subcategory_presenter.admin_collection_rate).to eq %w[N A] expect(subcategory_presenter.admin_collection_rate).to eq %w[N A]
end end
it 'creates a measure presenter for each measure in a subcategory' do it "creates a measure presenter for each measure in a subcategory" do
expect(subcategory_presenter.measure_presenters.count).to eq subcategory.measures.count expect(subcategory_presenter.measure_presenters.count).to eq subcategory.measures.count
end end
context 'When there are no measures populated with student or teacher surveys' do context "When there are no measures populated with student or teacher surveys" do
let(:empty_subcategory) { create :subcategory } let(:empty_subcategory) { create :subcategory }
let(:empty_subcategory_presenter) do let(:empty_subcategory_presenter) do
SubcategoryPresenter.new(subcategory: empty_subcategory, academic_year:, school:) SubcategoryPresenter.new(subcategory: empty_subcategory, academic_year:, school:)
end end
it 'should make a subcategory presenter return insufficient data' do it "should make a subcategory presenter return insufficient data" do
expect(empty_subcategory_presenter.subcategory_card_presenter.insufficient_data?).to eq true expect(empty_subcategory_presenter.subcategory_card_presenter.insufficient_data?).to eq true
end end
end end
def create_survey_item_responses_for_different_years_and_schools(survey_item) def create_survey_item_responses_for_different_years_and_schools(survey_item)
create_list(:survey_item_response, SurveyItemResponse::TEACHER_RESPONSE_THRESHOLD, survey_item:, create_list(:survey_item_response, SurveyItemResponse::TEACHER_RESPONSE_THRESHOLD, survey_item:,
school: School.new(name: 'Worst School', dese_id: 2), likert_score: 1) school: worst_school, likert_score: 1)
create_list(:survey_item_response, SurveyItemResponse::TEACHER_RESPONSE_THRESHOLD, survey_item:, create_list(:survey_item_response, SurveyItemResponse::TEACHER_RESPONSE_THRESHOLD, survey_item:,
academic_year: AcademicYear.create(range: '2000-01'), likert_score: 1) academic_year: AcademicYear.create(range: "2000-01"), likert_score: 1)
end end
context 'When there are admin data items' do context "When there are admin data items" do
context 'and the school is not a high school' do context "and the school is not a high school" do
context 'and the measure does not include high-school-only admin data items' do context "and the measure does not include high-school-only admin data items" do
before do before do
measure_of_only_admin_data measure_of_only_admin_data
scale_of_only_admin_data scale_of_only_admin_data
admin_data_item_1 admin_data_item_1
admin_data_item_2 admin_data_item_2
end end
context 'and there are no admin data values in the database' do context "and there are no admin data values in the database" do
it 'returns the admin collection rate' do it "returns the admin collection rate" do
expect(subcategory_presenter.admin_collection_rate).to eq [0, 2] expect(subcategory_presenter.admin_collection_rate).to eq [0, 2]
end end
end end
context 'and there are admin data values present in the database ' do context "and there are admin data values present in the database " do
before do before do
create(:admin_data_value, admin_data_item: admin_data_item_1, school:, academic_year:) create(:admin_data_value, admin_data_item: admin_data_item_1, school:, academic_year:)
create(:admin_data_value, admin_data_item: admin_data_item_2, school:, academic_year:) create(:admin_data_value, admin_data_item: admin_data_item_2, school:, academic_year:)
end end
it 'returns the admin collection rate' do it "returns the admin collection rate" do
expect(subcategory_presenter.admin_collection_rate).to eq [2, 2] expect(subcategory_presenter.admin_collection_rate).to eq [2, 2]
end end
end end
end end
context 'and the measure includes high-school-only items' do context "and the measure includes high-school-only items" do
before do before do
measure_of_only_admin_data = create(:measure, subcategory:) measure_of_only_admin_data = create(:measure, subcategory:)
scale_of_only_admin_data = create(:scale, measure: measure_of_only_admin_data) scale_of_only_admin_data = create(:scale, measure: measure_of_only_admin_data)
create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true) create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true)
create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true) create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true)
end end
it 'returns the admin collection rate' do it "returns the admin collection rate" do
expect(subcategory_presenter.admin_collection_rate).to eq %w[N A] expect(subcategory_presenter.admin_collection_rate).to eq %w[N A]
end end
end end
end end
context 'and the school is a high school' do context "and the school is a high school" do
context 'and the measure does not include high-school-only admin data items' do context "and the measure does not include high-school-only admin data items" do
before do before do
school.is_hs = true school.is_hs = true
school.save school.save
@ -149,12 +150,12 @@ describe SubcategoryPresenter do
create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: false) create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: false)
create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: false) create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: false)
end end
it 'returns the admin collection rate' do it "returns the admin collection rate" do
expect(subcategory_presenter.admin_collection_rate).to eq [0, 2] expect(subcategory_presenter.admin_collection_rate).to eq [0, 2]
end end
end end
context 'and the measure includes high-school-only items' do context "and the measure includes high-school-only items" do
before do before do
school.is_hs = true school.is_hs = true
school.save school.save
@ -163,7 +164,7 @@ describe SubcategoryPresenter do
create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true) create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true)
create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true) create(:admin_data_item, scale: scale_of_only_admin_data, hs_only_item: true)
end end
it 'returns the admin collection rate' do it "returns the admin collection rate" do
expect(subcategory_presenter.admin_collection_rate).to eq [0, 2] expect(subcategory_presenter.admin_collection_rate).to eq [0, 2]
end end
end end

@ -1,11 +1,11 @@
# This file is copied to spec/ when you run 'rails generate rspec:install' # This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test' ENV["RAILS_ENV"] ||= "test"
require File.expand_path('../config/environment', __dir__) require File.expand_path("../config/environment", __dir__)
# Prevent database truncation if the environment is production # Prevent database truncation if the environment is production
abort('The Rails environment is running in production mode!') if Rails.env.production? abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper' require "spec_helper"
require 'rspec/rails' require "rspec/rails"
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
# Add additional requires below this line. Rails is not loaded until this point! # Add additional requires below this line. Rails is not loaded until this point!
# Requires supporting ruby files with custom matchers and macros, etc, in # Requires supporting ruby files with custom matchers and macros, etc, in
@ -27,7 +27,7 @@ Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
# If you are not using ActiveRecord, you can remove this line. # If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema! ActiveRecord::Migration.maintain_test_schema!
require 'database_cleaner/active_record' require "database_cleaner/active_record"
RSpec.configure do |config| RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures

@ -1,12 +1,12 @@
require 'rails_helper' require "rails_helper"
describe EnrollmentLoader do describe EnrollmentLoader do
let(:path_to_enrollment_data) { Rails.root.join('spec', 'fixtures', 'sample_enrollment_data.csv') } let(:path_to_enrollment_data) { Rails.root.join("spec", "fixtures", "sample_enrollment_data.csv") }
let(:ay_2022_23) { create(:academic_year, range: '2022-23') } let(:ay_2022_23) { create(:academic_year, range: "2022-23") }
let(:attleboro) { School.find_or_create_by(name: 'Attleboro', dese_id: 160_505) } let(:attleboro) { create(:school, name: "Attleboro", dese_id: 160_505) }
let(:beachmont) { School.find_or_create_by(name: 'Beachmont', dese_id: 2_480_013) } let(:beachmont) { create(:school, name: "Beachmont", dese_id: 2_480_013) }
let(:winchester) { School.find_or_create_by(name: 'Winchester', dese_id: 3_440_505) } let(:winchester) { create(:school, name: "Winchester", dese_id: 3_440_505) }
before :each do before :each do
ay_2022_23 ay_2022_23
attleboro attleboro
@ -19,8 +19,8 @@ describe EnrollmentLoader do
DatabaseCleaner.clean DatabaseCleaner.clean
end end
context 'self.load_data' do context "self.load_data" do
it 'loads the correct enrollment numbers' do it "loads the correct enrollment numbers" do
academic_year = ay_2022_23 academic_year = ay_2022_23
expect(Respondent.find_by(school: attleboro, academic_year:).nine).to eq 506 expect(Respondent.find_by(school: attleboro, academic_year:).nine).to eq 506
# expect(Respondent.find_by(school: attleboro, academic_year:).total_students).to eq 1844 # expect(Respondent.find_by(school: attleboro, academic_year:).total_students).to eq 1844

@ -1,12 +1,12 @@
require 'rails_helper' require "rails_helper"
describe StaffingLoader do describe StaffingLoader do
let(:path_to_staffing_data) { Rails.root.join('spec', 'fixtures', 'sample_staffing_data.csv') } let(:path_to_staffing_data) { Rails.root.join("spec", "fixtures", "sample_staffing_data.csv") }
let(:ay_2022_23) { create(:academic_year, range: '2022-23') } let(:ay_2022_23) { create(:academic_year, range: "2022-23") }
let(:ay_2021_22) { create(:academic_year, range: '2021-22') } let(:ay_2021_22) { create(:academic_year, range: "2021-22") }
let(:attleboro) { School.find_or_create_by(name: 'Attleboro', dese_id: 160_505) } let(:attleboro) { create(:school, name: "Attleboro", dese_id: 160_505) }
let(:beachmont) { School.find_or_create_by(name: 'Beachmont', dese_id: 2_480_013) } let(:beachmont) { create(:school, name: "Beachmont", dese_id: 2_480_013) }
let(:winchester) { School.find_or_create_by(name: 'Winchester', dese_id: 3_440_505) } let(:winchester) { create(:school, name: "Winchester", dese_id: 3_440_505) }
before :each do before :each do
ay_2022_23 ay_2022_23
@ -22,8 +22,8 @@ describe StaffingLoader do
DatabaseCleaner.clean DatabaseCleaner.clean
end end
context 'self.load_data' do context "self.load_data" do
it 'loads the correct staffing numbers' do it "loads the correct staffing numbers" do
academic_year = ay_2021_22 academic_year = ay_2021_22
expect(Respondent.find_by(school: attleboro, academic_year:).total_teachers).to eq 197.5 expect(Respondent.find_by(school: attleboro, academic_year:).total_teachers).to eq 197.5
@ -32,11 +32,11 @@ describe StaffingLoader do
expect(Respondent.find_by(school: winchester, academic_year:).total_teachers).to eq 149.8 expect(Respondent.find_by(school: winchester, academic_year:).total_teachers).to eq 149.8
end end
context 'when the staffing data is missing a school' do context "when the staffing data is missing a school" do
after :each do after :each do
DatabaseCleaner.clean DatabaseCleaner.clean
end end
it 'fills in empty staffing numbers with the previous years data' do it "fills in empty staffing numbers with the previous years data" do
academic_year = ay_2022_23 academic_year = ay_2022_23
expect(Respondent.find_by(school: attleboro, academic_year:).total_teachers).to eq 197.5 expect(Respondent.find_by(school: attleboro, academic_year:).total_teachers).to eq 197.5

Loading…
Cancel
Save