diff --git a/.hound.yml b/.hound.yml index cdf1016..39fc2a5 100644 --- a/.hound.yml +++ b/.hound.yml @@ -1,4 +1,6 @@ fail_on_violations: true -ruby: +rubocop: + version: 0.72.0 config_file: .rubocop.yml + diff --git a/.rubocop.yml b/.rubocop.yml index bfbb3af..472e0f0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,7 @@ +require: + - rubocop-performance + - rubocop-rails + # Stolen from https://gist.github.com/jhass/a5ae80d87f18e53e7b56 AllCops: Exclude: diff --git a/Gemfile b/Gemfile index dc06bea..88893f0 100644 --- a/Gemfile +++ b/Gemfile @@ -56,7 +56,9 @@ group :development do gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'railroady' - gem 'rubocop' + gem 'rubocop', '0.72.0' + gem 'rubocop-performance' + gem 'rubocop-rails' gem 'solargraph' gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 0fee2e0..76af414 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -24,9 +24,9 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_model_serializers (0.10.9) - actionpack (>= 4.1, < 6) - activemodel (>= 4.1, < 6) + active_model_serializers (0.10.10) + actionpack (>= 4.1, < 6.1) + activemodel (>= 4.1, < 6.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) activejob (5.2.3) @@ -49,44 +49,45 @@ GEM tzinfo (~> 1.1) arel (9.0.0) ast (2.4.0) - backport (0.3.0) - bcrypt (3.1.12) - bootsnap (1.4.2) + backport (1.1.2) + bcrypt (3.1.13) + bootsnap (1.4.5) msgpack (~> 1.0) builder (3.2.3) byebug (11.0.1) case_transform (0.2) activesupport concurrent-ruby (1.1.5) - coveralls (0.8.22) + coveralls (0.8.23) json (>= 1.8, < 3) simplecov (~> 0.16.1) term-ansicolor (~> 1.3) - thor (~> 0.19.4) + thor (>= 0.19.4, < 2.0) tins (~> 1.6) crass (1.0.4) - devise (4.6.2) + devise (4.7.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 6.0) + railties (>= 4.1.0) responders warden (~> 1.2.3) - devise_token_auth (1.1.0) - devise (> 3.5.2, < 4.7) - rails (>= 4.2.0, < 6) + devise_token_auth (1.1.2) + bcrypt (~> 3.0) + devise (> 3.5.2, < 5) + rails (>= 4.2.0, < 6.1) diff-lcs (1.3) - docile (1.3.1) - domain_name (0.5.20180417) + docile (1.3.2) + domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) erubi (1.8.0) factory_bot (5.0.2) activesupport (>= 4.2.0) - factory_bot_rails (5.0.1) - factory_bot (~> 5.0.0) + factory_bot_rails (5.0.2) + factory_bot (~> 5.0.2) railties (>= 4.2.0) - faker (1.9.3) - i18n (>= 0.7) - ffi (1.10.0) + faker (2.3.0) + i18n (~> 1.6.0) + ffi (1.11.1) globalid (0.4.2) activesupport (>= 4.2.0) htmlentities (4.3.4) @@ -95,13 +96,12 @@ GEM i18n (1.6.0) concurrent-ruby (~> 1.0) interactor (3.1.1) - interactor-rails (2.2.0) + interactor-rails (2.2.1) interactor (~> 3.0) - rails (>= 4.2, < 5.3) - jaro_winkler (1.5.2) + rails (>= 4.2) + jaro_winkler (1.5.3) json (2.2.0) - jsonapi-renderer (0.2.0) - kramdown (1.17.0) + jsonapi-renderer (0.2.2) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) @@ -111,29 +111,28 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - mailgun-ruby (1.1.11) + mailgun-ruby (1.2.0) rest-client (~> 2.0.2) marcel (0.3.3) mimemagic (~> 0.3.2) method_source (0.9.2) - mime-types (3.2.2) + mime-types (3.3) mime-types-data (~> 3.2015) - mime-types-data (3.2019.0331) + mime-types-data (3.2019.0904) mimemagic (0.3.3) - mini_mime (1.0.1) + mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.11.3) - msgpack (1.2.9) + msgpack (1.3.1) netrc (0.11.0) - nio4r (2.3.1) - nokogiri (1.10.2) + nio4r (2.5.1) + nokogiri (1.10.4) mini_portile2 (~> 2.4.0) orm_adapter (0.5.0) parallel (1.17.0) - parser (2.6.2.0) + parser (2.6.4.1) ast (~> 2.4.0) pg (1.1.4) - psych (3.1.0) puma (3.12.1) rack (2.0.7) rack-cors (1.0.3) @@ -156,7 +155,7 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) + rails-html-sanitizer (1.2.0) loofah (~> 2.2, >= 2.2.2) railties (5.2.3) actionpack (= 5.2.3) @@ -165,25 +164,25 @@ GEM rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) rainbow (3.0.0) - rake (12.3.2) + rake (12.3.3) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) - responders (2.4.1) - actionpack (>= 4.2.0, < 6.0) - railties (>= 4.2.0, < 6.0) + responders (3.0.0) + actionpack (>= 5.0) + railties (>= 5.0) rest-client (2.0.2) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - reverse_markdown (1.1.0) + reverse_markdown (1.3.0) nokogiri - rspec-core (3.8.0) + rspec-core (3.8.2) rspec-support (~> 3.8.0) - rspec-expectations (3.8.2) + rspec-expectations (3.8.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) - rspec-mocks (3.8.0) + rspec-mocks (3.8.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-rails (3.8.2) @@ -194,37 +193,41 @@ GEM rspec-expectations (~> 3.8.0) rspec-mocks (~> 3.8.0) rspec-support (~> 3.8.0) - rspec-support (3.8.0) - rubocop (0.66.0) + rspec-support (3.8.2) + rubocop (0.72.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - psych (>= 3.1.0) + parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.6) - ruby-progressbar (1.10.0) + unicode-display_width (>= 1.4.0, < 1.7) + rubocop-performance (1.4.1) + rubocop (>= 0.71.0) + rubocop-rails (2.3.2) + rack (>= 1.1) + rubocop (>= 0.72.0) + ruby-progressbar (1.10.1) ruby_dep (1.5.0) - shoulda-matchers (4.0.1) + shoulda-matchers (4.1.2) activesupport (>= 4.2.0) simplecov (0.16.1) docile (~> 1.1) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - solargraph (0.31.3) - backport (~> 0.3) + solargraph (0.37.2) + backport (~> 1.1) + bundler (>= 1.17.2) htmlentities (~> 4.3, >= 4.3.4) jaro_winkler (~> 1.5) - kramdown (~> 1.16) + nokogiri (~> 1.9, >= 1.9.1) parser (~> 2.3) reverse_markdown (~> 1.0, >= 1.0.5) rubocop (~> 0.52) thor (~> 0.19, >= 0.19.4) tilt (~> 2.0) yard (~> 0.9) - spring (2.0.2) - activesupport (>= 4.2) + spring (2.1.0) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) @@ -235,25 +238,25 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.4.0) + sqlite3 (1.4.1) term-ansicolor (1.7.1) tins (~> 1.0) - thor (0.19.4) + thor (0.20.3) thread_safe (0.3.6) tilt (2.0.9) - tins (1.20.2) + tins (1.21.1) tzinfo (1.2.5) thread_safe (~> 0.1) unf (0.1.4) unf_ext unf_ext (0.0.7.6) - unicode-display_width (1.5.0) + unicode-display_width (1.6.0) warden (1.2.8) rack (>= 2.0.6) - websocket-driver (0.7.0) + websocket-driver (0.7.1) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) - yard (0.9.19) + websocket-extensions (0.1.4) + yard (0.9.20) PLATFORMS ruby @@ -277,7 +280,9 @@ DEPENDENCIES railroady rails (~> 5.2.1) rspec-rails - rubocop + rubocop (= 0.72.0) + rubocop-performance + rubocop-rails shoulda-matchers solargraph spring diff --git a/config/environments/production.rb b/config/environments/production.rb index 99d3cb3..e77ac60 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -55,7 +55,8 @@ Rails.application.configure do # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true + # https://github.com/ruby-i18n/i18n/releases/tag/v1.1.0 + config.i18n.fallbacks = [I18n.default_locale] # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify