Skip to content

Commit

Permalink
fix the rails zeitwerk:check warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed May 26, 2022
1 parent 278cd0c commit c776c53
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 68 deletions.
125 changes: 64 additions & 61 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,65 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.4.1)
actionpack (= 6.0.4.1)
actioncable (6.1.5.1)
actionpack (= 6.1.5.1)
activesupport (= 6.1.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.4.1)
actionpack (= 6.0.4.1)
activejob (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
actionmailbox (6.1.5.1)
actionpack (= 6.1.5.1)
activejob (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
mail (>= 2.7.1)
actionmailer (6.0.4.1)
actionpack (= 6.0.4.1)
actionview (= 6.0.4.1)
activejob (= 6.0.4.1)
actionmailer (6.1.5.1)
actionpack (= 6.1.5.1)
actionview (= 6.1.5.1)
activejob (= 6.1.5.1)
activesupport (= 6.1.5.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.4.1)
actionview (= 6.0.4.1)
activesupport (= 6.0.4.1)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.5.1)
actionview (= 6.1.5.1)
activesupport (= 6.1.5.1)
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.0.4.1)
actionpack (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
actiontext (6.1.5.1)
actionpack (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
nokogiri (>= 1.8.5)
actionview (6.0.4.1)
activesupport (= 6.0.4.1)
actionview (6.1.5.1)
activesupport (= 6.1.5.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.4.1)
activesupport (= 6.0.4.1)
activejob (6.1.5.1)
activesupport (= 6.1.5.1)
globalid (>= 0.3.6)
activemodel (6.0.4.1)
activesupport (= 6.0.4.1)
activerecord (6.0.4.1)
activemodel (= 6.0.4.1)
activesupport (= 6.0.4.1)
activestorage (6.0.4.1)
actionpack (= 6.0.4.1)
activejob (= 6.0.4.1)
activerecord (= 6.0.4.1)
marcel (~> 1.0.0)
activesupport (6.0.4.1)
activemodel (6.1.5.1)
activesupport (= 6.1.5.1)
activerecord (6.1.5.1)
activemodel (= 6.1.5.1)
activesupport (= 6.1.5.1)
activestorage (6.1.5.1)
actionpack (= 6.1.5.1)
activejob (= 6.1.5.1)
activerecord (= 6.1.5.1)
activesupport (= 6.1.5.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.5.1)
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)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
Expand Down Expand Up @@ -207,20 +211,20 @@ GEM
rack (>= 1.2.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.4.1)
actioncable (= 6.0.4.1)
actionmailbox (= 6.0.4.1)
actionmailer (= 6.0.4.1)
actionpack (= 6.0.4.1)
actiontext (= 6.0.4.1)
actionview (= 6.0.4.1)
activejob (= 6.0.4.1)
activemodel (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
bundler (>= 1.3.0)
railties (= 6.0.4.1)
rails (6.1.5.1)
actioncable (= 6.1.5.1)
actionmailbox (= 6.1.5.1)
actionmailer (= 6.1.5.1)
actionpack (= 6.1.5.1)
actiontext (= 6.1.5.1)
actionview (= 6.1.5.1)
activejob (= 6.1.5.1)
activemodel (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
bundler (>= 1.15.0)
railties (= 6.1.5.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
Expand All @@ -229,12 +233,12 @@ GEM
loofah (~> 2.3)
rails_autolink (1.1.6)
rails (> 3.1)
railties (6.0.4.1)
actionpack (= 6.0.4.1)
activesupport (= 6.0.4.1)
railties (6.1.5.1)
actionpack (= 6.1.5.1)
activesupport (= 6.1.5.1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.1)
Expand Down Expand Up @@ -313,7 +317,6 @@ GEM
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
tzinfo (1.2.9)
thread_safe (~> 0.1)
Expand Down Expand Up @@ -364,7 +367,7 @@ DEPENDENCIES
pry
psych (< 4)
rack-mini-profiler
rails (= 6.0.4.1)
rails (= 6.1.5.1)
rails_autolink
rdoc
recaptcha (~> 5.2)
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def redirect_new_api(class_view = false)
@error = "Please provide an ontology id or concept id with an ontology id."
return
end
acronym = BPIDResolver.id_to_acronym(params[:ontology])
acronym = BpidResolver.id_to_acronym(params[:ontology])
not_found unless acronym
if class_view
@ontology = LinkedData::Client::Models::Ontology.find_by_acronym(acronym).first
Expand All @@ -238,7 +238,7 @@ def redirect_new_api(class_view = false)
def params_cleanup_new_api
params = @_params
if params[:ontology] && params[:ontology].to_i > 0
params[:ontology] = BPIDResolver.id_to_acronym(params[:ontology])
params[:ontology] = BpidResolver.id_to_acronym(params[:ontology])
end

params
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def check_params_ontologies(params)
params[:ontologies] = [params[:ontologies]]
end
if params[:ontologies].first.to_i > 0
params[:ontologies].map! {|o| BPIDResolver.id_to_acronym(o)}
params[:ontologies].map! {|o| BpidResolver.id_to_acronym(o)}
end
params[:ontologies] = params[:ontologies].join(",")
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/bpid_resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'json'
require 'open-uri'

class BPIDResolver
class BpidResolver
require Rails.root + 'lib/resolver/acronym_from_virtual'
require Rails.root + 'lib/resolver/virtual_from_acronym'
require Rails.root + 'lib/resolver/virtual_from_version'
Expand Down
2 changes: 1 addition & 1 deletion lib/resolver/acronym_from_virtual.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BPIDResolver::ACRONYM_FROM_VIRTUAL = {
BpidResolver::ACRONYM_FROM_VIRTUAL = {
"old:acronym_from_virtual:3013" => "DIAGONT",
"old:acronym_from_virtual:3245" => "SuicidO",
"old:acronym_from_virtual:1247" => "GEOSPECIES",
Expand Down
2 changes: 1 addition & 1 deletion lib/resolver/virtual_from_acronym.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BPIDResolver::VIRTUAL_FROM_ACRONYM = {
BpidResolver::VIRTUAL_FROM_ACRONYM = {
"JERM" => 1488,
"OGSF" => 3214,
"NATPRO" => 3004,
Expand Down
2 changes: 1 addition & 1 deletion lib/resolver/virtual_from_version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BPIDResolver::VIRTUAL_FROM_VERSION = {
BpidResolver::VIRTUAL_FROM_VERSION = {
"old:virtual_from_version:40876" => 1048,
"old:virtual_from_version:44059" => 1125,
"old:virtual_from_version:46266" => 1172,
Expand Down

0 comments on commit c776c53

Please sign in to comment.