babelyoda 1.6.0 → 2.0.0
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.
- data/.gitignore +5 -0
- data/CHANGELOG +1 -0
- data/Gemfile +6 -0
- data/LICENSE +1 -1
- data/README.rdoc +2 -2
- data/Rakefile +1 -0
- data/babelyoda.gemspec +28 -0
- data/lib/babelyoda/file.rb +20 -0
- data/lib/babelyoda/genstrings.rb +27 -0
- data/lib/babelyoda/git.rb +99 -0
- data/lib/babelyoda/git_versions.rb +39 -0
- data/lib/babelyoda/ibtool.rb +51 -0
- data/lib/babelyoda/keyset.rb +58 -0
- data/lib/babelyoda/localization_key.rb +56 -0
- data/lib/babelyoda/localization_value.rb +26 -0
- data/lib/babelyoda/logger.rb +16 -0
- data/lib/babelyoda/rake.rb +10 -0
- data/lib/babelyoda/specification.rb +40 -0
- data/lib/babelyoda/specification_loader.rb +35 -0
- data/lib/babelyoda/strings.rb +64 -8
- data/lib/babelyoda/strings_lexer.rb +12 -0
- data/lib/babelyoda/strings_parser.rb +72 -0
- data/lib/babelyoda/tanker.rb +190 -0
- data/lib/babelyoda/version.rb +3 -0
- data/lib/babelyoda/xib.rb +94 -0
- data/lib/babelyoda.rb +207 -0
- data/templates/Babelfile.erb +15 -0
- metadata +162 -70
- data/VERSION +0 -1
- data/bin/babelyoda +0 -399
- data/data/empty.strings +0 -1
- data/lib/babelyoda/options.rb +0 -42
data/lib/babelyoda/options.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'optparse'
|
4
|
-
require 'ostruct'
|
5
|
-
|
6
|
-
module BabelYoda
|
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' => 'rules.babelyoda' }
|
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 'babelyoda.rules'.") 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
|