-
Notifications
You must be signed in to change notification settings - Fork 103
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
Upgrade to new Minitest constant + new dev env + 3.3 bugfix #325
Conversation
Also, change bin/setup to account for changes in the gemspec
Fixes #323 |
|
||
I am responsive on issues, so reach out there if you have a question. | ||
|
||
## How to Do Development |
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.
Clearer docs on how to do local dev for GLI
@@ -92,16 +92,20 @@ Get a more detailed walkthrough on the {main site}[http://davetron5000.github.io | |||
|
|||
== Supported Platforms | |||
|
|||
See `.circleci/config.yml` for the supported rubies, but general we're running tests on the all MRI rubies receiving support, which tends to be the most recent four versions. | |||
See `dx/docker-compose.env` and the variable `RUBY_VERSIONS` for the versions that are supported. This should generally track with the supported version of Ruby from Ruby's maintainers. |
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.
Ref to which versions are supported
@@ -80,6 +80,9 @@ Rake::TestTask.new("test:unit") do |t| | |||
ENV["RUBYOPT"].split(/\s/).each do |opt| | |||
t.ruby_opts << opt | |||
end | |||
if t.ruby_opts.none? { |x| x =~ /^\-W/ } |
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.
Stop showing warnings - some of the code in the tests does stuff you wouldn't want in prod code but I don't feel like fixing it and don't think they are issues. RUBYOPT
can be set explicitly to avoid this behavior
@@ -26,5 +26,5 @@ spec = Gem::Specification.new do |s| | |||
s.add_development_dependency("rdoc") | |||
s.add_development_dependency("rainbow", "~> 1.1", "~> 1.1.1") | |||
s.add_development_dependency("sdoc") | |||
s.add_development_dependency("minitest") | |||
s.add_development_dependency("minitest", "~> 5") |
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.
Clarify the version of minitest
@@ -121,7 +121,7 @@ def self.mk_rakefile(root_dir,dry_run,project_name,create_test_dir) | |||
rd.title = 'Your application title' | |||
end | |||
|
|||
spec = eval(File.read('#{project_name}.gemspec')) | |||
spec = Gem::Specification.load("#{project_name}.gemspec") |
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.
Bug in Ruby 3.3 - not sure why eval(File.read(...))
didn't work but Gem::Specification.load
seems to be the more correct way to do this.
Released as 2.21.2 |
Problem
A few:
MiniTest
toMinitest
like 10 years ago, but compatibilty was removed somewhat recently. Discovered by @rsanheim inCan't build/run tests - due to old ruby version / minitest changes? #323
nonsense, which I absolutely despise.
Solution
CONTRIBUTING.md
for docs).MiniTest
toMinitest
to avoid having to deal with compatibility. That change is 10 years old, so even super old unsupportedRubies should still work.
Gem::Specification.load
to load the spec into theRakefile
.