Skip to content

Commit

Permalink
🚓 enable Style/TrailingBlankLines and auto-correct
Browse files Browse the repository at this point in the history
  • Loading branch information
eitoball committed Jun 30, 2016
1 parent 3d61f2b commit 1cc206e
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 26 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Expand Up @@ -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'
7 changes: 0 additions & 7 deletions .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:
Expand Down
2 changes: 1 addition & 1 deletion app/concerns/measurement_concerns.rb
Expand Up @@ -14,4 +14,4 @@ def latitude
def longitude
location.try(:longitude)
end
end
end
2 changes: 1 addition & 1 deletion app/concerns/user_concerns.rb
Expand Up @@ -6,4 +6,4 @@ def first_name
def last_name
name.split(' ', 2).last if name
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/dashboards_controller.rb
Expand Up @@ -9,4 +9,4 @@ def show

alias_method :new, :show
alias_method :index, :show
end
end
2 changes: 1 addition & 1 deletion app/controllers/home_controller.rb
@@ -1,2 +1,2 @@
class HomeController < ApplicationController
end
end
2 changes: 1 addition & 1 deletion app/controllers/profiles_controller.rb
Expand Up @@ -9,4 +9,4 @@ def update
end
end

end
end
2 changes: 1 addition & 1 deletion app/helpers/docs_helper.rb
Expand Up @@ -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
end
2 changes: 1 addition & 1 deletion app/helpers/users_helper.rb
Expand Up @@ -2,4 +2,4 @@ module UsersHelper
def registering?
params[:user] && params[:user][:name].present?
end
end
end
2 changes: 1 addition & 1 deletion app/jobs/finalize_bgeigie_import_job.rb
Expand Up @@ -2,4 +2,4 @@
def perform
BgeigieImport.find(bgeigie_import_id).finalize!
end
end
end
2 changes: 1 addition & 1 deletion app/jobs/process_bgeigie_import_job.rb
Expand Up @@ -2,4 +2,4 @@
def perform
BgeigieImport.find(bgeigie_import_id).process
end
end
end
2 changes: 1 addition & 1 deletion app/views/bgeigie_logs/index.json.jbuilder
Expand Up @@ -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
end
2 changes: 1 addition & 1 deletion app/views/home/show.json.jbuilder
Expand Up @@ -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)
]
]
2 changes: 1 addition & 1 deletion 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
json.authentication_token user.authentication_token if current_user == user
2 changes: 1 addition & 1 deletion app/views/users/index.json.jbuilder
@@ -1,3 +1,3 @@
json.array!(@users) do |user|
json.partial! 'user', user: user
end
end
2 changes: 1 addition & 1 deletion app/views/users/show.json.jbuilder
@@ -1 +1 @@
json.partial! 'user', user: @user
json.partial! 'user', user: @user
1 change: 0 additions & 1 deletion 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

2 changes: 1 addition & 1 deletion 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'
sudo 'chmod 0600 ~/.pgpass'
2 changes: 1 addition & 1 deletion script/add_checksum_to_each_line
Expand Up @@ -5,4 +5,4 @@ require 'digest/md5'

ARGF.each_with_index do |line, _idx|
puts "#{line.strip},#{Digest::MD5.hexdigest(line.strip)}"
end
end
2 changes: 1 addition & 1 deletion spec/fabricators/device_fabricator.rb
Expand Up @@ -2,4 +2,4 @@
manufacturer 'Safecast'
model 'bGeigie'
sensor 'LND-7317'
end
end
2 changes: 1 addition & 1 deletion spec/support/capybara.rb
@@ -1,4 +1,4 @@
Capybara.configure do |config|
config.match = :prefer_exact
config.ignore_hidden_elements = false
end
end

0 comments on commit 1cc206e

Please sign in to comment.