Skip to content

Commit

Permalink
Simplify testing with different versions on Rails
Browse files Browse the repository at this point in the history
* remove Appraisal's gemfiles directory
* don't specify gemfiles for Travis
* use pessimistic operator in Appraisal
* upgrade development gems, use pessimistic operator
  • Loading branch information
Greg Lazarev committed Jun 28, 2013
1 parent 7e1053d commit e075bf0
Show file tree
Hide file tree
Showing 17 changed files with 111 additions and 683 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*.swp
*~
.bundle
Gemfile.lock
bin/
db/*.sqlite3
gemfiles/
log/*.log
pkg
tmp/
16 changes: 0 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,8 @@ rvm:
- 1.9.2
- 1.9.3
- 2.0.0
before_install:
- gem update --system
- gem update bundler
before_script:
- "bundle exec rake db:migrate"
gemfile:
- gemfiles/3.0.20.gemfile
- gemfiles/3.1.11.gemfile
- gemfiles/3.2.12.gemfile
- gemfiles/3.2.13.rc2.gemfile
matrix:
exclude:
- rvm: 2.0.0
gemfile: gemfiles/3.0.20.gemfile
- rvm: 2.0.0
gemfile: gemfiles/3.1.11.gemfile
- rvm: 2.0.0
gemfile: gemfiles/3.2.12.gemfile
branches:
only:
- master
6 changes: 3 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
if RUBY_VERSION >= '2.0'
rails_versions = ['3.2.13.rc2']
rails_versions = ['~> 3.2.13']
else
rails_versions = ['3.0.20', '3.1.11', '3.2.12']
rails_versions = ['~> 3.0.20', '~> 3.1.12', '~> 3.2.13']
end

rails_versions.each do |rails_version|
appraise "#{rails_version}" do
appraise "rails#{rails_version.slice(/\d+\.\d+/)}" do
gem 'rails', rails_version
end
end
140 changes: 70 additions & 70 deletions gemfiles/3.2.12.gemfile.lock → Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
PATH
remote: ../
remote: .
specs:
clearance (1.0.0.rc7)
bcrypt-ruby
email_validator (~> 1.4)
rails (>= 3.0)

GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
actionmailer (3.2.12)
actionpack (= 3.2.12)
Expand Down Expand Up @@ -36,65 +36,66 @@ GEM
activesupport (3.2.12)
i18n (~> 0.6)
multi_json (~> 1.0)
appraisal (0.4.1)
appraisal (0.5.2)
bundler
rake
arel (3.0.2)
aruba (0.4.11)
childprocess (>= 0.2.3)
aruba (0.5.3)
childprocess (>= 0.3.6)
cucumber (>= 1.1.1)
ffi (>= 1.0.11)
rspec (>= 2.7.0)
rspec-expectations (>= 2.7.0)
bcrypt-ruby (3.0.1)
bourne (1.3.0)
mocha (= 0.13.0)
bourne (1.4.0)
mocha (~> 0.13.2)
builder (3.0.4)
capybara (1.1.2)
capybara (2.0.3)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.8)
xpath (~> 1.0.0)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
cucumber (1.2.1)
cucumber (1.3.2)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
cucumber-rails (1.1.1)
capybara (>= 1.1.1)
cucumber (>= 1.1.0)
gherkin (~> 2.12.0)
multi_json (~> 1.3)
cucumber-rails (1.3.1)
capybara (>= 1.1.2)
cucumber (>= 1.2.0)
nokogiri (>= 1.5.0)
database_cleaner (0.8.0)
diff-lcs (1.1.3)
rails (~> 3.0)
database_cleaner (1.0.1)
diff-lcs (1.2.4)
email_validator (1.4.0)
activemodel
erubis (2.7.0)
factory_girl (3.5.0)
factory_girl (4.2.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.5.0)
factory_girl (~> 3.5.0)
factory_girl_rails (4.2.1)
factory_girl (~> 4.2.0)
railties (>= 3.0.0)
ffi (1.3.1)
gherkin (2.11.6)
json (>= 1.7.6)
hike (1.2.1)
i18n (0.6.1)
ffi (1.9.0)
gherkin (2.12.0)
multi_json (~> 1.3)
hike (1.2.3)
i18n (0.6.4)
journey (1.0.4)
json (1.7.7)
json (1.8.0)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.1)
mime-types (1.21)
minitest (4.7.0)
mocha (0.13.0)
mime-types (1.23)
mini_portile (0.5.0)
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.6.0)
nokogiri (1.5.6)
multi_json (1.7.7)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
Expand All @@ -118,65 +119,64 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.3)
rdoc (3.12.1)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.12.2)
rspec-rails (2.12.2)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rspec-rails (2.13.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rubyzip (0.9.9)
selenium-webdriver (2.29.0)
selenium-webdriver (2.33.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
shoulda-matchers (1.2.0)
shoulda-matchers (2.2.0)
activesupport (>= 3.0.0)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
thor (0.17.0)
tilt (1.3.3)
timecop (0.3.5)
treetop (1.4.12)
thor (0.18.1)
tilt (1.4.1)
timecop (0.6.1)
treetop (1.4.14)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
tzinfo (0.3.37)
websocket (1.0.7)
xpath (0.1.4)
xpath (1.0.0)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
appraisal (= 0.4.1)
aruba (= 0.4.11)
bourne (= 1.3.0)
bundler (~> 1.1)
capybara (= 1.1.2)
appraisal (~> 0.5)
aruba (~> 0.5)
bourne (~> 1.4)
bundler (~> 1.3)
capybara (~> 2.0.3)
clearance!
cucumber-rails (= 1.1.1)
database_cleaner (= 0.8.0)
factory_girl_rails (= 3.5.0)
minitest (~> 4.7.0)
rails (= 3.2.12)
rspec-rails (= 2.12.2)
shoulda-matchers (= 1.2.0)
sqlite3 (= 1.3.6)
timecop (= 0.3.5)
cucumber-rails (~> 1.3)
database_cleaner (~> 1.0)
factory_girl_rails (~> 4.2)
rspec (~> 2.13)
rspec-rails (~> 2.13)
shoulda-matchers (~> 2.2)
sqlite3 (~> 1.3)
timecop (~> 0.6)
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Thank you to all the [contributors](https://github.com/thoughtbot/clearance/contributors)!
Thank you to all the [contributors](https://github.com/thoughtbot/clearance/graphs/contributors)!

New for 1.0.0:

Expand Down
14 changes: 5 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,17 @@ require 'appraisal'
require 'clearance/testing/application'
Clearance::Testing::Application.load_tasks

task :default do
if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
exec 'rake spec cucumber'
else
Rake::Task['appraise'].execute
end
end
desc 'Default'
task :default => [:all]

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

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

Cucumber::Rake::Task.new(:cucumber) do |t|
t.fork = true
t.fork = false
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
end
27 changes: 14 additions & 13 deletions clearance.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ Gem::Specification.new do |s|
s.add_dependency 'bcrypt-ruby'
s.add_dependency 'email_validator', '~> 1.4'
s.add_dependency 'rails', '>= 3.0'
s.add_development_dependency 'appraisal', '0.4.1'
s.add_development_dependency 'aruba', '0.4.11'
s.add_development_dependency 'bourne', '1.3.0'
s.add_development_dependency 'bundler', '~> 1.1'
s.add_development_dependency 'capybara', '1.1.2'
s.add_development_dependency 'cucumber-rails', '1.1.1'
s.add_development_dependency 'database_cleaner', '0.8.0'
s.add_development_dependency 'factory_girl_rails', '3.5.0'
s.add_development_dependency 'minitest', '~> 4.7.0'
s.add_development_dependency 'rspec-rails', '2.12.2'
s.add_development_dependency 'shoulda-matchers', '1.2.0'
s.add_development_dependency 'sqlite3', '1.3.6'
s.add_development_dependency 'timecop', '0.3.5'

s.add_development_dependency 'appraisal', '~> 0.5'
s.add_development_dependency 'aruba', '~> 0.5'
s.add_development_dependency 'bourne', '~> 1.4'
s.add_development_dependency 'bundler', '~> 1.3'
s.add_development_dependency 'capybara', '~> 2.0.3'
s.add_development_dependency 'cucumber-rails', '~> 1.3'
s.add_development_dependency 'database_cleaner', '~> 1.0'
s.add_development_dependency 'factory_girl_rails', '~> 4.2'
s.add_development_dependency 'rspec', '~> 2.13'
s.add_development_dependency 'rspec-rails', '~> 2.13'
s.add_development_dependency 'shoulda-matchers', '~> 2.2'
s.add_development_dependency 'sqlite3', '~> 1.3'
s.add_development_dependency 'timecop', '~> 0.6'
end
1 change: 1 addition & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
require 'cucumber/rails/action_controller'
require 'cucumber/rails/application'
require 'cucumber/rails/capybara'
require 'cucumber/rails/database'
require 'cucumber/rails/hooks'
require 'cucumber/rails/world'

Expand Down
7 changes: 0 additions & 7 deletions gemfiles/3.0.20.gemfile

This file was deleted.

Loading

0 comments on commit e075bf0

Please sign in to comment.