yamlt 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/yamlt.rake +36 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0604c384119607a173fe237896059892667adc4b
|
4
|
+
data.tar.gz: 714dcc0d6802e50229978983854bdaa6fd9e31bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27dd743028ce6ed8e744016b71cdb296a28174fb7fdae213af0b04f534393ac228ac5205cee35a258d9ae5e3ac1b7ddb73b644c364977cd9379a03abf9e29cf0
|
7
|
+
data.tar.gz: 824d4837f583dafcdb674b07dd5be679ad677d49b81b030d7fab4887c7ef5d68c83051c6bb32497cecbea779923e7ec39a09fb4148bcc526e036e31ffdfc55fa
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "yamlt/checker"
|
2
|
+
require "yamlt/updater"
|
3
|
+
|
4
|
+
namespace :i18n do
|
5
|
+
desc "Updates locale file from original one"
|
6
|
+
task :update, [:target] do |t, args|
|
7
|
+
# Calculate source and destination
|
8
|
+
target = args[:target]
|
9
|
+
source = ENV["FROM"] || "en"
|
10
|
+
|
11
|
+
# Calculate paths
|
12
|
+
base_path = File.expand_path(File.join(Dir.pwd, "config"))
|
13
|
+
target_path = File.join(base_path, target)
|
14
|
+
source_path = File.join(base_path, source)
|
15
|
+
|
16
|
+
# Take an action
|
17
|
+
updater = Yamlt::Updater.new(source_path, target_path)
|
18
|
+
updater.()
|
19
|
+
updater.rename_updated
|
20
|
+
end
|
21
|
+
|
22
|
+
desc "Checks for missing values in locale file"
|
23
|
+
task :check, [:target] do |t, args|
|
24
|
+
# Calculate source and destination
|
25
|
+
target = args[:target]
|
26
|
+
source = ENV["FROM"] || "en"
|
27
|
+
|
28
|
+
# Calculate paths
|
29
|
+
base_path = File.expand_path(File.join(Dir.pwd, "config"))
|
30
|
+
target_path = File.join(base_path, target)
|
31
|
+
source_path = File.join(base_path, source)
|
32
|
+
|
33
|
+
# Take an action
|
34
|
+
Yamlt::Checker.(source_path, target_path)
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yamlt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tangerine Cat
|
@@ -30,6 +30,7 @@ executables: []
|
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
|
+
- lib/tasks/yamlt.rake
|
33
34
|
- lib/yamlt.rb
|
34
35
|
- lib/yamlt/checker.rb
|
35
36
|
- lib/yamlt/checker/reporter.rb
|