Skip to content

Commit

Permalink
Support Gemfile in ember-cli application
Browse files Browse the repository at this point in the history
Some EmberCLI addons require gems like compass or susy to be installed.
There is no need to have these gems in the rails project's Gemfile.
This pull request adds the support for Gemfile in the ember-cli
application's directory.

Tested with:

  - rvm 1.26.10
  - ruby 2.1.3
  - rubygems 2.4.5

Caveats:
  - the ruby version in both ember-cli and rails applications must be
  identical

We can reuse the exec method
  • Loading branch information
sevos committed Feb 13, 2015
1 parent c28c655 commit 652cf12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/ember-cli/app.rb
Expand Up @@ -20,6 +20,7 @@ def compile
end

def install_dependencies
exec "bundle install" if gemfile_path.exist?
exec "#{npm_path} install"
end

Expand Down Expand Up @@ -241,9 +242,14 @@ def env_hash
ENV.clone.tap do |vars|
vars.store "DISABLE_FINGERPRINTING", "true"
vars.store "EXCLUDE_EMBER_ASSETS", excluded_ember_deps
vars.store "BUNDLE_GEMFILE", gemfile_path
end
end

def gemfile_path
app_path.join('Gemfile')
end

def exec(cmd, options={})
method_name = options.fetch(:method, :system)

Expand Down

0 comments on commit 652cf12

Please sign in to comment.