ember-rails 0.16.4 → 0.17.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: e193b56bc41d164725875def1d5d905c4ce8894b
4
- data.tar.gz: d8235dd954452a5746f57be761093ec88e2afb01
3
+ metadata.gz: 7d4a9590ae4039949ea614394ca0caeb2abad7ca
4
+ data.tar.gz: 9d95fc4cd477131afa246207da35e9798015e9ef
5
5
  SHA512:
6
- metadata.gz: e15248446b595919ad8b59715b11790fed1da3284b0767fef2cf9d879dcff0291fa5a0efb5272dc1e37aabba69fb06eabdd7878f3adbf6c076dd84de91fee639
7
- data.tar.gz: 4c871faecfb02c5d2d77c3be8028a81bfb7f85e84e2350bf2a07342bc542ae95835fd4a2f5a6439361e910a8d4aa6ccdb2b4701f61f84a5ee1749013a24fde8b
6
+ metadata.gz: 25c951f6949cbac70a518294866198458f61226d0024f230999bb6ab3ffe4826630ef7620c9e517c6566be707119f25892dd88f66d97c9cf59584cb62544ee96
7
+ data.tar.gz: 114946b802515c50194646f4f3c474ae8279c06fd7b38ec2c6f0d49d682848fe27691e18013016813a241df4aaa1d703d575428784e9c78cf7007c377c7dab08
data/README.md CHANGED
@@ -331,7 +331,7 @@ Rails [`protect_from_forgery`](http://api.rubyonrails.org/classes/ActionControll
331
331
  The CSRF token is normally found in `app/views/layouts/application.html.*` inserted with the rails helper: [`csrf_meta_tags`](http://api.rubyonrails.org/classes/ActionView/Helpers/CsrfHelper.html#method-i-csrf_meta_tags).
332
332
 
333
333
  When you use [jquery-ujs](https://github.com/rails/jquery-ujs),
334
- the CSRF token will be send to rails application on every XHR automatically.
334
+ the CSRF token will be sent to the rails application on every XHR automatically.
335
335
  If not so, the following JavaScript is required in your code.
336
336
 
337
337
  ``` javascript
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Rails
3
- VERSION = '0.16.4'
3
+ VERSION = '0.17.0'
4
4
  end
5
5
  end
@@ -3,7 +3,13 @@ require 'ember/source'
3
3
  require 'ember/data/source'
4
4
  require 'ember/rails/version'
5
5
  require 'ember/rails/engine'
6
- require 'handlebars/source'
6
+
7
+ # Use handlebars if it possible. Because it is an optional feature.
8
+ begin
9
+ require 'handlebars/source'
10
+ rescue LoadError => e
11
+ raise e unless e.message == 'cannot load such file -- handlebars/source'
12
+ end
7
13
 
8
14
  module Ember
9
15
  module Rails
@@ -52,7 +58,7 @@ module Ember
52
58
  initializer "ember_rails.setup_vendor", :after => "ember_rails.copy_vendor_to_local", :group => :all do |app|
53
59
  app.assets.append_path(::Ember::Source.bundled_path_for(nil))
54
60
  app.assets.append_path(::Ember::Data::Source.bundled_path_for(nil))
55
- app.assets.append_path(File.expand_path('../', ::Handlebars::Source.bundled_path))
61
+ app.assets.append_path(File.expand_path('../', ::Handlebars::Source.bundled_path)) if defined?(::Handlebars::Source)
56
62
  end
57
63
 
58
64
  initializer "ember_rails.es5_default", :group => :all do |app|
@@ -18,8 +18,8 @@ module Ember
18
18
  comp_path = File.join(ember_path, 'components', class_path, "#{dashed_file_name}_component.#{engine_extension}")
19
19
  template "component.#{engine_extension}", comp_path
20
20
 
21
- templ_path = File.join(ember_path, 'templates/components', class_path, "#{dashed_file_name}.handlebars")
22
- template "component.template.handlebars", templ_path
21
+ templ_path = File.join(ember_path, 'templates/components', class_path, "#{dashed_file_name}.hbs")
22
+ template "component.template.hbs", templ_path
23
23
 
24
24
  end
25
25
 
@@ -14,8 +14,8 @@ module Ember
14
14
 
15
15
 
16
16
  def create_template_files
17
- file_path = File.join(ember_path, 'templates', class_path, "#{file_name}.handlebars")
18
- template 'template.handlebars', file_path
17
+ file_path = File.join(ember_path, 'templates', class_path, "#{file_name}.hbs")
18
+ template 'template.hbs', file_path
19
19
  end
20
20
 
21
21
  end
@@ -1,6 +1,6 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
- //= require handlebars
3
+ <%= "//= require handlebars\n" if ::Rails.configuration.handlebars.ember_template == 'Handlebars' -%>
4
4
  //= require ember
5
5
  //= require ember-data
6
6
  //= require_self
@@ -1,6 +1,6 @@
1
1
  #= require jquery
2
2
  #= require jquery_ujs
3
- #= require handlebars
3
+ <%= "#= require handlebars\n" if ::Rails.configuration.handlebars.ember_template == 'Handlebars' -%>
4
4
  #= require ember
5
5
  #= require ember-data
6
6
  #= require_self
@@ -1,6 +1,6 @@
1
1
  #= require jquery
2
2
  #= require jquery_ujs
3
- #= require handlebars
3
+ <%= "#= require handlebars\n" if ::Rails.configuration.handlebars.ember_template == 'Handlebars' -%>
4
4
  #= require ember
5
5
  #= require ember-data
6
6
  #= require_self
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
4
+ version: 0.17.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-02-17 00:00:00.000000000 Z
14
+ date: 2015-03-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: execjs
@@ -61,14 +61,14 @@ dependencies:
61
61
  requirements:
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: 0.6.0
64
+ version: 0.7.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: 0.6.0
71
+ version: 0.7.0
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: jquery-rails
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -97,26 +97,6 @@ dependencies:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: 1.1.0
100
- - !ruby/object:Gem::Dependency
101
- name: handlebars-source
102
- requirement: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - ">"
105
- - !ruby/object:Gem::Version
106
- version: 1.0.0
107
- - - "<"
108
- - !ruby/object:Gem::Version
109
- version: '3'
110
- type: :runtime
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - ">"
115
- - !ruby/object:Gem::Version
116
- version: 1.0.0
117
- - - "<"
118
- - !ruby/object:Gem::Version
119
- version: '3'
120
100
  - !ruby/object:Gem::Dependency
121
101
  name: ember-data-source
122
102
  requirement: !ruby/object:Gem::Requirement
@@ -174,7 +154,7 @@ dependencies:
174
154
  - !ruby/object:Gem::Version
175
155
  version: '0'
176
156
  - !ruby/object:Gem::Dependency
177
- name: sprockets-rails
157
+ name: vcr
178
158
  requirement: !ruby/object:Gem::Requirement
179
159
  requirements:
180
160
  - - ">="
@@ -188,7 +168,21 @@ dependencies:
188
168
  - !ruby/object:Gem::Version
189
169
  version: '0'
190
170
  - !ruby/object:Gem::Dependency
191
- name: vcr
171
+ name: webmock
172
+ requirement: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - "<"
175
+ - !ruby/object:Gem::Version
176
+ version: 1.14.0
177
+ type: :development
178
+ prerelease: false
179
+ version_requirements: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - "<"
182
+ - !ruby/object:Gem::Version
183
+ version: 1.14.0
184
+ - !ruby/object:Gem::Dependency
185
+ name: sprockets-rails
192
186
  requirement: !ruby/object:Gem::Requirement
193
187
  requirements:
194
188
  - - ">="
@@ -202,19 +196,25 @@ dependencies:
202
196
  - !ruby/object:Gem::Version
203
197
  version: '0'
204
198
  - !ruby/object:Gem::Dependency
205
- name: webmock
199
+ name: handlebars-source
206
200
  requirement: !ruby/object:Gem::Requirement
207
201
  requirements:
202
+ - - ">"
203
+ - !ruby/object:Gem::Version
204
+ version: 1.0.0
208
205
  - - "<"
209
206
  - !ruby/object:Gem::Version
210
- version: 1.14.0
207
+ version: '3'
211
208
  type: :development
212
209
  prerelease: false
213
210
  version_requirements: !ruby/object:Gem::Requirement
214
211
  requirements:
212
+ - - ">"
213
+ - !ruby/object:Gem::Version
214
+ version: 1.0.0
215
215
  - - "<"
216
216
  - !ruby/object:Gem::Version
217
- version: 1.14.0
217
+ version: '3'
218
218
  description:
219
219
  email:
220
220
  - me@keithpitt.com
@@ -248,7 +248,7 @@ files:
248
248
  - lib/generators/templates/app.js
249
249
  - lib/generators/templates/app.js.coffee
250
250
  - lib/generators/templates/app.js.em
251
- - lib/generators/templates/application.handlebars
251
+ - lib/generators/templates/application.hbs
252
252
  - lib/generators/templates/application.js
253
253
  - lib/generators/templates/application.js.coffee
254
254
  - lib/generators/templates/application.js.em
@@ -261,7 +261,7 @@ files:
261
261
  - lib/generators/templates/component.js
262
262
  - lib/generators/templates/component.js.coffee
263
263
  - lib/generators/templates/component.js.em
264
- - lib/generators/templates/component.template.handlebars
264
+ - lib/generators/templates/component.template.hbs
265
265
  - lib/generators/templates/controller.js
266
266
  - lib/generators/templates/controller.js.coffee
267
267
  - lib/generators/templates/controller.js.em
@@ -277,7 +277,7 @@ files:
277
277
  - lib/generators/templates/router.js
278
278
  - lib/generators/templates/router.js.coffee
279
279
  - lib/generators/templates/router.js.em
280
- - lib/generators/templates/template.handlebars
280
+ - lib/generators/templates/template.hbs
281
281
  - lib/generators/templates/view.js
282
282
  - lib/generators/templates/view.js.coffee
283
283
  - lib/generators/templates/view.js.em