i18n-tasks 1.0.4 → 1.0.5

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
  SHA256:
3
- metadata.gz: 5006a01bb4cc0233b564962b0260a626c0985b9e787e234d95a8176c93716d94
4
- data.tar.gz: a996c445790d6f679e17d77b241769d62fb6ee334af7bfa65f622b0c4b6b4864
3
+ metadata.gz: 4d600c7425116c27f5cadffdc23d6e29de6137f90cea588e1a046ca1ec5970f5
4
+ data.tar.gz: 91ea505ba06486d962e7be61eb52ca6af18bc8d481fdeb6a193f715b3c2f55a2
5
5
  SHA512:
6
- metadata.gz: 26c74331f3f32be4c8fbb49c16b308d6549f75eada577c2a589b0897591607d29a92d535a3a680d93957ada6a402ecafe87b923c54ef5563bdad7ec09f3949ac
7
- data.tar.gz: 792b07d6e3e8b90d15a2582c509b817189051846f9a1c520b0fb78a44aaa5c166def08c7819f204b3685d6d86a27f858e6c4a8ae0516c6305177a7c53217490b
6
+ metadata.gz: 0e74a51969f4a82f8fa479dc31cb9236cc9de5d6255fe99d6de9eb392fb85e8771f4b21cbaed35f8c114258ada6c88086fb6fae0f1e0d97d8eb1f2d317c4f834
7
+ data.tar.gz: 4a23c041ddef63f1b798f1455af637f77f369dcfb64e93f72c9592caf2105d2e9b15531679b30d7404746674596ee70078bba3525cbc2eacdce00d9d0ebc7054
data/README.md CHANGED
@@ -24,7 +24,7 @@ i18n-tasks can be used with any project using the ruby [i18n gem][i18n-gem] (def
24
24
  Add i18n-tasks to the Gemfile:
25
25
 
26
26
  ```ruby
27
- gem 'i18n-tasks', '~> 1.0.4'
27
+ gem 'i18n-tasks', '~> 1.0.5'
28
28
  ```
29
29
 
30
30
  Copy the default [configuration file](#configuration):
@@ -70,9 +70,16 @@ module I18n::Tasks::Scanners
70
70
  node.children[2]&.type == :code &&
71
71
  node.children[3].nil?
72
72
  code_node = node.children[2]
73
+
74
+ # Prepend # to each line to make it a valid Ruby comment.
75
+ code = code_node.children[0].split("\n").map do |line|
76
+ next line if line =~ /^\s*#/
77
+ "##{line}"
78
+ end.join("\n")
79
+
73
80
  node.updated(
74
81
  nil,
75
- [nil, nil, code_node.updated(nil, ["##{code_node.children[0]}"]), nil]
82
+ [nil, nil, code_node.updated(nil, [code]), nil]
76
83
  )
77
84
  end
78
85
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module Tasks
5
- VERSION = '1.0.4'
5
+ VERSION = '1.0.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-25 00:00:00.000000000 Z
11
+ date: 2022-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport