i18n_checker 0.8.6 → 0.8.7

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: de8b882e53e0bf640ab84e6e98c3aee570940604
4
- data.tar.gz: b93e9bad7bccafc8d81d08ab3faacd1387714005
3
+ metadata.gz: dd31944e28c141c0196975d4cbb8a2e171834b53
4
+ data.tar.gz: 129949bfbb57a8dcb97b290bc8d32e99d5212d8a
5
5
  SHA512:
6
- metadata.gz: a83ef2ab6f6617b2a500c59f7d051417902e88c5ce19b70de92c933f31fb31e40f9adbcf578769bb1430a21fb17429563c9c4e0f54a373aff6f0df12966effd7
7
- data.tar.gz: 4361acd0e7a245d22713205bbb5e96a469e87f35f1a4737175fa2023146c8ff2865c929ee135924d5fe93a1258915da2d50ecad3f451bb4af74ea0a70e2a0cd1
6
+ metadata.gz: 9ce662d65bce4aa03f5b23ecdfd49e4147b0f77e88240fd0f0d961b28c86cb0053426fce6451ad7fc269aafa4c2ba70d60fbbe9b48e462995fc0d87137bbb097
7
+ data.tar.gz: 7a517f18886fb8c23e35dcd0fbe8d78671448aaf2203779395ec40df9252da628ffc4e57a71e9ff371d9ed9d18504881434a236376319509f310a326316d8053
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n_checker (0.8.6)
4
+ i18n_checker (0.8.7)
5
5
  colorator (~> 1.1.0)
6
6
  haml_parser (~> 0.4)
7
7
  parser
@@ -39,11 +39,11 @@ module I18nChecker
39
39
 
40
40
  def collect_locale_text(ast)
41
41
  return locale_text_from_text(ast) if ast.is_a?(HamlParser::Ast::Text)
42
- return locale_text_from_script(ast) if ast.is_a?(HamlParser::Ast::Script)
42
+ return locale_text_from_script(ast) if script_node?(ast)
43
43
  return unless ast.respond_to?(:oneline_child)
44
44
  if ast.oneline_child.is_a?(HamlParser::Ast::Text)
45
45
  locale_text_from_text(ast.oneline_child)
46
- elsif ast.oneline_child.is_a?(HamlParser::Ast::Script)
46
+ elsif script_node?(ast.oneline_child)
47
47
  locale_text_from_script(ast.oneline_child)
48
48
  end
49
49
  end
@@ -88,7 +88,7 @@ module I18nChecker
88
88
 
89
89
  node_lines = if ast_node.is_a?(HamlParser::Ast::Text)
90
90
  ast_node.text.split("\n")
91
- elsif ast_node.is_a?(HamlParser::Ast::Script)
91
+ elsif script_node?(ast_node)
92
92
  ast_node.script.split("\n")
93
93
  end
94
94
 
@@ -110,7 +110,11 @@ module I18nChecker
110
110
  end
111
111
  results
112
112
  end
113
- end
113
+
114
+ def script_node?(ast_node)
115
+ ast_node.is_a?(HamlParser::Ast::Script) || ast_node.is_a?(HamlParser::Ast::SilentScript)
116
+ end
117
+ end
114
118
  end
115
119
  end
116
120
  end
@@ -1,3 +1,3 @@
1
1
  module I18nChecker
2
- VERSION = '0.8.6'.freeze
2
+ VERSION = '0.8.7'.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.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - holyshared