Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Appraisal generate frozen_string_literal comments automatically #344

Merged
merged 2 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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