helloh 0.2.1 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/helloh +3 -1
- data/helloh.gemspec +1 -1
- data/lib/helloh/compare.rb +3 -2
- metadata +21 -39
data/bin/helloh
CHANGED
@@ -10,8 +10,10 @@ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
|
10
10
|
require "helloh"
|
11
11
|
|
12
12
|
directory = ARGV[0] || "./config/locales"
|
13
|
+
ignore = File.exists?(".hellohignore") ? File.read(".hellohignore").split(/\n|,/) : []
|
13
14
|
|
14
15
|
helloh = Helloh::Compare.new
|
15
|
-
helloh.files = Dir.glob(File.join(directory, "
|
16
|
+
helloh.files = Dir.glob(File.join(directory, "??.yml"))
|
17
|
+
helloh.ignore = ignore
|
16
18
|
helloh.compare!
|
17
19
|
helloh.output_results!
|
data/helloh.gemspec
CHANGED
data/lib/helloh/compare.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Helloh
|
2
2
|
class Compare
|
3
3
|
|
4
|
-
attr_accessor :files
|
4
|
+
attr_accessor :files, :ignore
|
5
5
|
attr_reader :results
|
6
6
|
|
7
7
|
def initialize # {{{
|
@@ -36,8 +36,9 @@ module Helloh
|
|
36
36
|
|
37
37
|
def compare_yaml_hash(content1, content2, context = []) # {{{
|
38
38
|
content1.each do |key, value|
|
39
|
-
|
40
39
|
path = "#{(context+[key]).join(".")}"
|
40
|
+
|
41
|
+
next if @ignore.include?(path)
|
41
42
|
unless content2.include?(key)
|
42
43
|
@results[@other_file][:missing] << path unless @results[@other_file][:missing].include?(path)
|
43
44
|
next
|
metadata
CHANGED
@@ -1,32 +1,23 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: helloh
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.3'
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 0.2.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
-
|
7
|
+
authors:
|
8
|
+
- Rémi Prévost
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2012-01-05 00:00:00 Z
|
12
|
+
date: 2012-08-28 00:00:00.000000000Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: Helloh compares Rails localization files and looks for missing keys.
|
22
15
|
email: remi@exomel.com
|
23
|
-
executables:
|
16
|
+
executables:
|
24
17
|
- helloh
|
25
18
|
extensions: []
|
26
|
-
|
27
19
|
extra_rdoc_files: []
|
28
|
-
|
29
|
-
files:
|
20
|
+
files:
|
30
21
|
- .gitignore
|
31
22
|
- LICENSE
|
32
23
|
- README.mkd
|
@@ -38,36 +29,27 @@ files:
|
|
38
29
|
- lib/tasks/helloh.rake
|
39
30
|
homepage: http://github.com/remiprev/helloh
|
40
31
|
licenses: []
|
41
|
-
|
42
32
|
post_install_message:
|
43
33
|
rdoc_options: []
|
44
|
-
|
45
|
-
require_paths:
|
34
|
+
require_paths:
|
46
35
|
- lib
|
47
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
37
|
none: false
|
49
|
-
requirements:
|
50
|
-
- -
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
|
53
|
-
|
54
|
-
- 0
|
55
|
-
version: "0"
|
56
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
43
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
62
|
-
segments:
|
63
|
-
- 0
|
64
|
-
version: "0"
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
65
48
|
requirements: []
|
66
|
-
|
67
49
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.8.
|
50
|
+
rubygems_version: 1.8.18
|
69
51
|
signing_key:
|
70
52
|
specification_version: 3
|
71
53
|
summary: Helloh compares Rails l10n files
|
72
54
|
test_files: []
|
73
|
-
|
55
|
+
has_rdoc:
|