rake-pipeline-i18n-filters 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,12 +36,11 @@ module Rake::Pipeline::I18n::Filters
36
36
  # @param [FileWrapper] output a single {FileWrapper}
37
37
  # object representing the output.
38
38
  def generate_output(inputs, output)
39
- js_dec = 'I18n.translations = I18n.translations || {};'
40
39
  output_hash = {}
41
40
  inputs.each do |input|
42
41
  output_hash.deep_merge! YAML.load(input.read)
43
42
  end
44
- output.write "#{js_dec}\nI18n.translations = #{output_hash.to_json};"
43
+ output.write "I18n.translations = #{output_hash.to_json};"
45
44
  end
46
45
 
47
46
  private
@@ -2,7 +2,7 @@ module Rake
2
2
  class Pipeline
3
3
  module I18n
4
4
  module Filters
5
- VERSION = "0.0.4"
5
+ VERSION = "0.0.5"
6
6
  end
7
7
  end
8
8
  end
@@ -20,7 +20,7 @@ EOF
20
20
 
21
21
  # not using heredoc as it adds an extra \n to the end
22
22
  let(:expected_i18n_js) {
23
- "I18n.translations = I18n.translations || {};\nI18n.translations = {\"en\":{\"foo\":\"bar\",\"hoge\":\"hoge\"},\"ja\":{\"foo\":\"バー\",\"hoge\":\"ホゲ\"}};"
23
+ "I18n.translations = {\"en\":{\"foo\":\"bar\",\"hoge\":\"hoge\"},\"ja\":{\"foo\":\"バー\",\"hoge\":\"ホゲ\"}};"
24
24
  }
25
25
  def input_file(name, content)
26
26
  MemoryFileWrapper.new('/path/to/input', name, 'UTF-8', content)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-pipeline-i18n-filters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -83,7 +83,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  segments:
85
85
  - 0
86
- hash: -709470449074512646
86
+ hash: 4185059654656647175
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  none: false
89
89
  requirements:
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  segments:
94
94
  - 0
95
- hash: -709470449074512646
95
+ hash: 4185059654656647175
96
96
  requirements: []
97
97
  rubyforge_project:
98
98
  rubygems_version: 1.8.24