i18n_checker 0.7.3 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '05952c57f59e408d9ef1cde0eb61b7003dba8b04'
4
- data.tar.gz: be48696771888e8425274324bc5c8f27462a5cdd
3
+ metadata.gz: f0695d2dccfc42be22b1aeb675d5a45e790c72f0
4
+ data.tar.gz: a2cc2fa299502efb639c81dcec86474cef9455aa
5
5
  SHA512:
6
- metadata.gz: 0005ec8843e4ff29315c8e3e351878647da31d61c0621c8e63ceea4d7031b3e73f6cec2cf6fab7b5f4687587fb1dabcb62f8f442c2e2bb01985b053ce4478de5
7
- data.tar.gz: e2014246957685b166a917edde84a90db7122e4897446880322c7f7acc57b42da8501582be8fd3f8e33d2f6dd10e2f3465f7b7b536ac26c964c307161683b258
6
+ metadata.gz: 0b097f01d168bc6bc4a16f223d94d04b39574ca4a01dbae50fb62825ce043f1a86dcb226fdae431b7cd9372cab83e222d427bfea7c29d1c0daa4e9991220ef00
7
+ data.tar.gz: e71cbda4f6ce0ecf1f647bca537da00ecd1119f22039d6c7729227efdde20b4c3ad1c712e9f3e1c068713cb50453695b075eebee78988d38c2433be9de42dea8
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n_checker (0.7.3)
4
+ i18n_checker (0.8.0)
5
5
  colorator (~> 1.1.0)
6
6
  haml_parser (~> 0.4)
7
7
  parser
@@ -12,24 +12,26 @@ GEM
12
12
  ansi (1.5.0)
13
13
  ast (2.3.0)
14
14
  colorator (1.1.0)
15
- coveralls (0.8.19)
15
+ coveralls (0.8.21)
16
16
  json (>= 1.8, < 3)
17
- simplecov (~> 0.12.0)
17
+ simplecov (~> 0.14.1)
18
18
  term-ansicolor (~> 1.3)
19
- thor (~> 0.19.1)
19
+ thor (~> 0.19.4)
20
20
  tins (~> 1.6)
21
21
  diff-lcs (1.3)
22
22
  docile (1.1.5)
23
23
  haml_parser (0.4.1)
24
24
  hirb (0.7.3)
25
25
  json (2.1.0)
26
- onkcop (0.47.1.2)
27
- rubocop (~> 0.47.1)
28
- rubocop-rspec (>= 1.12.0)
26
+ onkcop (0.49.1.0)
27
+ rubocop (~> 0.49.1)
28
+ rubocop-rspec (>= 1.15.1)
29
+ parallel (1.12.0)
29
30
  parser (2.4.0.0)
30
31
  ast (~> 2.2)
31
32
  powerpack (0.1.1)
32
- rainbow (2.2.1)
33
+ rainbow (2.2.2)
34
+ rake
33
35
  rake (10.5.0)
34
36
  rspec (3.6.0)
35
37
  rspec-core (~> 3.6.0)
@@ -46,16 +48,17 @@ GEM
46
48
  rspec-support (3.6.0)
47
49
  rspec-temp_dir (1.0.0)
48
50
  rspec (>= 3.0)
49
- rubocop (0.47.1)
51
+ rubocop (0.49.1)
52
+ parallel (~> 1.10)
50
53
  parser (>= 2.3.3.1, < 3.0)
51
54
  powerpack (~> 0.1)
52
55
  rainbow (>= 1.99.1, < 3.0)
53
56
  ruby-progressbar (~> 1.7)
54
57
  unicode-display_width (~> 1.0, >= 1.0.1)
55
- rubocop-rspec (1.13.0)
58
+ rubocop-rspec (1.15.1)
56
59
  rubocop (>= 0.42.0)
57
60
  ruby-progressbar (1.8.1)
