guard-i18next 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,10 +8,8 @@ module Guard
8
8
 
9
9
  DEFAULT_OPTIONS = {
10
10
  :output => Pathname.pwd.join('app', 'assets', 'javascripts', 'i18n'),
11
- :namespace => '(global || window).Locales'
12
11
  }
13
12
 
14
-
15
13
  # Initialize Guard::i18next
16
14
  #
17
15
  # @param [Array<Guard::Watcher>] watchers the watchers in the Guard block
@@ -39,14 +37,11 @@ module Guard
39
37
  locale = YAML.load(input.read)
40
38
  input.close
41
39
 
42
- locale_key = locale.keys[0]
43
- content = locale[locale_key]
44
40
  File.open(options[:output] + "/#{filename}.json", "w") do |f|
45
- # Initialize namespace (if it hasn't been already)
46
- f.puts "#{options[:namespace]} = #{options[:namespace]} != null ? #{options[:namespace]} : {}"
47
- f.puts options[:namespace] + "[#{locale_key}] = " + content.to_json
41
+ f.puts locale.to_json
48
42
  end
49
43
  end
50
44
  end
45
+
51
46
  end
52
47
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  class I18nextVersion
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-i18next
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: