localer 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 165de59d1c94a764cc7dbdec0c2327c2f96c75ef608dd86b4ea627ba2ff071cc
4
- data.tar.gz: ba9fc37a955d84b70754bc03e894eb01093f9ca231bd0fce2622bf1fc4b19ead
3
+ metadata.gz: 7a5f69f56228031b0f043199f8dfc2d87a4068fb07b99d1be4e3b541172fa944
4
+ data.tar.gz: 0aa61fd219e832a2b594b7c2b05ac4e9694970b7a3ea521fd4376157c1e7e061
5
5
  SHA512:
6
- metadata.gz: 382f19b3867430029b46eeb76f39d9c6366160f5a325170778c825be4160f067ee276afc0047577655c20415db03c11cfcd99b3342668a7c33a64e8f6039aa1d
7
- data.tar.gz: eea447818e4ed693cf08e27b656d4a084a6b266dca554af277817532656fc1b304b830ee4dfb4aca97e450fed82f6c27430c89dba49d46b6ac8c3c2eb0dd5762
6
+ metadata.gz: 82b9a7c4247292d4bc6e8ffed6071a7121d01a390f7fe054e0ade1837220a9f25e5ff7f2669849364da9ec09d570d1eb9ba881d84471d66a720ad4fd7c5c1cc5
7
+ data.tar.gz: 5768221a0dd1a4c49df22e2af9ea4fb9acca47f23eefc19d117f679fb4dafef5202d952003a6a050c72acd5c2da83d4e1d0b4b95d8e388bc513ebebb4b93a3e2
data/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  [![Build Status](https://travis-ci.org/aderyabin/localer.svg?branch=master)](https://travis-ci.org/aderyabin/localer) [![Gem Version](https://badge.fury.io/rb/localer.svg)](https://rubygems.org/gems/localer)
2
2
 
3
3
  # Localer
4
- Localer is an automatic detecting missing I18n translations tool.
4
+ Localer is a tool that automatically detects missing I18n translations.
5
5
 
6
- The aim is to preserve the integrity of translations.
7
- Localer parses and merges keys for all locales in an application. At the next step, it searches missed translations for calculated keys.
6
+ The goal is to preserve the integrity of translations. Localer parses and merges all application locales’ keys. At the next step, it searches for missing translations among the calculated keys.
8
7
 
9
8
  <p align="center">
10
9
  <img align="center" height="500" src="https://gist.githubusercontent.com/aderyabin/cb0512cbcd6cb4c79a4d84a4831109a5/raw/localer2.png">
@@ -36,13 +35,13 @@ Or install it yourself as:
36
35
  ## Usage
37
36
 
38
37
  At the root directory of a Rails app, run:
39
- ```
40
- localer check .
41
- ```
38
+
39
+ $ localer check .
40
+
42
41
  or for specific Rails path:
43
- ```
44
- localer check /path/to/rails/application
45
- ```
42
+
43
+ $ localer check /path/to/rails/application
44
+
46
45
  ## Support
47
46
 
48
47
  Localer supports Ruby 2.3+, Rails. 4.1+
@@ -79,6 +78,30 @@ Locale:
79
78
  - .countries.france
80
79
  ```
81
80
 
81
+ ## Using Rake
82
+
83
+ Localer ships with a rake task. To use Localers's rake task you simply need to require the task file and define a task with it. Below is a rake task that will run `localer`:
84
+
85
+ ```ruby
86
+ require 'rubygems'
87
+ require 'localer'
88
+ require 'localer/rake_task'
89
+
90
+ Localer::RakeTask.new(:localer)
91
+ ```
92
+
93
+ When you now run:
94
+
95
+ $ rake -T
96
+
97
+ you should see
98
+
99
+ ```
100
+ rake localer # Run Localer
101
+ ```
102
+
103
+ ####
104
+
82
105
  ## Development
83
106
 
84
107
  After checking out the repo, run `bundle exec appraisal install` to install dependencies for each appraisal. Then, run `bundle exec appraisal rake` to run the tests.
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rake'
4
+ require 'rake/tasklib'
5
+ require 'localer'
6
+
7
+ module Localer
8
+ # Defines a Rake task for running Localer.
9
+ # The simplest use of it goes something like:
10
+ #
11
+ # Localer::Rakeask.new
12
+ # This will define a task named <tt>localer</tt> described as 'Run Localer'.
13
+ class RakeTask < Rake::TaskLib
14
+ def initialize(name = :localer, *args)
15
+ @name = name
16
+ desc 'Run Localer'
17
+ task(name, *args) do |_, _task_args|
18
+ sh('localer check') do |ok, res|
19
+ exit res.exitstatus unless ok
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Localer
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Deryabin
@@ -167,6 +167,7 @@ files:
167
167
  - lib/localer/ext/hash.rb
168
168
  - lib/localer/ext/string.rb
169
169
  - lib/localer/rails.rb
170
+ - lib/localer/rake_task.rb
170
171
  - lib/localer/version.rb
171
172
  - localer.gemspec
172
173
  homepage: https://github.com/aderyabin/localer