-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
✨ Support eval_gemfile #248
base: main
Are you sure you want to change the base?
Conversation
I think the test suite was already broken before I made any changes @nickcharlton The new test I wrote for |
spec/acceptance/eval_gemfile_spec.rb
Outdated
end | ||
|
||
def build_gemspec(path = ".") | ||
Dir.mkdir("tmp/stage/#{path}") rescue nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an existing pattern in the tests I merely copied.
spec/acceptance/eval_gemfile_spec.rb
Outdated
end | ||
|
||
def build_modular_gemfile | ||
Dir.mkdir("tmp/stage/gemfiles") rescue nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an existing pattern in the tests I merely copied.
9f19d18
to
05d6d9c
Compare
ping @nickcharlton 🔶 |
I don't think so, see: https://github.com/thoughtbot/appraisal/actions/runs/10999060013, but it might be due to a change in Bundler 😢 |
Interesting. Actually there may only be a few minor failures. From the Ruby 3.4 build:
The difference is there are spaces around the Also there is a semicolon before |
@nickcharlton I tihnk some of the failures were legit broken stuff. I've fixed pretty much everything (and done some other things too) in a new PR: |
@pboling thank you! |
- Support debug for debugging with Ruby >= 2.7 - Support byebug for debugging with Ruby < 2.7
…d matrix - all current jruby and truffleruby are compatible with Ruby 3.1 at minimum, thus are supported by latest bundler
- Use strip_heredoc uniformly in acceptance tests
- Differences in handling of whitespace between versions of Ruby are often seen as minor, and go unnoticed unless tests explicitly test white space as appraisal's test suite does.
05d6d9c
to
774054c
Compare
Rebased on top of the PR that fixes the build (#250) down to Ruby 2.7. |
- Ruby < 2 compat
- Possibly due to bundler issue on MRI and JRuby engines - rubygems/rubygems#8518
774054c
to
c353e3e
Compare
Rebased on my |
desc "Run the given task for all appraisals" | ||
task appraisal: "appraisal:all" | ||
desc("Run the given task for all appraisals") | ||
task(:appraisal => "appraisal:all") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
ARGV.shift | ||
exec "bundle exec appraisal rake #{ARGV.join(' ')}" | ||
exec("bundle exec appraisal rake #{ARGV.join(" ")}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
exec "bundle exec appraisal #{appraisal.name} rake #{ARGV.join(' ')}" | ||
warn("`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " \ | ||
"Please use `appraisal #{appraisal.name} rake #{ARGV.join(" ")}`.") | ||
exec("bundle exec appraisal #{appraisal.name} rake #{ARGV.join(" ")}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
Metrics/LineLength: Line is too long. [84/80]
"Please use `appraisal #{appraisal.name} rake #{ARGV.join(' ')}`." | ||
exec "bundle exec appraisal #{appraisal.name} rake #{ARGV.join(' ')}" | ||
warn("`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " \ | ||
"Please use `appraisal #{appraisal.name} rake #{ARGV.join(" ")}`.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
Metrics/LineLength: Line is too long. [83/80]
warn "`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " + | ||
"Please use `appraisal #{appraisal.name} rake #{ARGV.join(' ')}`." | ||
exec "bundle exec appraisal #{appraisal.name} rake #{ARGV.join(' ')}" | ||
warn("`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [103/80]
@@ -24,30 +31,31 @@ def self.format_string(object, enclosing_object = false) | |||
end | |||
end | |||
|
|||
# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal. | |||
# This means formatting Hashes as Rockets, until support for Ruby 1.8 is dropped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [85/80]
@@ -24,30 +31,31 @@ def self.format_string(object, enclosing_object = false) | |||
end | |||
end | |||
|
|||
# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [97/80]
@@ -15,7 +22,7 @@ def self.format_string(object, enclosing_object = false) | |||
end | |||
|
|||
if enclosing_object | |||
"{ #{items.join(', ')} }" | |||
"{ #{items.join(", ")} }" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
end | ||
|
||
# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal. | ||
# Otherwise, a project would not be able to use Appraisal to test compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [83/80]
Gem::Version.create(Bundler::VERSION) > Gem::Version.create("2.4.22") | ||
end | ||
|
||
# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [97/80]
eval_gemfile
#154