From 3d9b90fb0baf4ebd2c952f2a5eb44b71b09d3b17 Mon Sep 17 00:00:00 2001 From: Sydney Young Date: Fri, 9 Sep 2016 10:57:48 -0400 Subject: [PATCH] Dependency Upgrade Resolves #1629 --- Gemfile.lock | 144 +++++++++--------- app/controllers/announcements_controller.rb | 1 + app/controllers/application_controller.rb | 1 + app/controllers/blackouts_controller.rb | 1 + app/controllers/catalog_controller.rb | 1 + app/controllers/categories_controller.rb | 1 + app/controllers/concerns/calendarable.rb | 1 + app/controllers/contact_controller.rb | 1 + app/controllers/equipment_items_controller.rb | 1 + .../equipment_models_controller.rb | 1 + .../import_equipment_controller.rb | 1 + app/controllers/import_users_controller.rb | 1 + app/controllers/reports_controller.rb | 1 + app/controllers/requirements_controller.rb | 1 + app/controllers/reservations_controller.rb | 1 + app/controllers/status_controller.rb | 1 + app/controllers/users_controller.rb | 1 + app/decorators/application_decorator.rb | 1 + app/decorators/category_decorator.rb | 1 + app/decorators/equipment_item_decorator.rb | 1 + app/decorators/equipment_model_decorator.rb | 1 + app/helpers/announcements_helper.rb | 1 + app/helpers/app_configs_helper.rb | 1 + app/helpers/application_helper.rb | 1 + app/helpers/categories_helper.rb | 1 + app/helpers/contact_helper.rb | 1 + app/helpers/equipment_items_helper.rb | 1 + app/helpers/equipment_models_helper.rb | 1 + app/helpers/layout_helper.rb | 1 + app/helpers/reports_helper.rb | 1 + app/helpers/reservations_helper.rb | 1 + app/helpers/user_mailer_helper.rb | 64 ++++++-- app/helpers/users_helper.rb | 1 + app/inputs/deleted_input.rb | 1 + app/mailers/admin_mailer.rb | 1 + app/mailers/notifications_mailer.rb | 1 + app/mailers/user_mailer.rb | 1 + app/models/announcement.rb | 1 + app/models/app_config.rb | 1 + app/models/blackout.rb | 1 + app/models/cart.rb | 1 + app/models/cart_validations.rb | 1 + app/models/category.rb | 1 + app/models/checkin_procedure.rb | 1 + app/models/checkout_procedure.rb | 1 + app/models/concerns/linkable.rb | 1 + app/models/equipment_item.rb | 1 + app/models/equipment_model.rb | 1 + app/models/message.rb | 1 + app/models/report.rb | 1 + app/models/requirement.rb | 1 + app/models/reservation_validations.rb | 1 + app/models/user.rb | 1 + app/queries/query_base.rb | 1 + .../reservations/checkoutable_query.rb | 1 + .../reservations/consecutive_with_query.rb | 1 + app/queries/reservations/for_cat_query.rb | 1 + app/queries/reservations/future_query.rb | 1 + .../reservations/notes_unsent_query.rb | 1 + .../overlaps_with_date_range_query.rb | 1 + .../reservations/reservations_query_base.rb | 1 + .../reservations/starts_on_days_query.rb | 1 + app/queries/reservations/upcoming_query.rb | 1 + config/boot.rb | 1 + config/deploy/production.rb | 1 + config/deploy/staging.rb | 1 + config/environment.rb | 1 + config/environments/development.rb | 1 + config/environments/production.rb | 1 + config/environments/test.rb | 1 + config/initializers/00_devise.rb | 1 + config/initializers/assets.rb | 1 + config/initializers/authentication.rb | 1 + config/initializers/backtrace_silencers.rb | 1 + config/initializers/cookies_serializer.rb | 1 + config/initializers/days_of_the_week.rb | 1 + config/initializers/factory_girl.rb | 1 + .../initializers/filter_parameter_logging.rb | 1 + config/initializers/inflections.rb | 1 + config/initializers/kaminari_config.rb | 1 + config/initializers/mime_types.rb | 1 + config/initializers/new_rails_defaults.rb | 1 + config/initializers/rails_admin.rb | 1 + config/initializers/secret_token.rb | 1 + config/initializers/session_store.rb | 1 + config/initializers/setup_mail.rb | 1 + config/initializers/simple_form.rb | 1 + config/initializers/simple_form_bootstrap.rb | 1 + config/initializers/wrap_parameters.rb | 1 + config/routes.rb | 1 + config/schedule.rb | 1 + config/unicorn.rb | 1 + db/seeds.rb | 3 +- lib/activation_helper.rb | 1 + lib/autocomplete.rb | 1 + lib/capistrano/tasks/deployment_tasks.rake | 1 + lib/csv_export.rb | 1 + lib/csv_import.rb | 1 + lib/development_mail_interceptor.rb | 1 + lib/equipment_import.rb | 1 + lib/extras/simple_form_extensions.rb | 1 + lib/rails_extensions.rb | 1 + lib/searchable.rb | 1 + lib/tasks/setup_application.rake | 1 + spec/concerns/linkable_spec.rb | 1 + .../announcements_controller_spec.rb | 1 + spec/controllers/blackouts_controller_spec.rb | 1 + spec/controllers/catalog_controller_spec.rb | 1 + .../controllers/categories_controller_spec.rb | 1 + spec/controllers/contact_controller_spec.rb | 1 + .../import_users_controller_spec.rb | 1 + spec/controllers/reports_controller_spec.rb | 1 + .../requirements_controller_spec.rb | 1 + spec/controllers/users_controller_spec.rb | 1 + spec/factories/_sequences.rb | 1 + spec/factories/announcements.rb | 1 + spec/factories/app_configs.rb | 1 + spec/factories/blackouts.rb | 1 + spec/factories/carts.rb | 1 + spec/factories/categories.rb | 1 + spec/factories/checkin_procedures.rb | 1 + spec/factories/checkout_procedures.rb | 1 + spec/factories/equipment_items.rb | 1 + spec/factories/equipment_models.rb | 1 + spec/factories/messages.rb | 1 + spec/factories/requirements.rb | 1 + spec/factories/users.rb | 1 + spec/features/announcements_spec.rb | 1 + spec/features/auth_spec.rb | 1 + spec/features/eq_model_spec.rb | 1 + .../features/equipment_model_calendar_spec.rb | 1 + spec/features/equipment_model_views_spec.rb | 1 + spec/features/guest_spec.rb | 1 + spec/features/profile_spec.rb | 1 + spec/features/rails_admin_spec.rb | 1 + spec/features/reservations_archive_spec.rb | 1 + spec/features/reservations_spec.rb | 1 + spec/features/users_spec.rb | 1 + spec/helpers/announcements_helper_spec.rb | 1 + spec/helpers/application_helper_spec.rb | 1 + spec/helpers/email_helper_spec.rb | 1 + spec/helpers/user_mailer_helper_spec.rb | 1 + spec/lib/csv_export_spec.rb | 1 + spec/mailers/admin_mailer_spec.rb | 1 + spec/mailers/user_mailer_spec.rb | 1 + spec/models/announcement_spec.rb | 1 + spec/models/app_config_spec.rb | 1 + spec/models/blackout_spec.rb | 1 + spec/models/cart_spec.rb | 1 + spec/models/category_spec.rb | 1 + spec/models/checkin_procedure_spec.rb | 1 + spec/models/checkout_procedure_spec.rb | 1 + spec/models/equipment_item_spec.rb | 1 + spec/models/equipment_model_spec.rb | 1 + spec/models/message_spec.rb | 1 + spec/models/report_spec.rb | 1 + spec/models/requirement_spec.rb | 1 + spec/models/user_spec.rb | 1 + spec/spec_helper.rb | 1 + spec/support/app_config_helpers.rb | 1 + spec/support/calendarable_spec.rb | 1 + spec/support/capybara_form_helper.rb | 1 + spec/support/env_helpers.rb | 1 + spec/support/factory_girl.rb | 1 + spec/support/feature_helpers.rb | 1 + spec/support/shared_contexts/rake.rb | 1 + spec/support/warden_setup.rb | 1 + 167 files changed, 291 insertions(+), 84 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a422d2ce5..ebb275f3d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,47 +1,47 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) + actionmailer (4.2.7.1) + actionpack (= 4.2.7.1) + actionview (= 4.2.7.1) + activejob (= 4.2.7.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) + actionpack (4.2.7.1) + actionview (= 4.2.7.1) + activesupport (= 4.2.7.1) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) + actionview (4.2.7.1) + activesupport (= 4.2.7.1) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) + activejob (4.2.7.1) + activesupport (= 4.2.7.1) globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) + activemodel (4.2.7.1) + activesupport (= 4.2.7.1) builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) + activerecord (4.2.7.1) + activemodel (= 4.2.7.1) + activesupport (= 4.2.7.1) arel (~> 6.0) - activesupport (4.2.6) + activesupport (4.2.7.1) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.3.8) - airbrussh (1.0.2) + airbrussh (1.1.1) sshkit (>= 1.6.1, != 1.7.0) arel (6.0.3) - ast (2.2.0) - autoprefixer-rails (6.3.6.1) + ast (2.3.0) + autoprefixer-rails (6.4.1.1) execjs awesome_print (1.6.1) aws-sdk (1.66.0) @@ -52,14 +52,14 @@ GEM bcrypt (3.1.11) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - bootstrap-sass (3.3.6) + bootstrap-sass (3.3.7) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) builder (3.2.2) - bullet (5.1.0) + bullet (5.1.1) activesupport (>= 3.0.0) uniform_notifier (~> 1.10.0) - byebug (9.0.4) + byebug (9.0.5) cancancan (1.14.0) capistrano (3.5.0) airbrussh (>= 1.0.0) @@ -70,8 +70,8 @@ GEM capistrano-bundler (1.1.4) capistrano (~> 3.1) sshkit (~> 1.2) - capistrano-harrow (0.5.1) - capistrano-rails (1.1.6) + capistrano-harrow (0.5.3) + capistrano-rails (1.1.8) capistrano (~> 3.1) capistrano-bundler (~> 1.1) capistrano-rvm (0.1.2) @@ -93,7 +93,7 @@ GEM cocaine (0.5.8) climate_control (>= 0.0.3, < 1.0) cocoon (1.2.9) - codeclimate-test-reporter (0.5.0) + codeclimate-test-reporter (0.5.2) simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.1) coffee-rails (4.1.1) @@ -104,7 +104,7 @@ GEM execjs coffee-script-source (1.10.0) concurrent-ruby (1.0.2) - daemons (1.2.3) + daemons (1.2.4) database_cleaner (1.5.3) debug_inspector (0.0.2) devise (4.1.1) @@ -113,7 +113,7 @@ GEM railties (>= 4.1.0, < 5.1) responders warden (~> 1.2.3) - devise_cas_authenticatable (1.9.1) + devise_cas_authenticatable (1.9.2) devise (>= 1.2.0) rubycas-client (>= 2.2.1) diff-lcs (1.2.5) @@ -141,8 +141,8 @@ GEM faraday (0.9.2) multipart-post (>= 1.2, < 3) ffaker (2.2.0) - ffi (1.9.10) - font-awesome-rails (4.6.3.0) + ffi (1.9.14) + font-awesome-rails (4.6.3.1) railties (>= 3.2, < 5.1) formatador (0.2.5) fullcalendar-rails (2.6.1.0) @@ -152,7 +152,7 @@ GEM fuubar (2.0.0) rspec (~> 3.0) ruby-progressbar (~> 1.4) - globalid (0.3.6) + globalid (0.3.7) activesupport (>= 4.1.0) guard (2.14.0) formatador (>= 0.2.4) @@ -169,7 +169,7 @@ GEM guard (~> 2.8) guard-compat (~> 1.0) multi_json (~> 1.8) - guard-rspec (4.7.0) + guard-rspec (4.7.3) guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) @@ -221,11 +221,11 @@ GEM mail (2.6.4) mime-types (>= 1.16, < 4) method_source (0.8.2) - mime-types (3.0) + mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mimemagic (0.3.0) - mini_portile2 (2.0.0) + mini_portile2 (2.1.0) minitest (5.9.0) momentjs-rails (2.11.1) railties (>= 3.1) @@ -237,34 +237,36 @@ GEM net-ldap (0.14.0) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (3.1.1) + net-ssh (3.2.0) nilify_blanks (1.2.1) activerecord (>= 3.0.0) activesupport (>= 3.0.0) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) - notiffany (0.1.0) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + notiffany (0.1.1) nenv (~> 0.1) shellany (~> 0.0) octokit (3.8.0) sawyer (~> 0.6.0, >= 0.5.3) orm_adapter (0.5.0) - paperclip (4.3.6) + paperclip (4.3.7) activemodel (>= 3.2.0) activesupport (>= 3.2.0) cocaine (~> 0.5.5) mime-types mimemagic (= 0.3.0) - parser (2.3.1.0) + parser (2.3.1.3) ast (~> 2.2) party_foul (1.5.5) octokit (~> 3.1) - permanent_records (4.1.5) + permanent_records (4.1.7) activerecord (>= 4.2.0) activesupport (>= 4.2.0) pg (0.18.4) + pkg-config (1.1.7) powerpack (0.1.1) - pry (0.10.3) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) @@ -288,16 +290,16 @@ GEM rack-test (0.6.3) rack (>= 1.0) rack-timeout (0.4.2) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) + rails (4.2.7.1) + actionmailer (= 4.2.7.1) + actionpack (= 4.2.7.1) + actionview (= 4.2.7.1) + activejob (= 4.2.7.1) + activemodel (= 4.2.7.1) + activerecord (= 4.2.7.1) + activesupport (= 4.2.7.1) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) + railties (= 4.2.7.1) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -328,22 +330,22 @@ GEM sass-rails (>= 4.0, < 6) rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) + railties (4.2.7.1) + actionpack (= 4.2.7.1) + activesupport (= 4.2.7.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.16.0) + raindrops (0.17.0) rake (11.1.2) rb-fsevent (0.9.7) rb-inotify (0.9.7) ffi (>= 0.5.0) redcarpet (3.3.4) ref (2.0.0) - remotipart (1.2.1) + remotipart (1.3.0) request_store (1.3.1) - responders (2.2.0) + responders (2.3.0) railties (>= 4.2.0, < 5.1) rspec (3.4.0) rspec-core (~> 3.4.0) @@ -373,14 +375,14 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.8.1) - ruby_dep (1.3.1) + ruby_dep (1.4.0) rubycas-client (2.3.9) activesupport rubyzip (1.2.0) safe_yaml (1.0.4) sass (3.4.22) - sass-rails (5.0.4) - railties (>= 4.0.0, < 5.0) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) @@ -388,7 +390,7 @@ GEM sawyer (0.6.0) addressable (~> 2.3.5) faraday (~> 0.8, < 0.10) - select2-rails (4.0.2) + select2-rails (4.0.3) thor (~> 0.14) shellany (0.0.1) shoulda-matchers (3.1.1) @@ -396,23 +398,23 @@ GEM simple_form (3.2.1) actionpack (> 4, < 5.1) activemodel (> 4, < 5.1) - simplecov (0.11.2) + simplecov (0.12.0) docile (~> 1.1.0) - json (~> 1.8) + json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) slop (3.6.0) - spring (1.7.1) + spring (1.7.2) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.6.0) + sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.4) + sprockets-rails (3.2.0) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sshkit (1.10.0) + sshkit (1.11.3) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) therubyracer (0.12.2) @@ -424,19 +426,19 @@ GEM rack (~> 1.0) thor (0.19.1) thread_safe (0.3.5) - tilt (2.0.4) + tilt (2.0.5) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (3.0.0) + uglifier (3.0.2) execjs (>= 0.3.0, < 3) - unicode-display_width (1.0.5) + unicode-display_width (1.1.1) unicorn (5.1.0) kgio (~> 2.6) raindrops (~> 0.7) uniform_notifier (1.10.0) warden (1.2.6) rack (>= 1.0) - whenever (0.9.4) + whenever (0.9.7) chronic (>= 0.6.3) xpath (2.0.0) nokogiri (~> 1.3) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 3af940e2c..31226c6b5 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AnnouncementsController < ApplicationController load_and_authorize_resource before_action :set_current_announcement, only: [:edit, :update, :destroy] diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 86572b6e0..ee158f255 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. diff --git a/app/controllers/blackouts_controller.rb b/app/controllers/blackouts_controller.rb index 1bbca5513..1233d61c8 100644 --- a/app/controllers/blackouts_controller.rb +++ b/app/controllers/blackouts_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class BlackoutsController < ApplicationController load_and_authorize_resource before_action :set_current_blackout, diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index c8c9a7a5b..23032d3af 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable ClassLength class CatalogController < ApplicationController helper ReservationsHelper # for request_text diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index a99bce7ab..02b7be732 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CategoriesController < ApplicationController load_and_authorize_resource decorates_assigned :category diff --git a/app/controllers/concerns/calendarable.rb b/app/controllers/concerns/calendarable.rb index f305d5c82..316331b30 100644 --- a/app/controllers/concerns/calendarable.rb +++ b/app/controllers/concerns/calendarable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ## # This concern adds a monthly calendar view of reservations for a given resource # to a controller. It can be used to provide a standalone view with the diff --git a/app/controllers/contact_controller.rb b/app/controllers/contact_controller.rb index 2625b375d..45d44642a 100644 --- a/app/controllers/contact_controller.rb +++ b/app/controllers/contact_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ContactController < ApplicationController skip_before_action :authenticate_user!, unless: :guests_disabled? diff --git a/app/controllers/equipment_items_controller.rb b/app/controllers/equipment_items_controller.rb index 8a8dfe9d4..7c28c24b5 100644 --- a/app/controllers/equipment_items_controller.rb +++ b/app/controllers/equipment_items_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable Metrics/ClassLength class EquipmentItemsController < ApplicationController load_and_authorize_resource diff --git a/app/controllers/equipment_models_controller.rb b/app/controllers/equipment_models_controller.rb index d8ad11e93..1991dc0a9 100644 --- a/app/controllers/equipment_models_controller.rb +++ b/app/controllers/equipment_models_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable ClassLength class EquipmentModelsController < ApplicationController layout 'application_with_sidebar', only: :show diff --git a/app/controllers/import_equipment_controller.rb b/app/controllers/import_equipment_controller.rb index b5cd59010..576faf242 100644 --- a/app/controllers/import_equipment_controller.rb +++ b/app/controllers/import_equipment_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ImportEquipmentController < ApplicationController include CsvImport include EquipmentImport diff --git a/app/controllers/import_users_controller.rb b/app/controllers/import_users_controller.rb index 3cb6b7b0b..0eb90c992 100644 --- a/app/controllers/import_users_controller.rb +++ b/app/controllers/import_users_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ImportUsersController < ApplicationController include CsvImport helper UsersHelper diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 078b6a535..1d6e9e069 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ReportsController < ApplicationController authorize_resource class: false MODEL_COLUMNS = [['Total', :all, :count], diff --git a/app/controllers/requirements_controller.rb b/app/controllers/requirements_controller.rb index 1a0f4e307..1bf83da57 100644 --- a/app/controllers/requirements_controller.rb +++ b/app/controllers/requirements_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class RequirementsController < ApplicationController load_and_authorize_resource before_action :set_current_requirement, diff --git a/app/controllers/reservations_controller.rb b/app/controllers/reservations_controller.rb index 5d5d65c06..17cf14640 100644 --- a/app/controllers/reservations_controller.rb +++ b/app/controllers/reservations_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable ClassLength class ReservationsController < ApplicationController load_and_authorize_resource diff --git a/app/controllers/status_controller.rb b/app/controllers/status_controller.rb index cbbef21e1..a85818b80 100644 --- a/app/controllers/status_controller.rb +++ b/app/controllers/status_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class StatusController < ActionController::Base def index render text: 'Application is running.' diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 69bb2dacf..735ab9aff 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable ClassLength class UsersController < ApplicationController load_and_authorize_resource diff --git a/app/decorators/application_decorator.rb b/app/decorators/application_decorator.rb index 113ae573a..6c4b596ad 100644 --- a/app/decorators/application_decorator.rb +++ b/app/decorators/application_decorator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class ApplicationDecorator < Draper::Decorator include Draper::LazyHelpers diff --git a/app/decorators/category_decorator.rb b/app/decorators/category_decorator.rb index 76fc3779e..022727dc7 100644 --- a/app/decorators/category_decorator.rb +++ b/app/decorators/category_decorator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CategoryDecorator < ApplicationDecorator delegate_all diff --git a/app/decorators/equipment_item_decorator.rb b/app/decorators/equipment_item_decorator.rb index b30e0883f..0de51ed71 100644 --- a/app/decorators/equipment_item_decorator.rb +++ b/app/decorators/equipment_item_decorator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class EquipmentItemDecorator < ApplicationDecorator delegate_all diff --git a/app/decorators/equipment_model_decorator.rb b/app/decorators/equipment_model_decorator.rb index af1bc1a51..9eb993b1c 100644 --- a/app/decorators/equipment_model_decorator.rb +++ b/app/decorators/equipment_model_decorator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class EquipmentModelDecorator < ApplicationDecorator delegate_all diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb index beb2d0393..915b730f5 100644 --- a/app/helpers/announcements_helper.rb +++ b/app/helpers/announcements_helper.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true module AnnouncementsHelper end diff --git a/app/helpers/app_configs_helper.rb b/app/helpers/app_configs_helper.rb index 52aada6a7..598ec19f6 100644 --- a/app/helpers/app_configs_helper.rb +++ b/app/helpers/app_configs_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AppConfigsHelper def current_favicon_and_options return unless @app_configs.favicon.present? diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2c99e4b19..c0238bf93 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Methods added to this helper will be available to all templates in the # application. module ApplicationHelper diff --git a/app/helpers/categories_helper.rb b/app/helpers/categories_helper.rb index e06f31554..63fb7dc1e 100644 --- a/app/helpers/categories_helper.rb +++ b/app/helpers/categories_helper.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true module CategoriesHelper end diff --git a/app/helpers/contact_helper.rb b/app/helpers/contact_helper.rb index 83d146d8c..ff8ae084e 100644 --- a/app/helpers/contact_helper.rb +++ b/app/helpers/contact_helper.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true module ContactHelper end diff --git a/app/helpers/equipment_items_helper.rb b/app/helpers/equipment_items_helper.rb index 43f35a8de..73f70e318 100644 --- a/app/helpers/equipment_items_helper.rb +++ b/app/helpers/equipment_items_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module EquipmentItemsHelper def add_equipment_item_link(name) # TODO: link_to_function is deprecated and this can probably be removed diff --git a/app/helpers/equipment_models_helper.rb b/app/helpers/equipment_models_helper.rb index 1fd3c2e0f..9e8f420bd 100644 --- a/app/helpers/equipment_models_helper.rb +++ b/app/helpers/equipment_models_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module EquipmentModelsHelper def evaluate_img_presence(equipment_model) if equipment_model.photo.exists? diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb index d55813b90..020c7bbfe 100644 --- a/app/helpers/layout_helper.rb +++ b/app/helpers/layout_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # These helper methods can be called in your template to set variables to be # used in the layout # This module should be included in all views globally, diff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rb index 07ac2e2ab..6ad98a33f 100644 --- a/app/helpers/reports_helper.rb +++ b/app/helpers/reports_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ReportsHelper require 'csv' def generate_report_csv_helper(table, name = 'Reservation Set') diff --git a/app/helpers/reservations_helper.rb b/app/helpers/reservations_helper.rb index 1c6fd44b6..3a6df5f43 100644 --- a/app/helpers/reservations_helper.rb +++ b/app/helpers/reservations_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ReservationsHelper def filter_message(set, source, filter, view_all) if view_all diff --git a/app/helpers/user_mailer_helper.rb b/app/helpers/user_mailer_helper.rb index f773c7e45..2820b01e6 100644 --- a/app/helpers/user_mailer_helper.rb +++ b/app/helpers/user_mailer_helper.rb @@ -1,17 +1,57 @@ +# frozen_string_literal: true module UserMailerHelper + VARIABLES = { '@user@' => :reserver, + '@reservation_id@' => :reservation_id, + '@department_name@' => :dept_name, + '@equipment_list@' => :equipment_list, + '@return_date@' => :return_date, + '@start_date@' => :start_date, + '@late_fee@' => :late_fee, + '@replacement_fee@' => :replacement_fee, + '@tos@' => :tos }.freeze + def replace_variables(body) return '' if body.nil? - body.gsub!('@user@', @reservation.reserver.name) - body.gsub!('@reservation_id@', @reservation.id.to_s) - body.gsub!('@department_name@', @app_configs.department_name) - body.gsub!('@equipment_list@', @reservation.equipment_model.name) - body.gsub!('@return_date@', @reservation.due_date.to_s(:long)) - body.gsub!('@start_date@', @reservation.start_date.to_s(:long)) - body.gsub!('@late_fee@', - number_to_currency(@reservation.equipment_model.late_fee)) - body.gsub!('@replacement_fee@', - number_to_currency(@reservation.equipment_model.replacement_fee)) - body.gsub!('@tos@', @app_configs.terms_of_service) - body + body.dup.tap do |m| + VARIABLES.each { |variable, method| m.gsub!(variable, send(method)) } + end + end + + private + + def reserver + @reservation.reserver.name + end + + def reservation_id + @reservation.id.to_s + end + + def dept_name + @app_configs.department_name + end + + def equipment_list + @reservation.equipment_model.name + end + + def return_date + @reservation.due_date.to_s(:long) + end + + def start_date + @reservation.start_date.to_s(:long) + end + + def late_fee + number_to_currency(@reservation.equipment_model.late_fee) + end + + def replacement_fee + number_to_currency(@reservation.equipment_model.replacement_fee) + end + + def tos + @app_configs.terms_of_service end end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 3801c4eb2..99a1c2a5d 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module UsersHelper def active_tab(key) return 'active' if key == :current_equipment diff --git a/app/inputs/deleted_input.rb b/app/inputs/deleted_input.rb index 635bd30d4..077a99c98 100644 --- a/app/inputs/deleted_input.rb +++ b/app/inputs/deleted_input.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class DeletedInput < SimpleForm::Inputs::BooleanInput def input build_check_box diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index 420c95d8e..7c189875a 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AdminMailer < ActionMailer::Base add_template_helper(ApplicationHelper) default from: "no-reply@#{ActionMailer::Base.default_url_options[:host]}" diff --git a/app/mailers/notifications_mailer.rb b/app/mailers/notifications_mailer.rb index 783a1bcf5..5a6b84503 100644 --- a/app/mailers/notifications_mailer.rb +++ b/app/mailers/notifications_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class NotificationsMailer < ActionMailer::Base def new_message(message) @message = message diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 73d977ea6..b130a63bb 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class UserMailer < ActionMailer::Base # Workaround so that RSpec start-up doesn't fail. # TODO: Have RSpec initialize AppConfig with configuration. diff --git a/app/models/announcement.rb b/app/models/announcement.rb index d94d330b2..3be2c0f9d 100644 --- a/app/models/announcement.rb +++ b/app/models/announcement.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Announcement < ActiveRecord::Base validates :message, :ends_at, diff --git a/app/models/app_config.rb b/app/models/app_config.rb index 41c359dab..eb52e28a6 100644 --- a/app/models/app_config.rb +++ b/app/models/app_config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class AppConfig < ActiveRecord::Base has_attached_file :favicon, url: '/system/:attachment/:id/:style/favicon.:extension' diff --git a/app/models/blackout.rb b/app/models/blackout.rb index 2f097b801..2e8d9d514 100644 --- a/app/models/blackout.rb +++ b/app/models/blackout.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Blackout < ActiveRecord::Base attr_accessor :days # needed for days of the week checkboxes in new_recurring diff --git a/app/models/cart.rb b/app/models/cart.rb index c3cd3e034..e2b3b1c4f 100644 --- a/app/models/cart.rb +++ b/app/models/cart.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Cart # rubocop:disable ClassLength include ActiveModel::Validations include CartValidations diff --git a/app/models/cart_validations.rb b/app/models/cart_validations.rb index bad40ba3b..942b64dca 100644 --- a/app/models/cart_validations.rb +++ b/app/models/cart_validations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable ModuleLength module CartValidations # These validation methods were carefully written to use as few database diff --git a/app/models/category.rb b/app/models/category.rb index fe03e3f92..2498728ba 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Category < ActiveRecord::Base include Searchable searchable_on(:name) diff --git a/app/models/checkin_procedure.rb b/app/models/checkin_procedure.rb index b4c50853f..167d74ca4 100644 --- a/app/models/checkin_procedure.rb +++ b/app/models/checkin_procedure.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CheckinProcedure < ActiveRecord::Base belongs_to :equipment_model end diff --git a/app/models/checkout_procedure.rb b/app/models/checkout_procedure.rb index 89a74a77b..137aae694 100644 --- a/app/models/checkout_procedure.rb +++ b/app/models/checkout_procedure.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class CheckoutProcedure < ActiveRecord::Base belongs_to :equipment_model end diff --git a/app/models/concerns/linkable.rb b/app/models/concerns/linkable.rb index 489c44c07..9a69fede1 100644 --- a/app/models/concerns/linkable.rb +++ b/app/models/concerns/linkable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Linkable extend ActiveSupport::Concern include Rails.application.routes.url_helpers diff --git a/app/models/equipment_item.rb b/app/models/equipment_item.rb index 3f6880c95..dae64b05e 100644 --- a/app/models/equipment_item.rb +++ b/app/models/equipment_item.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class EquipmentItem < ActiveRecord::Base include Linkable include Searchable diff --git a/app/models/equipment_model.rb b/app/models/equipment_model.rb index fa04a98f8..2cba8ad35 100644 --- a/app/models/equipment_model.rb +++ b/app/models/equipment_model.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable ClassLength class EquipmentModel < ActiveRecord::Base include ApplicationHelper diff --git a/app/models/message.rb b/app/models/message.rb index 9e282dc76..6677ed0e3 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Message include ActiveModel::Validations include ActiveModel::Conversion diff --git a/app/models/report.rb b/app/models/report.rb index 8d2449fe1..64d8b8e7f 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Report attr_accessor :columns, :row_item_type, :rows DEFAULT_COLUMNS = [['Total', :all, :count], diff --git a/app/models/requirement.rb b/app/models/requirement.rb index 326315cf8..5ec89fa96 100644 --- a/app/models/requirement.rb +++ b/app/models/requirement.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Requirement < ActiveRecord::Base has_and_belongs_to_many :equipment_models # This join table associates users with the requirements that they have diff --git a/app/models/reservation_validations.rb b/app/models/reservation_validations.rb index 8fec5060f..dcec67a53 100644 --- a/app/models/reservation_validations.rb +++ b/app/models/reservation_validations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ReservationValidations ## Validations ## diff --git a/app/models/user.rb b/app/models/user.rb index 259707f34..de0e1d285 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'net/ldap' # rubocop:disable ClassLength diff --git a/app/queries/query_base.rb b/app/queries/query_base.rb index a5a7274f5..2c8d10f02 100644 --- a/app/queries/query_base.rb +++ b/app/queries/query_base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class QueryBase class << self delegate :call, to: :new diff --git a/app/queries/reservations/checkoutable_query.rb b/app/queries/reservations/checkoutable_query.rb index 37eba9cdf..2793f656d 100644 --- a/app/queries/reservations/checkoutable_query.rb +++ b/app/queries/reservations/checkoutable_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class CheckoutableQuery < Reservations::ReservationsQueryBase def call diff --git a/app/queries/reservations/consecutive_with_query.rb b/app/queries/reservations/consecutive_with_query.rb index 80fa52d9a..9f6d92291 100644 --- a/app/queries/reservations/consecutive_with_query.rb +++ b/app/queries/reservations/consecutive_with_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class ConsecutiveWithQuery < Reservations::ReservationsQueryBase def call(start_date, due_date) diff --git a/app/queries/reservations/for_cat_query.rb b/app/queries/reservations/for_cat_query.rb index 62b11a8cc..6848ee93c 100644 --- a/app/queries/reservations/for_cat_query.rb +++ b/app/queries/reservations/for_cat_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class ForCatQuery < Reservations::ReservationsQueryBase def call(cat_id) diff --git a/app/queries/reservations/future_query.rb b/app/queries/reservations/future_query.rb index de3a2a6f0..37c3bc837 100644 --- a/app/queries/reservations/future_query.rb +++ b/app/queries/reservations/future_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class FutureQuery < Reservations::ReservationsQueryBase def call diff --git a/app/queries/reservations/notes_unsent_query.rb b/app/queries/reservations/notes_unsent_query.rb index ebab4991a..95afb1108 100644 --- a/app/queries/reservations/notes_unsent_query.rb +++ b/app/queries/reservations/notes_unsent_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class NotesUnsentQuery < Reservations::ReservationsQueryBase def call diff --git a/app/queries/reservations/overlaps_with_date_range_query.rb b/app/queries/reservations/overlaps_with_date_range_query.rb index a1f89db87..9d0808dd1 100644 --- a/app/queries/reservations/overlaps_with_date_range_query.rb +++ b/app/queries/reservations/overlaps_with_date_range_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class OverlapsWithDateRangeQuery < Reservations::ReservationsQueryBase def call(start_date, end_date) diff --git a/app/queries/reservations/reservations_query_base.rb b/app/queries/reservations/reservations_query_base.rb index d95d8d085..728410683 100644 --- a/app/queries/reservations/reservations_query_base.rb +++ b/app/queries/reservations/reservations_query_base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class ReservationsQueryBase < QueryBase def initialize(relation = Reservation.all) diff --git a/app/queries/reservations/starts_on_days_query.rb b/app/queries/reservations/starts_on_days_query.rb index 1a9ffe14a..dcadae576 100644 --- a/app/queries/reservations/starts_on_days_query.rb +++ b/app/queries/reservations/starts_on_days_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class StartsOnDaysQuery < Reservations::ReservationsQueryBase def call(start_date, end_date) diff --git a/app/queries/reservations/upcoming_query.rb b/app/queries/reservations/upcoming_query.rb index bc552d09a..8eff73202 100644 --- a/app/queries/reservations/upcoming_query.rb +++ b/app/queries/reservations/upcoming_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Reservations class UpcomingQuery < Reservations::ReservationsQueryBase def call diff --git a/config/boot.rb b/config/boot.rb index 6b750f00b..cdaa151c7 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/deploy/production.rb b/config/deploy/production.rb index ea76f651a..788de68ab 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Simple Role Syntax # ================== # Supports bulk-adding hosts to roles, the primary server in each group diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index f61caf04b..e1cd211cd 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Simple Role Syntax # ================== # Supports bulk-adding hosts to roles, the primary server in each group diff --git a/config/environment.rb b/config/environment.rb index 1867de050..1ec1d8598 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Load the rails application require File.expand_path('../application', __FILE__) require 'rails_extensions' diff --git a/config/environments/development.rb b/config/environments/development.rb index 18bf1f562..bf5a91b7e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/ # application.rb diff --git a/config/environments/production.rb b/config/environments/production.rb index 610a3217d..68824533e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in # config/application.rb diff --git a/config/environments/test.rb b/config/environments/test.rb index 87b4ceb3c..c91524f67 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in # config/application.rb. diff --git a/config/initializers/00_devise.rb b/config/initializers/00_devise.rb index ce0289ece..195ad05bf 100644 --- a/config/initializers/00_devise.rb +++ b/config/initializers/00_devise.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 68e54f5d5..72a7e1c9f 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. diff --git a/config/initializers/authentication.rb b/config/initializers/authentication.rb index 52bfd48a2..78ae5861c 100644 --- a/config/initializers/authentication.rb +++ b/config/initializers/authentication.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Check for authentication method and copy data over if necessary (ENV variable # to skip if necessary, skip if migrating from a pre-v4.1.0 DB or no table) unless ENV['SKIP_AUTH_INIT'] || !User.table_exists? || diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index cf74fe3d7..5b98aef49 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -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 diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index ac5f8b663..6e5f50b4b 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. Rails.application.config.action_dispatch.cookies_serializer = :marshal diff --git a/config/initializers/days_of_the_week.rb b/config/initializers/days_of_the_week.rb index 7a13a6d3d..8592d2dc2 100644 --- a/config/initializers/days_of_the_week.rb +++ b/config/initializers/days_of_the_week.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable UselessAssignment def days_of_the_week_long days_of_the_week_long = %w(Sunday, Monday, Tuesday, Wednesday, Thursday, diff --git a/config/initializers/factory_girl.rb b/config/initializers/factory_girl.rb index b95b726df..f70406384 100644 --- a/config/initializers/factory_girl.rb +++ b/config/initializers/factory_girl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'active_support/testing/time_helpers' if defined? FactoryGirl diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4a994e1e7..b7fe1231f 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -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. diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index ac033bf9d..aa7435fbc 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -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 diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb index 3cb6c8e39..823fa72a6 100644 --- a/config/initializers/kaminari_config.rb +++ b/config/initializers/kaminari_config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Kaminari.configure do |config| # config.default_per_page = 25 config.window = 2 diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index dc1899682..6e1d16f02 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -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: diff --git a/config/initializers/new_rails_defaults.rb b/config/initializers/new_rails_defaults.rb index 4f932c7bf..732d5ae05 100644 --- a/config/initializers/new_rails_defaults.rb +++ b/config/initializers/new_rails_defaults.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # These settings change the behavior of Rails 2 apps and will be defaults diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb index b4b5c7835..de0267df1 100644 --- a/config/initializers/rails_admin.rb +++ b/config/initializers/rails_admin.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true RailsAdmin.config do |config| ### Popular gems integration diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 6b7f5655d..32f0c4ffa 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -1,3 +1,4 @@ +# 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. diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 8fb17d56e..a4c748c92 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, diff --git a/config/initializers/setup_mail.rb b/config/initializers/setup_mail.rb index dae786c53..813b0f0a5 100644 --- a/config/initializers/setup_mail.rb +++ b/config/initializers/setup_mail.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.smtp_settings = { diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index c6c394593..b7159ea52 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Use this setup block to configure all options available in SimpleForm. # rubocop:disable Metrics/LineLength SimpleForm.setup do |config| diff --git a/config/initializers/simple_form_bootstrap.rb b/config/initializers/simple_form_bootstrap.rb index e0b5da13d..cbe2c23fd 100644 --- a/config/initializers/simple_form_bootstrap.rb +++ b/config/initializers/simple_form_bootstrap.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'simple_form_extensions' # Use this setup block to configure all options available in SimpleForm. diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 6fffb7137..1fb5ac9b0 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index fd73aaffe..b156538df 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Reservations::Application.routes.draw do root to: 'catalog#index' diff --git a/config/schedule.rb b/config/schedule.rb index 476c671a1..96d133694 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Use this file to easily define all of your cron jobs. # # It's helpful, but not entirely necessary to understand cron before proceeding. diff --git a/config/unicorn.rb b/config/unicorn.rb index 57de9fec8..c551b6f40 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable Rails/Output worker_processes Integer(ENV['WEB_CONCURRENCY'] || 3) timeout 15 diff --git a/db/seeds.rb b/db/seeds.rb index aeda43460..e31e07267 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This script is used to populate the database with preload data. # It does not clear the database - mainly because that would mean deleting your # admin login. All the numbers are pretty arbitrary, and can be changed to suit @@ -75,7 +76,7 @@ IMAGES = Dir.glob(File.join(Rails.root, 'db', 'seed_images', '*')) # Progress bar format string -PROGRESS_STR = '%t: [%B] %P%% | %c / %C | %E'.freeze +PROGRESS_STR = '%t: [%B] %P%% | %c / %C | %E' #-------METHODS diff --git a/lib/activation_helper.rb b/lib/activation_helper.rb index 0a2a90ab0..42bc9db63 100644 --- a/lib/activation_helper.rb +++ b/lib/activation_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActivationHelper def activate_parents(current_item) # Equipment Items have EMs and Categories that may need to be diff --git a/lib/autocomplete.rb b/lib/autocomplete.rb index c07343bb1..e3223bd5e 100644 --- a/lib/autocomplete.rb +++ b/lib/autocomplete.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Autocomplete def get_autocomplete_items(parameters) query = '%' + parameters[:term].downcase + '%' diff --git a/lib/capistrano/tasks/deployment_tasks.rake b/lib/capistrano/tasks/deployment_tasks.rake index cdd6fc5ce..ecd659633 100644 --- a/lib/capistrano/tasks/deployment_tasks.rake +++ b/lib/capistrano/tasks/deployment_tasks.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'capistrano' # configuration tasks diff --git a/lib/csv_export.rb b/lib/csv_export.rb index a469f5ab3..ccea17050 100644 --- a/lib/csv_export.rb +++ b/lib/csv_export.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CsvExport require 'csv' require 'zip' diff --git a/lib/csv_import.rb b/lib/csv_import.rb index b0d3ddf29..11b8de1f1 100644 --- a/lib/csv_import.rb +++ b/lib/csv_import.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CsvImport # method used to convert a csv filepath to an array of objects specified by # the file diff --git a/lib/development_mail_interceptor.rb b/lib/development_mail_interceptor.rb index cf6cb93c1..64227aef8 100644 --- a/lib/development_mail_interceptor.rb +++ b/lib/development_mail_interceptor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # class DevelopmentMailInterceptor # def self.delivering_email(message) # message.subject = "[#{message.to}] #{message.subject}" diff --git a/lib/equipment_import.rb b/lib/equipment_import.rb index d7c2be195..44a7ea5d9 100644 --- a/lib/equipment_import.rb +++ b/lib/equipment_import.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # rubocop:disable ModuleLength module EquipmentImport # IMPORT FUNCTIONS - these are all kinda similar, but we'll write them diff --git a/lib/extras/simple_form_extensions.rb b/lib/extras/simple_form_extensions.rb index ee2e8575f..a4cc8075c 100644 --- a/lib/extras/simple_form_extensions.rb +++ b/lib/extras/simple_form_extensions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ButtonComponents def submit_button(*args, &block) options = args.extract_options! diff --git a/lib/rails_extensions.rb b/lib/rails_extensions.rb index 55a43d064..bb7205bb8 100644 --- a/lib/rails_extensions.rb +++ b/lib/rails_extensions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'date' class Range diff --git a/lib/searchable.rb b/lib/searchable.rb index a15105f41..45c30c282 100644 --- a/lib/searchable.rb +++ b/lib/searchable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Searchable def self.included(base) # rubocop:disable MethodLength def base.searchable_on(*args) diff --git a/lib/tasks/setup_application.rake b/lib/tasks/setup_application.rake index 39b3b82d2..4d01903ba 100644 --- a/lib/tasks/setup_application.rake +++ b/lib/tasks/setup_application.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rake' namespace :app do diff --git a/spec/concerns/linkable_spec.rb b/spec/concerns/linkable_spec.rb index 37b73fe39..7c93fca50 100644 --- a/spec/concerns/linkable_spec.rb +++ b/spec/concerns/linkable_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # based on http://stackoverflow.com/a/20010923/2187922 require 'spec_helper' diff --git a/spec/controllers/announcements_controller_spec.rb b/spec/controllers/announcements_controller_spec.rb index cbf25a9ca..11a013609 100644 --- a/spec/controllers/announcements_controller_spec.rb +++ b/spec/controllers/announcements_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' shared_examples_for 'page success' do diff --git a/spec/controllers/blackouts_controller_spec.rb b/spec/controllers/blackouts_controller_spec.rb index 4f0a03012..1e8ff0434 100644 --- a/spec/controllers/blackouts_controller_spec.rb +++ b/spec/controllers/blackouts_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' shared_examples_for 'page success' do diff --git a/spec/controllers/catalog_controller_spec.rb b/spec/controllers/catalog_controller_spec.rb index 13cc5fd96..56551282a 100644 --- a/spec/controllers/catalog_controller_spec.rb +++ b/spec/controllers/catalog_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe CatalogController, type: :controller do diff --git a/spec/controllers/categories_controller_spec.rb b/spec/controllers/categories_controller_spec.rb index ebc5ec9c1..73aaf0585 100644 --- a/spec/controllers/categories_controller_spec.rb +++ b/spec/controllers/categories_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe CategoriesController, type: :controller do diff --git a/spec/controllers/contact_controller_spec.rb b/spec/controllers/contact_controller_spec.rb index 324ddc03d..1cf2c34c0 100644 --- a/spec/controllers/contact_controller_spec.rb +++ b/spec/controllers/contact_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe ContactController, type: :controller do diff --git a/spec/controllers/import_users_controller_spec.rb b/spec/controllers/import_users_controller_spec.rb index b3d2e5b9e..09d68dba2 100644 --- a/spec/controllers/import_users_controller_spec.rb +++ b/spec/controllers/import_users_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' shared_examples_for 'successful upload' do |filename| diff --git a/spec/controllers/reports_controller_spec.rb b/spec/controllers/reports_controller_spec.rb index cc0410744..298d40553 100644 --- a/spec/controllers/reports_controller_spec.rb +++ b/spec/controllers/reports_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe ReportsController, type: :controller do diff --git a/spec/controllers/requirements_controller_spec.rb b/spec/controllers/requirements_controller_spec.rb index 4c7d1874f..6f559f991 100644 --- a/spec/controllers/requirements_controller_spec.rb +++ b/spec/controllers/requirements_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' # note, these tests are complex in order to test the admin security features diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index b379cd3e1..83a7d9e4f 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' shared_examples_for 'page success' do diff --git a/spec/factories/_sequences.rb b/spec/factories/_sequences.rb index 6346c31a2..ddfcbeedd 100644 --- a/spec/factories/_sequences.rb +++ b/spec/factories/_sequences.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true FactoryGirl.define do sequence :name do |n| "Name#{n}" diff --git a/spec/factories/announcements.rb b/spec/factories/announcements.rb index 0b946ce4f..6cf9a8ef0 100644 --- a/spec/factories/announcements.rb +++ b/spec/factories/announcements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/app_configs.rb b/spec/factories/app_configs.rb index ca4c9f042..20a4af58b 100644 --- a/spec/factories/app_configs.rb +++ b/spec/factories/app_configs.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/blackouts.rb b/spec/factories/blackouts.rb index 81b7b7c59..0ee448442 100644 --- a/spec/factories/blackouts.rb +++ b/spec/factories/blackouts.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/carts.rb b/spec/factories/carts.rb index 052bac025..e8a9a971f 100644 --- a/spec/factories/carts.rb +++ b/spec/factories/carts.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true FactoryGirl.define do factory :cart do reserver_id { FactoryGirl.create(:user).id } diff --git a/spec/factories/categories.rb b/spec/factories/categories.rb index 3b5d44126..a2c1186da 100644 --- a/spec/factories/categories.rb +++ b/spec/factories/categories.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/checkin_procedures.rb b/spec/factories/checkin_procedures.rb index 60e6fde7f..0383814a5 100644 --- a/spec/factories/checkin_procedures.rb +++ b/spec/factories/checkin_procedures.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true FactoryGirl.define do factory :checkin_procedure do equipment_model_id { FactoryGirl.create(:equipment_model).id } diff --git a/spec/factories/checkout_procedures.rb b/spec/factories/checkout_procedures.rb index b4d8c72d2..d2cffd691 100644 --- a/spec/factories/checkout_procedures.rb +++ b/spec/factories/checkout_procedures.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true FactoryGirl.define do factory :checkout_procedure do equipment_model_id { FactoryGirl.create(:equipment_model).id } diff --git a/spec/factories/equipment_items.rb b/spec/factories/equipment_items.rb index 64050d458..fbe9f6736 100644 --- a/spec/factories/equipment_items.rb +++ b/spec/factories/equipment_items.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/equipment_models.rb b/spec/factories/equipment_models.rb index cb93ef93a..4d85cc9cb 100644 --- a/spec/factories/equipment_models.rb +++ b/spec/factories/equipment_models.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/messages.rb b/spec/factories/messages.rb index c031f530e..318d3509c 100644 --- a/spec/factories/messages.rb +++ b/spec/factories/messages.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/requirements.rb b/spec/factories/requirements.rb index 857dac1b6..b79846a3c 100644 --- a/spec/factories/requirements.rb +++ b/spec/factories/requirements.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 0ae080d69..d94d53e72 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do diff --git a/spec/features/announcements_spec.rb b/spec/features/announcements_spec.rb index 7ac788055..ac39d3ab3 100644 --- a/spec/features/announcements_spec.rb +++ b/spec/features/announcements_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Announcements' do diff --git a/spec/features/auth_spec.rb b/spec/features/auth_spec.rb index b3cc259d1..6916fc8db 100644 --- a/spec/features/auth_spec.rb +++ b/spec/features/auth_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Authentication' do diff --git a/spec/features/eq_model_spec.rb b/spec/features/eq_model_spec.rb index 01d15b4d3..a36f5e881 100644 --- a/spec/features/eq_model_spec.rb +++ b/spec/features/eq_model_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Equipment Model views', type: :feature do diff --git a/spec/features/equipment_model_calendar_spec.rb b/spec/features/equipment_model_calendar_spec.rb index 138c42711..f46e53d29 100644 --- a/spec/features/equipment_model_calendar_spec.rb +++ b/spec/features/equipment_model_calendar_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.feature 'Equipment model calendar view' do diff --git a/spec/features/equipment_model_views_spec.rb b/spec/features/equipment_model_views_spec.rb index 4ec564885..f1fb88739 100644 --- a/spec/features/equipment_model_views_spec.rb +++ b/spec/features/equipment_model_views_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Equipment model views' do diff --git a/spec/features/guest_spec.rb b/spec/features/guest_spec.rb index 2782b4cda..07a9c6cf8 100644 --- a/spec/features/guest_spec.rb +++ b/spec/features/guest_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'guest users', type: :feature do diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb index e9ff64214..11a4da062 100644 --- a/spec/features/profile_spec.rb +++ b/spec/features/profile_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'User profile' do diff --git a/spec/features/rails_admin_spec.rb b/spec/features/rails_admin_spec.rb index d622785d8..1dea677f2 100644 --- a/spec/features/rails_admin_spec.rb +++ b/spec/features/rails_admin_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Active Admin', type: :feature do diff --git a/spec/features/reservations_archive_spec.rb b/spec/features/reservations_archive_spec.rb index 484ce0ca4..810de0832 100644 --- a/spec/features/reservations_archive_spec.rb +++ b/spec/features/reservations_archive_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Reservations archiving', type: :feature do diff --git a/spec/features/reservations_spec.rb b/spec/features/reservations_spec.rb index 8ae2c9979..d4e9fbbf0 100644 --- a/spec/features/reservations_spec.rb +++ b/spec/features/reservations_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Reservations', type: :feature do diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb index 0403023d0..ebf1a0899 100644 --- a/spec/features/users_spec.rb +++ b/spec/features/users_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Users', type: :feature do diff --git a/spec/helpers/announcements_helper_spec.rb b/spec/helpers/announcements_helper_spec.rb index 9c700c4a1..cf5b25c8e 100644 --- a/spec/helpers/announcements_helper_spec.rb +++ b/spec/helpers/announcements_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' # Specs in this file have access to a helper object that includes diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 17d5ee4af..7ca515e2b 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe ApplicationHelper, type: :helper do diff --git a/spec/helpers/email_helper_spec.rb b/spec/helpers/email_helper_spec.rb index 0c9383245..e68e62bed 100644 --- a/spec/helpers/email_helper_spec.rb +++ b/spec/helpers/email_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper.rb' def expect_email(email) diff --git a/spec/helpers/user_mailer_helper_spec.rb b/spec/helpers/user_mailer_helper_spec.rb index d56529b72..40a62e988 100644 --- a/spec/helpers/user_mailer_helper_spec.rb +++ b/spec/helpers/user_mailer_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe UserMailerHelper, type: :helper do diff --git a/spec/lib/csv_export_spec.rb b/spec/lib/csv_export_spec.rb index abeb9c1ee..fbaa51afe 100644 --- a/spec/lib/csv_export_spec.rb +++ b/spec/lib/csv_export_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' include CsvExport diff --git a/spec/mailers/admin_mailer_spec.rb b/spec/mailers/admin_mailer_spec.rb index 8bca4169a..3f09f7d41 100644 --- a/spec/mailers/admin_mailer_spec.rb +++ b/spec/mailers/admin_mailer_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' shared_examples_for 'a valid admin email' do diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index 1678363e8..c9f38ad01 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' include EnvHelpers diff --git a/spec/models/announcement_spec.rb b/spec/models/announcement_spec.rb index 22fb6608b..95a626a15 100644 --- a/spec/models/announcement_spec.rb +++ b/spec/models/announcement_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Announcement, type: :model do diff --git a/spec/models/app_config_spec.rb b/spec/models/app_config_spec.rb index 34b564e7c..5989f4bc8 100644 --- a/spec/models/app_config_spec.rb +++ b/spec/models/app_config_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe AppConfig, type: :model do diff --git a/spec/models/blackout_spec.rb b/spec/models/blackout_spec.rb index db967920a..9d8d58cff 100644 --- a/spec/models/blackout_spec.rb +++ b/spec/models/blackout_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Blackout, type: :model do diff --git a/spec/models/cart_spec.rb b/spec/models/cart_spec.rb index f70a6af17..80ba4feb0 100644 --- a/spec/models/cart_spec.rb +++ b/spec/models/cart_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Cart, type: :model do diff --git a/spec/models/category_spec.rb b/spec/models/category_spec.rb index a7352d106..050c34f42 100644 --- a/spec/models/category_spec.rb +++ b/spec/models/category_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Category, type: :model do diff --git a/spec/models/checkin_procedure_spec.rb b/spec/models/checkin_procedure_spec.rb index 9c8010123..f72a8c60e 100644 --- a/spec/models/checkin_procedure_spec.rb +++ b/spec/models/checkin_procedure_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe CheckinProcedure, type: :model do diff --git a/spec/models/checkout_procedure_spec.rb b/spec/models/checkout_procedure_spec.rb index bb027e617..906aca242 100644 --- a/spec/models/checkout_procedure_spec.rb +++ b/spec/models/checkout_procedure_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe CheckoutProcedure, type: :model do diff --git a/spec/models/equipment_item_spec.rb b/spec/models/equipment_item_spec.rb index c27b4e0fd..5a6cb52d8 100644 --- a/spec/models/equipment_item_spec.rb +++ b/spec/models/equipment_item_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'concerns/linkable_spec.rb' diff --git a/spec/models/equipment_model_spec.rb b/spec/models/equipment_model_spec.rb index aeb0bd48a..b88dd1ced 100644 --- a/spec/models/equipment_model_spec.rb +++ b/spec/models/equipment_model_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'concerns/linkable_spec.rb' diff --git a/spec/models/message_spec.rb b/spec/models/message_spec.rb index ecc35aa7d..8d82ec94a 100644 --- a/spec/models/message_spec.rb +++ b/spec/models/message_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Message, type: :model do diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb index d3731f28a..bc54a8f4d 100644 --- a/spec/models/report_spec.rb +++ b/spec/models/report_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Report, type: :model do diff --git a/spec/models/requirement_spec.rb b/spec/models/requirement_spec.rb index 9266d83d7..d4966b980 100644 --- a/spec/models/requirement_spec.rb +++ b/spec/models/requirement_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Requirement, type: :model do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 20439a091..d27deca5c 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'concerns/linkable_spec.rb' include EnvHelpers diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4b7930bbf..e022588f6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'codeclimate-test-reporter' CodeClimate::TestReporter.start # Rspec should submit the result to CodeClimate automatically with each Travis diff --git a/spec/support/app_config_helpers.rb b/spec/support/app_config_helpers.rb index 29e0318d5..d9017ff9a 100644 --- a/spec/support/app_config_helpers.rb +++ b/spec/support/app_config_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module AppConfigHelpers def mock_app_config(**attrs) ac = spy('AppConfig', require_phone: false, **attrs) diff --git a/spec/support/calendarable_spec.rb b/spec/support/calendarable_spec.rb index f3f6cbd48..2f1bc0c7e 100644 --- a/spec/support/calendarable_spec.rb +++ b/spec/support/calendarable_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' shared_examples_for 'calendarable' do |model| diff --git a/spec/support/capybara_form_helper.rb b/spec/support/capybara_form_helper.rb index 8701b03be..f0b8fbf2f 100644 --- a/spec/support/capybara_form_helper.rb +++ b/spec/support/capybara_form_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ## Load code after Capybara # see http://minimul.com/submitting-a-form-without-a-button-using-capybara.html module Capybara diff --git a/spec/support/env_helpers.rb b/spec/support/env_helpers.rb index 03ccad728..0ffb0e8ac 100644 --- a/spec/support/env_helpers.rb +++ b/spec/support/env_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module EnvHelpers # wrapper for modifying the environment variables for specific code # see: https://github.com/ScrappyAcademy/rock_candy diff --git a/spec/support/factory_girl.rb b/spec/support/factory_girl.rb index 4dd2ba6ea..1a81bd3b3 100644 --- a/spec/support/factory_girl.rb +++ b/spec/support/factory_girl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Adds FactoryGirl methods to global context RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods diff --git a/spec/support/feature_helpers.rb b/spec/support/feature_helpers.rb index 035cd4c5b..858b6fb43 100644 --- a/spec/support/feature_helpers.rb +++ b/spec/support/feature_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module FeatureHelpers # make sure we have a working app def app_setup diff --git a/spec/support/shared_contexts/rake.rb b/spec/support/shared_contexts/rake.rb index c86826708..dcb1d1601 100644 --- a/spec/support/shared_contexts/rake.rb +++ b/spec/support/shared_contexts/rake.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # see http://robots.thoughtbot.com/test-rake-tasks-like-a-boss require 'rake' diff --git a/spec/support/warden_setup.rb b/spec/support/warden_setup.rb index 3e836637b..4f4a7b5cc 100644 --- a/spec/support/warden_setup.rb +++ b/spec/support/warden_setup.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Warden test mode for authentication Warden.test_mode!