Skip to content

Commit

Permalink
Run bundler after we modify the project's Gemfile
Browse files Browse the repository at this point in the history
* 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
Harold Giménez committed Nov 4, 2011
1 parent cca000d commit 7e06fe7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/suspenders/generators/app_generator.rb
Expand Up @@ -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')

This comment has been minimized.

Copy link
@sikachu

sikachu Nov 4, 2011

Contributor

I think you can do this to save time:

bundle_command('install --local')

This comment has been minimized.

Copy link
@hgmnz

hgmnz Nov 4, 2011

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

This comment has been minimized.

Copy link
@sikachu

sikachu Nov 4, 2011

Contributor

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

This comment has been minimized.

Copy link
@jferris

jferris via email Nov 4, 2011

Member
end

def configure_app
Expand All @@ -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?
Expand Down Expand Up @@ -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
Expand All @@ -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.