Skip to content
Browse files

Revert "Rework the build to make it more travis-friendly."

This reverts commit 023887f.
  • Loading branch information...
1 parent daef552 commit 9fde58726afbd0e41967a1193f37902679f07707 @dchelimsky dchelimsky committed Apr 24, 2011
View
3 .gitignore
@@ -6,7 +6,8 @@ vendor
*.gem
Gemfile
Gemfile.lock
-*.lock
+gemfiles/*.lock
+gemfiles/bin/*
bin
.rvmrc
*.rbc
View
4 .travis.yml
@@ -3,5 +3,9 @@ rvm:
- 1.8.7
- 1.9.1
- 1.9.2
+gemfile:
+ - gemfiles/rails-3.0.6
+ - gemfiles/rails-3-0-stable
+ - gemfiles/rails-master
env:
- USE_GIT_REPOS=true
View
5 Gemfile-rails-3.0.0
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.0"
View
5 Gemfile-rails-3.0.1
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.1"
View
5 Gemfile-rails-3.0.2
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.2"
View
5 Gemfile-rails-3.0.3
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.3"
View
5 Gemfile-rails-3.0.4
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.4"
View
5 Gemfile-rails-3.0.5
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.5"
View
5 Gemfile-rails-3.0.6
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.6"
View
5 Gemfile-rails-3.0.7
@@ -1,5 +0,0 @@
-load File.expand_path("../Gemfile-base", __FILE__)
-
-extend GemfileBase
-
-gem "rails", "3.0.7"
View
40 Rakefile
@@ -1,6 +1,34 @@
-ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile-rails-3.0.7", __FILE__)
-# puts "Using gemfile: #{ENV["BUNDLE_GEMFILE"].gsub(Pathname.new(__FILE__).dirname.to_s,'').sub(/^\//,'')}"
+unless File.exist?("./.gemfile")
+ warn <<-MESSAGE
+=============================================================================
+You must set the version of rails you want to run against. The simplest way
+to accomplish this is to install thor (if you don't already have it) and run:
+ thor rails:use 3.0.6
+
+You can use any of the following versions/branches:
+
+ 3.0.0 .. 3.0.6
+ master
+ 3-0-stable
+
+See the README_DEV.md file for more information.
+=============================================================================
+
+MESSAGE
+ exit 1
+end
+
+require 'pathname'
+ENV["BUNDLE_GEMFILE"] ||= begin
+ version = if File.exist?("./.gemfile")
+ File.read("./.gemfile").chomp
+ else
+ "rails-3.0.6"
+ end
+ File.expand_path("../gemfiles/#{version}", __FILE__)
+ end
+puts "Using gemfile: #{ENV["BUNDLE_GEMFILE"].gsub(Pathname.new(__FILE__).dirname.to_s,'').sub(/^\//,'')}"
require "bundler"
Bundler.setup
Bundler::GemHelper.install_tasks
@@ -41,12 +69,6 @@ RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w[--color]
end
-desc "Run full build against all supported rubies and railses"
-task :ci do
- %w[3.0.7 3-0-stable master].each do |v|
- sh "BUNDLE_GEMFILE=Gemfile-rails-#{v} bundle install && rake"
- end
-end
namespace :spec do
desc "Run all examples using rcov"
@@ -61,7 +83,7 @@ namespace :generate do
desc "generate a fresh app with rspec installed"
task :app do |t|
unless File.directory?('./tmp/example_app')
- sh "rails new ./tmp/example_app"
+ sh "bin/rails new ./tmp/example_app"
bindir = File.expand_path("gemfiles/bin")
Dir.chdir("./tmp/example_app") do
sh "ln -s #{bindir}"
View
28 Gemfile-base → gemfiles/base.rb
@@ -1,10 +1,10 @@
module GemfileBase
def self.extended(host)
host.instance_eval do
- source :rubygems
+ source "http://rubygems.org"
%w[rspec rspec-core rspec-expectations rspec-mocks rspec-rails].each do |lib|
- library_path = File.expand_path("../../#{lib}", __FILE__)
+ library_path = File.expand_path("../../../#{lib}", __FILE__)
if File.exist?(library_path)
gem lib, :path => library_path
elsif ENV["USE_GIT_REPOS"] == 'true'
@@ -24,23 +24,21 @@ def self.extended(host)
gem "ZenTest", "~> 4.4.2"
gem "webrat", "0.7.2"
- platforms :jruby do
- gem "jruby-openssl"
+ if RUBY_PLATFORM =~ /darwin/
+ gem "autotest-fsevent", "~> 0.2.4"
+ gem "autotest-growl", "~> 0.2.9"
end
- unless ENV['TRAVIS']
- if RUBY_PLATFORM =~ /darwin/
- gem "autotest-fsevent", "~> 0.2.4"
- gem "autotest-growl", "~> 0.2.9"
- end
+ gem "ruby-debug", :platforms => :ruby_18
+ gem "ruby-debug19", "~> 0.11.6", :platforms => :ruby_19
- gem "ruby-debug", :platforms => :ruby_18
- gem "ruby-debug19", "~> 0.11.6", :platforms => :ruby_19
+ platforms :ruby_18, :ruby_19 do
+ gem "rb-fsevent", "~> 0.3.9"
+ gem "ruby-prof", "~> 0.9.2"
+ end
- platforms :ruby_18, :ruby_19 do
- gem "rb-fsevent", "~> 0.3.9"
- gem "ruby-prof", "~> 0.9.2"
- end
+ platforms :jruby do
+ gem "jruby-openssl"
end
end
end
View
2 Gemfile-rails-3-0-stable → gemfiles/rails-3-0-stable
@@ -1,4 +1,4 @@
-load File.expand_path("../Gemfile-base", __FILE__)
+require File.expand_path("../base.rb", __FILE__)
extend GemfileBase
View
5 gemfiles/rails-3.0.0
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.0"
View
5 gemfiles/rails-3.0.1
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.1"
View
5 gemfiles/rails-3.0.2
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.2"
View
5 gemfiles/rails-3.0.3
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.3"
View
5 gemfiles/rails-3.0.4
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.4"
View
5 gemfiles/rails-3.0.5
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.5"
View
5 gemfiles/rails-3.0.6
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.6"
View
5 gemfiles/rails-3.0.7
@@ -0,0 +1,5 @@
+require File.expand_path("../base.rb", __FILE__)
+
+extend GemfileBase
+
+gem "rails", "3.0.7"
View
2 Gemfile-rails-master → gemfiles/rails-master
@@ -1,4 +1,4 @@
-load File.expand_path("../Gemfile-base", __FILE__)
+require File.expand_path("../base.rb", __FILE__)
extend GemfileBase

0 comments on commit 9fde587

Please sign in to comment.
Something went wrong with that request. Please try again.