ember-cli-rails 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f36a51e987ca3f318c486ebb3827e3b033eea0f0
4
- data.tar.gz: a3b9cd8366e58423d70eab4de81d042f55fc86c7
3
+ metadata.gz: fa89f6f26b26bbf222e7881b397422868795a55c
4
+ data.tar.gz: 3d2b5205aa404925fa0a76fabae819646b9298f8
5
5
  SHA512:
6
- metadata.gz: 15b9f51c70c042c3eb3b7ff915cbf1269a8ebc23bf76c1d30d56242d645a19775596f3086dd02ac5a0923a40a2223db10c6d0e20b84cee0bad80c417d3a26733
7
- data.tar.gz: 52e7f0822e858e957e4a72277a0e6645eaf9fea6b00c803e52e7673e531edd96e52a5f5f78a562a63876f24be4195e73ca87d1f61f6b952ed947667b4d320d40
6
+ metadata.gz: 2a92409bab6abf2f119b3ae5ce064f33eb452cc1abc486a805fb57f759b83df1a0257a5a3432d86daf257e6d07048244b266c806e5f03208e4b82ed1a9275edf
7
+ data.tar.gz: 8ad3eb7eef5f6084ca30a583a5f9407e99702b491d92e1c00bb05e7f79236b9d3a5cd5dde83a822ebbfe416cb5f4131216da5e2b8fa65e9eda85b69d9c2dc2aa
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  master
2
2
  ------
3
3
 
4
+ 0.7.1
5
+ -----
6
+
7
+ * Resolve `ember` executable with full path within `node_modules`, instead of
8
+ depending on the presence of `node_modules/.bin`. [#395]
9
+ * Introduce the idea of `App#mountable?` and `App#to_rack` for handling deploys
10
+ that don't serve assets from the file system (Redis, for example).
11
+ * Fix bug with generated `bin/heroku_install` script iterating through multiple
12
+ * Don't mount route helpers at top-level. Instead, mount within the surrounding
13
+ context with which they're invoked. [#381]
14
+
15
+ [#395]: https://github.com/thoughtbot/ember-cli-rails/pull/395
16
+ [#381]: https://github.com/thoughtbot/ember-cli-rails/pull/381
17
+
4
18
  0.7.0
5
19
  -----
6
20
 
data/lib/ember_cli/app.rb CHANGED
@@ -78,6 +78,14 @@ module EmberCli
78
78
  @build.check!
79
79
  end
80
80
 
81
+ def mountable?
82
+ deploy.mountable?
83
+ end
84
+
85
+ def to_rack
86
+ deploy.to_rack
87
+ end
88
+
81
89
  private
82
90
 
83
91
  def development?
@@ -1,3 +1,4 @@
1
+ require "rack"
1
2
  require "ember_cli/errors"
2
3
 
3
4
  module EmberCli
@@ -7,6 +8,14 @@ module EmberCli
7
8
  @app = app
8
9
  end
9
10
 
11
+ def mountable?
12
+ true
13
+ end
14
+
15
+ def to_rack
16
+ Rack::File.new(app.dist_path.to_s)
17
+ end
18
+
10
19
  def index_html
11
20
  if index_file.exist?
12
21
  index_file.read
@@ -1,11 +1,9 @@
1
1
  module EmberCli
2
2
  class Engine < Rails::Engine
3
- initializer "ember-cli-rails.rendering" do
3
+ initializer "ember-cli-rails.setup" do
4
4
  require "ember_cli/ember_controller"
5
5
  require "ember_cli/route_helpers"
6
- end
7
6
 
8
- config.to_prepare do
9
7
  ActionController::Base.helper EmberRailsHelper
10
8
  end
11
9
  end
@@ -37,7 +37,7 @@ module EmberCli
37
37
 
38
38
  def ember
39
39
  @ember ||= begin
40
- root.join("node_modules", ".bin", "ember").tap do |path|
40
+ root.join("node_modules", "ember-cli", "bin", "ember").tap do |path|
41
41
  unless path.executable?
42
42
  fail DependencyError.new <<-MSG.strip_heredoc
43
43
  No `ember-cli` executable found for `#{app_name}`.
@@ -65,7 +65,7 @@ module EmberCli
65
65
  bower_path = app_options.fetch(:bower_path) { which("bower") }
66
66
 
67
67
  bower_path.tap do |path|
68
- unless Pathname(path).executable?
68
+ unless Pathname(path.to_s).executable?
69
69
  fail DependencyError.new <<-MSG.strip_heredoc
70
70
  Bower is required by EmberCLI
71
71
 
@@ -14,14 +14,18 @@ module ActionDispatch
14
14
  format: :html,
15
15
  )
16
16
 
17
- Rails.application.routes.draw do
18
- scope constraints: EmberCli::HtmlConstraint.new do
19
- get("#{to}(*rest)", routing_options)
20
- end
17
+ scope constraints: ::EmberCli::HtmlConstraint.new do
18
+ get("#{to}(*rest)", routing_options)
19
+ end
20
+
21
+ mount_ember_assets(app_name, to: to)
22
+ end
21
23
 
22
- dist_directory = EmberCli[app_name].paths.dist
24
+ def mount_ember_assets(app_name, to: "/")
25
+ app = ::EmberCli[app_name]
23
26
 
24
- mount Rack::File.new(dist_directory.to_s) => to
27
+ if app.mountable?
28
+ mount app.to_rack => to
25
29
  end
26
30
  end
27
31
  end
@@ -1,3 +1,3 @@
1
1
  module EmberCli
2
- VERSION = "0.7.0".freeze
2
+ VERSION = "0.7.1".freeze
3
3
  end
@@ -7,5 +7,6 @@ bower="$(pwd)/node_modules/.bin/bower"
7
7
  for app in <%= app_paths.map { |app_path| %{"#{app_path}"} }.join(" ") -%>; do
8
8
  cd $app &&
9
9
  npm install &&
10
- $bower install
10
+ $bower install &&
11
+ cd -
11
12
  done
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-cli-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-20 00:00:00.000000000 Z
13
+ date: 2016-02-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ember-cli-rails-assets