t_t 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +5 -5
  2. data/lib/t_t/tasks.rb +20 -0
  3. data/t_t.gemspec +1 -1
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6b2923ec3cc274e702884644d43d1763aead5bdc
4
- data.tar.gz: 83f9bd946598b6022eb31d9b52fc5a00707ce688
2
+ SHA256:
3
+ metadata.gz: b7c1607f7ce43ba6809aac93a83feb8dc101f5d3b3ae99850d5a2ab9cfda112b
4
+ data.tar.gz: 61942c69fa8030322d2fa2dfbf2997baae066830d1a97b095ea2540a647127ef
5
5
  SHA512:
6
- metadata.gz: ca40beffed3153dc6b66f34dac5616ce0c20a5d2e812bdcabae373bc9c18297494d0e50fcd61ff5c8f280c56a6c32a9cf4d1357dcbdde801bc95c6d6edb5059f
7
- data.tar.gz: 37a10c927ba1743cffbaee179bf64c3c6e09d546b69cf2db5d122899afd269914ed90e288379eea5b105b102b3bfa4ea21d1fd16bc29080bc21c4650b54edb39
6
+ metadata.gz: e3398a3b209d6975fce2caaf97f9ce81d4ed01f454c3f0592d2d976e5ceb73227ce3c36f9b0bef3da646c331a1dfc46a45f46291a530eaeb674ce8fd732f4613
7
+ data.tar.gz: 5c55c0d027aff2a38325cb0b6894b84e406449600428d2f8cb6ebdb7bcd7d1c76022f91244c5c2bdc5d5e512a473997ea3e3e423da81a8bef0d7cd4c50a6aeac
data/lib/t_t/tasks.rb CHANGED
@@ -17,4 +17,24 @@ namespace :tt do
17
17
  puts "t_t: Please, setup the synchronisation first"
18
18
  end
19
19
  end
20
+
21
+ desc "Shows a missed keys for locale"
22
+ task :ml, [:locale] => [:s] do |t, args|
23
+ if sync = TT::Rails.sync
24
+ require_relative './formaters'
25
+ locale = args[:locale]
26
+ data = sync.missed.reduce({}) do |acc, (path, groups)|
27
+ acc[path] = groups.reduce([]) do |acc, group|
28
+ if group[locale].blank?
29
+ acc.push(group.slice('en', locale))
30
+ end
31
+ acc
32
+ end
33
+ acc
34
+ end
35
+ TT::Formaters.print(data, nil)
36
+ else
37
+ puts "t_t: Please, setup the synchronisation first"
38
+ end
39
+ end
20
40
  end
data/t_t.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "t_t"
5
- spec.version = "1.3.2"
5
+ spec.version = "1.3.3"
6
6
  spec.authors = ["Sergey Pchelintsev"]
7
7
  spec.email = ["mail@sergeyp.me"]
8
8
  spec.summary = %q{An opinioned I18n helper}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: t_t
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Pchelintsev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-08 00:00:00.000000000 Z
11
+ date: 2020-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -167,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 2.6.13
170
+ rubygems_version: 3.0.3
172
171
  signing_key:
173
172
  specification_version: 4
174
173
  summary: An opinioned I18n helper