ember-rails 0.18.5 → 0.19.0

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: 7ff97dd7b40a93758ef542f4a1743c0c6d5a00b7
4
- data.tar.gz: ed0d46f1dd9ea3a6b8796db07dc8f5a3fd030863
3
+ metadata.gz: 60c79a29e21a0b32dbb561a606d5602c533efcc9
4
+ data.tar.gz: ce7e2f43d907b00438b87cd9f5d536dd768b91c8
5
5
  SHA512:
6
- metadata.gz: 9a98d995f779563de591541ed3b138400630d00cbd9535e1a7dbb23f3d61ce7fda0038448b10d606d071d23540541a1211e92bc2df8fd33c18440011424e89cd
7
- data.tar.gz: 7dc095c8c6c2b879ae5b68df12fd3d2ae33e76fe86e2784c88ed5193b4e86b064b41b67d54015894658e61fc6a9ba14e59c621caa73eefaf688eb5647262243f
6
+ metadata.gz: d0446ade896e01ee3da2d8aa38f6cee79ff89f2574b109b9b6a3f6fd20df572cc0b653c81eb789b9b3e65f80ab9792ee3aa937949ec30f457986289dd97f36a8
7
+ data.tar.gz: c2d86f6c6af314dd0febb294acdbb1fd81ab9974e2b95285e8e149a6b807aeb86799d8ea46879b15efb1188a55da9c920b07e2ab46d39a8f2f788a16593c4619
@@ -17,8 +17,9 @@ module Ember
17
17
 
18
18
  config.before_initialize do |app|
19
19
  Sprockets::Engines #force autoloading
20
-
21
- Ember::Handlebars::Template.setup Sprockets
20
+ Sprockets.register_engine '.handlebars', Ember::Handlebars::Template
21
+ Sprockets.register_engine '.hbs', Ember::Handlebars::Template
22
+ Sprockets.register_engine '.hjs', Ember::Handlebars::Template
22
23
  end
23
24
  end
24
25
  end
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Rails
3
- VERSION = '0.18.5'
3
+ VERSION = '0.19.0'
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@ require 'ember/source'
3
3
  require 'ember/data/source'
4
4
  require 'ember/rails/version'
5
5
  require 'ember/rails/engine'
6
+ require 'ember/data/active_model/adapter/source'
6
7
 
7
8
  # Use handlebars if it possible. Because it is an optional feature.
8
9
  begin
@@ -26,27 +27,12 @@ module Ember
26
27
  require "generators/ember/resource_override"
27
28
  end
28
29
 
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
-
41
30
  initializer "ember_rails.setup_vendor_on_locale", :after => "ember_rails.setup", :group => :all do |app|
42
31
  variant = app.config.ember.variant || (::Rails.env.production? ? :production : :development)
43
32
 
44
33
  # Allow a local variant override
45
34
  ember_path = app.root.join("vendor/assets/ember/#{variant}")
46
-
47
- configure_assets app do |env|
48
- env.prepend_path(ember_path.to_s) if ember_path.exist?
49
- end
35
+ app.assets.prepend_path(ember_path.to_s) if ember_path.exist?
50
36
  end
51
37
 
52
38
  initializer "ember_rails.copy_vendor_to_local", :after => "ember_rails.setup", :group => :all do |app|
@@ -66,24 +52,20 @@ module Ember
66
52
  FileUtils.cp(::Ember::Source.bundled_path_for("ember#{ember_ext}"), tmp_path.join("ember.js"))
67
53
  ember_data_ext = variant == :production ? ".prod.js" : ".js"
68
54
  FileUtils.cp(::Ember::Data::Source.bundled_path_for("ember-data#{ember_data_ext}"), tmp_path.join("ember-data.js"))
55
+ FileUtils.cp(::Ember::Data::ActiveModel::Adapter::Source.bundled_path_for("active-model-adapter.js"), tmp_path.join("active-model-adapter.js"))
69
56
 
70
- configure_assets app do |env|
71
- env.append_path tmp_path
72
- end
57
+ app.assets.append_path(tmp_path)
73
58
  end
74
59
 
75
60
  initializer "ember_rails.setup_vendor", :after => "ember_rails.copy_vendor_to_local", :group => :all do |app|
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
61
+ app.assets.append_path(::Ember::Source.bundled_path_for(nil))
62
+ app.assets.append_path(::Ember::Data::Source.bundled_path_for(nil))
63
+ app.assets.append_path(::Ember::Data::ActiveModel::Adapter::Source.bundled_path_for(nil))
64
+ app.assets.append_path(File.expand_path('../', ::Handlebars::Source.bundled_path)) if defined?(::Handlebars::Source)
81
65
  end
82
66
 
83
67
  initializer "ember_rails.setup_ember_template_compiler", :after => "ember_rails.setup_vendor", :group => :all do |app|
84
- configure_assets app do |env|
85
- Ember::Handlebars::Template.setup_ember_template_compiler(env.resolve('ember-template-compiler.js'))
86
- end
68
+ Ember::Handlebars::Template.setup_ember_template_compiler(app.assets.resolve('ember-template-compiler.js'))
87
69
  end
88
70
 
89
71
  initializer "ember_rails.es5_default", :group => :all do |app|
@@ -3,6 +3,7 @@
3
3
  <%= "//= require handlebars\n" if ::Rails.configuration.handlebars.ember_template == 'Handlebars' -%>
4
4
  //= require ember
5
5
  //= require ember-data
6
+ //= require active-model-adapter
6
7
  //= require_self
7
8
  //= require ./<%= application_name.underscore %>
8
9
 
@@ -3,6 +3,7 @@
3
3
  <%= "#= require handlebars\n" if ::Rails.configuration.handlebars.ember_template == 'Handlebars' -%>
4
4
  #= require ember
5
5
  #= require ember-data
6
+ #= require active-model-adapter
6
7
  #= require_self
7
8
  #= require <%= application_name.underscore %>
8
9
 
@@ -3,6 +3,7 @@
3
3
  <%= "#= require handlebars\n" if ::Rails.configuration.handlebars.ember_template == 'Handlebars' -%>
4
4
  #= require ember
5
5
  #= require ember-data
6
+ #= require active-model-adapter
6
7
  #= require_self
7
8
  #= require <%= application_name.underscore %>
8
9
 
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.5
4
+ version: 0.19.0
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-28 00:00:00.000000000 Z
14
+ date: 2015-07-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -61,28 +61,42 @@ dependencies:
61
61
  requirements:
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: 1.1.0
64
+ version: 1.8.0
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: 1.1.0
71
+ version: 1.8.0
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: ember-data-source
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: 1.0.0.beta.5
78
+ version: 1.13.0
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
- version: 1.0.0.beta.5
85
+ version: 1.13.0
86
+ - !ruby/object:Gem::Dependency
87
+ name: active-model-adapter-source
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 1.13.0
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 1.13.0
86
100
  - !ruby/object:Gem::Dependency
87
101
  name: ember-handlebars-template
88
102
  requirement: !ruby/object:Gem::Requirement
@@ -320,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
320
334
  version: '0'
321
335
  requirements: []
322
336
  rubyforge_project:
323
- rubygems_version: 2.4.5.1
337
+ rubygems_version: 2.4.7
324
338
  signing_key:
325
339
  specification_version: 4
326
340
  summary: Ember for Rails 3.1+