Gemfiles for testing and a rails test helper that works for both rails 2 and rails 3.
This commit is contained in:
parent
a2a9835688
commit
13055f4731
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
*.DS_Store
|
*.DS_Store
|
||||||
*.tmproj
|
*.tmproj
|
||||||
|
*.lock
|
||||||
sync
|
sync
|
||||||
tmp/*
|
tmp/*
|
||||||
examples/*/stylesheets/*
|
examples/*/stylesheets/*
|
||||||
|
8
Gemfile
Normal file
8
Gemfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
source :rubygems
|
||||||
|
|
||||||
|
gem "compass", :path => "."
|
||||||
|
gem "cucumber"
|
||||||
|
gem "rspec"
|
||||||
|
gem "rails", "~>3.0.0.rc"
|
||||||
|
gem "compass-validator"
|
||||||
|
gem "css_parser"
|
8
Gemfile_rails2
Normal file
8
Gemfile_rails2
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
source :rubygems
|
||||||
|
|
||||||
|
gem "compass", :path => "."
|
||||||
|
gem "cucumber"
|
||||||
|
gem "rspec"
|
||||||
|
gem "rails", "~>2.3"
|
||||||
|
gem "compass-validator"
|
||||||
|
gem "css_parser"
|
@ -19,13 +19,18 @@ module Compass
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
require 'rails/version'
|
require 'action_pack/version'
|
||||||
require 'rails_generator'
|
if ActionPack::VERSION::MAJOR >= 3
|
||||||
require 'rails_generator/scripts/generate'
|
`rails new #{name}`
|
||||||
Rails::Generator::Base.use_application_sources!
|
else
|
||||||
capture_output do
|
require 'rails/version'
|
||||||
Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout
|
require 'rails_generator'
|
||||||
Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app')
|
require 'rails_generator/scripts/generate'
|
||||||
|
Rails::Generator::Base.use_application_sources!
|
||||||
|
capture_output do
|
||||||
|
Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout
|
||||||
|
Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
Kernel.exit!(2)
|
Kernel.exit!(2)
|
||||||
|
Loading…
Reference in New Issue
Block a user