Skip to content

Commit

Permalink
Upgrade CI to Bundler 2.1.3 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson authored Jan 5, 2020
1 parent 26ac1e4 commit f505c2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ executors:
commands:
bundle_install:
steps:
- run: gem install bundler -v 2.0.2
- run: gem install bundler -v 2.1.3
- run: bundle install --jobs=4 --retry=3

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ rvm:
- 2.6.5
- 2.7.0
- ruby-head
before_install: gem install bundler -v 2.0.2
before_install: gem install bundler -v 2.1.3
script: bundle exec rake test
17 changes: 2 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ end

namespace :bump do
task :bundler do
version = Gemfile.bundler_version
version = Gem.latest_version_for("bundler").to_s
replace_in_file ".circleci/config.yml", /bundler -v (\S+)/ => version
replace_in_file ".travis.yml", /bundler -v (\S+)/ => version
replace_in_file "Gemfile.lock", /^BUNDLED WITH\n\s+([\d\.]+)$/ => version
end

task :ruby do
Expand Down Expand Up @@ -63,20 +64,6 @@ def replace_in_file(path, replacements)
IO.write(path, contents) if contents != orig_contents
end

module Gemfile
class << self
def bundler_version
lock_file[/BUNDLED WITH\n (\S+)$/, 1]
end

private

def lock_file
@_lock_file ||= IO.read("Gemfile.lock")
end
end
end

module RubyVersions
class << self
def lowest_supported
Expand Down

0 comments on commit f505c2b

Please sign in to comment.