Fixed rubocop messages

This commit is contained in:
Al Snow
2018-03-08 17:02:24 -05:00
parent 8dc8f4d61b
commit b8262ecb0a
7 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ guard "brakeman", run_on_start: true do
end
guard :shell do
watch(%r{^Gemfile|Gemfile.lock$}) { system("bundle-audit")}
watch(%r{^Gemfile|Gemfile.lock$}) { system("bundle-audit") }
end
guard "livereload", host: "railsgoat.dev", port: "35727" do
@@ -23,7 +23,7 @@ guard "livereload", host: "railsgoat.dev", port: "35727" do
end
guard :rspec, cmd: 'bundle exec rspec' do
guard :rspec, cmd: "bundle exec rspec" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch("spec/spec_helper.rb") { "spec" }
+2 -2
View File
@@ -15,7 +15,7 @@ class PayController < ApplicationController
msg = true if pay.save!
respond_to do |format|
format.json {render json: {msg: msg } }
format.json { render json: {msg: msg } }
end
end
@@ -38,7 +38,7 @@ class PayController < ApplicationController
def decrypted_bank_acct_num
decrypted = Encryption.decrypt_sensitive_value(params[:value_to_decrypt])
respond_to do |format|
format.json {render json: {account_num: decrypted || "No Data" }}
format.json { render json: {account_num: decrypted || "No Data" } }
end
end
end
+1 -1
View File
@@ -15,7 +15,7 @@ class ScheduleController < ApplicationController
end
respond_to do |format|
format.json {render json: {msg: message ? "success" : "failure" }}
format.json { render json: {msg: message ? "success" : "failure" } }
end
end
+1 -1
View File
@@ -1,6 +1,6 @@
# frozen_string_literal: true
class Analytics < ApplicationRecord
scope :hits_by_ip, ->(ip, col = "*") { select("#{col}").where(ip_address: ip).order("id DESC")}
scope :hits_by_ip, ->(ip, col = "*") { select("#{col}").where(ip_address: ip).order("id DESC") }
def self.count_by_col(col)
calculate(:count, col)
@@ -2,9 +2,9 @@
class CreateAnalytics < ActiveRecord::Migration[4.2]
def change
create_table :analytics do |t|
t.string :ip_address
t.string :referrer
t.string :user_agent
t.string :ip_address
t.string :referrer
t.string :user_agent
t.timestamps
end
end
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
+1 -1
View File
@@ -89,7 +89,7 @@ class WarningSuppressor
private
def ignore?(message)
IGNORE_PATTERNS.any? {|regexp| message =~ regexp }
IGNORE_PATTERNS.any? { |regexp| message =~ regexp }
end
end