diff --git a/.rubocop.yml b/.rubocop.yml index 18d21b3ef..939a4d255 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -135,3 +135,9 @@ Style/SymbolProc: Style/Tab: Exclude: - 'db/migrate/20111214154833_create_delayed_jobs.rb' + +Style/TrailingBlankLines: + Exclude: + - 'db/migrate/20111214154833_create_delayed_jobs.rb' + - 'db/migrate/20120103213502_add_default_to_bgeigie_log.rb' + - 'db/migrate/20120307232457_create_configurables.rb' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index cdda2fcbf..e3ad44f96 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,10 +1,3 @@ -# Offense count: 37 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: final_newline, final_blank_line -Style/TrailingBlankLines: - Enabled: false - # Offense count: 330 # Cop supports --auto-correct. Style/TrailingWhitespace: diff --git a/app/concerns/measurement_concerns.rb b/app/concerns/measurement_concerns.rb index 69c9ae50c..3e7d26c2d 100644 --- a/app/concerns/measurement_concerns.rb +++ b/app/concerns/measurement_concerns.rb @@ -14,4 +14,4 @@ def latitude def longitude location.try(:longitude) end -end \ No newline at end of file +end diff --git a/app/concerns/user_concerns.rb b/app/concerns/user_concerns.rb index f4d20ee60..a3815fa7a 100644 --- a/app/concerns/user_concerns.rb +++ b/app/concerns/user_concerns.rb @@ -6,4 +6,4 @@ def first_name def last_name name.split(' ', 2).last if name end -end \ No newline at end of file +end diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb index 1332181b9..258efda46 100644 --- a/app/controllers/dashboards_controller.rb +++ b/app/controllers/dashboards_controller.rb @@ -9,4 +9,4 @@ def show alias_method :new, :show alias_method :index, :show -end \ No newline at end of file +end diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 186a59cae..fc0b4743a 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,2 +1,2 @@ class HomeController < ApplicationController -end \ No newline at end of file +end diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 73444b1d2..35ca074a8 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -9,4 +9,4 @@ def update end end -end \ No newline at end of file +end diff --git a/app/helpers/docs_helper.rb b/app/helpers/docs_helper.rb index 343f4fb67..0f243e826 100644 --- a/app/helpers/docs_helper.rb +++ b/app/helpers/docs_helper.rb @@ -21,4 +21,4 @@ def api_example_link(http_method, url_method, *args) json_path, path = api_example_urls(url_method, *args) link_to "#{http_method.to_s.upcase} #{json_path}", path end -end \ No newline at end of file +end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 794843d8b..a5d708d37 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -2,4 +2,4 @@ module UsersHelper def registering? params[:user] && params[:user][:name].present? end -end \ No newline at end of file +end diff --git a/app/jobs/finalize_bgeigie_import_job.rb b/app/jobs/finalize_bgeigie_import_job.rb index 3bb6ef059..e59bf9f65 100644 --- a/app/jobs/finalize_bgeigie_import_job.rb +++ b/app/jobs/finalize_bgeigie_import_job.rb @@ -2,4 +2,4 @@ def perform BgeigieImport.find(bgeigie_import_id).finalize! end -end \ No newline at end of file +end diff --git a/app/jobs/process_bgeigie_import_job.rb b/app/jobs/process_bgeigie_import_job.rb index 6247fc30d..39daf1adb 100644 --- a/app/jobs/process_bgeigie_import_job.rb +++ b/app/jobs/process_bgeigie_import_job.rb @@ -2,4 +2,4 @@ def perform BgeigieImport.find(bgeigie_import_id).process end -end \ No newline at end of file +end diff --git a/app/views/bgeigie_logs/index.json.jbuilder b/app/views/bgeigie_logs/index.json.jbuilder index ebebfe577..c2a04cd34 100644 --- a/app/views/bgeigie_logs/index.json.jbuilder +++ b/app/views/bgeigie_logs/index.json.jbuilder @@ -4,4 +4,4 @@ json.array!(@bgeigie_import.bgeigie_logs) do |bgeigie_log| json.cpm bgeigie_log.cpm json.usv bgeigie_log.usv json.captured_at bgeigie_log.captured_at -end \ No newline at end of file +end diff --git a/app/views/home/show.json.jbuilder b/app/views/home/show.json.jbuilder index 800aa241d..89f9078b9 100644 --- a/app/views/home/show.json.jbuilder +++ b/app/views/home/show.json.jbuilder @@ -5,4 +5,4 @@ json.subresource_uris [ measurements_path(locale: false, format: :json), bgeigie_imports_path(locale: false, format: :json), devices_path(locale: false, format: :json) -] \ No newline at end of file +] diff --git a/app/views/users/_user.json.jbuilder b/app/views/users/_user.json.jbuilder index d2a7e8962..bf9767e59 100644 --- a/app/views/users/_user.json.jbuilder +++ b/app/views/users/_user.json.jbuilder @@ -1,4 +1,4 @@ json.id user.id json.name user.name json.measurements_count user.measurements_count -json.authentication_token user.authentication_token if current_user == user \ No newline at end of file +json.authentication_token user.authentication_token if current_user == user diff --git a/app/views/users/index.json.jbuilder b/app/views/users/index.json.jbuilder index bdc81427c..dbb1e420f 100644 --- a/app/views/users/index.json.jbuilder +++ b/app/views/users/index.json.jbuilder @@ -1,3 +1,3 @@ json.array!(@users) do |user| json.partial! 'user', user: user -end \ No newline at end of file +end diff --git a/app/views/users/show.json.jbuilder b/app/views/users/show.json.jbuilder index db1f69ee3..e34dd56a4 100644 --- a/app/views/users/show.json.jbuilder +++ b/app/views/users/show.json.jbuilder @@ -1 +1 @@ -json.partial! 'user', user: @user \ No newline at end of file +json.partial! 'user', user: @user diff --git a/config/initializers/amazon_ses.rb b/config/initializers/amazon_ses.rb index 61a12bde0..be6648715 100644 --- a/config/initializers/amazon_ses.rb +++ b/config/initializers/amazon_ses.rb @@ -1,4 +1,3 @@ ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base, access_key_id: Configurable.aws_access_key_id, secret_access_key: Configurable.aws_secret_access_key - diff --git a/deploy/after_restart.rb b/deploy/after_restart.rb index 262eabd6d..82989a357 100644 --- a/deploy/after_restart.rb +++ b/deploy/after_restart.rb @@ -1,3 +1,3 @@ sudo 'monit -g dj_safecastapi restart all' sudo "cp #{release_path}/doc/.pgpass ~/.pgpass" -sudo 'chmod 0600 ~/.pgpass' \ No newline at end of file +sudo 'chmod 0600 ~/.pgpass' diff --git a/script/add_checksum_to_each_line b/script/add_checksum_to_each_line index 725d113c6..9b7f27bce 100755 --- a/script/add_checksum_to_each_line +++ b/script/add_checksum_to_each_line @@ -5,4 +5,4 @@ require 'digest/md5' ARGF.each_with_index do |line, _idx| puts "#{line.strip},#{Digest::MD5.hexdigest(line.strip)}" -end \ No newline at end of file +end diff --git a/spec/fabricators/device_fabricator.rb b/spec/fabricators/device_fabricator.rb index 1a7aecc20..775ced443 100644 --- a/spec/fabricators/device_fabricator.rb +++ b/spec/fabricators/device_fabricator.rb @@ -2,4 +2,4 @@ manufacturer 'Safecast' model 'bGeigie' sensor 'LND-7317' -end \ No newline at end of file +end diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index 23d45ba28..5baf95c67 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -1,4 +1,4 @@ Capybara.configure do |config| config.match = :prefer_exact config.ignore_hidden_elements = false -end \ No newline at end of file +end