Skip to content

Commit

Permalink
updated dev dependencies & refactored for bundler 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrothenberg committed Apr 6, 2012
1 parent b8bb4c5 commit e7d1460
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
18 changes: 8 additions & 10 deletions Rakefile
Expand Up @@ -21,21 +21,19 @@ Cucumber::Rake::Task.new(:cucumber)
# for cucumber features that create a sample project
def in_example_app(command)
Dir.chdir("./tmp/example_app/") do
Bundler.with_clean_env do
sh command
end
Bundler.clean_system command
end
end
namespace :generate do
desc "generate a fresh app with rspec installed"
task :app do |t|
# unless File.directory?('./tmp/example_app')
sh "bundle exec rails new ./tmp/example_app -m 'features/templates/generate_example_app.rb' --skip-test-unit"
sh "cp 'features/templates/rspec.rake' ./tmp/example_app/lib/tasks"
in_example_app 'rake db:migrate'
in_example_app 'rails g rspec:install'
in_example_app 'bundle install'
# end
raise 'Bundler 1.1 is a development dependency to build ammeter. Please upgrade bundler.' unless Bundler::VERSION >= '1.1'

sh "bundle exec rails new ./tmp/example_app -m 'features/templates/generate_example_app.rb' --skip-test-unit"
sh "cp 'features/templates/rspec.rake' ./tmp/example_app/lib/tasks"
in_example_app 'rake db:migrate'
in_example_app 'rails g rspec:install'
in_example_app 'bundle install'
end
end

Expand Down
18 changes: 9 additions & 9 deletions ammeter.gemspec
Expand Up @@ -22,13 +22,13 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'rspec', '>= 2.2'
s.add_runtime_dependency 'rspec-rails', '>= 2.2'

s.add_development_dependency 'rails', '>= 3.1'
s.add_development_dependency 'uglifier'
s.add_development_dependency 'rake'
s.add_development_dependency 'coffee-rails'
s.add_development_dependency 'sass-rails'
s.add_development_dependency 'jquery-rails'
s.add_development_dependency 'cucumber', '~> 0.10'
s.add_development_dependency 'aruba', '~> 0.3'
s.add_development_dependency 'sqlite3', '~> 1'
s.add_development_dependency 'rails', '>= 3.1'
s.add_development_dependency 'uglifier', '>= 1.2.4'
s.add_development_dependency 'rake', '>= 0.9.2.2'
s.add_development_dependency 'coffee-rails', '>= 3.2.2'
s.add_development_dependency 'sass-rails', '>= 3.2.5'
s.add_development_dependency 'jquery-rails', '>= 2.0.2'
s.add_development_dependency 'cucumber', '>= 0.10'
s.add_development_dependency 'aruba', '>= 0.3'
s.add_development_dependency 'sqlite3', '>= 1'
end

0 comments on commit e7d1460

Please sign in to comment.