yaml-validator 0.1.9 → 0.1.10

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
  SHA1:
3
- metadata.gz: 72169d02254be948df3251d36d2695c6bee61d2f
4
- data.tar.gz: 7c9dcfae1d208b65c0dcd55407e3471a68193a8c
3
+ metadata.gz: a6253c01e82b6553d1aca11e0290849dae96584d
4
+ data.tar.gz: a7a8bef46abe62dabb613b6d9ee4257f864002cd
5
5
  SHA512:
6
- metadata.gz: 54294202eaf60a86469bad84b94d95fb81f01c45f5df2c49bcc73f3abb61f0412728f4e2610b7d8ad3583a108a7143b6d508fba8e9b19cbb464cafe765fd1853
7
- data.tar.gz: 811d5884ebfa60693e3f1d4b31f77afcb588185a8b451348c3f7693557e0fa9c2efd0ecf1b6d7d3be89c96eebf17cdb9d922468c5cf62d90abcf3fc4f7767c1e
6
+ metadata.gz: 222bb94a310041c47d44b61a8394f12513d9febf1574897c6d62cdfa1c11142c4e45be09c6dfaa61bfe11be142dafc4cdc0afd18cf4e67bd5e7b675efdcd00f3
7
+ data.tar.gz: 4384169af2bf09f0d2349e03b46b972a3fb5532df6f3316ed404545a87fb1b364f3a9ae6c9bfa8cfe515b97ff2168161f93ad3684a0d5365237611a141c494e4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yaml-validator (0.1.9)
4
+ yaml-validator (0.1.10)
5
5
  colorize
6
6
  rake
7
7
  rspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Sagie Maoz
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  YAML Validator
2
2
  ==============
3
3
 
4
+
4
5
  [![Build Status](https://travis-ci.org/wazeHQ/yaml-validator.png?branch=master)](https://travis-ci.org/wazeHQ/yaml-validator)
5
6
 
6
7
  Validates .yml locale files for Ruby on Rails projects.
@@ -8,6 +9,21 @@ Validates .yml locale files for Ruby on Rails projects.
8
9
  What does it validate?
9
10
  ----------------------
10
11
 
12
+ * Rails I18n variables:
13
+
14
+ * Make sure users didn't translate the variables (e.g. `Hi %{user}` was translated to `Hola %{usuario}`).
15
+ * Make sure users didn't write invalid variable syntax (e.g. `{name}` or `{name}%` instead of `%{name}`)
16
+
17
+ * Make sure users didn't change locked keys (searches for a file named `locked_keys` in the same folder, where each line is a regular expression).
18
+ * Check for bad characters in values (transifex sometimes adds the "⏎ " character)
19
+ * Keys that don't appear in the source language
20
+ * Checks that Ruby's YAML parser can parse the file
21
+ * Checks for missing pluralization (in languages like russian there are 4 types of pluralization: one, other, few, many)
22
+
23
+
24
+ How to run it?
25
+ ----------------------
26
+
11
27
  Given the following file tree:
12
28
 
13
29
  ```
@@ -23,7 +39,7 @@ config/
23
39
  Run the following command:
24
40
 
25
41
  ```bash
26
- yaml-validator config/locales
42
+ yaml-validator validate config/locales
27
43
 
28
44
  or
29
45
 
@@ -1,3 +1,3 @@
1
1
  class YamlValidator
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
@@ -52,13 +52,13 @@ describe Helpers do
52
52
 
53
53
  describe "#pluralization?" do
54
54
  it "returns true when object has :one and :other" do
55
- Helpers.pluralization?(:one => 'one', :other => 'other').should be_true
55
+ Helpers.pluralization?(:one => 'one', :other => 'other').should be true
56
56
  end
57
57
  it "returns true when object has 'one' and 'other'" do
58
- Helpers.pluralization?('one' => 'one', 'other' => 'other').should be_true
58
+ Helpers.pluralization?('one' => 'one', 'other' => 'other').should be true
59
59
  end
60
60
  it "returns false for {}" do
61
- Helpers.pluralization?({}).should be_false
61
+ Helpers.pluralization?({}).should be false
62
62
  end
63
63
  end
64
64
 
@@ -7,10 +7,11 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "yaml-validator"
8
8
  gem.version = YamlValidator::VERSION
9
9
  gem.authors = ["David Elentok"]
10
- gem.email = ["3david@gmail.com"]
10
+ gem.email = ["elentok@google.com"]
11
11
  gem.description = %q{YAML locales validator}
12
12
  gem.summary = %q{Validates .yml locale files for Ruby on Rails projects}
13
13
  gem.homepage = "http://github.com/wazeHQ/yaml-validator"
14
+ gem.license = 'MIT'
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
metadata CHANGED
@@ -1,98 +1,98 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml-validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Elentok
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-02 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: colorize
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sanitize
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: thor
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: YAML locales validator
84
84
  email:
85
- - 3david@gmail.com
85
+ - elentok@google.com
86
86
  executables:
87
87
  - yaml-validator
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
- - .rspec
92
- - .ruby-version
93
- - .travis.yml
91
+ - ".rspec"
92
+ - ".travis.yml"
94
93
  - Gemfile
95
94
  - Gemfile.lock
95
+ - LICENSE.txt
96
96
  - README.md
97
97
  - Rakefile
98
98
  - bin/yaml-validator
@@ -128,7 +128,8 @@ files:
128
128
  - spec/yaml-validator_spec.rb
129
129
  - yaml-validator.gemspec
130
130
  homepage: http://github.com/wazeHQ/yaml-validator
131
- licenses: []
131
+ licenses:
132
+ - MIT
132
133
  metadata: {}
133
134
  post_install_message:
134
135
  rdoc_options: []
@@ -136,17 +137,17 @@ require_paths:
136
137
  - lib
137
138
  required_ruby_version: !ruby/object:Gem::Requirement
138
139
  requirements:
139
- - - '>='
140
+ - - ">="
140
141
  - !ruby/object:Gem::Version
141
142
  version: '0'
142
143
  required_rubygems_version: !ruby/object:Gem::Requirement
143
144
  requirements:
144
- - - '>='
145
+ - - ">="
145
146
  - !ruby/object:Gem::Version
146
147
  version: '0'
147
148
  requirements: []
148
149
  rubyforge_project:
149
- rubygems_version: 2.0.3
150
+ rubygems_version: 2.4.8
150
151
  signing_key:
151
152
  specification_version: 4
152
153
  summary: Validates .yml locale files for Ruby on Rails projects
@@ -173,3 +174,4 @@ test_files:
173
174
  - spec/fixtures/wrong_variables/he.yml
174
175
  - spec/helpers_spec.rb
175
176
  - spec/yaml-validator_spec.rb
177
+ has_rdoc:
@@ -1 +0,0 @@
1
- 2.0.0-p247