rabelyoda 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/rabelyoda +0 -4
- metadata +4 -17
- data/lib/rabelyoda/options.rb +0 -42
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
data/bin/rabelyoda
CHANGED
@@ -3,21 +3,17 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'fileutils'
|
5
5
|
require 'term/ansicolor'
|
6
|
-
require 'tmpdir'
|
7
6
|
require 'yaml'
|
8
7
|
require 'ya2yaml'
|
9
8
|
$KCODE = 'UTF8'
|
10
9
|
|
11
10
|
include Term::ANSIColor
|
12
11
|
|
13
|
-
require 'rabelyoda/options'
|
14
12
|
require 'rabelyoda/hash'
|
15
13
|
|
16
14
|
# Main block
|
17
15
|
|
18
16
|
def main
|
19
|
-
$config = RabelYoda::Options.parse
|
20
|
-
|
21
17
|
load_ymls
|
22
18
|
populate_locales
|
23
19
|
save_ymls
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 4
|
9
|
+
version: 1.1.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Andrey Subbotin
|
@@ -19,7 +19,7 @@ default_executable:
|
|
19
19
|
- rabelyoda
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: term-ansicolor
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
type: :runtime
|
32
32
|
version_requirements: *id001
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: ya2yaml
|
35
35
|
prerelease: false
|
36
36
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
@@ -42,18 +42,6 @@ dependencies:
|
|
42
42
|
version: "0"
|
43
43
|
type: :runtime
|
44
44
|
version_requirements: *id002
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: ya2yaml
|
47
|
-
prerelease: false
|
48
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
49
|
-
requirements:
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
segments:
|
53
|
-
- 0
|
54
|
-
version: "0"
|
55
|
-
type: :runtime
|
56
|
-
version_requirements: *id003
|
57
45
|
description: A simple utility to push/pull l10n resources of a Rails project to/from the translators
|
58
46
|
email: andrey@subbotin.me
|
59
47
|
executables:
|
@@ -69,7 +57,6 @@ files:
|
|
69
57
|
- README.markdown
|
70
58
|
- VERSION
|
71
59
|
- lib/rabelyoda/hash.rb
|
72
|
-
- lib/rabelyoda/options.rb
|
73
60
|
has_rdoc: true
|
74
61
|
homepage: http://github.com/eploko/rabelyoda
|
75
62
|
licenses: []
|
data/lib/rabelyoda/options.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'optparse'
|
4
|
-
require 'ostruct'
|
5
|
-
|
6
|
-
module RabelYoda
|
7
|
-
class Options
|
8
|
-
|
9
|
-
#
|
10
|
-
# Return a structure describing the options.
|
11
|
-
#
|
12
|
-
def self.parse
|
13
|
-
# The options specified on the command line will be collected in *options*.
|
14
|
-
# We set default values here.
|
15
|
-
options = { 'rules' => 'config/rabelyoda.yml' }
|
16
|
-
|
17
|
-
optparser = OptionParser.new do |opts|
|
18
|
-
opts.banner = "Usage: babelyoda [options]"
|
19
|
-
|
20
|
-
opts.separator ""
|
21
|
-
opts.separator "Common options:"
|
22
|
-
|
23
|
-
# Optional argument; multi-line description.
|
24
|
-
opts.on("-r", "--rules <RULES-FILE>",
|
25
|
-
"Use the specified rules file.",
|
26
|
-
"Default is 'config/rabelyoda.yml'.") do |rules|
|
27
|
-
options['rules'] = rules
|
28
|
-
end
|
29
|
-
|
30
|
-
# No argument, shows at tail. This will print an options summary.
|
31
|
-
opts.on_tail("-h", "--help", "Show this message") do
|
32
|
-
puts opts
|
33
|
-
exit
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
optparser.parse!
|
38
|
-
options
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|