js_erb 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,7 +53,7 @@ module JsErb
53
53
  #
54
54
  def compile_locales
55
55
  Dir.glob("#{JsErb.config['path']['locales']}/*.yml").each do |file|
56
- name = File.basename(file, '.js.yml')
56
+ name = File.basename(file, '.yml')
57
57
  content = YAML.load(ERB.new(File.read(file)).result)
58
58
  File.open(File.join(JsErb.config['path']['compiled'], 'locales', "#{name}.js"), "wb") do |f|
59
59
  f.write("window.i18n = {t:function(key){for(var i in i18n.$){ return eval('i18n.$.'+i+'[\"'+key.replace(/\\./g, '\"][\"')+'\"]') }}, $:#{content.to_json} };")
@@ -2,7 +2,7 @@ module JsErb
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristijan Sedlak