Skip to content

Commit

Permalink
Upgrade to Appraisal 1.0
Browse files Browse the repository at this point in the history
The default `rake` task is now the non-appraisal version, which runs
both the specs and features.  To run appraisals, use the appraisal CLI:
`appraisal rake`.

Updated travis config to use appraisal CLI. Updated rails 4.x dependencies
to latest versions.
  • Loading branch information
derekprior committed Apr 15, 2014
1 parent b8a51ad commit 80f230e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ language:
rvm:
- 1.9.3
- 2.0.0
- 2.1.0

before_install:
- "sudo apt-get install ca-certificates"
- "gem update --system"
- 2.1.1

install:
- "travis_retry bundle install"
- "bundle exec appraisal generate"
- "travis_retry bundle exec appraisal install"

before_script:
- "bundle exec rake db:migrate"

script:
- "bundle exec appraisal rake"

branches:
only:
- master
4 changes: 2 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ end

appraise 'rails4.0' do
gem 'jbuilder', '~> 1.2'
gem 'rails', '~> 4.0.3'
gem 'rails', '~> 4.0.4'
gem 'sdoc'
end

appraise 'rails4.1' do
gem 'jbuilder', '~> 2.0'
gem 'rails', '~> 4.1.0.rc1'
gem 'rails', '~> 4.1.0'
gem 'sdoc'
gem 'spring'
end
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
We love pull requests. Here's a quick guide:

1. Fork the repo.
1. Fork the repo and `bundle install`

2. Set up Appraisal, which helps us test against multiple Rails versions:
`rake appraisal:install`.
`bundle exec appraisal install`

3. Run the tests. We only take pull requests with passing tests, and it's great
to know that you have a clean slate: `rake`
to know that you have a clean slate: `bundle exec appraisal rake`

4. Add a test for your change. Only refactoring and documentation changes
require no new tests. If you are adding functionality or fixing a
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

gemspec

gem 'appraisal', '~> 0.5'
gem 'appraisal', '~> 1.0'
gem 'aruba', '~> 0.5'
gem 'bourne', '~> 1.4'
gem 'bundler', '~> 1.3'
Expand Down
7 changes: 4 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ GEM
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
appraisal (0.5.2)
appraisal (1.0.0)
bundler
rake
thor (>= 0.14.0)
arel (4.0.1)
aruba (0.5.4)
childprocess (>= 0.3.6)
Expand Down Expand Up @@ -111,7 +112,7 @@ GEM
activesupport (= 4.0.2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
rake (10.2.2)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
Expand Down Expand Up @@ -159,7 +160,7 @@ PLATFORMS
ruby

DEPENDENCIES
appraisal (~> 0.5)
appraisal (~> 1.0)
aruba (~> 0.5)
bourne (~> 1.4)
bundler (~> 1.3)
Expand Down
14 changes: 5 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
# encoding: utf-8

require 'rubygems'
require 'bundler/setup'
require 'bundler/gem_tasks'

require 'rake'
require 'cucumber/rake/task'
require 'rspec/core/rake_task'
require 'appraisal'

require 'clearance/testing/application'
Clearance::Testing::Application.load_tasks

desc 'Default'
task :default => [:all]

desc 'Test the engine under all supported Rails versions'
task :all => ['appraisal:install'] do |t|
exec 'rake appraisal spec cucumber'
end
desc 'Run the specs and cucumber featrues'
task :all => [:spec, :cucumber]

RSpec::Core::RakeTask.new(:spec)
Clearance::Testing::Application.load_tasks

Cucumber::Rake::Task.new(:cucumber) do |t|
t.fork = false
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
end

RSpec::Core::RakeTask.new(:spec)

0 comments on commit 80f230e

Please sign in to comment.