ember-rails 0.18.4 → 0.18.5
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 +27 -6
- 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: 7ff97dd7b40a93758ef542f4a1743c0c6d5a00b7
|
4
|
+
data.tar.gz: ed0d46f1dd9ea3a6b8796db07dc8f5a3fd030863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a98d995f779563de591541ed3b138400630d00cbd9535e1a7dbb23f3d61ce7fda0038448b10d606d071d23540541a1211e92bc2df8fd33c18440011424e89cd
|
7
|
+
data.tar.gz: 7dc095c8c6c2b879ae5b68df12fd3d2ae33e76fe86e2784c88ed5193b4e86b064b41b67d54015894658e61fc6a9ba14e59c621caa73eefaf688eb5647262243f
|
data/lib/ember/rails/version.rb
CHANGED
data/lib/ember_rails.rb
CHANGED
@@ -26,12 +26,27 @@ module Ember
|
|
26
26
|
require "generators/ember/resource_override"
|
27
27
|
end
|
28
28
|
|
29
|
+
def configure_assets(app)
|
30
|
+
if config.respond_to?(:assets) && config.assets.respond_to?(:configure)
|
31
|
+
# Rails 4.x
|
32
|
+
config.assets.configure do |env|
|
33
|
+
yield env
|
34
|
+
end
|
35
|
+
else
|
36
|
+
# Rails 3.2
|
37
|
+
yield app.assets
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
29
41
|
initializer "ember_rails.setup_vendor_on_locale", :after => "ember_rails.setup", :group => :all do |app|
|
30
42
|
variant = app.config.ember.variant || (::Rails.env.production? ? :production : :development)
|
31
43
|
|
32
44
|
# Allow a local variant override
|
33
45
|
ember_path = app.root.join("vendor/assets/ember/#{variant}")
|
34
|
-
|
46
|
+
|
47
|
+
configure_assets app do |env|
|
48
|
+
env.prepend_path(ember_path.to_s) if ember_path.exist?
|
49
|
+
end
|
35
50
|
end
|
36
51
|
|
37
52
|
initializer "ember_rails.copy_vendor_to_local", :after => "ember_rails.setup", :group => :all do |app|
|
@@ -52,17 +67,23 @@ module Ember
|
|
52
67
|
ember_data_ext = variant == :production ? ".prod.js" : ".js"
|
53
68
|
FileUtils.cp(::Ember::Data::Source.bundled_path_for("ember-data#{ember_data_ext}"), tmp_path.join("ember-data.js"))
|
54
69
|
|
55
|
-
app
|
70
|
+
configure_assets app do |env|
|
71
|
+
env.append_path tmp_path
|
72
|
+
end
|
56
73
|
end
|
57
74
|
|
58
75
|
initializer "ember_rails.setup_vendor", :after => "ember_rails.copy_vendor_to_local", :group => :all do |app|
|
59
|
-
app
|
60
|
-
|
61
|
-
|
76
|
+
configure_assets app do |env|
|
77
|
+
env.append_path ::Ember::Source.bundled_path_for(nil)
|
78
|
+
env.append_path ::Ember::Data::Source.bundled_path_for(nil)
|
79
|
+
env.append_path File.expand_path('../', ::Handlebars::Source.bundled_path) if defined?(::Handlebars::Source)
|
80
|
+
end
|
62
81
|
end
|
63
82
|
|
64
83
|
initializer "ember_rails.setup_ember_template_compiler", :after => "ember_rails.setup_vendor", :group => :all do |app|
|
65
|
-
|
84
|
+
configure_assets app do |env|
|
85
|
+
Ember::Handlebars::Template.setup_ember_template_compiler(env.resolve('ember-template-compiler.js'))
|
86
|
+
end
|
66
87
|
end
|
67
88
|
|
68
89
|
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.18.
|
4
|
+
version: 0.18.5
|
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
|
@@ -320,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
320
|
version: '0'
|
321
321
|
requirements: []
|
322
322
|
rubyforge_project:
|
323
|
-
rubygems_version: 2.4.
|
323
|
+
rubygems_version: 2.4.5.1
|
324
324
|
signing_key:
|
325
325
|
specification_version: 4
|
326
326
|
summary: Ember for Rails 3.1+
|