Browse files

Clean up Appraisals and Rake

  • Loading branch information...
1 parent 92d2989 commit 49aa449f7b7994bd844cb0598f5dd753895eb6f9 @harlow harlow committed Jul 17, 2013
View
4 .gitignore
@@ -5,5 +5,5 @@ spec/dummy/db/*.sqlite3
spec/dummy/log/*.log
spec/dummy/tmp/
*.swp
-gemfiles/*.lock
-*.gem
+gemfiles/
+*.gem
View
4 .travis.yml
@@ -3,7 +3,3 @@ rvm:
- 1.9.2
- 1.9.3
- 2.0.0
-gemfile:
- - gemfiles/rails_3.1.12.gemfile
- - gemfiles/rails_3.2.13.gemfile
- - gemfiles/rails_4.0.0.gemfile
View
10 Appraisals
@@ -1,14 +1,14 @@
-if RUBY_VERSION >= '1.9.3'
- rails_versions = ['3.2.13', '4.0.0']
+if RUBY_VERSION >= '2.0'
+ rails_versions = ['~> 3.2.13', '~> 4.0.0']
else
- rails_versions = ['3.1.12']
+ rails_versions = ['~> 3.1.12', '~> 3.2.13']
end
rails_versions.each do |rails_version|
- appraise "rails_#{rails_version}" do
+ appraise "rails#{rails_version.slice(/\d+\.\d+/)}" do
gem 'rails', rails_version
- if rails_version == '4.0.0'
+ if rails_version == '~> 4.0.0'
gem 'actionpack-action_caching'
gem 'actionpack-page_caching'
end
View
119 Gemfile.lock
@@ -6,26 +6,23 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- abstract (1.0.0)
- actionpack (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.5.0)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.14)
- rack-test (~> 0.5.7)
- tzinfo (~> 0.3.23)
- activemodel (3.0.10)
- activesupport (= 3.0.10)
- builder (~> 2.1.2)
- i18n (~> 0.5.0)
- activesupport (3.0.10)
- appraisal (0.4.1)
+ actionpack (4.0.0)
+ activesupport (= 4.0.0)
+ builder (~> 3.1.0)
+ erubis (~> 2.7.0)
+ rack (~> 1.5.2)
+ rack-test (~> 0.6.2)
+ activesupport (4.0.0)
+ i18n (~> 0.6, >= 0.6.4)
+ minitest (~> 4.2)
+ multi_json (~> 1.3)
+ thread_safe (~> 0.1)
+ tzinfo (~> 0.3.37)
+ appraisal (0.5.2)
bundler
rake
- builder (2.1.2)
+ atomic (1.1.10)
+ builder (3.1.4)
capybara (2.0.3)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@@ -35,49 +32,64 @@ GEM
xpath (~> 1.0.0)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
- diff-lcs (1.1.3)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- ffi (1.8.1)
- i18n (0.5.0)
+ coderay (1.0.9)
+ columnize (0.3.6)
+ debugger (1.6.1)
+ columnize (>= 0.3.1)
+ debugger-linecache (~> 1.2.0)
+ debugger-ruby_core_source (~> 1.2.3)
+ debugger-linecache (1.2.0)
+ debugger-ruby_core_source (1.2.3)
+ diff-lcs (1.2.4)
+ erubis (2.7.0)
+ ffi (1.9.0)
+ i18n (0.6.4)
+ method_source (0.8.1)
mime-types (1.23)
- multi_json (1.7.3)
- nokogiri (1.5.9)
- rack (1.2.3)
- rack-mount (0.6.14)
- rack (>= 1.0.0)
- rack-test (0.5.7)
+ mini_portile (0.5.1)
+ minitest (4.7.5)
+ multi_json (1.7.7)
+ nokogiri (1.6.0)
+ mini_portile (~> 0.5.0)
+ pry (0.9.12.2)
+ coderay (~> 1.0.5)
+ method_source (~> 0.8)
+ slop (~> 3.4)
+ pry-debugger (0.2.2)
+ debugger (~> 1.3)
+ pry (~> 0.9.10)
+ rack (1.5.2)
+ rack-test (0.6.2)
rack (>= 1.0)
- railties (3.0.10)
- actionpack (= 3.0.10)
- activesupport (= 3.0.10)
+ railties (4.0.0)
+ actionpack (= 4.0.0)
+ activesupport (= 4.0.0)
rake (>= 0.8.7)
- rdoc (~> 3.4)
- thor (~> 0.14.4)
- rake (0.9.2.2)
- rdoc (3.9.4)
- rspec (2.6.0)
- rspec-core (~> 2.6.0)
- rspec-expectations (~> 2.6.0)
- rspec-mocks (~> 2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.6.0)
- rspec-rails (2.6.1)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- railties (~> 3.0)
- rspec (~> 2.6.0)
+ thor (>= 0.18.1, < 2.0)
+ rake (10.1.0)
+ rspec-core (2.14.3)
+ rspec-expectations (2.14.0)
+ diff-lcs (>= 1.1.3, < 2.0)
+ rspec-mocks (2.14.1)
+ rspec-rails (2.14.0)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec-core (~> 2.14.0)
+ rspec-expectations (~> 2.14.0)
+ rspec-mocks (~> 2.14.0)
rubyzip (0.9.9)
- selenium-webdriver (2.32.1)
+ selenium-webdriver (2.33.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
- sqlite3 (1.3.4)
- thor (0.14.6)
- tzinfo (0.3.29)
+ slop (3.4.5)
+ sqlite3 (1.3.7)
+ thor (0.18.1)
+ thread_safe (0.1.0)
+ atomic
+ tzinfo (0.3.37)
websocket (1.0.7)
xpath (1.0.0)
nokogiri (~> 1.3)
@@ -89,5 +101,6 @@ DEPENDENCIES
appraisal
capybara (= 2.0.3)
high_voltage!
+ pry-debugger
rspec-rails
sqlite3
View
21 Rakefile
@@ -1,18 +1,19 @@
+# encoding: utf-8
+
+require 'rubygems'
require 'bundler/setup'
require 'bundler/gem_tasks'
-require 'appraisal'
+require 'rake'
require 'rspec/core/rake_task'
+require 'appraisal'
+
RSpec::Core::RakeTask.new(:spec)
-task :default do |t|
- if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
- exec 'rake spec'
- else
- Rake::Task['appraise'].execute
- end
-end
+desc 'Default'
+task :default => [:all]
-task :appraise => ['appraisal:install'] do |t|
- exec 'rake appraisal'
+desc 'Test the engine under all supported Rails versions'
+task all: ['appraisal:install'] do |t|
+ exec 'rake appraisal spec'
end
View
7 gemfiles/rails_3.0.20.gemfile
@@ -1,7 +0,0 @@
-# This file was generated by Appraisal
-
-source "http://rubygems.org"
-
-gem "rails", "3.0.20"
-
-gemspec :path=>"../"
View
7 gemfiles/rails_3.1.12.gemfile
@@ -1,7 +0,0 @@
-# This file was generated by Appraisal
-
-source "http://rubygems.org"
-
-gem "rails", "3.1.12"
-
-gemspec :path=>"../"
View
7 gemfiles/rails_3.2.13.gemfile
@@ -1,7 +0,0 @@
-# This file was generated by Appraisal
-
-source "http://rubygems.org"
-
-gem "rails", "3.2.13"
-
-gemspec :path=>"../"
View
9 gemfiles/rails_4.0.0.gemfile
@@ -1,9 +0,0 @@
-# This file was generated by Appraisal
-
-source "http://rubygems.org"
-
-gem "rails", "4.0.0"
-gem "actionpack-action_caching"
-gem "actionpack-page_caching"
-
-gemspec :path=>"../"
View
5 high_voltage.gemspec
@@ -8,15 +8,16 @@ Gem::Specification.new do |s|
s.email = ['support@thoughtbot.com']
s.homepage = 'http://github.com/thoughtbot/high_voltage'
s.summary = 'Simple static page rendering controller'
- s.description = 'Fire in the disco. Fire in the ... taco bell.'
+ s.description = 'Fire in the disco. Fire in the ... taco bell.'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.add_development_dependency("appraisal")
- s.add_development_dependency("rspec-rails")
s.add_development_dependency("capybara", "= 2.0.3")
+ s.add_development_dependency("pry-debugger")
+ s.add_development_dependency("rspec-rails")
s.add_development_dependency("sqlite3")
end
View
16 spec/constraints/root_route_spec.rb
@@ -3,19 +3,23 @@
describe HighVoltage::Constraints::RootRoute, '.matches?' do
context 'view file exists' do
it 'should return true' do
- request = stub(:path => 'index')
- Dir.stub!(:glob).and_return(['about.html.erb'])
+ request = double(path: 'index')
+ Dir.stub(:glob).and_return(['about.html.erb'])
- HighVoltage::Constraints::RootRoute.matches?(request).should be_true
+ result = HighVoltage::Constraints::RootRoute.matches?(request)
+
+ expect(result).to be_true
end
end
context 'view file does not exist' do
it 'should return false' do
- request = stub(:path => 'index')
- File.stub!(:glob).and_return([])
+ request = double(path: 'index')
+ File.stub(:glob).and_return([])
+
+ result = HighVoltage::Constraints::RootRoute.matches?(request)
- HighVoltage::Constraints::RootRoute.matches?(request).should be_false
+ expect(result).to be_false
end
end
end
View
2 spec/controllers/action_caching_controller_spec.rb
@@ -20,7 +20,7 @@
end
def action_was_cached(page)
- ActionController::Base.cache_store.exist?("views/test.host#{page_path(page)}")
+ ActionController::Base.cache_store.exist?("views/test.host#{page_path(page)}")
end
end
View
1 spec/dummy/config/initializers/secret_key_base.rb
@@ -0,0 +1 @@
+Dummy::Application.config.secret_key_base = '9c0b876ab8f513cc23d354b6d684c88eb9bc5f73ddc8d5843e7c6ac9176c5819adc2620e220980a3cb818de687753f1bfc56c66c4454b74fc7d432813f8e555a'
View
1 spec/spec_helper.rb
@@ -1,6 +1,7 @@
ENV['RAILS_ENV'] = 'test'
require File.expand_path("../dummy/config/environment.rb", __FILE__)
+require 'pry'
require 'rails/test_help'
require 'rspec/rails'
require 'capybara/rails'

0 comments on commit 49aa449

Please sign in to comment.