58
- simplecov (0.12.0)
61
+ simplecov (0.14.1)
59
62
  docile (~> 1.1.0)
60
63
  json (>= 1.8, < 3)
61
64
  simplecov-html (~> 0.10.0)
@@ -64,11 +67,11 @@ GEM
64
67
  hirb
65
68
  simplecov
66
69
  simplecov-html (0.10.1)
67
- term-ansicolor (1.4.0)
70
+ term-ansicolor (1.6.0)
68
71
  tins (~> 1.0)
69
72
  thor (0.19.4)
70
- tins (1.13.2)
71
- unicode-display_width (1.1.3)
73
+ tins (1.15.0)
74
+ unicode-display_width (1.3.0)
72
75
  yard (0.9.9)
73
76
 
74
77
  PLATFORMS
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'i18n_checker/version'
@@ -61,7 +61,7 @@ module I18nChecker
61
61
  file: script_node.filename,
62
62
  line: script_node.lineno,
63
63
  column: column,
64
- text: locale_text
64
+ text: locale_text,
65
65
  )
66
66
  end
67
67
 
@@ -19,7 +19,7 @@ module I18nChecker
19
19
  file: file,
20
20
  line: arg_node.loc.line,
21
21
  column: arg_node.loc.column + 1,
22
- text: arg_node.children.first
22
+ text: arg_node.children.first,
23
23
  )
24
24
  super(node)
25
25
  end
@@ -13,14 +13,14 @@ module I18nChecker
13
13
  private
14
14
 
15
15
  def detect_not_found(locale_text)
16
- not_founds = @locale_texts.select do |_lang, texts|
16
+ not_founds = @locale_texts.reject do |_lang, texts|
17
17
  next false if texts.nil?
18
- !texts.key?(locale_text.text)
18
+ texts.key?(locale_text.text)
19
19
  end
20
20
  not_founds.keys.map do |not_found_lang|
21
21
  Text.new(
22
22
  lang: not_found_lang.to_sym,
23
- locale_text: locale_text
23
+ locale_text: locale_text,
24
24
  )
25
25
  end
26
26
  end
@@ -39,7 +39,7 @@ module I18nChecker
39
39
  commmand = I18nChecker::Command::Check.new(
40
40
  reporter: reporter,
41
41
  source_paths: source_paths,
42
- locale_file_paths: locale_file_paths
42
+ locale_file_paths: locale_file_paths,
43
43
  )
44
44
  commmand.run do |result|
45
45
  exit 1 unless result.empty?
@@ -39,7 +39,7 @@ module I18nChecker
39
39
  command = I18nChecker::Command::Clean.new(
40
40
  reporter: reporter,
41
41
  source_paths: source_paths,
42
- locale_file_paths: locale_file_paths
42
+ locale_file_paths: locale_file_paths,
43
43
  )
44
44
  command.run do |result|
45
45
  exit 1 unless result.empty?
@@ -13,7 +13,7 @@ module I18nChecker
13
13
  locale_file.locale_texts.map do |key, _v|
14
14
  I18nChecker::Unused::Text.new(
15
15
  text: key,
16
- file: locale_file
16
+ file: locale_file,
17
17
  )
18
18
  end
19
19
  end
@@ -29,8 +29,8 @@ module I18nChecker
29
29
  # @return [Array<I18nChecker::Locale::File>]
30
30
  def apply(target_locale_files)
31
31
  locale_files = target_locale_files.
32
- group_by(&:file_name).
33
- map { |k, v| [k, v.first] }
32
+ group_by(&:file_name).
33
+ map { |k, v| [k, v.first] }
34
34
 
35
35
  cleanup_locale_files = locale_files.map do |file_name, locale_file|
36
36
  return locale_file unless @locale_files.key?(file_name)
@@ -1,3 +1,3 @@
1
1
  module I18nChecker
2
- VERSION = '0.7.3'.freeze
2
+ VERSION = '0.8.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - holyshared