i18n-tasks 1.0.4 → 1.0.5
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 +4 -4
- data/README.md +1 -1
- data/lib/i18n/tasks/scanners/erb_ast_processor.rb +8 -1
- data/lib/i18n/tasks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d600c7425116c27f5cadffdc23d6e29de6137f90cea588e1a046ca1ec5970f5
|
4
|
+
data.tar.gz: 91ea505ba06486d962e7be61eb52ca6af18bc8d481fdeb6a193f715b3c2f55a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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, [
|
82
|
+
[nil, nil, code_node.updated(nil, [code]), nil]
|
76
83
|
)
|
77
84
|
end
|
78
85
|
|
data/lib/i18n/tasks/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2022-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|