From 7677f68ad72e8ecc564ff94f8ca93f83e048b1b4 Mon Sep 17 00:00:00 2001 From: Stefan Wrobel Date: Sun, 18 Jun 2017 12:06:13 -0700 Subject: [PATCH] Update rubocop and fix warnings --- Gemfile | 4 +++- Gemfile.lock | 9 +++++++-- Rakefile | 3 ++- app/channels/application_cable/channel.rb | 1 + app/channels/application_cable/connection.rb | 1 + app/controllers/application_controller.rb | 1 + app/controllers/spots_controller.rb | 3 ++- app/helpers/application_helper.rb | 1 + app/helpers/spots_helper.rb | 1 + app/jobs/application_job.rb | 1 + app/mailers/application_mailer.rb | 1 + app/models/api_request.rb | 1 + app/models/application_record.rb | 1 + app/models/forecast.rb | 3 ++- app/models/msw.rb | 1 + app/models/spitcast.rb | 1 + app/models/spot.rb | 3 ++- app/models/surfline.rb | 3 ++- app/models/surfline_lola.rb | 1 + app/models/surfline_nearshore.rb | 1 + app/models/water_quality.rb | 1 + app/models/water_quality_department.rb | 1 + app/views/spots/index.json.jbuilder | 1 + app/views/spots/show.json.jbuilder | 1 + bin/rubocop | 8 ++++++++ config.ru | 1 + config/application.rb | 3 ++- config/boot.rb | 1 + config/environment.rb | 1 + config/environments/development.rb | 1 + config/environments/production.rb | 1 + config/environments/test.rb | 1 + .../active_record_belongs_to_required_by_default.rb | 1 + config/initializers/assets.rb | 1 + config/initializers/callback_terminator.rb | 1 + config/initializers/cookies_serializer.rb | 1 + config/initializers/filter_parameter_logging.rb | 1 + config/initializers/friendly_id.rb | 5 +++-- config/initializers/request_forgery_protection.rb | 1 + config/initializers/rubocop.rb | 1 + config/initializers/session_store.rb | 1 + config/initializers/wrap_parameters.rb | 1 + config/routes.rb | 2 +- config/spring.rb | 5 +++-- db/seeds.rb | 1 + lib/api_methods.rb | 1 + lib/tasks/cleanup.rake | 1 + lib/tasks/msw.rake | 1 + lib/tasks/spitcast.rake | 1 + lib/tasks/surfline.rake | 1 + lib/tasks/water_quality.rake | 1 + test/controllers/spots_controller_test.rb | 1 + test/models/api_request_test.rb | 1 + test/models/msw_test.rb | 1 + test/models/spitcast_test.rb | 1 + test/models/spot_test.rb | 1 + test/models/surfline_test.rb | 1 + test/models/water_quality_department_test.rb | 1 + test/models/water_quality_test.rb | 1 + 59 files changed, 84 insertions(+), 14 deletions(-) create mode 100755 bin/rubocop diff --git a/Gemfile b/Gemfile index 277bb0d..56d1f1d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,5 @@ # frozen_string_literal: true + source 'https://rubygems.org' ruby "~> #{`cat .ruby-version`.strip}" @@ -30,8 +31,9 @@ group :development do gem 'guard-shell', require: false gem 'invoker', '1.5.1' gem 'rack-toolbar' - gem 'rubocop', '~> 0.47.1' + gem 'rubocop', '~> 0.49.1' gem 'spring' + gem 'spring-commands-rubocop', require: false gem 'terminal-notifier-guard' gem 'web-console', '~> 3.0' end diff --git a/Gemfile.lock b/Gemfile.lock index 5814b25..40198cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -130,6 +130,7 @@ GEM notiffany (0.1.1) nenv (~> 0.1) shellany (~> 0.0) + parallel (1.11.2) parser (2.4.0.0) ast (~> 2.2) pg (0.21.0) @@ -177,7 +178,8 @@ GEM rb-fsevent (0.9.8) rb-inotify (0.9.9) ffi (~> 1.0) - rubocop (0.47.1) + rubocop (0.49.1) + parallel (~> 1.10) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) @@ -199,6 +201,8 @@ GEM slop (3.6.0) spring (2.0.2) activesupport (>= 4.2) + spring-commands-rubocop (0.2.0) + spring (>= 1.0, < 3.0) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -250,9 +254,10 @@ DEPENDENCIES rack-toolbar rails (= 5.1.1) rails_12factor - rubocop (~> 0.47.1) + rubocop (~> 0.49.1) slim-rails spring + spring-commands-rubocop terminal-notifier-guard web-console (~> 3.0) webpacker diff --git a/Rakefile b/Rakefile index 422f3b7..9029aa1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. @@ -12,5 +13,5 @@ if Rails.env.development? || Rails.env.test? t.options = RUBOCOP_OPTS end - task default: [:test, :rubocop] + task default: %i[test rubocop] end diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb index f61c073..2318f88 100644 --- a/app/channels/application_cable/channel.rb +++ b/app/channels/application_cable/channel.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. Action Cable runs in an EventMachine loop that does not support auto reloading. module ApplicationCable class Channel < ActionCable::Channel::Base diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb index 186199f..b4aab50 100644 --- a/app/channels/application_cable/connection.rb +++ b/app/channels/application_cable/connection.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. Action Cable runs in an EventMachine loop that does not support auto reloading. module ApplicationCable class Connection < ActionCable::Connection::Base diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f660d50..1ff0944 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. diff --git a/app/controllers/spots_controller.rb b/app/controllers/spots_controller.rb index 804674a..1823595 100644 --- a/app/controllers/spots_controller.rb +++ b/app/controllers/spots_controller.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true + class SpotsController < ApplicationController - before_action :set_spot, only: [:edit, :update, :destroy] + before_action :set_spot, only: %i[edit update destroy] # GET /spots # GET /spots.json diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 09058f0..3e1b8e2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module ApplicationHelper def height_range(min, max) return unless min && max diff --git a/app/helpers/spots_helper.rb b/app/helpers/spots_helper.rb index 8a5d3b6..105aadd 100644 --- a/app/helpers/spots_helper.rb +++ b/app/helpers/spots_helper.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + module SpotsHelper end diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index 32fe70b..d92ffdd 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + class ApplicationJob < ActiveJob::Base end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 2428900..d84cb6e 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class ApplicationMailer < ActionMailer::Base default from: 'from@example.com' layout 'mailer' diff --git a/app/models/api_request.rb b/app/models/api_request.rb index a2b2ef4..5abb7aa 100644 --- a/app/models/api_request.rb +++ b/app/models/api_request.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + class ApiRequest < ApplicationRecord end diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 767a072..71fbba5 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end diff --git a/app/models/forecast.rb b/app/models/forecast.rb index f546d38..f296682 100644 --- a/app/models/forecast.rb +++ b/app/models/forecast.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class Forecast < ApplicationRecord extend ApiMethods self.abstract_class = true @@ -45,7 +46,7 @@ def forecasted_max(stamps) private def raise_not_implemented_error - raise NotImplementedError, "Subclass should override method '#{caller[0][/`.*'/][1..-2]}'" + raise NotImplementedError, "Subclass should override method '#{caller(0..0).first[/`.*'/][1..-2]}'" end end end diff --git a/app/models/msw.rb b/app/models/msw.rb index f8319ce..07fdc14 100644 --- a/app/models/msw.rb +++ b/app/models/msw.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class Msw < Forecast def avg_height (min_height + max_height) / 2 diff --git a/app/models/spitcast.rb b/app/models/spitcast.rb index 1453356..f3fd774 100644 --- a/app/models/spitcast.rb +++ b/app/models/spitcast.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class Spitcast < Forecast class << self def site_url diff --git a/app/models/spot.rb b/app/models/spot.rb index 135c68a..b24022b 100644 --- a/app/models/spot.rb +++ b/app/models/spot.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true + class Spot < ApplicationRecord extend FriendlyId - friendly_id :name, use: [:slugged, :finders] + friendly_id :name, use: %i[slugged finders] has_many :surfline_nearshores has_many :surfline_lolas diff --git a/app/models/surfline.rb b/app/models/surfline.rb index 9852960..e61657e 100644 --- a/app/models/surfline.rb +++ b/app/models/surfline.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class Surfline < Forecast self.abstract_class = true @@ -78,7 +79,7 @@ def parse_response(_spot, request, responses) spot_data = forecasts[spot_id] # [1..-2] gets all elements except first & last spot_data.keys[1..-2].each_with_index do |tstamp, index| - next unless spot_data[:swell_rating].blank? + next if spot_data[:swell_rating].present? prev_tstamp = spot_data.keys[index] # index is already offset by 1 next_tstamp = spot_data.keys[index + 2] prev_rating = spot_data[prev_tstamp][:swell_rating] diff --git a/app/models/surfline_lola.rb b/app/models/surfline_lola.rb index b1a00c7..72c0c23 100644 --- a/app/models/surfline_lola.rb +++ b/app/models/surfline_lola.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class SurflineLola < Surfline class << self def api_url(spot) diff --git a/app/models/surfline_nearshore.rb b/app/models/surfline_nearshore.rb index eca836c..2a8a1d9 100644 --- a/app/models/surfline_nearshore.rb +++ b/app/models/surfline_nearshore.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class SurflineNearshore < Surfline class << self def api_url(spot) diff --git a/app/models/water_quality.rb b/app/models/water_quality.rb index 0308e2c..712d9b9 100644 --- a/app/models/water_quality.rb +++ b/app/models/water_quality.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class WaterQuality < ApplicationRecord extend ApiMethods diff --git a/app/models/water_quality_department.rb b/app/models/water_quality_department.rb index 61da937..276259e 100644 --- a/app/models/water_quality_department.rb +++ b/app/models/water_quality_department.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class WaterQualityDepartment < ApplicationRecord has_many :water_qualities end diff --git a/app/views/spots/index.json.jbuilder b/app/views/spots/index.json.jbuilder index ce75ce7..ef3c89c 100644 --- a/app/views/spots/index.json.jbuilder +++ b/app/views/spots/index.json.jbuilder @@ -1,4 +1,5 @@ # frozen_string_literal: true + json.array!(@spots) do |spot| json.extract! spot, :id, :name, :lat, :lon, :surfline_id, :msw_id, :spitcast_id, :wunder_id json.url spot_url(spot, format: :json) diff --git a/app/views/spots/show.json.jbuilder b/app/views/spots/show.json.jbuilder index 2c8ade7..1d2aebf 100644 --- a/app/views/spots/show.json.jbuilder +++ b/app/views/spots/show.json.jbuilder @@ -1,2 +1,3 @@ # frozen_string_literal: true + json.extract! @spot, :id, :name, :lat, :lon, :surfline_id, :msw_id, :spitcast_id, :wunder_id, :created_at, :updated_at diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 0000000..eae5e84 --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require 'bundler/setup' +load Gem.bin_path('rubocop', 'rubocop') diff --git a/config.ru b/config.ru index 405d50d..92ef704 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,5 @@ # frozen_string_literal: true + # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) diff --git a/config/application.rb b/config/application.rb index 49f503f..5ee9a05 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require File.expand_path('../boot', __FILE__) require 'rails/all' @@ -15,7 +16,7 @@ class Application < Rails::Application config.time_zone = 'Pacific Time (US & Canada)' - config.autoload_paths += %W(#{config.root}/lib) + config.autoload_paths += %W[#{config.root}/lib] config.force_ssl = true end diff --git a/config/boot.rb b/config/boot.rb index cdaa151..04258c0 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,5 @@ # 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/environment.rb b/config/environment.rb index fcccd33..3fa6621 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Load the Rails application. require File.expand_path('../application', __FILE__) diff --git a/config/environments/development.rb b/config/environments/development.rb index 84055f5..91337a0 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,5 @@ # 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 868df51..44ea371 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,4 +1,5 @@ # 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 2ad5bab..9a4e007 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,5 @@ # 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/active_record_belongs_to_required_by_default.rb b/config/initializers/active_record_belongs_to_required_by_default.rb index 8bcc4f9..9e30b19 100644 --- a/config/initializers/active_record_belongs_to_required_by_default.rb +++ b/config/initializers/active_record_belongs_to_required_by_default.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Require `belongs_to` associations by default. This is a new Rails 5.0 default, diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 9287bcd..678efe9 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,4 +1,5 @@ # 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/callback_terminator.rb b/config/initializers/callback_terminator.rb index 84f7720..50195d6 100644 --- a/config/initializers/callback_terminator.rb +++ b/config/initializers/callback_terminator.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Do not halt callback chains when a callback returns false. This is a new Rails 5.0 default, diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index b5ac1b6..fd2799e 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. # This is a new Rails 5.0 default, so introduced as a config to ensure apps made with earlier versions of Rails aren't affected when upgrading. diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index b7fe123..7a4f47b 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,4 +1,5 @@ # 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/friendly_id.rb b/config/initializers/friendly_id.rb index d9515ff..b9eee6a 100644 --- a/config/initializers/friendly_id.rb +++ b/config/initializers/friendly_id.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # FriendlyId Global Configuration # # Use this to set up shared configuration options for your entire application. @@ -17,8 +18,8 @@ # undesirable to allow as slugs. Edit this list as needed for your app. config.use :reserved - config.reserved_words = %w(new edit index session login logout users admin - stylesheets assets javascripts images) + config.reserved_words = %w[new edit index session login logout users admin + stylesheets assets javascripts images] # ## Friendly Finders # diff --git a/config/initializers/request_forgery_protection.rb b/config/initializers/request_forgery_protection.rb index 1b045a9..0e1994a 100644 --- a/config/initializers/request_forgery_protection.rb +++ b/config/initializers/request_forgery_protection.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Enable origin-checking CSRF mitigation. diff --git a/config/initializers/rubocop.rb b/config/initializers/rubocop.rb index 6790fc4..25ab86a 100644 --- a/config/initializers/rubocop.rb +++ b/config/initializers/rubocop.rb @@ -1,2 +1,3 @@ # frozen_string_literal: true + RUBOCOP_OPTS = ['--rails', '--display-cop-names', '--auto-correct'].freeze diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index b2e1bac..f5dd0ff 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_meta-surf-forecast_session' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 18c3825..2f3c0db 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -1,4 +1,5 @@ # 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 f5c4ae5..52af6d6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ get '/(*path)' => redirect { |_params, req| "https://#{ENV['DOMAIN']}#{req.fullpath}" } if ENV['HOST'].present? end - resources :spots, only: [:index, :show] + resources :spots, only: %i[index show] root to: 'spots#index' end diff --git a/config/spring.rb b/config/spring.rb index 312295f..c5933e4 100644 --- a/config/spring.rb +++ b/config/spring.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true -%w( + +%w[ .ruby-version .rbenv-vars tmp/restart.txt tmp/caching-dev.txt -).each { |path| Spring.watch(path) } +].each { |path| Spring.watch(path) } diff --git a/db/seeds.rb b/db/seeds.rb index 421553d..624c592 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + WaterQualityDepartment.find_or_create_by(code: 'LAPH') do |dept| dept.name = 'Los Angeles County Department of Public Health' dept.url = 'http://www.publichealth.lacounty.gov/phcommon/public/eh/water_quality/beach_grades.cfm' diff --git a/lib/api_methods.rb b/lib/api_methods.rb index d143179..44ae244 100644 --- a/lib/api_methods.rb +++ b/lib/api_methods.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'open-uri' module ApiMethods diff --git a/lib/tasks/cleanup.rake b/lib/tasks/cleanup.rake index efc0ef5..85ae1fd 100644 --- a/lib/tasks/cleanup.rake +++ b/lib/tasks/cleanup.rake @@ -1,4 +1,5 @@ # frozen_string_literal: true + namespace :cleanup do desc 'Remove forecasts that are in the past' task prune_past_forecasts: :environment do diff --git a/lib/tasks/msw.rake b/lib/tasks/msw.rake index 294b961..5c8516e 100644 --- a/lib/tasks/msw.rake +++ b/lib/tasks/msw.rake @@ -1,4 +1,5 @@ # frozen_string_literal: true + namespace :msw do desc 'Update forecast from MagicSeaweed' task update: :environment do diff --git a/lib/tasks/spitcast.rake b/lib/tasks/spitcast.rake index 2f45090..04d22fa 100644 --- a/lib/tasks/spitcast.rake +++ b/lib/tasks/spitcast.rake @@ -1,4 +1,5 @@ # frozen_string_literal: true + namespace :spitcast do desc 'Update forecast from Spitcast' task update: :environment do diff --git a/lib/tasks/surfline.rake b/lib/tasks/surfline.rake index 48ca05c..b7a877f 100644 --- a/lib/tasks/surfline.rake +++ b/lib/tasks/surfline.rake @@ -1,4 +1,5 @@ # frozen_string_literal: true + namespace :surfline do desc 'Update forecast from Surfline' task update: :environment do diff --git a/lib/tasks/water_quality.rake b/lib/tasks/water_quality.rake index a9b9ab6..54d7046 100644 --- a/lib/tasks/water_quality.rake +++ b/lib/tasks/water_quality.rake @@ -1,4 +1,5 @@ # frozen_string_literal: true + namespace :water_quality do desc 'Update forecast from Water Quality Departments' task update: :environment do diff --git a/test/controllers/spots_controller_test.rb b/test/controllers/spots_controller_test.rb index 3ed0fc5..e3631b5 100644 --- a/test/controllers/spots_controller_test.rb +++ b/test/controllers/spots_controller_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class SpotsControllerTest < ActionDispatch::IntegrationTest diff --git a/test/models/api_request_test.rb b/test/models/api_request_test.rb index 93a396d..6de4731 100644 --- a/test/models/api_request_test.rb +++ b/test/models/api_request_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class ApiRequestTest < ActiveSupport::TestCase diff --git a/test/models/msw_test.rb b/test/models/msw_test.rb index 4b16895..7d8bf74 100644 --- a/test/models/msw_test.rb +++ b/test/models/msw_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class MswTest < ActiveSupport::TestCase diff --git a/test/models/spitcast_test.rb b/test/models/spitcast_test.rb index b8adee9..185af6e 100644 --- a/test/models/spitcast_test.rb +++ b/test/models/spitcast_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class SpitcastTest < ActiveSupport::TestCase diff --git a/test/models/spot_test.rb b/test/models/spot_test.rb index b0d15a6..bcbb149 100644 --- a/test/models/spot_test.rb +++ b/test/models/spot_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class SpotTest < ActiveSupport::TestCase diff --git a/test/models/surfline_test.rb b/test/models/surfline_test.rb index 79ec8d4..16027a3 100644 --- a/test/models/surfline_test.rb +++ b/test/models/surfline_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class SurflineTest < ActiveSupport::TestCase diff --git a/test/models/water_quality_department_test.rb b/test/models/water_quality_department_test.rb index 70ccd70..c969134 100644 --- a/test/models/water_quality_department_test.rb +++ b/test/models/water_quality_department_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class WaterQualityDepartmentTest < ActiveSupport::TestCase diff --git a/test/models/water_quality_test.rb b/test/models/water_quality_test.rb index d54f9da..78ac64b 100644 --- a/test/models/water_quality_test.rb +++ b/test/models/water_quality_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'test_helper' class WaterQualityTest < ActiveSupport::TestCase