Skip to content

Commit

Permalink
added support for Appraisal and removed ginger, also added instance v…
Browse files Browse the repository at this point in the history
…ariable for visitor so nulldb works with AR 3.2
  • Loading branch information
Theo Cummings authored and Matt Van Horn committed May 14, 2012
1 parent bcb83e5 commit dd0e1c4
Show file tree
Hide file tree
Showing 30 changed files with 388 additions and 528 deletions.
11 changes: 11 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
appraise "rails-3.2" do
gem 'rails', '~> 3.2.3'
end

appraise "rails-3.1" do
gem 'rails', '~> 3.1.3'
end

appraise "rails-3.0" do
gem 'rails', '~> 3.0.0'
end
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
source "http://rubygems.org"
gemspec
gem 'appraisal'
36 changes: 36 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PATH
GEM
remote: http://rubygems.org/
specs:
<<<<<<< HEAD
activemodel (3.2.1)
activesupport (= 3.2.1)
builder (~> 3.0.0)
Expand All @@ -32,10 +33,45 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
tzinfo (0.3.31)
=======
activemodel (3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
activerecord (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
appraisal (0.4.1)
bundler
rake
arel (3.0.2)
builder (3.0.0)
diff-lcs (1.1.3)
i18n (0.6.0)
multi_json (1.3.4)
rake (0.9.2.2)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
rspec-core (2.10.0)
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
tzinfo (0.3.33)
>>>>>>> added support for Appraisal and removed ginger, also added instance variable for visitor so nulldb works with AR 3.2

PLATFORMS
ruby

DEPENDENCIES
activerecord-nulldb-adapter!
<<<<<<< HEAD
=======
appraisal
>>>>>>> added support for Appraisal and removed ginger, also added instance variable for visitor so nulldb works with AR 3.2
rspec (>= 1.2.9)
58 changes: 5 additions & 53 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'rubygems'
require 'rake'
require 'thread'
require 'appraisal'
require 'rspec/core/rake_task'

begin
require 'jeweler'
Expand All @@ -16,7 +17,6 @@ begin
gem.add_dependency 'activerecord', '>= 2.0.0'
gem.add_development_dependency "rspec", ">= 1.2.9"

gem.files.exclude 'vendor/ginger'
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
Expand All @@ -27,58 +27,10 @@ rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

# We want to test ActiveRecord 3 against RSpec 2.x, and
# prior versions of AR against RSpec 1.x. The task
# definitions are different, and in order to allow ginger
# to invoke a single task (:spec_for_ginger) that runs the
# specs against the right version of RSpec, we dynamically
# define the spec task with this method.
def define_specs_task
require 'active_record'
require 'active_record/version'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec

if ActiveRecord::VERSION::MAJOR > 2
# rspec 2
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:specs) do |spec|
spec.pattern = "spec/*_spec.rb"
end
else
# rspec 1
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:specs) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end
end
end

desc "Run the specs"
task :spec do
define_specs_task
Rake::Task[:specs].invoke
end

task :spec_for_ginger do
$LOAD_PATH << File.join(*%w[vendor ginger lib])
require 'ginger'
define_specs_task
Rake::Task[:specs].invoke
end

task :spec => :check_dependencies if defined?(Jeweler)

desc 'Run ginger tests'
task :ginger do
$LOAD_PATH << File.join(*%w[vendor ginger lib])
ARGV.clear
ARGV << 'spec_for_ginger'
load File.join(*%w[vendor ginger bin ginger])
end

task :default => :ginger

require 'rake/rdoctask'
require 'rdoc/task'
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc", "LICENSE", "lib/**/*.rb")
Expand Down
8 changes: 8 additions & 0 deletions gemfiles/rails-3.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "appraisal"
gem "rails", "~> 3.0.0"

gemspec :path=>"../"
97 changes: 97 additions & 0 deletions gemfiles/rails-3.0.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
PATH
remote: /Users/theocummings/cp/nulldb
specs:
activerecord-nulldb-adapter (0.2.1)
activerecord (>= 2.0.0)

GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.12)
actionpack (= 3.0.12)
mail (~> 2.2.19)
actionpack (3.0.12)
activemodel (= 3.0.12)
activesupport (= 3.0.12)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.5)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.12)
activesupport (= 3.0.12)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.12)
activemodel (= 3.0.12)
activesupport (= 3.0.12)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activeresource (3.0.12)
activemodel (= 3.0.12)
activesupport (= 3.0.12)
activesupport (3.0.12)
appraisal (0.4.1)
bundler
rake
arel (2.0.10)
builder (2.1.2)
diff-lcs (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
i18n (0.5.0)
json (1.7.1)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
polyglot (0.3.3)
rack (1.2.5)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.12)
actionmailer (= 3.0.12)
actionpack (= 3.0.12)
activerecord (= 3.0.12)
activeresource (= 3.0.12)
activesupport (= 3.0.12)
bundler (~> 1.0)
railties (= 3.0.12)
railties (3.0.12)
actionpack (= 3.0.12)
activesupport (= 3.0.12)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
rspec-core (2.10.0)
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
thor (0.14.6)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)

PLATFORMS
ruby

DEPENDENCIES
activerecord-nulldb-adapter!
appraisal
rails (~> 3.0.0)
rspec (>= 1.2.9)
8 changes: 8 additions & 0 deletions gemfiles/rails-3.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "appraisal"
gem "rails", "~> 3.1.3"

gemspec :path=>"../"
108 changes: 108 additions & 0 deletions gemfiles/rails-3.1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
PATH
remote: /Users/theocummings/cp/nulldb
specs:
activerecord-nulldb-adapter (0.2.1)
activerecord (>= 2.0.0)

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.4)
actionpack (= 3.1.4)
mail (~> 2.3.0)
actionpack (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.6)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.3)
activemodel (3.1.4)
activesupport (= 3.1.4)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
arel (~> 2.2.3)
tzinfo (~> 0.3.29)
activeresource (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
activesupport (3.1.4)
multi_json (~> 1.0)
appraisal (0.4.1)
bundler
rake
arel (2.2.3)
builder (3.0.0)
diff-lcs (1.1.3)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0)
json (1.7.1)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
multi_json (1.3.4)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.4)
actionmailer (= 3.1.4)
actionpack (= 3.1.4)
activerecord (= 3.1.4)
activeresource (= 3.1.4)
activesupport (= 3.1.4)
bundler (~> 1.0)
railties (= 3.1.4)
railties (3.1.4)
actionpack (= 3.1.4)
activesupport (= 3.1.4)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
rspec-core (2.10.0)
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
sprockets (2.0.4)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)

PLATFORMS
ruby

DEPENDENCIES
activerecord-nulldb-adapter!
appraisal
rails (~> 3.1.3)
rspec (>= 1.2.9)
8 changes: 8 additions & 0 deletions gemfiles/rails-3.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "appraisal"
gem "rails", "~> 3.2.3"

gemspec :path=>"../"
Loading

0 comments on commit dd0e1c4

Please sign in to comment.