lib/ember-cli/app.rb in ember-cli-rails-0.1.6 vs lib/ember-cli/app.rb in ember-cli-rails-0.1.7
- old
+ new
@@ -11,10 +11,14 @@
def initialize(name, options={})
@name, @options = name.to_s, options
end
+ def tests_path
+ dist_path.join("tests")
+ end
+
def compile
prepare
silence_build { exec command }
check_for_build_error!
end
@@ -105,11 +109,11 @@
application inside Rails' app has negative performance implications.
Please see, https://github.com/rwz/ember-cli-rails/issues/66 for more
detailed information.
- It is now reccomended to place your EmberCLI application into the Rails
+ It is now recommended to place your EmberCLI application into the Rails
root path.
MSG
path
end
@@ -163,11 +167,11 @@
true
end
end
def check_ember_cli_version!
- version = dev_dependencies.fetch("ember-cli").split("-").first
+ version = dev_dependencies.fetch("ember-cli").split(?-).first
unless match_version?(version, EMBER_CLI_VERSION)
fail <<-MSG.strip_heredoc
EmberCLI Rails require ember-cli NPM package version to be
#{EMBER_CLI_VERSION} to work properly. From within your EmberCLI directory
@@ -219,20 +223,16 @@
def app_path
@app_path ||= begin
path = options.fetch(:path){ default_app_path }
pathname = Pathname.new(path)
- app_path = pathname.absolute?? pathname : Rails.root.join(path)
+ pathname.absolute?? pathname : Rails.root.join(path)
end
end
def tmp_path
- @tmp_path ||= begin
- path = app_path.join("tmp")
- path.mkdir unless path.exist?
- path
- end
+ @tmp_path ||= app_path.join("tmp").tap(&:mkpath)
end
def log_path
Rails.root.join("log", "ember-#{name}.#{Rails.env}.log")
end
@@ -261,10 +261,10 @@
dev_dependencies["ember-cli-rails-addon"] == ADDON_VERSION &&
app_path.join("node_modules", "ember-cli-rails-addon", "package.json").exist?
end
def excluded_ember_deps
- Array.wrap(options[:exclude_ember_deps]).join(",")
+ Array.wrap(options[:exclude_ember_deps]).join(?,)
end
def env_hash
ENV.clone.tap do |vars|
vars.store "DISABLE_FINGERPRINTING", "true"