slimkeyfy 0.0.1 → 0.0.2
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/lib/slimkeyfy/console/command_line.rb +7 -7
- data/lib/slimkeyfy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ee5c9bad4a4451f742d2dd6cc4b58200fccc293
|
|
4
|
+
data.tar.gz: fb7116389730093d186eed6e347653d73651191a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec2d6e0334284b0b23dbdbde0b7e6642ed9bfb2356cfa25171b3b2fcde8b61294b6fce9c4cc809c22014291b74e2436062641086e6d28bd58dc30f9baa76ed1c
|
|
7
|
+
data.tar.gz: ccb8f003cfd001ece01588eb6186aebd3902ff93a159f4c667b952a5c03baabc9e6dae4e05647fa3cb7c5e69ec94afa25e314165a656b58b1e004261482cf686
|
|
@@ -17,8 +17,8 @@ class SlimKeyfy::Console::Commandline
|
|
|
17
17
|
#{"Usage".white}: slimkeyfy #{"INPUT_FILENAME_OR_DIRECTORY".green} #{"LOCALE".red} #{"[YAML_FILE]".yellow} [Options]
|
|
18
18
|
e.g. slimkeyfy #{"app/views/users/".green} #{"en".red} #{"phrase/locales/en.yml".yellow} [Options]
|
|
19
19
|
|
|
20
|
-
#{"Description".white}: Extract plain Strings from .slim views and Rails controllers to
|
|
21
|
-
replace them with I18n's t() method. Keys with it's translations will be streamed
|
|
20
|
+
#{"Description".white}: Extract plain Strings from .slim views and Rails controllers to
|
|
21
|
+
replace them with I18n's t() method. Keys with it's translations will be streamed
|
|
22
22
|
to a YAML file.
|
|
23
23
|
|
|
24
24
|
the following options are available:
|
|
@@ -32,13 +32,13 @@ class SlimKeyfy::Console::Commandline
|
|
|
32
32
|
puts "0.1"
|
|
33
33
|
exit
|
|
34
34
|
end
|
|
35
|
-
opts.on_tail('-R', '--recursive', 'If a directory is given all subdirectories will be walked either.
|
|
35
|
+
opts.on_tail('-R', '--recursive', 'If a directory is given all subdirectories will be walked either.
|
|
36
36
|
Without -r and a directory just the files within the first level are walked.
|
|
37
37
|
') do
|
|
38
38
|
@options[:recursive] = true
|
|
39
39
|
end
|
|
40
|
-
opts.on_tail('-b', '--no-backup', 'No Backups - for safety reasons - are created. For minimum safety we
|
|
41
|
-
recommend a version control like git. Backups will still be created for
|
|
40
|
+
opts.on_tail('-b', '--no-backup', 'No Backups - for safety reasons - are created. For minimum safety we
|
|
41
|
+
recommend a version control like git. Backups will still be created for
|
|
42
42
|
comparison but deleted right after you agree to the changes.
|
|
43
43
|
') do
|
|
44
44
|
@options[:no_backup] = true
|
|
@@ -65,7 +65,7 @@ class SlimKeyfy::Console::Commandline
|
|
|
65
65
|
def directory_translate(input)
|
|
66
66
|
rec = @options.fetch(:recursive, false)
|
|
67
67
|
SlimKeyfy::Slimutils::MFileUtils.walk(input, rec).each do |rec_input|
|
|
68
|
-
if File.file?(rec_input) and
|
|
68
|
+
if File.file?(rec_input) and SlimKeyfy::Slimutils::MFileUtils.is_valid_extension?(rec_input) then
|
|
69
69
|
@options[:input] = rec_input
|
|
70
70
|
translate
|
|
71
71
|
end
|
|
@@ -87,4 +87,4 @@ class SlimKeyfy::Console::Commandline
|
|
|
87
87
|
SlimKeyfy::Slimutils::MFileUtils.restore(translate_slim.bak_path, translate_slim.original_file_path)
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
|
-
end
|
|
90
|
+
end
|
data/lib/slimkeyfy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slimkeyfy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dynport GmbH
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-09-
|
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|