ember-cli-rails 0.4.0 → 0.4.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 +4 -4
- data/CHANGELOG.md +17 -4
- data/README.md +6 -3
- data/lib/ember-cli/capture.rb +11 -10
- data/lib/ember-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2050418a47d41c4dadef58815563fc33f790182
|
4
|
+
data.tar.gz: 389762dcb79129cb6d0f774c5be0d2cb430c51af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca28ef57e18cbad4df443df774a3c089f3859073ee076567c99213ae1b302fda2b89659162793ae44f33c5e53adc0dade4c1473c15b29df3b8853d8eea8d3a8a
|
7
|
+
data.tar.gz: ee03a4aae56dc0db75380856cd77dc58d579763b87115df771ca84d66f4b7d735449e5a1836a6318bf97d4b7bfe59d33f91ea26bf96ceb6f1681bc8673ab5895
|
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,28 @@
|
|
1
1
|
master
|
2
2
|
------
|
3
3
|
|
4
|
+
0.4.1
|
5
|
+
-----
|
6
|
+
|
7
|
+
* `<%= head.append do %>` will now return `nil` so that accidentally using
|
8
|
+
`<%= %>` variety of ERB tags won't render the contents of the capture [#231]
|
9
|
+
|
10
|
+
[#231]: https://github.com/thoughtbot/ember-cli-rails/pull/231
|
11
|
+
|
4
12
|
0.4.0
|
5
13
|
-----
|
6
14
|
|
7
15
|
* Extend `include_ember_index_html` helper to accept a block. The contents of
|
8
|
-
the block will be injected into the page
|
9
|
-
* Drop support for Ruby `< 2.1.0` and Rails `4.0.0, < 3.2.0`
|
16
|
+
the block will be injected into the page [#228]
|
17
|
+
* Drop support for Ruby `< 2.1.0` and Rails `4.0.0, < 3.2.0` [#227]
|
10
18
|
* Introduce `rails g ember-cli:heroku` generator to configure a project for
|
11
|
-
deploying to Heroku
|
12
|
-
* Introduce `include_ember_index_html` helper
|
19
|
+
deploying to Heroku [#230]
|
20
|
+
* Introduce `include_ember_index_html` helper [#226]
|
21
|
+
|
22
|
+
[#226]: https://github.com/thoughtbot/ember-cli-rails/pull/226
|
23
|
+
[#227]: https://github.com/thoughtbot/ember-cli-rails/pull/227
|
24
|
+
[#228]: https://github.com/thoughtbot/ember-cli-rails/pull/228
|
25
|
+
[#230]: https://github.com/thoughtbot/ember-cli-rails/pull/230
|
13
26
|
|
14
27
|
0.3.5
|
15
28
|
-----
|
data/README.md
CHANGED
@@ -122,7 +122,7 @@ To inject markup into page, pass in a block that accepts the `head`, and
|
|
122
122
|
```erb
|
123
123
|
<!-- /app/views/application/index.html.erb -->
|
124
124
|
<%= include_ember_index_html :frontend do |head| %>
|
125
|
-
|
125
|
+
<% head.append do %>
|
126
126
|
<%= csrf_meta_tags %>
|
127
127
|
<% end %>
|
128
128
|
<% end %>
|
@@ -317,8 +317,11 @@ To configure your Ember CLI Rails app to be ready to deploy on Heroku:
|
|
317
317
|
`bower` dependency's executable file.
|
318
318
|
|
319
319
|
```sh
|
320
|
-
heroku buildpacks:
|
321
|
-
heroku
|
320
|
+
$ heroku buildpacks:clear
|
321
|
+
$ heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-nodejs
|
322
|
+
$ heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-ruby
|
323
|
+
$ heroku config:set NPM_CONFIG_PRODUCTION=false
|
324
|
+
$ heroku config:unset SKIP_EMBER
|
322
325
|
```
|
323
326
|
|
324
327
|
You should be ready to deploy.
|
data/lib/ember-cli/capture.rb
CHANGED
@@ -9,7 +9,7 @@ module EmberCLI
|
|
9
9
|
|
10
10
|
def capture
|
11
11
|
if block.present?
|
12
|
-
|
12
|
+
capture_content
|
13
13
|
else
|
14
14
|
SKIP_CAPTURE
|
15
15
|
end
|
@@ -19,24 +19,24 @@ module EmberCLI
|
|
19
19
|
|
20
20
|
attr_reader :block, :sprockets
|
21
21
|
|
22
|
-
def
|
22
|
+
def capture_content
|
23
23
|
if block.arity > 0
|
24
24
|
block.call(*block_arguments)
|
25
25
|
end
|
26
26
|
|
27
|
-
[
|
27
|
+
[head.content, body.content]
|
28
28
|
end
|
29
29
|
|
30
30
|
def block_arguments
|
31
|
-
[
|
31
|
+
[head, body].first(block.arity)
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
35
|
-
@
|
34
|
+
def body
|
35
|
+
@body ||= Block.new(sprockets)
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
39
|
-
@
|
38
|
+
def head
|
39
|
+
@head ||= begin
|
40
40
|
if block.arity < 1
|
41
41
|
BlockWithoutArguments.new(sprockets, &block)
|
42
42
|
else
|
@@ -52,7 +52,7 @@ module EmberCLI
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def content
|
55
|
-
@sprockets.
|
55
|
+
@sprockets.with_output_buffer(&@block)
|
56
56
|
end
|
57
57
|
end
|
58
58
|
private_constant :BlockWithoutArguments
|
@@ -64,7 +64,8 @@ module EmberCLI
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def append(&block)
|
67
|
-
@content.push(@sprockets.
|
67
|
+
@content.push(@sprockets.with_output_buffer(&block))
|
68
|
+
nil
|
68
69
|
end
|
69
70
|
|
70
71
|
def content
|
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.4.
|
4
|
+
version: 0.4.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-10-
|
13
|
+
date: 2015-10-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|