Skip to content

Commit

Permalink
Merge pull request #52 from grosser/grosser/update
Browse files Browse the repository at this point in the history
update
  • Loading branch information
grosser committed Apr 14, 2018
2 parents f445b29 + 1347df8 commit 10a3847
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ before_install:
- "ruby -e 'print(defined?(JRUBY_VERSION) ? %{jruby-#{JRUBY_VERSION}} : RUBY_VERSION)' > version"
- rvm install 2.0.0
- rvm install 2.1.5
- rvm install jruby-1.7.25
- rvm install jruby-9.1.16.0
- rvm use $(cat version) # install switches versions, so restore

rvm:
Expand All @@ -19,5 +19,9 @@ rvm:
- 2.2
- 2.3
- 2.4
- jruby-1.7.25
- jruby

matrix:
allow_failures:
- rvm: jruby
fast_finish: true
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ source "https://rubygems.org"
gemspec

gem "bump"
gem "rake", "~> 12.2.1" # 12.3 wants ruby 2.0 and jruby 1.7 is ruby 1.9
gem "rake"
gem "rspec", "~>3"
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ PATH
GEM
remote: https://rubygems.org/
specs:
bump (0.5.4)
bump (0.6.0)
diff-lcs (1.3)
rake (12.2.1)
rake (12.3.1)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
Expand All @@ -21,15 +21,15 @@ GEM
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rspec-support (3.7.1)

PLATFORMS
java
ruby

DEPENDENCIES
bump
rake (~> 12.2.1)
rake
rspec (~> 3)
wwtd!

Expand Down
Binary file added spec/rake-12.3.0.gem
Binary file not shown.
2 changes: 1 addition & 1 deletion spec/ruby_versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module RubyVersions
ALL.size == 3 &&
ALL[0] =~ /^\d+\.\d+\.\d+$/ &&
ALL[1] =~ /^\d+\.\d+\.\d+$/ &&
ALL[2] =~ /^jruby-\d+\.\d+\.\d+$/
ALL[2] =~ /^jruby-\d+\.\d+\.\d+(\.\d+)?$/

RUBY_1 = ALL[0]
RUBY_2 = ALL[1]
Expand Down
9 changes: 4 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
require "benchmark"
require "ruby_versions"

# having global BUNDLE_PATH=vendor/bundle breaks a few tests, but should still work fine on CO
SHARED_GEMS_DISABLED = if ENV['CI']
false
else
File.exist?(".bundle/config") && File.read(".bundle/config").include?("BUNDLE_DISABLE_SHARED_GEMS: '1'")
# having global BUNDLE_PATH=vendor/bundle breaks a few tests
# somehow it's not set in travis but it still always generates vendor/bundle
BUNDLE_PATH_USED = !ENV["CI"] && [".bundle/config", File.expand_path("~/.bundle/config")].any? do |file|
File.exist?(file) && File.read(file).include?("BUNDLE_PATH")
end

RSpec.configure do |config|
Expand Down
10 changes: 6 additions & 4 deletions spec/wwtd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def write_default_rakefile
result = wwtd("")
result.should include "bundle install --quiet"
result.should include "\nRAKE: 0.9.2.2\n"
File.exist?("vendor/bundle").should == SHARED_GEMS_DISABLED
File.exist?("vendor/bundle").should == BUNDLE_PATH_USED
end

it "bundles with --deployment if lockfile is committed" do
Expand Down Expand Up @@ -308,7 +308,7 @@ def write_default_rakefile
write_default_gemfile
bundle
wwtd("")
File.exist?(".bundle").should == SHARED_GEMS_DISABLED
File.exist?(".bundle").should == false
end

it "leaves .bundle alone" do
Expand All @@ -321,8 +321,7 @@ def write_default_rakefile

wwtd("")

File.exist?(".bundle").should == true
sh("ls .bundle").should == (SHARED_GEMS_DISABLED ? "config\nfoo\n" : "foo\n")
sh("ls .bundle").should == "foo\n"
end

it "ignores .bundle settings" do
Expand Down Expand Up @@ -457,6 +456,9 @@ def write_default_rakefile
require 'wwtd/tasks'
task(:default) { puts 'YES-IT-WORKS' }
RUBY
FileUtils.mkdir_p("vendor/cache")
FileUtils.cp("#{Bundler.root}/spec/rake-12.3.0.gem", "vendor/cache")
sh "bundle install --local"
end

it "runs normally" do
Expand Down

0 comments on commit 10a3847

Please sign in to comment.