emberprecompile 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,17 +10,15 @@ module Emberprecompile
10
10
 
11
11
  Find.find(source) do |file|
12
12
  if !FileTest.directory?(file)
13
- print "Compiling "+file
14
- templateName = file.chomp(".handlebars")
15
- templateName.slice!(source)
16
- result = Barber::Ember::FilePrecompiler.call(File.read(file))
17
- output.write('/* '+ templateName + ' Handlebar */')
18
- output.puts @string
19
- output.write('Ember.TEMPLATES["' + templateName + '"] = ' + result + '')
20
- output.puts @string
21
- print "\n"
22
- else
23
- next
13
+ if(file.end_with?(".handlebars"))
14
+ print "Compiling "+file
15
+ templateName = file.chomp(".handlebars")
16
+ templateName.slice!(source)
17
+ result = Barber::Ember::FilePrecompiler.call(File.read(file))
18
+ output.write('/* '+ templateName + ' Handlebar */')
19
+ output.write('Ember.TEMPLATES["' + templateName + '"] = ' + result + '')
20
+ print "\n"
21
+ end
24
22
  end
25
23
  end
26
24
  print "\n"
@@ -1,3 +1,3 @@
1
1
  module Emberprecompile
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emberprecompile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2013-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: barber