lib/ember_cli/path_set.rb in ember-cli-rails-0.8.7 vs lib/ember_cli/path_set.rb in ember-cli-rails-0.9.0
- old
+ new
@@ -33,10 +33,14 @@
def gemfile
@gemfile ||= root.join("Gemfile")
end
+ def bower_json
+ ember_cli_root.join("bower.json")
+ end
+
def ember
@ember ||= begin
root.join("node_modules", "ember-cli", "bin", "ember").tap do |path|
unless path.executable?
fail DependencyError.new <<-MSG.strip_heredoc
@@ -62,10 +66,10 @@
end
def bower
@bower ||= begin
path_for_executable("bower").tap do |bower_path|
- if bower_path.blank? || !bower_path.executable?
+ if bower_json.exist? && (bower_path.blank? || !bower_path.executable?)
fail DependencyError.new <<-MSG.strip_heredoc
Bower is required by EmberCLI
Install it with: