hansel 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/hansel +2 -1
  3. data/hansel.gemspec +2 -2
  4. data/lib/arg_parser.rb +6 -10
  5. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.1.0
data/bin/hansel CHANGED
@@ -19,4 +19,5 @@ include Config
19
19
  include Mutter
20
20
 
21
21
  hansel = Hansel.new(options)
22
- puts hansel.run
22
+ exit if options.exit
23
+ hansel.run
data/hansel.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hansel}
8
- s.version = "0.0.3"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Mylchreest"]
12
- s.date = %q{2010-02-27}
12
+ s.date = %q{2010-03-01}
13
13
  s.default_executable = %q{hansel}
14
14
  s.description = %q{Ruby driver for httperf - automated load and performance testing}
15
15
  s.email = %q{paul.mylchreest@mac.com}
data/lib/arg_parser.rb CHANGED
@@ -18,11 +18,11 @@ class ArgParser
18
18
  options.output_format = :yaml
19
19
  options.output = nil
20
20
  options.output_dir = File.join ENV['HOME'], 'hansel_output'
21
+ options.exit = false
21
22
 
22
23
  opts = OptionParser.new do |opts|
23
24
  opts.banner = "Usage: hansel [options]"
24
25
 
25
- opts.separator ""
26
26
  opts.separator "Specific options:"
27
27
 
28
28
  # Mandatory argument.
@@ -77,25 +77,21 @@ class ArgParser
77
77
  options.output_dir = opt
78
78
  end
79
79
 
80
- opts.separator ""
81
80
  opts.separator "Common options:"
82
81
 
83
82
  # Boolean switch.
84
- opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
85
- options.verbose = v
83
+ opts.on("-v", "--[no-]verbose", "Run verbosely") do |opt|
84
+ options.verbose = opt
86
85
  end
87
86
 
88
- # No argument, shows at tail. This will print an options summary.
89
- # Try it and see!
90
87
  opts.on_tail("-h", "--help", "Show this message") do
91
88
  puts opts
92
- exit
89
+ options.exit = true
93
90
  end
94
91
 
95
- # Another typical switch to print the version.
96
92
  opts.on_tail("--version", "Show version") do
97
- puts OptionParser::Version.join('.')
98
- exit
93
+ puts "Hansel version #{IO.foreach('VERSION').first.strip}"
94
+ options.exit = true
99
95
  end
100
96
  end
101
97
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hansel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Mylchreest
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-27 00:00:00 -05:00
12
+ date: 2010-03-01 00:00:00 -05:00
13
13
  default_executable: hansel
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency