i18n-tasks 0.2.3 → 0.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 10a6c74d023a1a48cd323220d0040aba024291a9
4
- data.tar.gz: 89d8d7f841d16c33b80b8ad53c69b38b17bec801
5
- SHA512:
6
- metadata.gz: 9a40284c2b024046cad115c61b9faa22eac5331b380298d9b45b3c83753534fa6c6682114cd6760a1dcd293be8c8e0be4984f95b7462910ec085f3a12a69d074
7
- data.tar.gz: bd398e0f3892c70bc27ed94be7a4f6332e396220b2909debb97aecf716280affa5b9d59bd3d356909ef81bf5c0da6bfacc5f086542703614008506e604cafbba
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e0c21ea7a7fb96f56cb630dda06c0fe3e1ad8429
4
+ data.tar.gz: 837023040b812540446e4ecf8f3f192a6a896339
5
+ SHA512:
6
+ metadata.gz: b88f3ea402af1fcb94388afbd31da4ba9e19077ed464fb023cbc9a825db5d24358bcd418d3b0e3c76c293541debe7bc2b8e7eef9006efd48e9c4653a3ac41481
7
+ data.tar.gz: 0acb8e5a56d3386a108ab518c31430d76c81c38496296d304d1b213a33fa351ad337efed14a215405d69047178cd3dd4ecdaa713c2e9d4128b4c4d171905b088
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.travis.yml CHANGED
@@ -4,3 +4,6 @@ rvm:
4
4
  - 1.9.3
5
5
  - jruby
6
6
  - rbx
7
+ env:
8
+ global:
9
+ - TRAVIS=1
data/CHANGES.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## v0.2.4
2
+
3
+ * more powerful key pattern matching with sets and backtracking (@glebm)
4
+
5
+ ## v0.2.3
6
+
7
+ * spreadsheet report, tests run on rbx (@glebm)
8
+
1
9
  ## v0.2.2
2
10
 
3
11
  * improved output with terminal-table (@glebm)
@@ -41,4 +49,4 @@
41
49
  ## v0.1.2
42
50
 
43
51
  * added grep config options (thanks @dmke)
44
- * improved terminal output (@glebm)
52
+ * improved terminal output (@glebm)
data/Gemfile CHANGED
@@ -3,19 +3,15 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in i18n-tasks.gemspec
4
4
  gemspec
5
5
 
6
-
7
-
8
6
  platform :rbx do
9
- gem "rubysl-rake", "~> 2.0"
10
- gem "rubysl-bundler", "~> 2.0"
11
- gem "rubysl-digest", "~> 2.0"
12
- gem 'rubysl-delegate', '~> 2.0'
13
- gem 'rubysl-singleton', '~> 2.0'
14
- gem 'rubysl-base64', '~> 2.0'
7
+ gem 'rubysl', '~> 2.0'
8
+ gem 'rubysl-mutex_m', '~> 2.0'
15
9
  group :development do
16
10
  gem 'racc'
17
- gem 'rubysl-irb', '~> 2.0'
18
11
  end
19
12
  end
20
13
 
21
- #gem 'byebug'
14
+ group :development do
15
+ gem 'coveralls', require: false
16
+ end
17
+
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # i18n-tasks [![Build Status](https://travis-ci.org/glebm/i18n-tasks.png?branch=master)](https://travis-ci.org/glebm/i18n-tasks) [![Code Climate](https://codeclimate.com/github/glebm/i18n-tasks.png)](https://codeclimate.com/github/glebm/i18n-tasks)
1
+ # i18n-tasks [![Build Status](https://travis-ci.org/glebm/i18n-tasks.png?branch=master)](https://travis-ci.org/glebm/i18n-tasks) [![Coverage Status](https://coveralls.io/repos/glebm/i18n-tasks/badge.png?branch=master)](https://coveralls.io/r/glebm/i18n-tasks?branch=master) [![Code Climate](https://codeclimate.com/github/glebm/i18n-tasks.png)](https://codeclimate.com/github/glebm/i18n-tasks)
2
2
 
3
3
 
4
4
  Tasks to manage translations in Rails.
@@ -96,6 +96,25 @@ data:
96
96
  - 'config/locales/%{locale}.yml' # path is short for ['*', path]
