ember-cli-rails 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +20 -0
- data/lib/ember-cli-rails.rb +5 -1
- data/lib/ember-cli/app.rb +9 -9
- data/lib/ember-cli/{railtie.rb → engine.rb} +1 -1
- data/lib/ember-cli/middleware.rb +5 -1
- data/lib/ember-cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f920d670a1774fce16c0bc61111b17292caa879f
|
4
|
+
data.tar.gz: 10eb258cc10eb4b3acef3ad64d67a2a5d39e7b2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c96486c1419c1a671b7eafc2358e63b463a0ec9d29b278810605dde305febd032b502a0e369b0ef7cdd8b916328dd5b6686257bdee9ec4ed5847b048397bfcb7
|
7
|
+
data.tar.gz: 7ab0834bb58959a1b50a46e4f16bf6b05ab4171117b0c249b32bdc74bf71636248aa7272f27f86dcbb0d26516d3e72f526d3898e84da9482328b39d6582f09bf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -113,6 +113,26 @@ could render your app at the `/` route with the following view:
|
|
113
113
|
|
114
114
|
Your Ember application will now be served at the `/` route.
|
115
115
|
|
116
|
+
## Ember Test Suite
|
117
|
+
|
118
|
+
To run an Ember app's tests in a browser, mount the `EmberCLI::Engine`:
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
# config/routes.rb
|
122
|
+
|
123
|
+
Rails.application.routes.draw do
|
124
|
+
mount EmberCLI::Engine => "ember-tests" if Rails.env.development?
|
125
|
+
|
126
|
+
root "application#index"
|
127
|
+
end
|
128
|
+
```
|
129
|
+
|
130
|
+
Ember tests are served based on the route you mount the Engine on (in this
|
131
|
+
example, `/ember-tests`) and the name of the Ember app.
|
132
|
+
|
133
|
+
For example, to view tests of the `frontend` app, visit
|
134
|
+
`http://localhost:3000/ember-tests/frontend`.
|
135
|
+
|
116
136
|
## Enabling LiveReload
|
117
137
|
|
118
138
|
In order to get LiveReload up and running with EmberCLI Rails, you can install
|
data/lib/ember-cli-rails.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "ember-cli/
|
1
|
+
require "ember-cli/engine" if defined?(Rails)
|
2
2
|
|
3
3
|
module EmberCLI
|
4
4
|
extend self
|
@@ -17,6 +17,10 @@ module EmberCLI
|
|
17
17
|
Configuration.instance
|
18
18
|
end
|
19
19
|
|
20
|
+
def get_app(name)
|
21
|
+
configuration.apps[name]
|
22
|
+
end
|
23
|
+
|
20
24
|
def prepare!
|
21
25
|
@prepared ||= begin
|
22
26
|
Rails.configuration.assets.paths << root.join("assets").to_s
|
data/lib/ember-cli/app.rb
CHANGED
@@ -13,6 +13,10 @@ module EmberCLI
|
|
13
13
|
@name, @options = name.to_s, options
|
14
14
|
end
|
15
15
|
|
16
|
+
def tests_path
|
17
|
+
dist_path.join("tests")
|
18
|
+
end
|
19
|
+
|
16
20
|
def compile
|
17
21
|
prepare
|
18
22
|
silence_build { exec command }
|
@@ -107,7 +111,7 @@ module EmberCLI
|
|
107
111
|
Please see, https://github.com/rwz/ember-cli-rails/issues/66 for more
|
108
112
|
detailed information.
|
109
113
|
|
110
|
-
It is now
|
114
|
+
It is now recommended to place your EmberCLI application into the Rails
|
111
115
|
root path.
|
112
116
|
MSG
|
113
117
|
|
@@ -165,7 +169,7 @@ module EmberCLI
|
|
165
169
|
end
|
166
170
|
|
167
171
|
def check_ember_cli_version!
|
168
|
-
version = dev_dependencies.fetch("ember-cli").split(
|
172
|
+
version = dev_dependencies.fetch("ember-cli").split(?-).first
|
169
173
|
|
170
174
|
unless match_version?(version, EMBER_CLI_VERSION)
|
171
175
|
fail <<-MSG.strip_heredoc
|
@@ -221,16 +225,12 @@ module EmberCLI
|
|
221
225
|
@app_path ||= begin
|
222
226
|
path = options.fetch(:path){ default_app_path }
|
223
227
|
pathname = Pathname.new(path)
|
224
|
-
|
228
|
+
pathname.absolute?? pathname : Rails.root.join(path)
|
225
229
|
end
|
226
230
|
end
|
227
231
|
|
228
232
|
def tmp_path
|
229
|
-
@tmp_path ||=
|
230
|
-
path = app_path.join("tmp")
|
231
|
-
path.mkdir unless path.exist?
|
232
|
-
path
|
233
|
-
end
|
233
|
+
@tmp_path ||= app_path.join("tmp").tap(&:mkpath)
|
234
234
|
end
|
235
235
|
|
236
236
|
def log_path
|
@@ -263,7 +263,7 @@ module EmberCLI
|
|
263
263
|
end
|
264
264
|
|
265
265
|
def excluded_ember_deps
|
266
|
-
Array.wrap(options[:exclude_ember_deps]).join(
|
266
|
+
Array.wrap(options[:exclude_ember_deps]).join(?,)
|
267
267
|
end
|
268
268
|
|
269
269
|
def env_hash
|
data/lib/ember-cli/middleware.rb
CHANGED
data/lib/ember-cli/version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Pravosud
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-02-
|
12
|
+
date: 2015-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -53,9 +53,9 @@ files:
|
|
53
53
|
- lib/ember-cli-rails.rb
|
54
54
|
- lib/ember-cli/app.rb
|
55
55
|
- lib/ember-cli/configuration.rb
|
56
|
+
- lib/ember-cli/engine.rb
|
56
57
|
- lib/ember-cli/helpers.rb
|
57
58
|
- lib/ember-cli/middleware.rb
|
58
|
-
- lib/ember-cli/railtie.rb
|
59
59
|
- lib/ember-cli/version.rb
|
60
60
|
- lib/ember-cli/view_helpers.rb
|
61
61
|
- lib/generators/ember-cli/init/USAGE
|