js_erb 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,7 +56,7 @@ module JsErb
56
56
  name = File.basename(file, '.js.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
- f.write("window.i18n = {t:function(key){for(var i in i18n.$){return eval('i18n.$.'+i+'.'+key)}}, $:#{content.to_json} };")
59
+ f.write("window.i18n = {t:function(key){for(var i in i18n.$){ return eval('i18n.$.'+i+'[\"'+key.replace(/\\./g, '\"][\"')+'\"]') }}, $:#{content.to_json} };")
60
60
  end
61
61
  end
62
62
  end
@@ -2,7 +2,7 @@ module JsErb
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js_erb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kristijan Sedlak