97
97
  ```
98
98
 
99
+ Key matching syntax work this way:
100
+
101
+ | syntax | description |
102
+ |:------------:|:----------------------------------------------------------|
103
+ | `*` | matches everything |
104
+ | `:` | matches a single key |
105
+ | `{a, b.c}` | match any in set, can use `:` and `*`, match is captured |
106
+
107
+ Example:
108
+
109
+ ```yaml
110
+ data:
111
+ write:
112
+ # store sorcery and simple_form keys in the respective files:
113
+ - ['{sorcery,simple_form}.*', 'config/locales/\\1.%{locale}.yml']
114
+ # write every namespace to its own file:
115
+ - ['{:}.*', 'config/locales/\1.%{locale}.yml']
116
+ ```
117
+
99
118
  ### Translation
100
119
 
101
120
  Set `GOOGLE_TRANSLATE_API_KEY` environment variable, or specify the key in config/i18n-tasks.yml:
data/i18n-tasks.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.homepage = 'https://github.com/glebm/i18n-tasks'
17
17
  spec.license = 'MIT'
18
18
 
19
- spec.files = `git ls-files`.split($/)
19
+ spec.files = `git ls-files`.split($/) - %w(doc/img/i18n-tasks.gif)
20
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
21
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
22
  spec.require_paths = ['lib']
@@ -28,6 +28,10 @@ module I18n
28
28
  include TranslationData
29
29
  include FillTasks
30
30
  include GoogleTranslation
31
+
32
+ def initialize(config = {})
33
+ self.config = config || {}
34
+ end
31
35
  end
32
36
  end
33
37
  end
@@ -4,21 +4,40 @@ module I18n::Tasks::Configuration
4
4
  # i18n-tasks config (defaults + config/i18n-tasks.yml)
5
5
  # @return [Hash{String => String,Hash,Array}]
6
6
  def config
7
- @config ||= I18n::Tasks.config
7
+ @config || (self.config = {})
8
+ end
9
+
10
+ def config=(conf)
11
+ @config = I18n::Tasks.config.deep_merge(conf)
12
+ @config_sections = {}
13
+ @config
14
+ end
15
+
16
+ # data config
17
+ # @return [{adapter: String, options: Hash}]
18
+ def data_config
19
+ @config_sections[:data] ||= begin
20
+ conf = (config[:data] || {}).with_indifferent_access
21
+ adapter = (conf[:adapter].presence || conf[:class].presence || :yaml).to_s
22
+ if adapter !~ /[A-Z]/
23
+ adapter = "I18n::Tasks::Data::#{adapter.camelize}"
24
+ end
25
+ {adapter: adapter, options: conf.except(:adapter, :class)}
26
+ end
8
27
  end
9
28
 
10
29
  DEFAULT_PATTERN = /\bt[( ]\s*(:?".+?"|:?'.+?'|:\w+)/
11
30
  # search config
12
31
  # @return [Hash{String => String,Hash,Array}]
13
32
  def search_config
14
- @search_config ||= begin
33
+ @config_sections[:search] ||= begin
15
34
  if config.key?(:grep)
16
35
  config[:search] ||= config.delete(:grep)
17
36
  I18n::Tasks.warn_deprecated 'please rename "grep" key to "search" in config/i18n-tasks.yml'
18
37
  end
19
38
  search_config = (config[:search] || {}).with_indifferent_access
20
39
  search_config.tap do |conf|
21
- conf[:paths] = %w(app/) if conf[:paths].blank?
40
+ conf[:paths] = %w(app/) if conf[:paths].blank?
22
41
  conf[:include] = Array(conf[:include]) if conf[:include].present?
23
42
  conf[:exclude] = Array(conf[:exclude])
24
43
  conf[:pattern] = conf[:pattern].present? ? Regexp.new(conf[:pattern]) : DEFAULT_PATTERN
@@ -29,7 +48,7 @@ module I18n::Tasks::Configuration
29
48
  # translation config
30
49
  # @return [Hash{String => String,Hash,Array}]
31
50
  def translation_config
32
- @translation_config ||= begin
51
+ @config_sections[:translation] ||= begin
33
52
  conf = (config[:translation] ||= {}).with_indifferent_access
34
53
  conf[:api_key] ||= ENV['GOOGLE_TRANSLATE_API_KEY']
35
54
  conf
@@ -5,15 +5,19 @@ module I18n::Tasks
5
5
  class Yaml
6
6
  include ::I18n::Tasks::DataTraversal
7
7
  include ::I18n::Tasks::KeyPatternMatching
8
- attr_reader :options
8
+ attr_reader :config
9
9
 
10
10
  DEFAULTS = {
11
11
  read: ['config/locales/%{locale}.yml'],
12
12
  write: ['config/locales/%{locale}.yml']
13
13
  }.with_indifferent_access
14
14
 
15
- def initialize(options)
16
- opt = (options || {}).with_indifferent_access
15
+ def initialize(config = {})
16
+ self.config = config
17
+ end
18
+
19
+ def config=(config)
20
+ opt = (config || {}).with_indifferent_access
17
21
  if opt.key?(:paths)
18
22
  opt[:read] ||= opt.delete(:paths)
19
23
  ::I18n::Tasks.warn_deprecated 'please rename "data.paths" key to "data.read" in config/i18n-tasks.yml'
@@ -21,14 +25,16 @@ module I18n::Tasks
21
25
  opt = DEFAULTS.deep_merge(opt)
22
26
  @read = opt[:read]
23
27
  @write = opt[:write].map { |x| x.is_a?(String) ? ['*', x] : x }.map { |x|
24
- [key_pattern_to_re(x[0]), x[1]]
28
+ [compile_key_pattern(x[0]), x[1]]
25
29
  }
30
+ @locale_data = {}
26
31
  end
32
+ attr_reader :config
27
33
 
28
34
  # get locale tree
29
35
  def get(locale)
30
36
  locale = locale.to_s
31
- (@locale_data ||= {})[locale] ||= begin
37
+ @locale_data[locale] ||= begin
32
38
  @read.map do |path|
33
39
  Dir.glob path % {locale: locale}
34
40
  end.flatten.map do |locale_file|
@@ -47,7 +53,10 @@ module I18n::Tasks
47
53
  out = {}
48
54
  traverse value_tree do |key, value|
49
55
  route = @write.detect { |route| route[0] =~ key }
50
- (out[route[1] % {locale: locale}] ||= []) << [key, value]
56
+ key_match = $~
57
+ path = route[1] % {locale: locale}
58
+ path.gsub!(/[\\]\d+/) { |m| key_match[m[1..-1].to_i] }
59
+ (out[path] ||= []) << [key, value]
51
60
  end
52
61
  out.each do |path, data|
53
62
  File.open(path, 'w') { |f|
@@ -7,18 +7,25 @@ module I18n::Tasks::KeyPatternMatching
7
7
  # match nothing
8
8
  MATCH_NOTHING
9
9
  else
10
- /(?:#{ key_patterns.map { |p| key_pattern_to_re p } * '|' })/m
10
+ /(?:#{ key_patterns.map { |p| compile_key_pattern p } * '|' })/m
11
11
  end
12
12
  end
13
13
 
14
- # convert key.* to key\..*
15
- def key_pattern_to_re(key_pattern)
14
+ # convert pattern to regex
15
+ # In patterns:
16
+ # * is like .* in regexs
17
+ # : matches a single key
18
+ # {a, b.c} match any in set, can use : and *, match is captured
19
+ def compile_key_pattern(key_pattern)
16
20
  if key_pattern.end_with? '.'
17
21
  I18n::Tasks.warn_deprecated %Q(please change pattern "#{key_pattern}" to "#{key_pattern += '*'}" in config/i18n-tasks.yml)
18
22
  end
19
23
  /^#{key_pattern.
20
24
  gsub(/\./, '\.').
21
- gsub(/\*/, '.*')}$/
25
+ gsub(/\*/, '.*').
26
+ gsub(/:/, '(?<=^|\.)[^.]+?(?=\.|$)').
27
+ gsub(/\{(.*?)}/) { "(#{$1.strip.gsub /\s*,\s*/, '|'})" }
28
+ }$/
22
29
  end
23
30
 
24
31
  # @return [Array<String>] keys sans passed patterns
@@ -5,13 +5,7 @@ module I18n::Tasks::TranslationData
5
5
  # I18n data provider
6
6
  # @see I18n::Tasks::Data::Yaml
7
7
  def data
8
- return @data if @data
9
- conf = (config[:data] || {}).with_indifferent_access
10
- adapter = (conf[:adapter].presence || conf[:class].presence || :yaml).to_s
11
- if adapter !~ /[A-Z]/
12
- adapter = "I18n::Tasks::Data::#{adapter.camelize}"
13
- end
14
- @data = adapter.constantize.new(conf.except(:adapter, :class))
8
+ @data ||= data_config[:adapter].constantize.new(data_config[:options])
15
9
  end
16
10
 
17
11
  # whether the value for key exists in locale (defaults: base_locale)
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Tasks
3
- VERSION = '0.2.3'
3
+ VERSION = '0.2.4'
4
4
  end
5
5
  end
@@ -0,0 +1,64 @@
1
+ # coding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe 'Key pattern' do
5
+ include I18n::Tasks::KeyPatternMatching
6
+ describe 'matching' do
7
+ describe '*' do
8
+ it 'as suffix' do
9
+ 'devise.*'.should match_key 'devise.some.key'
10
+ end
11
+ it 'as prefix' do
12
+ '*.some.key'.should match_key 'devise.some.key'
13
+ end
14
+ it 'as infix' do
15
+ '*.some.*'.should match_key 'devise.some.key'
16
+ end
17
+ it 'matches multiple namespaces' do
18
+ 'a.*.e*'.should match_key 'a.b.c.d.eeee'
19
+ end
20
+ end
21
+
22
+ describe ':' do
23
+ it 'as suffix' do
24
+ 'a.b.:'.should match_key 'a.b.c'
25
+ 'a.b.:'.should_not match_key 'a.b.c.d'
26
+ end
27
+
28
+ it 'as prefix' do
29
+ ':.b.c'.should match_key 'a.b.c'
30
+ ':.b.c'.should_not match_key 'x.a.b.c'
31
+ end
32
+
33
+ it 'as infix' do
34
+ 'a.:.c'.should match_key 'a.b.c'
35
+ 'a.:.c'.should_not match_key 'a.b.x.c'
36
+ end
37
+ end
38
+
39
+ describe '{sets}' do
40
+ it 'matches' do
41
+ p = 'a.{x,y}.b'
42
+ p.should match_key 'a.x.b'
43
+ p.should match_key 'a.y.b'
44
+ p.should_not match_key 'a.z.b'
45
+ end
46
+
47
+ it 'supports :' do
48
+ 'a.{:}.c'.should match_key 'a.b.c'
49
+ 'a.{:}.c'.should_not match_key 'a.b.x.c'
50
+ end
51
+
52
+ it 'supports *' do
53
+ 'a.{*}.c'.should match_key 'a.b.c'
54
+ 'a.{*}.c'.should match_key 'a.b.x.y.c'
55
+ end
56
+
57
+ it 'captures' do
58
+ p = 'a.{x,y}.{:}'
59
+ compile_key_pattern(p) =~ 'a.x.c'
60
+ [$1, $2].should == ['x', 'c']
61
+ end
62
+ end
63
+ end
64
+ end
@@ -7,7 +7,8 @@ describe 'Source keys' do
7
7
 
8
8
  ['t "a.b"', "t 'a.b'", 't("a.b")', "t('a.b')",
9
9
  "t('a.b', :arg => val)", "t('a.b', arg: val)",
10
- "t :a_b", "t :'a.b'", 't :"a.b"', "t(:ab)", "t(:'a.b')", 't(:"a.b")'].each do |s|
10
+ "t :a_b", "t :'a.b'", 't :"a.b"', "t(:ab)", "t(:'a.b')", 't(:"a.b")',
11
+ 'I18n.t("a.b")'].each do |s|
11
12
  it "matches #{s}" do
12
13
  pattern.should match s
13
14
  end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,10 @@
1
- ENV['RAKE_ENV'] ||= 'test'
1
+ ENV['RAILS_ENV'] = ENV['RAKE_ENV'] = 'test'
2
+
3
+ unless defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
4
+ require 'coveralls'
5
+ Coveralls.wear! 'rails'
6
+ end
7
+
2
8
  require 'rspec/autorun'
3
9
  $: << File.expand_path('../lib', __FILE__)
4
10
 
@@ -0,0 +1,8 @@
1
+ # coding: utf-8
2
+ RSpec::Matchers.define :match_key do |key|
3
+ include I18n::Tasks::KeyPatternMatching
4
+
5
+ match do |pattern|
6
+ compile_key_pattern(pattern).should =~ key
7
+ end
8
+ end
@@ -5,15 +5,11 @@ module TestCodebase
5
5
  extend self
6
6
  AT = 'tmp/test_codebase'
7
7
 
8
- DEFAULTS = {
9
- 'config/locales/en.yml' => {'en' => {}}.to_yaml,
10
- 'config/locales/es.yml' => {'es' => {}}.to_yaml
11
- }
12
8
 
13
- def setup(files)
9
+ def setup(files = {})
14
10
  FileUtils.mkdir_p AT
15
11
  in_test_app_dir do
16
- DEFAULTS.merge(files).each do |path, content|
12
+ files.each do |path, content|
17
13
  FileUtils.mkdir_p File.dirname(path)
18
14
  File.open(path, 'w') { |f| f.write(content) }
19
15
  end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'YAML adapter' do
4
+ describe 'options' do
5
+ let!(:data) { I18n::Tasks::Data::Yaml.new }
6
+ after { TestCodebase.teardown }
7
+
8
+ it 'reads' do
9
+ data.config = {read: ['a.yml', '{b,c}.yml']}
10
+ TestCodebase.setup(
11
+ 'a.yml' => {en: {a: 1}}.stringify_keys.to_yaml,
12
+ 'b.yml' => {en: {b: 1}}.stringify_keys.to_yaml,
13
+ 'c.yml' => {en: {c: 1}}.stringify_keys.to_yaml
14
+ )
15
+ TestCodebase.in_test_app_dir {
16
+ data[:en].should == {a: 1, b: 1, c: 1}
17
+ }
18
+ end
19
+
20
+ it 'writes' do
21
+ data.config = {read: 'a.yml', write: [['{:}.*', '\1.%{locale}.yml']]}
22
+ keys = {'a' => {'b' => 'c'}, 'x' => 'y'}
23
+ locale_data = {'pizza' => keys, 'sushi' => keys}
24
+ TestCodebase.setup
25
+ TestCodebase.in_test_app_dir {
26
+ data[:en] = locale_data
27
+ files = %w(pizza.en.yml sushi.en.yml)
28
+ Dir['*.yml'].sort.should == files.sort
29
+ files.each { |f| YAML.load_file(f)['en'].should == {File.basename(f, '.en.yml') => keys} }
30
+ }
31
+ end
32
+ end
33
+ end
metadata CHANGED
@@ -1,113 +1,166 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: i18n-tasks
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.4
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - glebm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2013-11-28 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
11
+ date: 2013-11-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
15
14
  name: rake
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - &id002
20
- - ">="
21
- - !ruby/object:Gem::Version
22
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
23
20
  type: :runtime
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
26
- name: activesupport
27
21
  prerelease: false
28
- requirement: &id003 !ruby/object:Gem::Requirement
29
- requirements:
30
- - *id002
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: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
31
34
  type: :runtime
32
- version_requirements: *id003
33
- - !ruby/object:Gem::Dependency
34
- name: easy_translate
35
35
  prerelease: false
36
- requirement: &id004 !ruby/object:Gem::Requirement
37
- requirements:
38
- - *id002
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: easy_translate
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
39
48
  type: :runtime
40
- version_requirements: *id004
41
- - !ruby/object:Gem::Dependency
42
- name: term-ansicolor
43
49
  prerelease: false
44
- requirement: &id005 !ruby/object:Gem::Requirement
45
- requirements:
46
- - *id002
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: term-ansicolor
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  type: :runtime
48
- version_requirements: *id005
49
- - !ruby/object:Gem::Dependency
50
- name: terminal-table
51
63
  prerelease: false
52
- requirement: &id006 !ruby/object:Gem::Requirement
53
- requirements:
54
- - *id002
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: terminal-table
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
55
76
  type: :runtime
56
- version_requirements: *id006
57
- - !ruby/object:Gem::Dependency
58
- name: axlsx
59
77
  prerelease: false
60
- requirement: &id007 !ruby/object:Gem::Requirement
61
- requirements:
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: axlsx
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
62
87
  - - ~>
63
- - !ruby/object:Gem::Version
64
- version: "2.0"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.0'
65
90
  type: :development
66
- version_requirements: *id007
67
- - !ruby/object:Gem::Dependency
68
- name: bundler
69
91
  prerelease: false
70
- requirement: &id008 !ruby/object:Gem::Requirement
71
- requirements:
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '2.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
72
101
  - - ~>
73
- - !ruby/object:Gem::Version
74
- version: "1.3"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.3'
75
104
  type: :development
76
- version_requirements: *id008
77
- - !ruby/object:Gem::Dependency
78
- name: rake
79
105
  prerelease: false
80
- requirement: &id009 !ruby/object:Gem::Requirement
81
- requirements:
82
- - *id002
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '1.3'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
83
118
  type: :development
84
- version_requirements: *id009
85
- - !ruby/object:Gem::Dependency
86
- name: rspec-rails
87
119
  prerelease: false
88
- requirement: &id010 !ruby/object:Gem::Requirement
89
- requirements:
90
- - *id002
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: rspec-rails
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
91
132
  type: :development
92
- version_requirements: *id010
93
- - !ruby/object:Gem::Dependency
94
- name: yard
95
133
  prerelease: false
96
- requirement: &id011 !ruby/object:Gem::Requirement
97
- requirements:
98
- - *id002
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: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
99
146
  type: :development
100
- version_requirements: *id011
101
- description: "\n rake tasks to find unused and missing translations, normalize locale files,\n and prefill missing keys. Supports relative and plural keys and Google Translate.\n"
102
- email:
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: |2
154
+
155
+ rake tasks to find unused and missing translations, normalize locale files,
156
+ and prefill missing keys. Supports relative and plural keys and Google Translate.
157
+ email:
103
158
  - glex.spb@gmail.com
104
159
  executables: []
105
-
106
160
  extensions: []
107
-
108
161
  extra_rdoc_files: []
109
-
110
- files:
162
+ files:
163
+ - .coveralls.yml
111
164
  - .gitignore
112
165
  - .travis.yml
113
166
  - CHANGES.md
@@ -115,7 +168,6 @@ files:
115
168
  - LICENSE.txt
116
169
  - README.md
117
170
  - Rakefile
118
- - doc/img/i18n-tasks.gif
119
171
  - i18n-tasks.gemspec
120
172
  - lib/i18n/tasks.rb
121
173
  - lib/i18n/tasks/base_task.rb
@@ -145,48 +197,55 @@ files:
145
197
  - spec/fixtures/app/views/relative/index.html.slim
146
198
  - spec/fixtures/config/i18n-tasks.yml
147
199
  - spec/i18n_tasks_spec.rb
200
+ - spec/key_pattern_matching_spec.rb
148
201
  - spec/readme_spec.rb
149
202
  - spec/source_keys_spec.rb
150
203
  - spec/spec_helper.rb
151
204
  - spec/support/fixtures.rb
152
205
  - spec/support/i18n_tasks_output_matcher.rb
206
+ - spec/support/key_pattern_matcher.rb
153
207
  - spec/support/test_codebase.rb
154
208
  - spec/support/test_codebase_env.rake
209
+ - spec/yaml_adapter_spec.rb
155
210
  homepage: https://github.com/glebm/i18n-tasks
156
- licenses:
211
+ licenses:
157
212
  - MIT
158
213
  metadata: {}
159
-
160
214
  post_install_message:
161
215
  rdoc_options: []
162
-
163
- require_paths:
216
+ require_paths:
164
217
  - lib
165
- required_ruby_version: !ruby/object:Gem::Requirement
166
- requirements:
167
- - *id002
168
- required_rubygems_version: !ruby/object:Gem::Requirement
169
- requirements:
170
- - *id002
218
+ required_ruby_version: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ required_rubygems_version: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - '>='
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
171
228
  requirements: []
172
-
173
229
  rubyforge_project:
174
- rubygems_version: 2.1.10
230
+ rubygems_version: 2.1.11
175
231
  signing_key:
176
232
  specification_version: 4
177
233
  summary: Tasks to manage missing and unused translations in Rails.
178
- test_files:
234
+ test_files:
179
235
  - spec/fixtures/app/assets/javascripts/application.js
180
236
  - spec/fixtures/app/controllers/events_controller.rb
181
237
  - spec/fixtures/app/views/index.html.slim
182
238
  - spec/fixtures/app/views/relative/index.html.slim
183
239
  - spec/fixtures/config/i18n-tasks.yml
184
240
  - spec/i18n_tasks_spec.rb
241
+ - spec/key_pattern_matching_spec.rb
185
242
  - spec/readme_spec.rb
186
243
  - spec/source_keys_spec.rb
187
244
  - spec/spec_helper.rb
188
245
  - spec/support/fixtures.rb
189
246
  - spec/support/i18n_tasks_output_matcher.rb
247
+ - spec/support/key_pattern_matcher.rb
190
248
  - spec/support/test_codebase.rb
191
249
  - spec/support/test_codebase_env.rake
250
+ - spec/yaml_adapter_spec.rb
192
251
  has_rdoc:
Binary file