Skip to content

Commit

Permalink
Setup Appraisal
Browse files Browse the repository at this point in the history
This will allow the test suite to be run against v2.2 and v2.3 of
addressable.

Travis CI will use test using both versions automatically.
  • Loading branch information
James Conroy-Finn committed Aug 9, 2012
1 parent 6a53723 commit a893df9
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -21,7 +21,7 @@ pkg
## PROJECT::SPECIFIC
*.gem
.bundle
Gemfile.lock
*emfile.lock
.yardoc
doc/
pkg/*
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -7,6 +7,9 @@ rvm:
- jruby-18mode
- rbx-18mode
- rbx-19mode
gemfile:
- gemfiles/addressable-2.2.gemfile
- gemfiles/addressable-2.3.gemfile
matrix:
allow_failures:
- rvm: rbx-18mode
Expand Down
7 changes: 7 additions & 0 deletions Appraisals
@@ -0,0 +1,7 @@
appraise 'addressable-2.2' do
gem 'addressable', '~> 2.2.8'
end

appraise 'addressable-2.3' do
gem 'addressable', '~> 2.3.2'
end
7 changes: 4 additions & 3 deletions Gemfile
Expand Up @@ -10,6 +10,7 @@ group :development do
gem 'guard-rspec', '~> 1.2'
end

platforms :jruby do
gem 'jruby-openssl', '~> 0.7.7'
end
# Appraisal does not support platforms.
#
# https://github.com/thoughtbot/appraisal/issues/21
gem 'jruby-openssl', '~> 0.7.7', platform: :jruby
3 changes: 2 additions & 1 deletion Rakefile
Expand Up @@ -3,6 +3,8 @@
require 'bundler'
Bundler::GemHelper.install_tasks

require 'appraisal'

namespace :rvm do
desc 'Run specs against 1.8.6, REE, 1.8.7, 1.9.2 and jRuby'
task :specs do
Expand All @@ -25,7 +27,6 @@ RSpec::Core::RakeTask.new(:spec_http_without_webmock) do |t|
t.pattern = 'spec/acceptance/net_http/real_net_http_spec.rb'
end


task :em_http_request_0_x_spec do
sh "EM_HTTP_REQUEST_0_X=true bundle install && bundle exec rspec spec/acceptance/em_http_request/em_http_request_spec.rb" if RUBY_VERSION <= "1.8.7"
end
Expand Down
8 changes: 8 additions & 0 deletions gemfiles/addressable-2.2.gemfile
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org/"

gem "jruby-openssl", "~> 0.7.7", :platform=>:jruby
gem "addressable", "~> 2.2.8"

gemspec :path=>"../"
8 changes: 8 additions & 0 deletions gemfiles/addressable-2.3.gemfile
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org/"

gem "jruby-openssl", "~> 0.7.7", :platform=>:jruby
gem "addressable", "~> 2.3.2"

gemspec :path=>"../"
4 changes: 3 additions & 1 deletion webmock.gemspec
Expand Up @@ -14,10 +14,12 @@ Gem::Specification.new do |s|

s.rubyforge_project = 'webmock'

s.add_dependency 'addressable', '~> 2.2.8'
s.add_dependency 'addressable', '>= 2.2', '< 2.4'
s.add_dependency 'crack', '>=0.1.7'

s.add_development_dependency 'rspec', '~> 2.10'
s.add_development_dependency 'appraisal', '~> 0.4'
s.add_development_dependency 'rack', '~> 1.4'
s.add_development_dependency 'httpclient', '>= 2.2.4'
s.add_development_dependency 'patron', '>= 0.4.18' unless RUBY_PLATFORM =~ /java/
s.add_development_dependency 'em-http-request', '>= 1.0.2'
Expand Down

0 comments on commit a893df9

Please sign in to comment.