diff --git a/Gemfile b/Gemfile index 1366de09..2de59690 100644 --- a/Gemfile +++ b/Gemfile @@ -54,6 +54,7 @@ group :development do gem 'rubocop-rspec', require: false gem 'rubocop-rspec_rails' gem 'seed_dump' + gem 'solargraph' gem 'solargraph-reek' gem 'spring' # gem "web-console" diff --git a/Gemfile.lock b/Gemfile.lock index 53c53115..dde1e483 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -386,7 +386,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rbs (3.9.4) + rbs (3.9.5) logger rdoc (6.14.0) erb @@ -481,7 +481,7 @@ GEM simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) smart_properties (1.17.0) - solargraph (0.55.1) + solargraph (0.57.0) backport (~> 1.2) benchmark (~> 0.4) bundler (~> 2.0) @@ -493,12 +493,14 @@ GEM observer (~> 0.1) ostruct (~> 0.6) parser (~> 3.0) - rbs (~> 3.3) + prism (~> 1.4) + rbs (>= 3.6.1, <= 4.0.0.dev.4) reverse_markdown (~> 3.0) - rubocop (~> 1.38) + rubocop (~> 1.76) thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) + yard-activesupport-concern (~> 0.0) yard-solargraph (~> 0.1) solargraph-reek (0.1.1) reek (>= 5.0) @@ -517,7 +519,7 @@ GEM railties (>= 6.0.0) stringio (3.1.7) thor (1.3.2) - tilt (2.6.0) + tilt (2.6.1) timeout (0.4.3) trollop (2.9.10) turbo-rails (2.0.16) @@ -545,6 +547,8 @@ GEM xpath (3.2.0) nokogiri (~> 1.8) yard (0.9.37) + yard-activesupport-concern (0.0.1) + yard (>= 0.8) yard-solargraph (0.1.0) yard (~> 0.9) zeitwerk (2.7.3) @@ -607,6 +611,7 @@ DEPENDENCIES rubocop-rspec_rails seed_dump simplecov + solargraph solargraph-reek spring sprockets-rails diff --git a/app/helpers/analyze_helper.rb b/app/helpers/analyze_helper.rb index 47bcf15a..826528dc 100644 --- a/app/helpers/analyze_helper.rb +++ b/app/helpers/analyze_helper.rb @@ -69,6 +69,6 @@ module AnalyzeHelper def base_url analyze_subcategory_link(district: @district, school: @school, academic_year: @academic_year, category: @presenter.category, - subcategory: @presenter.subcategory) + subcategory: @presenter.subcategory) end end diff --git a/app/models/benefit.rb b/app/models/benefit.rb index 5055e7ba..6cdcc183 100644 --- a/app/models/benefit.rb +++ b/app/models/benefit.rb @@ -2,7 +2,7 @@ class Benefit < ApplicationRecord scope :by_designation, -> { all.map { |benefits| [benefits.designation, benefits] }.to_h } def self.to_designation(benefits) - return "Unknown" if benefits.blank? or benefits.nil? + return "Unknown" if benefits.blank? || benefits.nil? case benefits in /^1$/i diff --git a/app/models/education.rb b/app/models/education.rb index e4275686..0f62d76f 100644 --- a/app/models/education.rb +++ b/app/models/education.rb @@ -2,7 +2,7 @@ class Education < ApplicationRecord scope :by_designation, -> { all.map { |education| [education.designation, education] }.to_h } def self.to_designation(education) - return "Unknown" if education.blank? or education.nil? + return "Unknown" if education.blank? || education.nil? case education in /^1$/i diff --git a/app/models/employment.rb b/app/models/employment.rb index fb05a3f0..45687477 100644 --- a/app/models/employment.rb +++ b/app/models/employment.rb @@ -2,7 +2,7 @@ class Employment < ApplicationRecord scope :by_designation, -> { all.map { |employment| [employment.designation, employment] }.to_h } def self.to_designation(employment) - return "Unknown" if employment.blank? or employment.nil? + return "Unknown" if employment.blank? || employment.nil? case employment in /^1$|^1100$/i diff --git a/app/presenters/analyze/graph/column/ell.rb b/app/presenters/analyze/graph/column/ell.rb index 22de434f..9c4d42a1 100644 --- a/app/presenters/analyze/graph/column/ell.rb +++ b/app/presenters/analyze/graph/column/ell.rb @@ -11,7 +11,7 @@ module Analyze end def label - ["#{ell.designation}"] + [ell.designation.to_s] end def basis diff --git a/app/presenters/analyze/graph/column/gender.rb b/app/presenters/analyze/graph/column/gender.rb index 57b0673b..1d2eff4b 100644 --- a/app/presenters/analyze/graph/column/gender.rb +++ b/app/presenters/analyze/graph/column/gender.rb @@ -11,7 +11,7 @@ module Analyze end def label - ["#{gender.designation}"] + [gender.designation.to_s] end def basis diff --git a/app/presenters/analyze/graph/column/grade.rb b/app/presenters/analyze/graph/column/grade.rb index ccabd6a9..6055027a 100644 --- a/app/presenters/analyze/graph/column/grade.rb +++ b/app/presenters/analyze/graph/column/grade.rb @@ -11,7 +11,7 @@ module Analyze end def label - ["#{grade}"] + [grade.to_s] end def basis diff --git a/app/presenters/analyze/graph/column/sped.rb b/app/presenters/analyze/graph/column/sped.rb index 32b47eab..a28ca15a 100644 --- a/app/presenters/analyze/graph/column/sped.rb +++ b/app/presenters/analyze/graph/column/sped.rb @@ -11,7 +11,7 @@ module Analyze end def label - ["#{sped.designation}"] + [sped.designation.to_s] end def basis diff --git a/app/services/survey_responses_data_loader.rb b/app/services/survey_responses_data_loader.rb index e54bab1e..b28b7d78 100644 --- a/app/services/survey_responses_data_loader.rb +++ b/app/services/survey_responses_data_loader.rb @@ -49,7 +49,7 @@ class SurveyResponsesDataLoader workers = pool_size.times.map do Thread.new do - while slice = jobs.pop(true) + while (slice = jobs.pop(true)) slice.each do |line| survey_item_responses = [] diff --git a/app/views/categories/_subcategory_section.html.erb b/app/views/categories/_subcategory_section.html.erb index 878441e5..e44937e2 100644 --- a/app/views/categories/_subcategory_section.html.erb +++ b/app/views/categories/_subcategory_section.html.erb @@ -13,32 +13,6 @@
<%= subcategory.description %>
-<%= subcategory.admin_collection_rate.first %> / <%= subcategory.admin_collection_rate.last %>
-school data sources
-<%= subcategory.student_response_rate %>
-of students responded
-<%= subcategory.teacher_response_rate %>
-of teachers responded
-