helloh 0.3 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -1
- data/Gemfile +2 -0
- data/LICENSE +7 -3
- data/README.mkd +1 -5
- data/Rakefile +4 -0
- data/helloh.gemspec +9 -2
- data/lib/helloh.rb +2 -6
- metadata +28 -7
- data/lib/helloh/railtie.rb +0 -12
- data/lib/tasks/helloh.rake +0 -11
data/.gitignore
CHANGED
data/Gemfile
ADDED
data/LICENSE
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
-
Copyright 2011 Rémi Prévost
|
2
|
-
|
3
|
-
|
1
|
+
Copyright (c) 2011-2012 Rémi Prévost
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.mkd
CHANGED
@@ -22,14 +22,10 @@ However, you can also use a path (where the localization files are) as the first
|
|
22
22
|
|
23
23
|
$ helloh /path/to/my/rails/project/config/locales
|
24
24
|
|
25
|
-
Another way to use Helloh is with a Rake task, when the gem is included in a Rails project `Gemfile`:
|
26
|
-
|
27
|
-
$ rake helloh:compare
|
28
|
-
|
29
25
|
## Features
|
30
26
|
|
31
27
|
It is still missing a lot of useful features. Like colored output. But its biggest feature would be to scan every file in a Rails project and check if every translation is defined in each localization file. That’s coming too.
|
32
28
|
|
33
29
|
## License
|
34
30
|
|
35
|
-
Helloh is © 2011 Rémi Prévost and may be freely distributed under the [
|
31
|
+
Helloh is © 2011-2012 Rémi Prévost and may be freely distributed under the [MIT license](https://github.com/rosette/helloh/blob/master/LICENSE). See the `LICENSE` file.
|
data/Rakefile
ADDED
data/helloh.gemspec
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
$:.push File.expand_path("../lib", __FILE__)
|
4
|
+
require "helloh"
|
5
|
+
|
1
6
|
spec = Gem::Specification.new do |s|
|
2
7
|
s.name = "helloh"
|
3
|
-
s.version =
|
8
|
+
s.version = Helloh::VERSION
|
4
9
|
s.platform = Gem::Platform::RUBY
|
5
10
|
s.authors = "Rémi Prévost"
|
6
11
|
s.email = "remi@exomel.com"
|
7
|
-
s.homepage = "http://github.com/
|
12
|
+
s.homepage = "http://github.com/rosette/helloh"
|
8
13
|
s.summary = "Helloh compares Rails l10n files"
|
9
14
|
s.description = "Helloh compares Rails localization files and looks for missing keys."
|
10
15
|
|
@@ -14,4 +19,6 @@ spec = Gem::Specification.new do |s|
|
|
14
19
|
|
15
20
|
s.require_paths = ["lib"]
|
16
21
|
s.require_path = "lib"
|
22
|
+
|
23
|
+
s.add_development_dependency "rake", "~> 0.9.2"
|
17
24
|
end
|
data/lib/helloh.rb
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
require "yaml"
|
2
|
+
require "helloh/compare"
|
2
3
|
|
3
4
|
module Helloh
|
4
|
-
VERSION = "0.
|
5
|
-
|
6
|
-
autoload :Compare, "helloh/compare"
|
7
|
-
autoload :Railtie, "helloh/railtie"
|
5
|
+
VERSION = "0.3.5"
|
8
6
|
|
9
7
|
def self.lang_from_filename(file) # {{{
|
10
8
|
file.match(/([^\/]+)\.yml$/)[1]
|
11
9
|
end # }}}
|
12
10
|
|
13
11
|
end
|
14
|
-
|
15
|
-
require "helloh/railtie" if defined?(Rails)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helloh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
-
dependencies:
|
12
|
+
date: 2012-10-22 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.9.2
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.9.2
|
14
30
|
description: Helloh compares Rails localization files and looks for missing keys.
|
15
31
|
email: remi@exomel.com
|
16
32
|
executables:
|
@@ -19,15 +35,15 @@ extensions: []
|
|
19
35
|
extra_rdoc_files: []
|
20
36
|
files:
|
21
37
|
- .gitignore
|
38
|
+
- Gemfile
|
22
39
|
- LICENSE
|
23
40
|
- README.mkd
|
41
|
+
- Rakefile
|
24
42
|
- bin/helloh
|
25
43
|
- helloh.gemspec
|
26
44
|
- lib/helloh.rb
|
27
45
|
- lib/helloh/compare.rb
|
28
|
-
|
29
|
-
- lib/tasks/helloh.rake
|
30
|
-
homepage: http://github.com/remiprev/helloh
|
46
|
+
homepage: http://github.com/rosette/helloh
|
31
47
|
licenses: []
|
32
48
|
post_install_message:
|
33
49
|
rdoc_options: []
|
@@ -39,12 +55,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
39
55
|
- - ! '>='
|
40
56
|
- !ruby/object:Gem::Version
|
41
57
|
version: '0'
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
hash: -2178282763209004564
|
42
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
62
|
none: false
|
44
63
|
requirements:
|
45
64
|
- - ! '>='
|
46
65
|
- !ruby/object:Gem::Version
|
47
66
|
version: '0'
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
hash: -2178282763209004564
|
48
70
|
requirements: []
|
49
71
|
rubyforge_project:
|
50
72
|
rubygems_version: 1.8.18
|
@@ -52,4 +74,3 @@ signing_key:
|
|
52
74
|
specification_version: 3
|
53
75
|
summary: Helloh compares Rails l10n files
|
54
76
|
test_files: []
|
55
|
-
has_rdoc:
|
data/lib/helloh/railtie.rb
DELETED
data/lib/tasks/helloh.rake
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
namespace :helloh do
|
2
|
-
|
3
|
-
desc "Compare localization files and show missing keys"
|
4
|
-
task :compare do # {{{
|
5
|
-
helloh = Helloh::Compare.new
|
6
|
-
helloh.files = Dir.glob(Rails.root.join("config/locales/*.yml"))
|
7
|
-
helloh.compare!
|
8
|
-
helloh.output_results!
|
9
|
-
end # }}}
|
10
|
-
|
11
|
-
end
|