diff --git a/.gitignore b/.gitignore index f04555fd..efbcad5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.DS_Store *.tmproj +*.lock sync tmp/* examples/*/stylesheets/* diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..c78185e8 --- /dev/null +++ b/Gemfile @@ -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" diff --git a/Gemfile_rails2 b/Gemfile_rails2 new file mode 100644 index 00000000..2af96342 --- /dev/null +++ b/Gemfile_rails2 @@ -0,0 +1,8 @@ +source :rubygems + +gem "compass", :path => "." +gem "cucumber" +gem "rspec" +gem "rails", "~>2.3" +gem "compass-validator" +gem "css_parser" diff --git a/test/rails_helper.rb b/test/rails_helper.rb index d8b47a17..11a743d9 100644 --- a/test/rails_helper.rb +++ b/test/rails_helper.rb @@ -19,13 +19,18 @@ module Compass end else begin - require 'rails/version' - require 'rails_generator' - 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') + require 'action_pack/version' + if ActionPack::VERSION::MAJOR >= 3 + `rails new #{name}` + else + require 'rails/version' + require 'rails_generator' + 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 rescue LoadError Kernel.exit!(2)