chore(rubocop): giganto rubocop commit.

muahahahah
This commit is contained in:
Joseph Mastey
2017-12-05 18:46:21 -06:00
parent 284cd8811c
commit 9902345291
120 changed files with 743 additions and 635 deletions
+5 -4
View File
@@ -1,6 +1,7 @@
require File.expand_path('../boot', __FILE__)
# frozen_string_literal: true
require File.expand_path("../boot", __FILE__)
require 'rails/all'
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
@@ -46,12 +47,12 @@ module Railsgoat
# Enable the asset pipeline
config.assets.enabled = true
# add app/assets/fonts to the asset path
config.assets.paths << Rails.root.join("app", "assets", "fonts")
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
config.assets.version = "1.0"
I18n.config.enforce_available_locales = false
end
+3 -2
View File
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
+2 -1
View File
@@ -1,5 +1,6 @@
# frozen_string_literal: true
# Load the Rails application.
require File.expand_path('../application', __FILE__)
require File.expand_path("../application", __FILE__)
# Initialize the Rails application.
Railsgoat::Application.initialize!
+3 -2
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Railsgoat::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
@@ -30,8 +31,8 @@ Railsgoat::Application.configure do
# ActionMailer settings for email support
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "127.0.0.1", :port => 1025 }
config.action_mailer.default_url_options = { :host => "127.0.0.1:3000" }
config.action_mailer.smtp_settings = { address: "127.0.0.1", port: 1025 }
config.action_mailer.default_url_options = { host: "127.0.0.1:3000" }
# config.middleware.insert_before(
# Rack::Lock, Rack::LiveReload,
+3 -2
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Railsgoat::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
@@ -30,8 +31,8 @@ Railsgoat::Application.configure do
# ActionMailer settings for email support
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "127.0.0.1", :port => 1025 }
config.action_mailer.default_url_options = { :host => "127.0.0.1:3000" }
config.action_mailer.smtp_settings = { address: "127.0.0.1", port: 1025 }
config.action_mailer.default_url_options = { host: "127.0.0.1:3000" }
# config.middleware.insert_before(
# Rack::Lock, Rack::LiveReload,
+2 -1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Railsgoat::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
@@ -31,7 +32,7 @@ Railsgoat::Application.configure do
config.assets.digest = true
# For Rails 4.0+: Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
config.assets.version = "1.0"
# Defaults to nil and saved in location specified by config.assets.prefix
# config.assets.manifest = YOUR_PATH
+2 -1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Railsgoat::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
@@ -9,7 +10,7 @@ Railsgoat::Application.configure do
# Configure static asset server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
config.public_file_server.headers = { "Cache-Control" => "public, max-age=3600" }
# Show full error reports and disable caching.
config.consider_all_requests_local = true
+1
View File
@@ -1 +1,2 @@
# frozen_string_literal: true
Rails.application.config.assets.precompile += %w( validation.js jquery.dataTables.min.js fullcalendar.min.js moment.min.js )
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+2 -1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
ACCESS_TOKEN_SALT = "S4828341189aefiasd#ASDF"
RG_IV = "PPKLKAJDKGHALDJL482823458028"
RG_IV = "PPKLKAJDKGHALDJL482823458028"
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
+1
View File
@@ -1 +1,2 @@
# frozen_string_literal: true
ActiveSupport::JSON::Encoding::escape_html_entities_in_json = false
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
if Rails.env.production?
# Specify env variable/location/etc. to retrieve key from
else
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
+107 -106
View File
@@ -1,163 +1,164 @@
# frozen_string_literal: true
POPULATE_RETIREMENTS = [
{
:employee_contrib => "1000",
:employer_contrib => "2000",
:total => "4500"
employee_contrib: "1000",
employer_contrib: "2000",
total: "4500"
},
{
:employee_contrib => "8000",
:employer_contrib => "16000",
:total => "30000"
employee_contrib: "8000",
employer_contrib: "16000",
total: "30000"
},
{
:employee_contrib => "10000",
:employer_contrib => "20000",
:total => "40000"
employee_contrib: "10000",
employer_contrib: "20000",
total: "40000"
},
{
:employee_contrib => "3000",
:employer_contrib => "6000",
:total => "12500"
employee_contrib: "3000",
employer_contrib: "6000",
total: "12500"
}
]
POPULATE_PAID_TIME_OFF = [
{
:sick_days_taken => 2,
:sick_days_earned => 5,
:pto_taken => 5,
:pto_earned => 30
sick_days_taken: 2,
sick_days_earned: 5,
pto_taken: 5,
pto_earned: 30
},
{
:sick_days_taken => 3,
:sick_days_earned => 6,
:pto_taken => 3,
:pto_earned => 20
sick_days_taken: 3,
sick_days_earned: 6,
pto_taken: 3,
pto_earned: 20
},
{
:sick_days_taken => 2,
:sick_days_earned => 5,
:pto_taken => 5,
:pto_earned => 30
sick_days_taken: 2,
sick_days_earned: 5,
pto_taken: 5,
pto_earned: 30
},
{
:sick_days_taken => 1,
:sick_days_earned => 5,
:pto_taken => 10,
:pto_earned => 30
sick_days_taken: 1,
sick_days_earned: 5,
pto_taken: 10,
pto_earned: 30
}
]
POPULATE_SCHEDULE = [
{
:date_begin => Date.new(2014, 7, 30),
:date_end => Date.new(2014, 8, 2),
:event_type => "pto",
:event_desc => "vacation to france",
:event_name => "My 2014 Vacation"
date_begin: Date.new(2014, 7, 30),
date_end: Date.new(2014, 8, 2),
event_type: "pto",
event_desc: "vacation to france",
event_name: "My 2014 Vacation"
},
{
:date_begin => Date.new(2013, 9, 1),
:date_end => Date.new(2013, 9, 12),
:event_type => "pto",
:event_desc => "Going Home to see folks",
:event_name => "Visit Parents"
date_begin: Date.new(2013, 9, 1),
date_end: Date.new(2013, 9, 12),
event_type: "pto",
event_desc: "Going Home to see folks",
event_name: "Visit Parents"
},
{
:date_begin => Date.new(2013, 9, 13),
:date_end => Date.new(2013, 9, 20),
:event_type => "pto",
:event_desc => "Taking kids to Grand Canyon",
:event_name => "AZ Trip"
date_begin: Date.new(2013, 9, 13),
date_end: Date.new(2013, 9, 20),
event_type: "pto",
event_desc: "Taking kids to Grand Canyon",
event_name: "AZ Trip"
},
{
:date_begin => Date.new(2013, 12, 20),
:date_end => Date.new(2013, 12, 30),
:event_type => "pto",
:event_desc => "Xmas Staycation",
:event_name => "Christmas Leave"
date_begin: Date.new(2013, 12, 20),
date_end: Date.new(2013, 12, 30),
event_type: "pto",
event_desc: "Xmas Staycation",
event_name: "Christmas Leave"
}
]
POPULATE_WORK_INFO = [
{
:income => "$50,000",
:bonuses => "$10,000",
:years_worked => 2,
:SSN => "666-66-6666",
:DoB => "01-01-1980"
income: "$50,000",
bonuses: "$10,000",
years_worked: 2,
SSN: "666-66-6666",
DoB: "01-01-1980"
},
{
:income => "$40,000",
:bonuses => "$10,000",
:years_worked => 1,
:SSN => "777-77-7777",
:DoB => "01-01-1979"
income: "$40,000",
bonuses: "$10,000",
years_worked: 1,
SSN: "777-77-7777",
DoB: "01-01-1979"
},
{
:income => "$60,000",
:bonuses => "$12,000",
:years_worked => 3,
:SSN => "888-88-8888",
:DoB => "01-01-1981"
income: "$60,000",
bonuses: "$12,000",
years_worked: 3,
SSN: "888-88-8888",
DoB: "01-01-1981"
},
{
:income => "$30,000",
:bonuses => "7,000",
:years_worked => 1,
:SSN => "999-99-9999",
:DoB => "01-01-1982"
}
income: "$30,000",
bonuses: "7,000",
years_worked: 1,
SSN: "999-99-9999",
DoB: "01-01-1982"
}
]
POPULATE_PERFORMANCE = [
{
:reviewer => 1,
:comments => "Great job! You are my hero",
:date_submitted => Date.new(2012, 01, 01),
:score => 5
reviewer: 1,
comments: "Great job! You are my hero",
date_submitted: Date.new(2012, 01, 01),
score: 5
},
{
:reviewer => 1,
:comments => "Once again, you've done a great job this year. We greatly appreciate your hard work.",
:date_submitted => Date.new(2013, 01, 01),
:score => 5
reviewer: 1,
comments: "Once again, you've done a great job this year. We greatly appreciate your hard work.",
date_submitted: Date.new(2013, 01, 01),
score: 5
},
{
:reviewer => 1,
:comments => "Great worker, great attitude for this newcomer!",
:date_submitted => Date.new(2013, 01, 01),
:score => 5
reviewer: 1,
comments: "Great worker, great attitude for this newcomer!",
date_submitted: Date.new(2013, 01, 01),
score: 5
},
{
:reviewer => 1,
:comments => "Wow, right out of the gate we've been very impressed but unfortunately, our system doesn't allow us to give you a full 5.0 because other ppl have gotten 5.0 ratings.",
:date_submitted => Date.new(2011, 01, 01),
:score => 4
reviewer: 1,
comments: "Wow, right out of the gate we've been very impressed but unfortunately, our system doesn't allow us to give you a full 5.0 because other ppl have gotten 5.0 ratings.",
date_submitted: Date.new(2011, 01, 01),
score: 4
},
{
:reviewer => 1,
:comments => "We highly recommend promotion for this employee! Consistent performer with proven leadership qualities.",
:date_submitted => Date.new(2012, 01, 01),
:score => 5
reviewer: 1,
comments: "We highly recommend promotion for this employee! Consistent performer with proven leadership qualities.",
date_submitted: Date.new(2012, 01, 01),
score: 5
},
{
:reviewer => 1,
:comments => "Right out of the gate has made incredible moves as a newly appointed leader. His only improvement would be more cowbell. Not enough of it.",
:date_submitted => Date.new(2013, 01, 01),
:score => 4
reviewer: 1,
comments: "Right out of the gate has made incredible moves as a newly appointed leader. His only improvement would be more cowbell. Not enough of it.",
date_submitted: Date.new(2013, 01, 01),
score: 4
},
{
:reviewer => 1,
:comments => "Ehh, you are okay, we will let you stay..... barely",
:date_submitted => Date.new(2013, 01, 01),
:score => 2
reviewer: 1,
comments: "Ehh, you are okay, we will let you stay..... barely",
date_submitted: Date.new(2013, 01, 01),
score: 2
}
]
]
+3 -2
View File
@@ -1,8 +1,9 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Railsgoat::Application.config.secret_token = '2f1d90a26236c3245d96f5606c201a780dc9ca687e5ed82b45e211bb5dc84c1870f61ca9e002dad5dd8a149c9792d8f07f31a9575065cca064bd6af44f8750e4'
Railsgoat::Application.config.secret_key_base = '2f1d90a26236c3245d96f5606c201a780dc9ca687e5ed82b45e211bb5dc84c1870f61ca9e002dad5dd8a149c9792d8f07f31a9575065cca064bd6af44f8750e4'
Railsgoat::Application.config.secret_token = "2f1d90a26236c3245d96f5606c201a780dc9ca687e5ed82b45e211bb5dc84c1870f61ca9e002dad5dd8a149c9792d8f07f31a9575065cca064bd6af44f8750e4"
Railsgoat::Application.config.secret_key_base = "2f1d90a26236c3245d96f5606c201a780dc9ca687e5ed82b45e211bb5dc84c1870f61ca9e002dad5dd8a149c9792d8f07f31a9575065cca064bd6af44f8750e4"
+2 -1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
Railsgoat::Application.config.session_store :cookie_store, key: '_railsgoat_session', httponly: false
Railsgoat::Application.config.session_store :cookie_store, key: "_railsgoat_session", httponly: false
+1
View File
@@ -1 +1,2 @@
# frozen_string_literal: true
ActiveRecord::Base.send(:include, ActiveModel::ForbiddenAttributesProtection)
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
+4 -3
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
Railsgoat::Application.routes.draw do
get "login" => "sessions#new"
@@ -78,14 +79,14 @@ Railsgoat::Application.routes.draw do
end
end
namespace :api, defaults: {format: 'json'} do
namespace :api, defaults: {format: "json"} do
namespace :v1 do
resources :users
resources :mobile
end
end
end
root :to => "sessions#new"
root to: "sessions#new"
end