Skip to content

Commit

Permalink
Ensure rubocop can run under Ruby 3.1 (capistrano#2099)
Browse files Browse the repository at this point in the history
* Move de dependencies to Gemfile

* Pin psych gem so that rubocop runs on Ruby 3.1
  • Loading branch information
mattbrictson authored Jan 8, 2022
1 parent 27bbaa6 commit 9b32298
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 7 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ source "https://rubygems.org"
# Specify your gem's dependencies in capistrano.gemspec
gemspec

gem "mocha"
gem "rspec"
gem "rspec-core", "~> 3.4.4"

group :cucumber do
# Latest versions of cucumber don't support Ruby < 2.1
# rubocop:disable Bundler/DuplicatedGem
Expand All @@ -12,8 +16,6 @@ group :cucumber do
gem "cucumber"
end
# rubocop:enable Bundler/DuplicatedGem
gem "rspec"
gem "rspec-core", "~> 3.4.4"
end

# Latest versions of net-ssh don't support Ruby < 2.2.6
Expand All @@ -36,7 +38,9 @@ if Gem::Requirement.new("< 2.2").satisfied_by?(Gem::Version.new(RUBY_VERSION))
gem "rake", "< 13.0.0"
end

# We only run danger once on a new-ish ruby; no need to install it otherwise
# We only run danger and rubocop on a new-ish ruby; no need to install them otherwise
if Gem::Requirement.new("> 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
gem "danger"
gem "psych", "< 4" # Ensures rubocop works on Ruby 3.1
gem "rubocop", "0.48.1"
end
4 changes: 0 additions & 4 deletions capistrano.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ Gem::Specification.new do |gem|
gem.add_dependency "i18n"
gem.add_dependency "rake", ">= 10.0.0"
gem.add_dependency "sshkit", ">= 1.9.0"

gem.add_development_dependency "mocha"
gem.add_development_dependency "rspec"
gem.add_development_dependency "rubocop", "0.48.1"
end

0 comments on commit 9b32298

Please sign in to comment.