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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9799668878e4b56fcaba55c32546fb35fd748a17
4
- data.tar.gz: 33cb45199dcbcd0da57ec5a734381f020bceec62
3
+ metadata.gz: 7ff97dd7b40a93758ef542f4a1743c0c6d5a00b7
4
+ data.tar.gz: ed0d46f1dd9ea3a6b8796db07dc8f5a3fd030863
5
5
  SHA512:
6
- metadata.gz: c19cf4ab1339a2460d91f1ef3e15654eaa61937b1fbbe1de8b433be124e44369db96c6394f363c0bf2e8c563e639548d7e68a4045abded752ec915ec242779e2
7
- data.tar.gz: d5e2e4e055a6616e230aac87d4bb777c2948f4c27993bbb3ec33183c0e1a23b75b06a15e1d43e177f28d4e12aacb253731f36a2685c16bc52bf9d519e234122e
6
+ metadata.gz: 9a98d995f779563de591541ed3b138400630d00cbd9535e1a7dbb23f3d61ce7fda0038448b10d606d071d23540541a1211e92bc2df8fd33c18440011424e89cd
7
+ data.tar.gz: 7dc095c8c6c2b879ae5b68df12fd3d2ae33e76fe86e2784c88ed5193b4e86b064b41b67d54015894658e61fc6a9ba14e59c621caa73eefaf688eb5647262243f
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Rails
3
- VERSION = '0.18.4'
3
+ VERSION = '0.18.5'
4
4
  end
5
5
  end
@@ -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
- app.assets.prepend_path(ember_path.to_s) if ember_path.exist?
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.assets.append_path(tmp_path)
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.assets.append_path(::Ember::Source.bundled_path_for(nil))
60
- app.assets.append_path(::Ember::Data::Source.bundled_path_for(nil))
61
- app.assets.append_path(File.expand_path('../', ::Handlebars::Source.bundled_path)) if defined?(::Handlebars::Source)
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
- Ember::Handlebars::Template.setup_ember_template_compiler(app.assets.resolve('ember-template-compiler.js'))
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
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-24 00:00:00.000000000 Z
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.7
323
+ rubygems_version: 2.4.5.1
324
324
  signing_key:
325
325
  specification_version: 4
326
326
  summary: Ember for Rails 3.1+