ember-rails 0.19.1 → 0.19.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ember/rails/version.rb +1 -1
- data/lib/ember_rails.rb +28 -7
- 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: 8c948ea4422f22666b4648a0c243e3cb19924855
|
4
|
+
data.tar.gz: df5bea12b6c5ea2ea320548339de4e9ce23eac8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27d7000e1b108835f90830b11d3a59a905e0edaec3e29922d5bb58ee7d7b8348df0e8c508b521c0cb82071b8740447dc3bbf1ed2d3c966588607eeda2a5e873d
|
7
|
+
data.tar.gz: 4073b92a377cdd6c639d2ecbe7674fbd0e96d5117a9e2222a9cbd7bd5c0b892ea7e7ea85e47a6ea21ae48642c937f15375324b61f90848e4c269efd2d2b9be27
|
data/lib/ember/rails/version.rb
CHANGED
data/lib/ember_rails.rb
CHANGED
@@ -27,12 +27,27 @@ module Ember
|
|
27
27
|
require "generators/ember/resource_override"
|
28
28
|
end
|
29
29
|
|
30
|
+
def configure_assets(app)
|
31
|
+
if config.respond_to?(:assets) && config.assets.respond_to?(:configure)
|
32
|
+
# Rails 4.x
|
33
|
+
config.assets.configure do |env|
|
34
|
+
yield env
|
35
|
+
end
|
36
|
+
else
|
37
|
+
# Rails 3.2
|
38
|
+
yield app.assets
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
30
42
|
initializer "ember_rails.setup_vendor_on_locale", :after => "ember_rails.setup", :group => :all do |app|
|
31
43
|
variant = app.config.ember.variant || (::Rails.env.production? ? :production : :development)
|
32
44
|
|
33
45
|
# Allow a local variant override
|
34
46
|
ember_path = app.root.join("vendor/assets/ember/#{variant}")
|
35
|
-
|
47
|
+
|
48
|
+
configure_assets app do |env|
|
49
|
+
env.prepend_path(ember_path.to_s) if ember_path.exist?
|
50
|
+
end
|
36
51
|
end
|
37
52
|
|
38
53
|
initializer "ember_rails.copy_vendor_to_local", :after => "ember_rails.setup", :group => :all do |app|
|
@@ -54,18 +69,24 @@ module Ember
|
|
54
69
|
FileUtils.cp(::Ember::Data::Source.bundled_path_for("ember-data#{ember_data_ext}"), tmp_path.join("ember-data.js"))
|
55
70
|
FileUtils.cp(::Ember::Data::ActiveModel::Adapter::Source.bundled_path_for("active-model-adapter.js"), tmp_path.join("active-model-adapter.js"))
|
56
71
|
|
57
|
-
app
|
72
|
+
configure_assets app do |env|
|
73
|
+
env.append_path tmp_path
|
74
|
+
end
|
58
75
|
end
|
59
76
|
|
60
77
|
initializer "ember_rails.setup_vendor", :after => "ember_rails.copy_vendor_to_local", :group => :all do |app|
|
61
|
-
app
|
62
|
-
|
63
|
-
|
64
|
-
|
78
|
+
configure_assets app do |env|
|
79
|
+
env.append_path ::Ember::Source.bundled_path_for(nil)
|
80
|
+
env.append_path ::Ember::Data::Source.bundled_path_for(nil)
|
81
|
+
env.append_path ::Ember::Data::ActiveModel::Adapter::Source.bundled_path_for(nil)
|
82
|
+
env.append_path File.expand_path('../', ::Handlebars::Source.bundled_path) if defined?(::Handlebars::Source)
|
83
|
+
end
|
65
84
|
end
|
66
85
|
|
67
86
|
initializer "ember_rails.setup_ember_template_compiler", :after => "ember_rails.setup_vendor", :group => :all do |app|
|
68
|
-
|
87
|
+
configure_assets app do |env|
|
88
|
+
Ember::Handlebars::Template.setup_ember_template_compiler(env.resolve('ember-template-compiler.js'))
|
89
|
+
end
|
69
90
|
end
|
70
91
|
|
71
92
|
initializer "ember_rails.es5_default", :group => :all do |app|
|
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.19.
|
4
|
+
version: 0.19.2
|
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: 2015-08-
|
14
|
+
date: 2015-08-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: railties
|
@@ -334,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
version: '0'
|
335
335
|
requirements: []
|
336
336
|
rubyforge_project:
|
337
|
-
rubygems_version: 2.4.
|
337
|
+
rubygems_version: 2.4.5.1
|
338
338
|
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: Ember for Rails 3.1+
|