Browse files

Run bundler after we modify the project's Gemfile

* This should keep CI or any new gemset/environment happy.
* We also disable (noop) the original run_bundle task,
  so that instead we call bundle at the right spot,
  which also allows us to run bundle only once.
  • Loading branch information...
1 parent cca000d commit 7e06fe7a1ebc5f3eaeccde3dda7434bbef93aac4 Harold Giménez committed Nov 4, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/suspenders/generators/app_generator.rb
View
10 lib/suspenders/generators/app_generator.rb
@@ -83,6 +83,10 @@ def setup_database
def customize_gemfile
build(:include_custom_gems)
+ if options[:clearance]
+ build(:add_clearance_gem)
+ end
+ bundle_command('install')
@sikachu
thoughtbot, inc. member
sikachu added a note Nov 4, 2011

I think you can do this to save time:

bundle_command('install --local')
@hgmnz
hgmnz added a note Nov 4, 2011

We need/want it to connect to rubygems.org to fetch the gems though.

@sikachu
thoughtbot, inc. member
sikachu added a note Nov 4, 2011

Not if you already specify your test app's dependency on the project's Gemfile.

@jferris
thoughtbot, inc. member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
end
def configure_app
@@ -99,7 +103,6 @@ def configure_app
def setup_clearance
if options[:clearance]
- build(:add_clearance_gem)
build(:generate_clearance)
build(:include_clearance_matchers)
if using_active_record?
@@ -156,6 +159,10 @@ def outro
say "Remember to run 'rails generate airbrake' with your API key."
end
+ def run_bundle
+ # Let's not: We'll bundle manually at the right spot
+ end
+
protected
def get_builder_class
@@ -165,6 +172,5 @@ def get_builder_class
def using_active_record?
!options[:skip_active_record]
end
-
end
end

0 comments on commit 7e06fe7

Please sign in to comment.