ember-middleman 0.0.4 → 0.0.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: b258bfcc0df720da313702b1fcfebf61a9765307
4
- data.tar.gz: 4eb063744b29b990ff05ccd69f23832bbe224bf2
3
+ metadata.gz: f191f2813cdf9d7ed789d174f53f66bf9c50628e
4
+ data.tar.gz: d837e70e043484581b14435320abfc6130635f4e
5
5
  SHA512:
6
- metadata.gz: eaa06b4d1ab6f170a33e2d32a57e9d726421322796f9f9d891776d511a3a5ec6797667e08c95d581619cd1c654bd4aaa03051e559cac60e72cbf8a34ccb1a490
7
- data.tar.gz: f659fbf91b43e88be2c1cc45a193ff08c850b7f56c3f1902143ba4358ee3416c1ff6ad21845479ae0bfd0464084effebef2ac805a746996f553f1c53256a2596
6
+ metadata.gz: 65cc630f2342672389e7bbd4e4543ecee5bf6a66eb2bab4ff95a0cae13435cc069f4f2db24d16331e98313aa856077b250415e7162ede64bbb59c4760294b2ec
7
+ data.tar.gz: f10759fa2dcbd731544dcb968178fc94c216d987eca94b0e5394fb217ef84a223ad86fb84f50e626b0d8399db9b643ac42bf10ccc94fbf1c6c96c8023d0e9f47
@@ -3,3 +3,8 @@ Feature: Handlebars compilation
3
3
  Given the Server is running at "handlebars-compilation"
4
4
  When I go to "/javascripts/templates.js"
5
5
  Then I should see 'Ember.TEMPLATES["ok_button"]'
6
+
7
+ Scenario: Access template as JS file
8
+ Given the Server is running at "handlebars-compilation"
9
+ When I go to "/javascripts/templates/ok_button.js"
10
+ Then I should see 'Ember.TEMPLATES["ok_button"]'
@@ -20,18 +20,24 @@ module Ember
20
20
  yield config if block_given?
21
21
 
22
22
  app.before_configuration do
23
- template_extensions :handlebars => :javascript
23
+ template_extensions handlebars: :js,
24
+ hbs: :js,
25
+ hjs: :js
24
26
  end
25
27
 
26
28
  app.after_configuration do
27
29
  sprockets.append_path ::Ember::Source.bundled_path_for(nil)
28
30
  sprockets.append_path ::Ember::Data::Source.bundled_path_for(nil)
29
31
  sprockets.append_path File.dirname(::Handlebars::Source.bundled_path)
32
+
33
+ sprockets.register_engine '.handlebars', Ember::Middleman::Handlebars::Template
34
+ sprockets.register_engine '.hbs', Ember::Middleman::Handlebars::Template
35
+ sprockets.register_engine '.hjs', Ember::Middleman::Handlebars::Template
30
36
  end
31
37
 
32
- Sprockets.register_engine '.handlebars', Ember::Middleman::Handlebars::Template
33
- Sprockets.register_engine '.hbs', Ember::Middleman::Handlebars::Template
34
- Sprockets.register_engine '.hjs', Ember::Middleman::Handlebars::Template
38
+ ::Tilt.register '.handlebars', Ember::Middleman::Handlebars::Template
39
+ ::Tilt.register '.hbs', Ember::Middleman::Handlebars::Template
40
+ ::Tilt.register '.hjs', Ember::Middleman::Handlebars::Template
35
41
  end
36
42
  end
37
43
  end
@@ -8,9 +8,7 @@ module Ember
8
8
  module Middleman
9
9
  module Handlebars
10
10
  class Template < Tilt::Template
11
- def self.default_mime_type
12
- 'application/javascript'
13
- end
11
+ self.default_mime_type = 'application/javascript'
14
12
 
15
13
  def self.configuration
16
14
  @configuration ||= OpenStruct.new
@@ -49,6 +47,10 @@ module Ember
49
47
  self.class.configuration
50
48
  end
51
49
 
50
+ def allows_script?
51
+ false
52
+ end
53
+
52
54
  private
53
55
 
54
56
  def handlebars?(scope)
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Middleman
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-middleman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-05 00:00:00.000000000 Z
11
+ date: 2014-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: barber