ember-rails 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -11
- data/lib/ember/rails/version.rb +1 -1
- data/lib/ember_rails.rb +5 -0
- data/lib/generators/ember/install_generator.rb +13 -3
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d2bc90c8745e6458bbbeaa2c88bef7ae3678297
|
4
|
+
data.tar.gz: 4e272c941dbfa2c4111e6c4fddcc9bf69a97901b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf9f95ccc1519eac9725c9d5b762edc81903385f41229471ea7b441af87851f064bf3ff51fbdb9b981b3029613f1dfe344888519570dbc9be07e7a84c7ff00dd
|
7
|
+
data.tar.gz: 70173e03ac5ab815f0b845a2ae593141d34e48dd4fc83a12a51660a3e05bb1a59437773bd72eb189020fdb367f13ae8a017e4175a0cfe8f639279f897d242105
|
data/README.md
CHANGED
@@ -237,17 +237,6 @@ Now a single line in the layout loads everything:
|
|
237
237
|
|
238
238
|
<%= javascript_include_tag "templates/all" %>
|
239
239
|
|
240
|
-
If you use Slim or Haml templates, you can use the handlebars filter :
|
241
|
-
|
242
|
-
handlebars:
|
243
|
-
<button {{action anActionName}}>OK</button>
|
244
|
-
|
245
|
-
It will be translated as :
|
246
|
-
|
247
|
-
<script type="text/x-handlebars">
|
248
|
-
<button {{action anActionName}}>OK</button>
|
249
|
-
</script>
|
250
|
-
|
251
240
|
### Note about ember components
|
252
241
|
|
253
242
|
When necessary, ember-rails adheres to a conventional folder structure. To create an ember component you must define the handlebars file *inside* the *components* folder under the templates folder of your project to properly register your handlebars component file.
|
data/lib/ember/rails/version.rb
CHANGED
data/lib/ember_rails.rb
CHANGED
@@ -38,6 +38,11 @@ module Ember
|
|
38
38
|
ember_data_ext = variant == :production ? ".prod.js" : ".js"
|
39
39
|
FileUtils.cp(::Ember::Data::Source.bundled_path_for("ember-data#{ember_data_ext}"), tmp_path.join("ember-data.js"))
|
40
40
|
|
41
|
+
# Copy ember-data source map to tmp folder.
|
42
|
+
if File.exist?(::Ember::Data::Source.bundled_path_for("ember-data.js.map")) # Source maps are present in ember-data-source gem, starting from version 1.0.0-beta.14.1
|
43
|
+
FileUtils.cp(::Ember::Data::Source.bundled_path_for("ember-data.js.map"), tmp_path.join("ember-data.js.map"))
|
44
|
+
end
|
45
|
+
|
41
46
|
app.assets.append_path(tmp_path)
|
42
47
|
|
43
48
|
# Make the handlebars.js and handlebars.runtime.js bundled
|
@@ -85,6 +85,13 @@ module Ember
|
|
85
85
|
create_file "vendor/assets/ember/#{environment}/ember-data.js" do
|
86
86
|
fetch url_for(chan, 'ember-data', environment), "vendor/assets/ember/#{environment}/ember-data.js"
|
87
87
|
end
|
88
|
+
|
89
|
+
sourcemap_url = "#{base_url}/#{chan}/ember-data.js.map"
|
90
|
+
if resource_exist?(sourcemap_url)
|
91
|
+
create_file "vendor/assets/ember/#{environment}/ember-data.js.map" do
|
92
|
+
fetch sourcemap_url, "vendor/assets/ember/#{environment}/ember-data.js.map", false
|
93
|
+
end
|
94
|
+
end
|
88
95
|
end
|
89
96
|
|
90
97
|
def get_ember_js_for(environment)
|
@@ -155,14 +162,17 @@ module Ember
|
|
155
162
|
end
|
156
163
|
end
|
157
164
|
|
158
|
-
def fetch(from, to)
|
165
|
+
def fetch(from, to, prepend_verbose = true)
|
159
166
|
message = "#{from} -> #{to}"
|
160
167
|
say_status("downloading:", message , :green)
|
161
168
|
|
162
169
|
uri = URI(from)
|
163
170
|
output = StringIO.new
|
164
|
-
|
165
|
-
|
171
|
+
if prepend_verbose
|
172
|
+
output.puts "// Fetched from channel: #{channel}, with url " + uri.to_s
|
173
|
+
output.puts "// Fetched on: " + Time.now.utc.iso8601.to_s
|
174
|
+
end
|
175
|
+
|
166
176
|
response = Net::HTTP.get_response(uri)
|
167
177
|
case response.code
|
168
178
|
when '404'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Pitt
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2015-01-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: execjs
|
@@ -279,7 +279,8 @@ files:
|
|
279
279
|
- lib/generators/templates/view.js.coffee
|
280
280
|
- lib/generators/templates/view.js.em
|
281
281
|
homepage: https://github.com/emberjs/ember-rails
|
282
|
-
licenses:
|
282
|
+
licenses:
|
283
|
+
- MIT
|
283
284
|
metadata: {}
|
284
285
|
post_install_message:
|
285
286
|
rdoc_options: []
|
@@ -297,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
298
|
version: '0'
|
298
299
|
requirements: []
|
299
300
|
rubyforge_project:
|
300
|
-
rubygems_version: 2.
|
301
|
+
rubygems_version: 2.4.5
|
301
302
|
signing_key:
|
302
303
|
specification_version: 4
|
303
304
|
summary: Ember for Rails 3.1+
|