Skip to content

Commit 67ea1cf

Browse files
author
Stanislav Katkov
committed
unsafe corrections
1 parent 1055376 commit 67ea1cf

File tree

83 files changed

+159
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+159
-11
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AllCops:
1515
# These have been copied from the Rails repo
1616
- test/unit/behaviors/*
1717
# Don't second guess the generated schemas
18-
- test/dummy/db/*schema.rb
18+
- test/dummy/*
1919

2020
Performance:
2121
Exclude:

Appraisals

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
appraise "rails-7" do
24
gem "rails", github: "rails/rails", branch: "7-0-stable"
35
end

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source "https://rubygems.org"
24
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
35

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "bundler/setup"
24

35
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)

app/jobs/solid_cache/expiry_job.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module SolidCache
24
class ExpiryJob < ActiveJob::Base
35
def perform(count, shard: nil, max_age:, max_entries:)

app/models/solid_cache/entry.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module SolidCache
24
class Entry < Record
35
# This is all quite awkward but it achieves a couple of performance aims

app/models/solid_cache/record.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module SolidCache
24
class Record < ActiveRecord::Base
35
NULL_INSTRUMENTER = ActiveSupport::Notifications::Instrumenter.new(ActiveSupport::Notifications::Fanout.new)

bin/irb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
1313
bundle_binstub = File.expand_path("bundle", __dir__)
1414

1515
if File.file?(bundle_binstub)
16-
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
1717
load(bundle_binstub)
1818
else
1919
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.

bin/rails

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
24
# This command will automatically be run when you run "rails" with Rails gems
35
# installed from the root of your application.
46

bin/rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
1313
bundle_binstub = File.expand_path("bundle", __dir__)
1414

1515
if File.file?(bundle_binstub)
16-
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
1717
load(bundle_binstub)
1818
else
1919
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.

0 commit comments

Comments
 (0)