yamlt 0.0.7 → 0.0.8

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tasks/yamlt.rake +36 -0
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b327eb8ea680a909ef61575b0611b1a74eaa011
4
- data.tar.gz: 0a83eda03e6556c06addcac0a7e41a19d721d53e
3
+ metadata.gz: 0604c384119607a173fe237896059892667adc4b
4
+ data.tar.gz: 714dcc0d6802e50229978983854bdaa6fd9e31bb
5
5
  SHA512:
6
- metadata.gz: f2d0ea583ba5bc4f1ab02cc725bd9cbda88ab01c1eb52d27125a79372913fb7a568192b1a147be011646f479086448c31d80add44ff15857030e46f9ae1c064d
7
- data.tar.gz: 70933d24a3121546eb45a231dfc8a1dbb6d6efbefb4a207a43be9e03acb0904bd9304f79204a07c064ed4fe0a82a1e6ff60b5f79cf70692078acc5e961837660
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.7
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