Skip to content

Commit

Permalink
Merge pull request #34 from FundingCircle/allow-newer-bundler
Browse files Browse the repository at this point in the history
Allow any version of bundler < 3
  • Loading branch information
bliof-fc authored Feb 19, 2021
2 parents 81aadeb + 08fb9f7 commit 80b7e16
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
<<: *defaults
steps:
- &install_packages
run: apk --no-cache add curl git openssh-client
run: apk --no-cache add curl git openssh-client make gcc libc-dev
- checkout
- &restore_gems
restore_cache:
Expand Down
2 changes: 1 addition & 1 deletion hellgrid.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/FundingCircle/hellgrid'
s.license = 'BSD-3-Clause'

s.add_runtime_dependency 'bundler', '>= 1.11.0', '< 2.1'
s.add_runtime_dependency 'bundler', '>= 1.11.0', '< 3'

s.add_development_dependency 'rspec', '~> 3.8.0'
s.add_development_dependency 'simplecov', '~> 0.16.0'
Expand Down
2 changes: 1 addition & 1 deletion lib/hellgrid/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Hellgrid
VERSION = '0.3.4'
VERSION = '0.3.5'
end
14 changes: 11 additions & 3 deletions spec/hellgrid_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
require 'spec_helper'

describe 'bin/hellgrid' do
def with_unbundled_env(&block)
if Bundler.respond_to?(:with_unbundled_env)
Bundler.with_unbundled_env(&block)
else
Bundler.with_clean_env(&block)
end
end

before do
delete_tmp_folder

Expand Down Expand Up @@ -88,7 +96,7 @@
rspec-support | x | 3.0.4
TABLE

Bundler.with_clean_env do
with_unbundled_env do
expect(`cd ~ && #{PROJECT_ROOT}/bin/hellgrid #{PROJECT_ROOT}/spec/tmp`).to eq(expected_result)
end
end
Expand All @@ -106,14 +114,14 @@
rspec-support | x | 3.0.4
TABLE

Bundler.with_clean_env do
with_unbundled_env do
expect(`cd #{PROJECT_ROOT}/spec/tmp && #{PROJECT_ROOT}/bin/hellgrid`).to eq(expected_result)
end
end

context 'when passing -r' do
it 'searches recursively within folders if you flag it to' do
Bundler.with_clean_env do
with_unbundled_env do
expect(`cd #{PROJECT_ROOT} && #{PROJECT_ROOT}/bin/hellgrid -r`.lines.first).to(
include(
'hellgrid',
Expand Down

0 comments on commit 80b7e16

Please sign in to comment.