chivy 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/Gemfile +11 -0
- data/LICENSE +22 -0
- data/README.md +58 -0
- data/Rakefile +2 -0
- data/bin/chivy +71 -0
- data/chivy.gemspec +32 -0
- data/lib/chivy/configuration.rb +69 -0
- data/lib/chivy/key_list.rb +82 -0
- data/lib/chivy/task_helper.rb +100 -0
- data/lib/chivy/tree.rb +53 -0
- data/lib/chivy/tree_diff.rb +17 -0
- data/lib/chivy/version.rb +4 -0
- data/lib/chivy.rb +4 -0
- metadata +200 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1603bd0a85a275283a45ce56b63e9bb845e2a26b
|
4
|
+
data.tar.gz: 3e293b627cf02cddf8b271e59f518d6eb1ceeac9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cb0d8aa1ff2d7d738cfb5b20502384a2918395eccedc40e33aebd03b13fee696abd0f19586ce8c65f740234f9b823a366d2e99af98962aad5aa18a0c69a026b4
|
7
|
+
data.tar.gz: 287d6a198e851d116d81cb04dd07d99e3514010031068dedae5066e46d99ad760d740a0fa48a6b21eb714aee9bf8cf9fabb21fd5444c2f2ef1e5cd842b53b4eb
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Daniel Senff
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Chivy
|
2
|
+
|
3
|
+
Offers a quick way of analyzing language YAML-files and to add missing translation keys from the CLI.
|
4
|
+
|
5
|
+
[![Gem Version](https://img.shields.io/gem/v/chivy.svg)](https://rubygems.org/gems/woro)
|
6
|
+
[![Gem Downloads](https://img.shields.io/gem/dt/chivy.svg)](https://rubygems.org/gems/woro)
|
7
|
+
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/dahie/chivy)
|
8
|
+
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```rb
|
15
|
+
gem 'chivy', require: false
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
```shell
|
21
|
+
$ bundle
|
22
|
+
```
|
23
|
+
|
24
|
+
Or install it yourself as:
|
25
|
+
|
26
|
+
```shell
|
27
|
+
$ gem install chivy
|
28
|
+
```
|
29
|
+
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
```shell
|
33
|
+
$ chivy list config/locales/
|
34
|
+
```
|
35
|
+
|
36
|
+
Will search in the directory `config/locales` for all translation yaml-files by the schema "<name>.<locale>.yml" and will output a list of the minimal changeset between both translations.
|
37
|
+
|
38
|
+
## Testing
|
39
|
+
|
40
|
+
The project classes are tested through rspec.
|
41
|
+
|
42
|
+
```shell
|
43
|
+
$ rspec
|
44
|
+
```
|
45
|
+
|
46
|
+
The command line interface is tested through cucmber/aruba.
|
47
|
+
|
48
|
+
```shell
|
49
|
+
$ cucumber
|
50
|
+
```
|
51
|
+
|
52
|
+
## Contributing
|
53
|
+
|
54
|
+
1. Fork it
|
55
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
56
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
57
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
58
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/bin/chivy
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
require 'commander/import'
|
5
|
+
require 'chivy'
|
6
|
+
|
7
|
+
program :name, 'chivy'
|
8
|
+
program :version, Chivy::VERSION
|
9
|
+
program :description, 'List and fill missing translation keys in YAML-files.'
|
10
|
+
|
11
|
+
default_command :check
|
12
|
+
|
13
|
+
command :list do |c|
|
14
|
+
c.syntax = 'chivy [list|ls|check] [options]'
|
15
|
+
c.description = 'List missing keys'
|
16
|
+
c.example 'List missing translation keys', 'chivy list'
|
17
|
+
c.example 'List missing translation keys of in directory config/locales/', 'chivy list config/locales'
|
18
|
+
#c.example 'List missing translation keys in directory config/locales/application*', 'chivy list config/locales/application*'
|
19
|
+
c.action do |args, options|
|
20
|
+
|
21
|
+
folder = args[1] || '.'
|
22
|
+
|
23
|
+
files = Dir.entries(folder)
|
24
|
+
|
25
|
+
# find base locales
|
26
|
+
base_locales = {}
|
27
|
+
base_names = {}
|
28
|
+
files.each do |filename|
|
29
|
+
if filename.match(/(\S*)\.(\S*)(.yml)/)
|
30
|
+
|
31
|
+
|
32
|
+
tree = Chivy::Tree.new filename
|
33
|
+
tree.load File.join(folder, filename)
|
34
|
+
|
35
|
+
if base_locales.include? tree.locale
|
36
|
+
base_locales[tree.locale] << tree.name
|
37
|
+
else
|
38
|
+
base_locales[tree.locale] = [tree.name]
|
39
|
+
end
|
40
|
+
|
41
|
+
if base_names.include? tree.name
|
42
|
+
base_names[tree.name] << tree
|
43
|
+
else
|
44
|
+
base_names[tree.name] = [tree]
|
45
|
+
end
|
46
|
+
else
|
47
|
+
# TODO error message
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
processed_files = []
|
53
|
+
|
54
|
+
base_names.each_key do |name|
|
55
|
+
reference_tree = base_names[name].first
|
56
|
+
base_names[name].each do |tree|
|
57
|
+
next if tree.file == reference_tree.file
|
58
|
+
|
59
|
+
puts "--- #{reference_tree.file} to #{tree.file}"
|
60
|
+
|
61
|
+
diffs = HashDiff.diff(reference_tree.tree, tree.tree)
|
62
|
+
diffs.each do |diff_set|
|
63
|
+
if diff_set[0] == '-' || diff_set[0] == '+' || diff_set[2] == nil || diff_set[3] == nil
|
64
|
+
puts "#{diff_set[0]} #{diff_set[1]}: #{diff_set[2]}"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
alias_command :ls, :list, :check
|
data/chivy.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'chivy/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "chivy"
|
8
|
+
spec.version = Chivy::VERSION
|
9
|
+
spec.authors = ["Daniel Senff"]
|
10
|
+
spec.email = ["mail@danielsenff.de"]
|
11
|
+
spec.summary = %q{List and fill missing translation keys in YAML-files.}
|
12
|
+
spec.description = %q{Offers a quick way of analyzing language YAML-files and to add missing translation keys from the CLI.}
|
13
|
+
spec.homepage = "http://github.com/Dahie/chivy"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "commander"
|
22
|
+
spec.add_dependency "hashdiff"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "guard"
|
27
|
+
spec.add_development_dependency "guard-rspec"
|
28
|
+
spec.add_development_dependency "pry"
|
29
|
+
spec.add_development_dependency "pry-remote"
|
30
|
+
spec.add_development_dependency "pry-nav"
|
31
|
+
spec.add_development_dependency "pry-byebug"
|
32
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'commander'
|
3
|
+
include Commander::UI
|
4
|
+
|
5
|
+
module Chivy
|
6
|
+
class Configuration
|
7
|
+
attr_reader :adapter_settings, :woro_task_dir, :app_name
|
8
|
+
|
9
|
+
# Initialize configuration.
|
10
|
+
def initialize(options = {})
|
11
|
+
@woro_task_dir = Configuration.woro_task_dir
|
12
|
+
@adapter_settings = options['adapters'] || {}
|
13
|
+
@app_name = options['app_name']
|
14
|
+
end
|
15
|
+
|
16
|
+
# Load configuration file or default_options. Passed options take precedence.
|
17
|
+
def self.load(options = {})
|
18
|
+
user_options = options.reject { |k, v| !['adapters', 'app_name'].include? k }
|
19
|
+
|
20
|
+
unless File.exist? config_file
|
21
|
+
File.open(config_file, 'w') { |file| YAML.dump(default_options, file) }
|
22
|
+
say "Initialized default config file in `#{config_file}`. See 'woro help init' for options."
|
23
|
+
end
|
24
|
+
|
25
|
+
config_file_options = YAML.load_file(config_file)
|
26
|
+
new(config_file_options.merge(user_options))
|
27
|
+
end
|
28
|
+
|
29
|
+
# Save configuration. Passed options take precendence over default_options.
|
30
|
+
def self.save(options = {})
|
31
|
+
user_options = options.reject { |k, v| !['adapters', 'app_name'].include? k }
|
32
|
+
force_save = options.delete :force
|
33
|
+
|
34
|
+
if !File.exist?(config_file) || force_save
|
35
|
+
File.open(config_file, 'w') do |file|
|
36
|
+
YAML.dump(default_options.merge(user_options), file)
|
37
|
+
end
|
38
|
+
say "Initialized config file in `#{config_file}`"
|
39
|
+
else
|
40
|
+
say_error "Not overwriting existing config file `#{config_file}`, use --force to override. See 'woro help init'."
|
41
|
+
end
|
42
|
+
self
|
43
|
+
end
|
44
|
+
|
45
|
+
def adapter(adapter_name)
|
46
|
+
clazz = Object.const_get("Woro::Adapters::#{adapter_name.capitalize}")
|
47
|
+
clazz.new adapter_settings[adapter_name.downcase]
|
48
|
+
end
|
49
|
+
|
50
|
+
# Helpers
|
51
|
+
|
52
|
+
def self.config_file
|
53
|
+
File.join('config', 'woro.yml')
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.woro_task_dir
|
57
|
+
File.join('lib', 'woro_tasks')
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.rake_task_dir
|
61
|
+
File.join('lib', 'tasks')
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.default_options
|
65
|
+
{
|
66
|
+
}
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'commander'
|
3
|
+
include Commander::UI
|
4
|
+
|
5
|
+
module Chivy
|
6
|
+
# Generates the list of all missing keys and prints out to the console.
|
7
|
+
class KeyList
|
8
|
+
attr_reader :config, :list
|
9
|
+
|
10
|
+
def initialize(translations)
|
11
|
+
@config = config
|
12
|
+
@list = []
|
13
|
+
end
|
14
|
+
|
15
|
+
# Determine the max count of characters for all task names.
|
16
|
+
# @return [integer] count of characters
|
17
|
+
def width
|
18
|
+
@width ||= list.map { |t| t.name_with_args ? t.name_with_args.length : 0 }.max || 10
|
19
|
+
end
|
20
|
+
|
21
|
+
# Fill task list by loading tasks from the configured adapters and locally.
|
22
|
+
# @return [Object] task_list
|
23
|
+
def fill
|
24
|
+
fill_list_from_adapters
|
25
|
+
fill_list_from_local
|
26
|
+
self
|
27
|
+
end
|
28
|
+
|
29
|
+
# Print the current task list to console.
|
30
|
+
def print
|
31
|
+
list.each do |entry|
|
32
|
+
entry.headline ? print_headline(entry) : print_task_description(entry)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Extract description from gist's data content string.
|
37
|
+
# @param data [Hash] gist data hash
|
38
|
+
# [String] description string
|
39
|
+
def self.extract_description(task_content)
|
40
|
+
# regex from http://stackoverflow.com/questions/171480/regex-grabbing-values-between-quotation-marks
|
41
|
+
match = task_content.match(/desc (["'])((?:(?!\1)[^\\]|(?:\\\\)*\\[^\\])*)\1/)
|
42
|
+
match && match[2] || 'No description'
|
43
|
+
end
|
44
|
+
|
45
|
+
protected
|
46
|
+
|
47
|
+
def fill_list_from_local
|
48
|
+
list << OpenStruct.new(headline: 'local')
|
49
|
+
Woro::TaskHelper.woro_task_files(config.woro_task_dir) do |file_name, data|
|
50
|
+
list << OpenStruct.new(name_with_args: file_name.split('.rake').first,
|
51
|
+
comment: Woro::TaskList.extract_description(data))
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def fill_list_from_adapters
|
56
|
+
adapter_settings.each do |adapter_setting|
|
57
|
+
list << OpenStruct.new(headline: adapter_setting[0])
|
58
|
+
adapter = config.adapter(adapter_setting[0])
|
59
|
+
files = adapter.list_contents || {}
|
60
|
+
files.map do |file_name, data|
|
61
|
+
if file_name.include? '.rake'
|
62
|
+
list << OpenStruct.new(name_with_args: file_name.split('.rake').first,
|
63
|
+
comment: adapter.extract_description(data[:data]))
|
64
|
+
end
|
65
|
+
end
|
66
|
+
list.compact!
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def adapter_settings
|
71
|
+
config.adapter_settings
|
72
|
+
end
|
73
|
+
|
74
|
+
def print_headline(headline)
|
75
|
+
say "#{headline.headline} ---"
|
76
|
+
end
|
77
|
+
|
78
|
+
def print_task_description(task)
|
79
|
+
say " %-#{width}s # %s" % [task.name_with_args, task.comment]
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'commander'
|
2
|
+
|
3
|
+
module Chivy
|
4
|
+
# Set of helper methods used in the chivy executable
|
5
|
+
class TaskHelper
|
6
|
+
include Commander::UI
|
7
|
+
class << self
|
8
|
+
# Check if woro environment is available in project
|
9
|
+
def check_environment
|
10
|
+
return if woro_environment_setup?
|
11
|
+
abort 'Woro environment is not set up. Call `woro init` to do so.'
|
12
|
+
end
|
13
|
+
|
14
|
+
# Create the given directory, unless it already exists.
|
15
|
+
# @param directory [String] directory to create
|
16
|
+
def create_directory_unless_existing(directory)
|
17
|
+
return if File.exist? directory
|
18
|
+
FileUtils.mkdir_p directory
|
19
|
+
say "Created `#{directory}`"
|
20
|
+
end
|
21
|
+
|
22
|
+
# Write a file at a given path with the given content, unless
|
23
|
+
# it already exists.
|
24
|
+
# @param file_path [String] save the new file here
|
25
|
+
# @param content [String] write this into the file
|
26
|
+
def create_file_unless_existing(file_path, content)
|
27
|
+
return if File.exist? file_path
|
28
|
+
File.open(file_path, 'w') do |f|
|
29
|
+
f.puts content
|
30
|
+
end
|
31
|
+
say "Created `#{file_path}`"
|
32
|
+
end
|
33
|
+
|
34
|
+
# Creates all files required for a setup woro environment.
|
35
|
+
def create_required_files
|
36
|
+
create_directory_unless_existing Woro::Configuration.woro_task_dir
|
37
|
+
create_file_unless_existing File.join(Woro::Configuration.woro_task_dir, '.gitignore'), '*.rake'
|
38
|
+
create_directory_unless_existing Woro::Configuration.rake_task_dir
|
39
|
+
create_directory_unless_existing File.dirname(Woro::Configuration.config_file)
|
40
|
+
|
41
|
+
return if File.exist? File.join(Woro::Configuration.rake_task_dir, 'woro.rake')
|
42
|
+
|
43
|
+
woro_task_file = File.join(File.dirname(__FILE__),
|
44
|
+
'templates', 'woro.rake')
|
45
|
+
FileUtils.cp(woro_task_file, Woro::Configuration.rake_task_dir)
|
46
|
+
say "Created `woro.rake` in `#{Woro::Configuration.rake_task_dir}`"
|
47
|
+
end
|
48
|
+
|
49
|
+
# Returns true, if all requirements of a woro setup are met.
|
50
|
+
# @return [boolean] all configurations, all directories exist
|
51
|
+
def woro_environment_setup?
|
52
|
+
File.exist?(Woro::Configuration.woro_task_dir) &&
|
53
|
+
File.exist?(File.join('config', 'woro.yml')) &&
|
54
|
+
File.exist?(Woro::Configuration.rake_task_dir) &&
|
55
|
+
File.exist?(File.join(Woro::Configuration.rake_task_dir, 'woro.rake'))
|
56
|
+
end
|
57
|
+
|
58
|
+
# Display choice of adapter and return name of the chosen one.
|
59
|
+
# @param choices [Array] list of choices
|
60
|
+
# @return [String] Name of chosen adapter
|
61
|
+
def select_choice(choices, message)
|
62
|
+
choose do |menu|
|
63
|
+
menu.prompt = message
|
64
|
+
menu.choices(*choices) do |choice|
|
65
|
+
return choice.to_s.strip
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Choose adapter and return its settings.
|
71
|
+
# @param task_name [String] sanitized name of the task, used
|
72
|
+
# @return [Hash] Hash with adapter name and its settings
|
73
|
+
def choose_and_build_adapter_config(available_adapters)
|
74
|
+
adapter_name = select_choice available_adapters, 'Please choose a service to use with Woro:'
|
75
|
+
adapter = Object.const_get "Woro::Adapters::#{adapter_name}"
|
76
|
+
{ adapter_name.downcase => adapter.setup }
|
77
|
+
end
|
78
|
+
|
79
|
+
# Perform an action over all files within the woro task directory
|
80
|
+
# @param directory [String] directory
|
81
|
+
# @return [Array] List of rake tasks in the directory
|
82
|
+
def woro_task_files(directory)
|
83
|
+
tasks = []
|
84
|
+
Dir.foreach(directory) do |file_name|
|
85
|
+
if file_name.include? '.rake'
|
86
|
+
data = File.read(File.join(directory, file_name))
|
87
|
+
tasks << yield(file_name, data)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
tasks
|
91
|
+
end
|
92
|
+
|
93
|
+
# Read the rake task template
|
94
|
+
# @return [String] Content of template file
|
95
|
+
def read_template_file
|
96
|
+
File.read File.join(File.dirname(__FILE__), 'templates', 'task.rake.erb')
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
data/lib/chivy/tree.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module Chivy
|
4
|
+
class Tree
|
5
|
+
|
6
|
+
# Forwarding methods to the @tree
|
7
|
+
extend Forwardable
|
8
|
+
|
9
|
+
def_delegator :@tree, :[]
|
10
|
+
def_delegator :@tree, :[]=
|
11
|
+
def_delegator :@tree, :to_yaml
|
12
|
+
def_delegator :@tree, :as_yaml
|
13
|
+
def_delegator :@tree, :==
|
14
|
+
def_delegator :@tree, :eql
|
15
|
+
|
16
|
+
attr_accessor :file, :locale, :name, :tree
|
17
|
+
|
18
|
+
def load(file)
|
19
|
+
@file = file
|
20
|
+
@tree = ::YAML.load_file(file)[locale] if file
|
21
|
+
@tree
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
# returns self (instance of Answers) after building the tree by
|
26
|
+
# its template
|
27
|
+
def initialize(filename)
|
28
|
+
build_tree
|
29
|
+
split_filename = filename.split('.')
|
30
|
+
@locale = split_filename[-2]
|
31
|
+
@name = split_filename.first
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
# returns the tree as an instance of Hash
|
36
|
+
def build_tree
|
37
|
+
@tree = {}
|
38
|
+
end
|
39
|
+
|
40
|
+
# returns a yaml string of the answers
|
41
|
+
def self.dump(answers)
|
42
|
+
data.to_yaml
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
# returns an answer-intance from the yaml string
|
47
|
+
def self.load(string)
|
48
|
+
data = Tree.new
|
49
|
+
data.load(string)
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
data/lib/chivy.rb
ADDED
metadata
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: chivy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Senff
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: commander
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashdiff
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry-remote
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry-nav
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry-byebug
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
description: Offers a quick way of analyzing language YAML-files and to add missing
|
154
|
+
translation keys from the CLI.
|
155
|
+
email:
|
156
|
+
- mail@danielsenff.de
|
157
|
+
executables:
|
158
|
+
- chivy
|
159
|
+
extensions: []
|
160
|
+
extra_rdoc_files: []
|
161
|
+
files:
|
162
|
+
- ".gitignore"
|
163
|
+
- Gemfile
|
164
|
+
- LICENSE
|
165
|
+
- README.md
|
166
|
+
- Rakefile
|
167
|
+
- bin/chivy
|
168
|
+
- chivy.gemspec
|
169
|
+
- lib/chivy.rb
|
170
|
+
- lib/chivy/configuration.rb
|
171
|
+
- lib/chivy/key_list.rb
|
172
|
+
- lib/chivy/task_helper.rb
|
173
|
+
- lib/chivy/tree.rb
|
174
|
+
- lib/chivy/tree_diff.rb
|
175
|
+
- lib/chivy/version.rb
|
176
|
+
homepage: http://github.com/Dahie/chivy
|
177
|
+
licenses:
|
178
|
+
- MIT
|
179
|
+
metadata: {}
|
180
|
+
post_install_message:
|
181
|
+
rdoc_options: []
|
182
|
+
require_paths:
|
183
|
+
- lib
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
requirements: []
|
195
|
+
rubyforge_project:
|
196
|
+
rubygems_version: 2.4.6
|
197
|
+
signing_key:
|
198
|
+
specification_version: 4
|
199
|
+
summary: List and fill missing translation keys in YAML-files.
|
200
|
+
test_files: []
|