gettext_i18n_rails 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed99097612654d09733a3d63ac71dfc1284aac5d
4
- data.tar.gz: 3509111d78ec79cab4102e021b91911cda7efe75
3
+ metadata.gz: d7557b2fab972e1f2bf8b917fc988e61c2309840
4
+ data.tar.gz: e127e33460bbb73d235214d7fd1e53911d59af18
5
5
  SHA512:
6
- metadata.gz: 4b5cd433328403fe28752dda13a54255376fffa27ca76cd8dde4b14eaaed66a072863943c94139f05683affbe00ff18ce5bc09e47aa8c6c0bc71f5141394e96d
7
- data.tar.gz: e09b985cbf7eaaf11204ad0248eb49060e0a9a45baeb737826bdcaa4dfeec325bb79303fdd84becf6146ad009859dd5b3769f9c282a3a1a9d6be4039601812b8
6
+ metadata.gz: be0e6655736b607005b33755e68468415c042b9c8d98200da3144f086bf7f8f5752cc87d67520adb459d4ebcc51a7e2c4dd34be123a5fa4d6bb93b92b83f851a
7
+ data.tar.gz: 32f16b2163256df40b9391511d67e2305cc5fbf718794c6d56da8a8a41eeb329fcc6022487cdeb5d855cb311fcc5d16cf049f5b2d128202d8b22ba40a27c5777
@@ -6,7 +6,7 @@ module GettextI18nRails
6
6
  File.extname(file) == ".#{extension}"
7
7
  end
8
8
 
9
- def self.parse(file, msgids = [])
9
+ def self.parse(file, _options = {}, msgids = [])
10
10
  return msgids unless load_library
11
11
  code = convert_to_code(File.read(file))
12
12
  RubyGettextExtractor.parse_string(code, msgids, file)
@@ -8,13 +8,13 @@ module RubyGettextExtractor
8
8
  extend self
9
9
 
10
10
  def parse(file, targets = []) # :nodoc:
11
- parse_string(File.new(file), targets)
11
+ parse_string(File.read(file), targets, file)
12
12
  end
13
13
 
14
- def parse_string(content, targets = [], file = nil)
15
- syntax_tree = RubyParser.for_current_ruby.parse(content)
14
+ def parse_string(content, targets = [], file)
15
+ syntax_tree = RubyParser.for_current_ruby.parse(content, file)
16
16
 
17
- processor = Extractor.new(targets, file)
17
+ processor = Extractor.new(targets)
18
18
  processor.require_empty = false
19
19
  processor.process(syntax_tree)
20
20
 
@@ -24,8 +24,7 @@ module RubyGettextExtractor
24
24
  class Extractor < SexpProcessor
25
25
  attr_reader :results
26
26
 
27
- def initialize(targets, file_name = nil)
28
- @file_name = file_name
27
+ def initialize(targets)
29
28
  @targets = {}
30
29
  @results = []
31
30
 
@@ -96,8 +95,7 @@ module RubyGettextExtractor
96
95
  @targets[key] = res
97
96
  end
98
97
 
99
- file_name = @file_name.nil? ? args.file : @file_name
100
- res << "#{file_name}:#{args.line}"
98
+ res << "#{args.file}:#{args.line}"
101
99
  end
102
100
  end
103
101
 
@@ -1,3 +1,3 @@
1
1
  module GettextI18nRails
2
- Version = VERSION = '1.3.0'
2
+ Version = VERSION = '1.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext_i18n_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-08 00:00:00.000000000 Z
11
+ date: 2015-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fast_gettext
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project:
228
- rubygems_version: 2.2.2
228
+ rubygems_version: 2.4.5.1
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: Simple FastGettext Rails integration.