macaw-ruby 0.0.13 → 0.0.15

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: de54af672c0b7bb74aba69009b45240e3d2bc019
4
- data.tar.gz: 5d057a8376ef73581ab221c1b7828d7915915e3f
3
+ metadata.gz: 69465fa08f369855d092df09f704792f3e7e887a
4
+ data.tar.gz: f97a7e4b2afbce09c321751382078290e2e8f3ea
5
5
  SHA512:
6
- metadata.gz: 8d3f3757c29a4441f30fb952a9c12b4aca6c608673d9e3394c979b565960ad84b7794cdbf611a451573fabf5d7d7275c14e066f90331ce71eeac95f4c2c67d21
7
- data.tar.gz: 7775bc3d98b34b1ac249b2f446fc4bb66dba489dac3f651cfbd4390318627ed3fa8087bf85a6ec9698ae73ae7fa119804f4ea77614b3261ce395f2a57811c81d
6
+ metadata.gz: 52082218e8d1983460fa63924e0bda0ff582cc2e955634a0f131cae7bce77b76446e3b14914dbf1ca4e895fe025853cbca23884dc6c30f76c49afb41adaf86ea
7
+ data.tar.gz: e64e485ed1366d17bf675fc9ad4d52fb4d9d19e7261e033b6fd44d1a963c4d2dc9116e5245816dc68b42c4ed44cab0dfc801ba3ca1eec382022108d53a351421
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- macaw-ruby (0.0.13)
4
+ macaw-ruby (0.0.15)
5
5
  i18n
6
6
  json_pure
7
7
  os
data/Rakefile CHANGED
@@ -8,6 +8,7 @@ task :bump do
8
8
  version[2] += 1
9
9
  version = version.collect{|v| v.to_s}.join('.')
10
10
  File.open('lib/macaw/version.rb', 'w'){|f| f.write("class Macaw\n VERSION = #{version.inspect}\nend\n") }
11
+ puts `git add lib/macaw/version.rb`
11
12
  end
12
13
 
13
14
  task :publish do
data/bin/macaw CHANGED
@@ -51,14 +51,17 @@ I18n.load_path = Dir[File.expand_path(File.join(File.dirname(__FILE__), '..', 'l
51
51
  I18n.default_locale = :en
52
52
 
53
53
  def options!
54
+ options = {}
54
55
  [true, false].collect{|dryrun|
55
56
  opts = OptionParser.new{|parser|
56
57
  parser.banner = "#{I18n.t('help.usage')}: macaw [options] FILE"
57
58
  parser.separator ""
58
59
 
60
+ options[:language] = I18n.default_locale
59
61
  parser.on('-L', '--language LANG', I18n.t('help.language')){|lang|
60
62
  begin
61
63
  I18n.locale = lang.intern
64
+ options[:language] = lang.intern
62
65
  rescue I18n::InvalidLocale
63
66
  if !dryrun
64
67
  puts "#{lang.inspect} is not among the supported languages #{I18n.available_locales.inspect}"
@@ -67,13 +70,17 @@ def options!
67
70
  end
68
71
  }
69
72
 
70
- parser.on('-l', '--log', I18n.t('help.log'))
73
+ parser.on('-l', '--log', I18n.t('help.log')) {|v|
74
+ options[:log] = v
75
+ }
71
76
 
72
77
  parser.on('-t', '--timeout SECONDS', I18n.t('help.timeout')){|timeout|
73
- Integer(timeout)
78
+ options[:timeout] = Integer(timeout)
74
79
  }
75
80
 
76
- parser.on('-v', '--verbose', I18n.t('help.verbose'))
81
+ parser.on('-v', '--verbose', I18n.t('help.verbose')) {|v|
82
+ options[:verbose] = v
83
+ }
77
84
 
78
85
  parser.on_tail('-h', '--help', '--usage', I18n.t('help.help')){
79
86
  if !dryrun
@@ -97,7 +104,8 @@ def options!
97
104
  else
98
105
  opts.parse!
99
106
  end
100
- }.last
107
+ }
108
+ options
101
109
  end
102
110
 
103
111
  OPTS=options!
data/lib/macaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Macaw
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.15"
3
3
  end
data/macaw.gemspec CHANGED
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
+ spec.required_ruby_version = '>= 1.9'
21
22
 
22
23
  spec.add_development_dependency "bundler", "~> 1.3"
23
24
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macaw-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Heyns
@@ -180,7 +180,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
181
  - - ">="
182
182
  - !ruby/object:Gem::Version
183
- version: '0'
183
+ version: '1.9'
184
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - ">="