Skip to content

Commit

Permalink
Loosen the dependency version of Rake (< 1.4.0)
Browse files Browse the repository at this point in the history
This PR suppress the following Ruby 2.7's warnings.

```console
% cd path/to/mime-types/ruby-mime-types
% ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin17]

% bundle exec rake
(snip)

/Users/koic/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rake-12.3.3/lib/rake/file_utils_ext.rb:35:
warning: Using the last argument as keyword parameters is deprecated;
maybe ** should be added to the call
/Users/koic/.rbenv/versions/2.7.0/lib/ruby/2.7.0/fileutils.rb:644:
warning: The called method `rm_rf' is defined here
/Users/koic/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rake-12.3.3/lib/rake/file_utils_ext.rb:35:
warning: Using the last argument as keyword parameters is deprecated;
maybe ** should be added to the call
/Users/koic/.rbenv/versions/2.7.0/lib/ruby/2.7.0/fileutils.rb:622:
warning: The called method `rm_r' is defined here
rm -rf doc
rm -r pkg
/Users/koic/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rake-12.3.3/lib/rake/clean.rb:34:
warning: Using the last argument as keyword parameters is deprecated;
maybe ** should be added to the call
/Users/koic/.rbenv/versions/2.7.0/lib/ruby/2.7.0/fileutils.rb:622:
warning: The called method `rm_r' is defined here
```

For Ruby 2.8.0-dev (Ruby 3.0) the warnings will be `ArgumentError`.

```console
% cd path/to/mime-types/ruby-mime-types
% ruby -v
ruby 2.8.0dev (2020-01-05T05:35:14Z master 54fd50c951) [x86_64-darwin17]

% bundle exec rake
(snip)

rake aborted!
ArgumentError: wrong number of arguments (given 2, expected 1)
/Users/koic/.rbenv/versions/2.8.0-dev/bin/bundle:23:in `load'
/Users/koic/.rbenv/versions/2.8.0-dev/bin/bundle:23:in `<main>'
Tasks: TOP => default => mime-types.gemspec => clobber => clean =>
clobber_docs
(See full trace by running task with --trace)
```
  • Loading branch information
koic authored and halostatue committed Nov 21, 2020
1 parent af7f2ab commit 3bbe313
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec = Hoe.spec 'mime-types' do
extra_dev_deps << ['minitest-focus', '~> 1.0']
extra_dev_deps << ['minitest-bonus-assertions', '~> 3.0']
extra_dev_deps << ['minitest-hooks', '~> 1.4']
extra_dev_deps << ['rake', '>= 10.0', '< 13.0']
extra_dev_deps << ['rake', '>= 10.0', '< 14.0']
extra_dev_deps << ['fivemat', '~> 1.3']
extra_dev_deps << ['minitest-rg', '~> 5.2']

Expand Down
6 changes: 3 additions & 3 deletions mime-types.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<minitest-focus>.freeze, ["~> 1.0"])
s.add_development_dependency(%q<minitest-bonus-assertions>.freeze, ["~> 3.0"])
s.add_development_dependency(%q<minitest-hooks>.freeze, ["~> 1.4"])
s.add_development_dependency(%q<rake>.freeze, [">= 10.0", "< 13.0"])
s.add_development_dependency(%q<rake>.freeze, [">= 10.0", "< 14.0"])
s.add_development_dependency(%q<fivemat>.freeze, ["~> 1.3"])
s.add_development_dependency(%q<minitest-rg>.freeze, ["~> 5.2"])
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.7"])
Expand All @@ -54,7 +54,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<minitest-focus>.freeze, ["~> 1.0"])
s.add_dependency(%q<minitest-bonus-assertions>.freeze, ["~> 3.0"])
s.add_dependency(%q<minitest-hooks>.freeze, ["~> 1.4"])
s.add_dependency(%q<rake>.freeze, [">= 10.0", "< 13.0"])
s.add_dependency(%q<rake>.freeze, [">= 10.0", "< 14.0"])
s.add_dependency(%q<fivemat>.freeze, ["~> 1.3"])
s.add_dependency(%q<minitest-rg>.freeze, ["~> 5.2"])
s.add_dependency(%q<simplecov>.freeze, ["~> 0.7"])
Expand All @@ -73,7 +73,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<minitest-focus>.freeze, ["~> 1.0"])
s.add_dependency(%q<minitest-bonus-assertions>.freeze, ["~> 3.0"])
s.add_dependency(%q<minitest-hooks>.freeze, ["~> 1.4"])
s.add_dependency(%q<rake>.freeze, [">= 10.0", "< 13.0"])
s.add_dependency(%q<rake>.freeze, [">= 10.0", "< 14.0"])
s.add_dependency(%q<fivemat>.freeze, ["~> 1.3"])
s.add_dependency(%q<minitest-rg>.freeze, ["~> 5.2"])
s.add_dependency(%q<simplecov>.freeze, ["~> 0.7"])
Expand Down

0 comments on commit 3bbe313

Please sign in to comment.