Skip to content

Commit

Permalink
Simplify testing with secondary Gemfiles
Browse files Browse the repository at this point in the history
- No "Appraisal" needed
- Simpler Gemfiles
- Move to root directory to be affected by main `.bundle/config` and
  install into `vendor/bundle` by default
  • Loading branch information
mislav committed Oct 6, 2015
1 parent eb086a7 commit da9058d
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 305 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
/*.gem

# Ignore bundler config
/bin
/.bundle
/Gemfile.lock
/Gemfile*.lock

# Ignore autoset environment variables
/.ruby-env

# Ignore all bundler caching
/vendor/cache
/vendor/ruby
/vendor/bundle

# Ignore all tempfiles
/tmp
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.faraday-0.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "faraday", "~> 0.8.8"

gemspec
6 changes: 6 additions & 0 deletions Gemfile.typhoeus-0.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "typhoeus", "~> 0.4.2"
gem "webmock", "~> 1.8.11"

gemspec
6 changes: 0 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ task default: :spec

using_git = File.exist?(File.expand_path('../.git/', __FILE__))

begin
require 'appraisal'
rescue LoadError
warn "Warning: %s" % $! unless ENV['CI']
end

require 'cucumber/rake/task'
Cucumber::Rake::Task.new

Expand Down
29 changes: 0 additions & 29 deletions gemfiles/faraday_old.gemfile

This file was deleted.

118 changes: 0 additions & 118 deletions gemfiles/faraday_old.gemfile.lock

This file was deleted.

29 changes: 0 additions & 29 deletions gemfiles/typhoeus_old.gemfile

This file was deleted.

118 changes: 0 additions & 118 deletions gemfiles/typhoeus_old.gemfile.lock

This file was deleted.

5 changes: 3 additions & 2 deletions script/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ fold() {
}

run() {
[[ "${BUNDLE_GEMFILE##*/}" == Gemfile.* ]] && bundle install
# Save warnings on stderr to a separate file
RUBYOPT="$RUBYOPT -w" "$@" 2> >(tee >(grep 'warning:' >>"$warnings") | grep -v 'warning:')
}
Expand All @@ -72,10 +73,10 @@ export JAVA_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1'

export SPEC_OPTS="--backtrace --profile"

BUNDLE_GEMFILE=gemfiles/typhoeus_old.gemfile fold "typhoeus-old" \
BUNDLE_GEMFILE=Gemfile.typhoeus-0.4 fold "typhoeus-0.4" \
run script/test spec/lib/vcr/library_hooks/typhoeus_0.4_spec.rb

BUNDLE_GEMFILE=gemfiles/faraday_old.gemfile fold "faraday-old" \
BUNDLE_GEMFILE=Gemfile.faraday-0.8 fold "faraday-0.8" \
run script/test spec/lib/vcr/middleware/faraday_spec.rb spec/lib/vcr/library_hooks/faraday_spec.rb \
features/middleware/faraday.feature

Expand Down
1 change: 0 additions & 1 deletion vcr.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "em-http-request"
spec.add_development_dependency "curb"
spec.add_development_dependency "yajl-ruby"
spec.add_development_dependency "appraisal"
spec.add_development_dependency "relish"
spec.add_development_dependency "mime-types"
spec.add_development_dependency "sinatra"
Expand Down

0 comments on commit da9058d

Please sign in to comment.