Skip to content

Commit

Permalink
Merge pull request #344 from ActsAsParanoid/appraisal-frozen-string-l…
Browse files Browse the repository at this point in the history
…iterals

Make Appraisal generate frozen_string_literal comments automatically
  • Loading branch information
mvz authored Aug 11, 2024
2 parents d7aa03f + 1ed6547 commit 37ed6b8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# frozen_string_literal: true

# HACK: This uses odd syntax to make appraisal customization work on newer Rubies.
# See https://github.com/thoughtbot/appraisal/pull/214. Once that one has been
# released, we should use customize_gemfiles instead.
Customize.new heading: <<~HEADING.chomp
frozen_string_literal: true
This file was generated by Appraisal
HEADING

appraise "active_record_61" do
gem "activerecord", "~> 6.1.0", require: "active_record"
gem "activesupport", "~> 6.1.0", require: "active_support"
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/active_record_61.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source "https://rubygems.org"
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/active_record_70.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source "https://rubygems.org"
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/active_record_71.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source "https://rubygems.org"
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/active_record_72.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source "https://rubygems.org"
Expand Down
3 changes: 1 addition & 2 deletions test/legacy/validations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class ParanoidWithSerializedColumn < ActiveRecord::Base
acts_as_paranoid
validates_as_paranoid


if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new('7.2')
if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new("7.2")
serialize :colors, Array
else
serialize :colors
Expand Down

0 comments on commit 37ed6b8

Please sign in to comment.