diff --git a/.rubocop.yml b/.rubocop.yml index e8ce860..55806ec 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -14,8 +14,9 @@ AllCops: Exclude: # These have been copied from the Rails repo - test/unit/behaviors/* - # Don't second guess the generated schemas - - test/dummy/* + # Don't rubocop generated files + - test/dummy/**/* + - bin/* - '**/tmp/**/*' - '**/vendor/**/*' - '**/node_modules/**/*' diff --git a/bin/irb b/bin/irb index e7de6d6..42346ee 100755 --- a/bin/irb +++ b/bin/irb @@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. diff --git a/bin/rails b/bin/rails index d3170a3..41ed1e0 100755 --- a/bin/rails +++ b/bin/rails @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# frozen_string_literal: true - # This command will automatically be run when you run "rails" with Rails gems # installed from the root of your application. diff --git a/bin/rake b/bin/rake index 4eb7d7b..51e10c4 100755 --- a/bin/rake +++ b/bin/rake @@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. diff --git a/bin/rdbg b/bin/rdbg index 5e3b279..0622550 100755 --- a/bin/rdbg +++ b/bin/rdbg @@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. diff --git a/bin/release b/bin/release index f6d54d8..376609d 100755 --- a/bin/release +++ b/bin/release @@ -10,10 +10,6 @@ fi printf "module SolidCache\n VERSION = \"$VERSION\"\nend\n" > ./lib/solid_cache/version.rb bundle -for gemfile in gemfiles/rails_*.gemfile -do - echo BUNDLE_GEMFILE=$gemfile bundle -done git add Gemfile.lock lib/solid_cache/version.rb git commit -m "Bump version for $VERSION" git push diff --git a/bin/rubocop b/bin/rubocop index 369a05b..2b1fa1f 100755 --- a/bin/rubocop +++ b/bin/rubocop @@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. diff --git a/test/dummy/Rakefile b/test/dummy/Rakefile index d2a78aa..9a5ea73 100644 --- a/test/dummy/Rakefile +++ b/test/dummy/Rakefile @@ -1,5 +1,3 @@ -# 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. diff --git a/test/dummy/app/controllers/application_controller.rb b/test/dummy/app/controllers/application_controller.rb index 7944f9f..09705d1 100644 --- a/test/dummy/app/controllers/application_controller.rb +++ b/test/dummy/app/controllers/application_controller.rb @@ -1,4 +1,2 @@ -# frozen_string_literal: true - class ApplicationController < ActionController::Base end diff --git a/test/dummy/app/jobs/application_job.rb b/test/dummy/app/jobs/application_job.rb index bef3959..d394c3d 100644 --- a/test/dummy/app/jobs/application_job.rb +++ b/test/dummy/app/jobs/application_job.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked diff --git a/test/dummy/app/models/application_record.rb b/test/dummy/app/models/application_record.rb index 08dc537..b63caeb 100644 --- a/test/dummy/app/models/application_record.rb +++ b/test/dummy/app/models/application_record.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class ApplicationRecord < ActiveRecord::Base primary_abstract_class end diff --git a/test/dummy/app/views/layouts/application.html.erb b/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index e69de29..0000000 diff --git a/test/dummy/bin/rails b/test/dummy/bin/rails index 22f2d8d..efc0377 100755 --- a/test/dummy/bin/rails +++ b/test/dummy/bin/rails @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# frozen_string_literal: true - APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/test/dummy/bin/rake b/test/dummy/bin/rake index e436ea5..4fbf10b 100755 --- a/test/dummy/bin/rake +++ b/test/dummy/bin/rake @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# frozen_string_literal: true - require_relative "../config/boot" require "rake" Rake.application.run diff --git a/test/dummy/bin/setup b/test/dummy/bin/setup index 25fe477..ec47b79 100755 --- a/test/dummy/bin/setup +++ b/test/dummy/bin/setup @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# frozen_string_literal: true - require "fileutils" # path to your application root. diff --git a/test/dummy/config.ru b/test/dummy/config.ru index 2e03084..4a3c09a 100644 --- a/test/dummy/config.ru +++ b/test/dummy/config.ru @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file is used by Rack-based servers to start the application. require_relative "config/environment" diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb index 8fb82dc..684353c 100644 --- a/test/dummy/config/application.rb +++ b/test/dummy/config/application.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require_relative "boot" require "rails/all" diff --git a/test/dummy/config/boot.rb b/test/dummy/config/boot.rb index 59459d4..116591a 100644 --- a/test/dummy/config/boot.rb +++ b/test/dummy/config/boot.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__) diff --git a/test/dummy/config/environment.rb b/test/dummy/config/environment.rb index 7df99e8..cac5315 100644 --- a/test/dummy/config/environment.rb +++ b/test/dummy/config/environment.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Load the Rails application. require_relative "application" diff --git a/test/dummy/config/environments/development.rb b/test/dummy/config/environments/development.rb index 697e2f4..5ab2549 100644 --- a/test/dummy/config/environments/development.rb +++ b/test/dummy/config/environments/development.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "active_support/core_ext/integer/time" Rails.application.configure do diff --git a/test/dummy/config/environments/test.rb b/test/dummy/config/environments/test.rb index dbf6f9c..eb2f171 100644 --- a/test/dummy/config/environments/test.rb +++ b/test/dummy/config/environments/test.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's @@ -35,7 +33,6 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false - # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/test/dummy/config/initializers/assets.rb b/test/dummy/config/initializers/assets.rb index 101a290..2eeef96 100644 --- a/test/dummy/config/initializers/assets.rb +++ b/test/dummy/config/initializers/assets.rb @@ -1,5 +1,3 @@ -# 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/test/dummy/config/initializers/content_security_policy.rb b/test/dummy/config/initializers/content_security_policy.rb index 691cfa1..54f47cf 100644 --- a/test/dummy/config/initializers/content_security_policy.rb +++ b/test/dummy/config/initializers/content_security_policy.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Define an application-wide content security policy. diff --git a/test/dummy/config/initializers/filter_parameter_logging.rb b/test/dummy/config/initializers/filter_parameter_logging.rb index ca55f95..adc6568 100644 --- a/test/dummy/config/initializers/filter_parameter_logging.rb +++ b/test/dummy/config/initializers/filter_parameter_logging.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Be sure to restart your server when you modify this file. # Configure parameters to be filtered from the log file. Use this to limit dissemination of diff --git a/test/dummy/config/initializers/inflections.rb b/test/dummy/config/initializers/inflections.rb index 6c78420..3860f65 100644 --- a/test/dummy/config/initializers/inflections.rb +++ b/test/dummy/config/initializers/inflections.rb @@ -1,4 +1,3 @@ -# 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/test/dummy/config/initializers/permissions_policy.rb b/test/dummy/config/initializers/permissions_policy.rb index 50bcf4e..00f64d7 100644 --- a/test/dummy/config/initializers/permissions_policy.rb +++ b/test/dummy/config/initializers/permissions_policy.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true # Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # diff --git a/test/dummy/config/puma.rb b/test/dummy/config/puma.rb index ea3b550..daaf036 100644 --- a/test/dummy/config/puma.rb +++ b/test/dummy/config/puma.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match diff --git a/test/dummy/config/routes.rb b/test/dummy/config/routes.rb index 9fb4b63..b26e3b8 100644 --- a/test/dummy/config/routes.rb +++ b/test/dummy/config/routes.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - Rails.application.routes.draw do mount SolidCache::Engine => "/solid_cache" end diff --git a/test/dummy/db/primary_shard_one_schema.rb b/test/dummy/db/primary_shard_one_schema.rb index 8360029..9a00cd4 100644 --- a/test/dummy/db/primary_shard_one_schema.rb +++ b/test/dummy/db/primary_shard_one_schema.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -19,4 +17,5 @@ t.datetime "created_at", null: false t.index ["key"], name: "index_solid_cache_entries_on_key", unique: true end + end diff --git a/test/dummy/db/primary_shard_two_schema.rb b/test/dummy/db/primary_shard_two_schema.rb index 8360029..9a00cd4 100644 --- a/test/dummy/db/primary_shard_two_schema.rb +++ b/test/dummy/db/primary_shard_two_schema.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -19,4 +17,5 @@ t.datetime "created_at", null: false t.index ["key"], name: "index_solid_cache_entries_on_key", unique: true end + end diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 8360029..9a00cd4 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -19,4 +17,5 @@ t.datetime "created_at", null: false t.index ["key"], name: "index_solid_cache_entries_on_key", unique: true end + end diff --git a/test/dummy/db/secondary_shard_one_schema.rb b/test/dummy/db/secondary_shard_one_schema.rb index 8360029..9a00cd4 100644 --- a/test/dummy/db/secondary_shard_one_schema.rb +++ b/test/dummy/db/secondary_shard_one_schema.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -19,4 +17,5 @@ t.datetime "created_at", null: false t.index ["key"], name: "index_solid_cache_entries_on_key", unique: true end + end diff --git a/test/dummy/db/secondary_shard_two_schema.rb b/test/dummy/db/secondary_shard_two_schema.rb index 8360029..9a00cd4 100644 --- a/test/dummy/db/secondary_shard_two_schema.rb +++ b/test/dummy/db/secondary_shard_two_schema.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -19,4 +17,5 @@ t.datetime "created_at", null: false t.index ["key"], name: "index_solid_cache_entries_on_key", unique: true end + end