exprc 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/exprc +4 -5
  2. data/exprc.gemspec +1 -1
  3. metadata +1 -1
data/bin/exprc CHANGED
@@ -21,7 +21,7 @@ ARGV.options do |o|
21
21
  key = nil
22
22
  percentile = nil
23
23
 
24
- o.banner = "usage: exprc list|show|test|create|destroy [options]"
24
+ o.banner = "usage: exprc list|show|test|create|destroy|version [options]"
25
25
  o.on("-n", "--name n", String, "name of metric") { |n| name = n }
26
26
  o.on("-t", "--type t", String, "type of metric") { |t| type = t }
27
27
  o.on("-w", "--window w", Integer, "window of metric in seconds") { |w| window = w }
@@ -37,11 +37,13 @@ ARGV.options do |o|
37
37
  exprd_api_url = ENV["EXPRD_API_URL"]
38
38
 
39
39
  abort("! error: an action is required (e.g list).\n\n#{o}") if (!action || action.empty?)
40
- abort("! error: unrecognized action #{action}.") if !%w{list show test create update destroy}.include?(action)
40
+ abort("! error: unrecognized action #{action}.") if !%w{list show test create update destroy version}.include?(action)
41
41
  abort("! error: missing EXPRD_API_URL.\n\n#{o}") if (!exprd_api_url || exprd_api_url.empty?)
42
42
  abort("! error: unrecognized args: #{ARGV.join(" ")}.") if !ARGV.empty?
43
43
 
44
44
  case action
45
+ when "version"
46
+ puts("0.0.2")
45
47
  when "list"
46
48
  begin
47
49
  names = JSON.parse(RestClient.get("#{exprd_api_url}/metrics"))
@@ -73,9 +75,6 @@ ARGV.options do |o|
73
75
  end
74
76
  when "test"
75
77
  abort("! error: missing --name.\n\n#{o}") if (!name || name.empty?)
76
- abort("! error: missing --type.\n\n#{o}") if (!type || type.empty?)
77
- abort("! error: missing --window.\n\n#{o}") if !window
78
- abort("! error: missing --delay.\n\n#{o}") if !delay
79
78
  $stdout.print("* testing metric #{name}...")
80
79
  begin
81
80
  params = {
data/exprc.gemspec CHANGED
@@ -9,5 +9,5 @@ Gem::Specification.new do |gem|
9
9
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
10
10
  gem.name = "exprc"
11
11
  gem.require_paths = ["lib"]
12
- gem.version = "0.0.1"
12
+ gem.version = "0.0.2"
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exprc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: