From 034e313eb9998cb32f3edd46e605e4c653279bbe Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 17 Mar 2018 15:43:39 +0100 Subject: [PATCH] Cleaning up following a rubocop upgrade --- Rakefile | 2 +- bin/bundle | 2 +- bin/setup | 2 +- bin/update | 2 +- config/application.rb | 2 +- db/seeds.rb | 1 - test/test_helper.rb | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index e26a2fc2..0051a45e 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,6 @@ # for example lib/tasks/capistrano.rake, and they will automatically be # available to Rake. -require File.expand_path('../config/application', __FILE__) +require File.expand_path('config/application', __dir__) AgendaDuLibreRails::Application.load_tasks diff --git a/bin/bundle b/bin/bundle index 66e9889e..f19acf5b 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) load Gem.bin_path('bundler', 'bundle') diff --git a/bin/setup b/bin/setup index 21907e89..e04536d2 100755 --- a/bin/setup +++ b/bin/setup @@ -3,7 +3,7 @@ require 'pathname' require 'fileutils' # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = Pathname.new File.expand_path('../', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") diff --git a/bin/update b/bin/update index 801926bd..84a6caf6 100755 --- a/bin/update +++ b/bin/update @@ -3,7 +3,7 @@ require 'pathname' require 'fileutils' # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = Pathname.new File.expand_path('./', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") diff --git a/config/application.rb b/config/application.rb index 69ce4966..a1ac9b05 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('../boot', __FILE__) +require File.expand_path('boot', __dir__) require 'rails/all' require 'action_view/encoded_mail_to/mail_to_with_encoding' diff --git a/db/seeds.rb b/db/seeds.rb index e8735e7f..20c85fa0 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -411,4 +411,3 @@ Ces recommandations de modération sont à discuter et à améliorer au fur et ] ) # rubocop:enable Metrics/LineLength -# rubocop:enable Layout/EmptyLinesAroundArguments diff --git a/test/test_helper.rb b/test/test_helper.rb index 91e19698..2ca3770f 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,5 @@ ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../../config/environment', __FILE__) +require File.expand_path('../config/environment', __dir__) require 'rails/test_help' # require 'simplecov'