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
|
||||
*.tmproj
|
||||
*.lock
|
||||
sync
|
||||
tmp/*
|
||||
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,6 +19,10 @@ module Compass
|
||||
end
|
||||
else
|
||||
begin
|
||||
require 'action_pack/version'
|
||||
if ActionPack::VERSION::MAJOR >= 3
|
||||
`rails new #{name}`
|
||||
else
|
||||
require 'rails/version'
|
||||
require 'rails_generator'
|
||||
require 'rails_generator/scripts/generate'
|
||||
@ -27,6 +31,7 @@ module Compass
|
||||
Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout
|
||||
Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app')
|
||||
end
|
||||
end
|
||||
rescue LoadError
|
||||
Kernel.exit!(2)
|
||||
rescue => e
|
||||
|
Loading…
Reference in New Issue
Block a user