From 0cb0bc4554d5dd5df56d681e659c0218c53046c7 Mon Sep 17 00:00:00 2001 From: Al Snow Date: Sat, 3 Mar 2018 18:04:13 -0500 Subject: [PATCH 1/5] Upgraded rb-fsevent gem --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a8901e1..2c56952 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,7 +230,7 @@ GEM rainbow (3.0.0) raindrops (0.19.0) rake (12.3.0) - rb-fsevent (0.10.2) + rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) ref (2.0.0) From 743b944aa9877b473d08055516897537eef35790 Mon Sep 17 00:00:00 2001 From: Al Snow Date: Tue, 6 Mar 2018 10:11:08 -0500 Subject: [PATCH 2/5] Upgraded [aruba, erubi, parser, rubocop] gems --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2c56952..ab53dec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,7 +41,7 @@ GEM addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) arel (8.0.0) - aruba (0.14.3) + aruba (0.14.4) childprocess (~> 0.8.0) contracts (~> 0.9) cucumber (>= 1.3.19) @@ -106,7 +106,7 @@ GEM em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - erubi (1.7.0) + erubi (1.7.1) eventmachine (1.2.5) execjs (2.7.0) ffi (1.9.23) @@ -182,7 +182,7 @@ GEM nenv (~> 0.1) shellany (~> 0.0) parallel (1.12.1) - parser (2.5.0.2) + parser (2.5.0.3) ast (~> 2.4.0) poltergeist (1.17.0) capybara (~> 2.1) @@ -258,9 +258,9 @@ GEM rspec-mocks (~> 3.7.0) rspec-support (~> 3.7.0) rspec-support (3.7.1) - rubocop (0.52.1) + rubocop (0.53.0) parallel (~> 1.10) - parser (>= 2.4.0.2, < 3.0) + parser (>= 2.5) powerpack (~> 0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) From 8dc8f4d61bd4a3d6ab2591453c899de8fcb85ae0 Mon Sep 17 00:00:00 2001 From: Al Snow Date: Thu, 8 Mar 2018 17:01:02 -0500 Subject: [PATCH 3/5] Upgraded rubocop-github gem --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ab53dec..0cb8ef9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -265,7 +265,7 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-github (0.9.0) + rubocop-github (0.10.0) rubocop (~> 0.51) ruby-prof (0.17.0) ruby-progressbar (1.9.0) From b8262ecb0a2d0fbae24a9965f159f8b0d6e82e0d Mon Sep 17 00:00:00 2001 From: Al Snow Date: Thu, 8 Mar 2018 17:02:24 -0500 Subject: [PATCH 4/5] Fixed rubocop messages --- Guardfile | 4 ++-- app/controllers/pay_controller.rb | 4 ++-- app/controllers/schedule_controller.rb | 2 +- app/models/analytics.rb | 2 +- db/migrate/20140408185601_create_analytics.rb | 6 +++--- db/schema.rb | 1 + spec/support/capybara_shared.rb | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Guardfile b/Guardfile index e7d5a0f..18b70eb 100755 --- a/Guardfile +++ b/Guardfile @@ -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" } diff --git a/app/controllers/pay_controller.rb b/app/controllers/pay_controller.rb index 7db951e..d345f14 100644 --- a/app/controllers/pay_controller.rb +++ b/app/controllers/pay_controller.rb @@ -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 diff --git a/app/controllers/schedule_controller.rb b/app/controllers/schedule_controller.rb index 7e30139..1b52e6b 100644 --- a/app/controllers/schedule_controller.rb +++ b/app/controllers/schedule_controller.rb @@ -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 diff --git a/app/models/analytics.rb b/app/models/analytics.rb index ab8fd73..e331808 100644 --- a/app/models/analytics.rb +++ b/app/models/analytics.rb @@ -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) diff --git a/db/migrate/20140408185601_create_analytics.rb b/db/migrate/20140408185601_create_analytics.rb index 695cb8f..1ede62d 100644 --- a/db/migrate/20140408185601_create_analytics.rb +++ b/db/migrate/20140408185601_create_analytics.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 074df54..e9d5e1e 100755 --- a/db/schema.rb +++ b/db/schema.rb @@ -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. diff --git a/spec/support/capybara_shared.rb b/spec/support/capybara_shared.rb index 5838f92..7216b16 100644 --- a/spec/support/capybara_shared.rb +++ b/spec/support/capybara_shared.rb @@ -89,7 +89,7 @@ class WarningSuppressor private def ignore?(message) - IGNORE_PATTERNS.any? {|regexp| message =~ regexp } + IGNORE_PATTERNS.any? { |regexp| message =~ regexp } end end From aaa2e615e075807540f84c987ed4631b5ac6e977 Mon Sep 17 00:00:00 2001 From: Al Snow Date: Sun, 11 Mar 2018 15:11:12 -0400 Subject: [PATCH 5/5] Upgraded uglifier gem --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0cb8ef9..11df5ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -310,7 +310,7 @@ GEM turbolinks-source (5.1.0) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.6) + uglifier (4.1.7) execjs (>= 0.3.0, < 3) unicode-display_width (1.3.0) unicorn (5.4.0)