monitoring-client 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,9 @@
3
3
  module Monitoring
4
4
  class SystemInfo
5
5
 
6
+ require "optparse"
7
+ require "yaml"
8
+ require "monitoring/client/version"
6
9
  require "monitoring/client/profiler"
7
10
 
8
11
  RC_OK = 0
@@ -58,6 +61,12 @@ module Monitoring
58
61
  @stdout = v
59
62
  end
60
63
 
64
+ o.on("-v", "--version",
65
+ "Print version and exit") do |v|
66
+ STDOUT.puts(Monitoring::Client::VERSION)
67
+ Kernel.exit(RC_OK)
68
+ end
69
+
61
70
  o.on("--stderr=FILE",
62
71
  "Place to write stdout to",
63
72
  "Default: " + @stderr.inspect()) do |v|
@@ -10,6 +10,7 @@ module Monitoring
10
10
  require "net/https"
11
11
  require "uri"
12
12
  require "timeout"
13
+ require "monitoring/client/version"
13
14
 
14
15
  RC_OK = 0
15
16
  RC_USAGE = 1
@@ -76,6 +77,12 @@ module Monitoring
76
77
  "Default: " + @stderr.inspect()) do |v|
77
78
  @stderr = v
78
79
  end
80
+
81
+ o.on("-v", "--version",
82
+ "Print version and exit") do |v|
83
+ STDOUT.puts(Monitoring::Client::VERSION)
84
+ Kernel.exit(RC_OK)
85
+ end
79
86
 
80
87
  o.separator("")
81
88
  o.on_tail("-h", "--help", "You're reading it :-)") do
@@ -1,5 +1,5 @@
1
1
  module Monitoring
2
2
  module Client
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monitoring-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marc Bowes