exprc 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. data/bin/exprc +6 -1
  2. data/exprc.gemspec +1 -1
  3. metadata +2 -2
data/bin/exprc CHANGED
@@ -19,6 +19,7 @@ ARGV.options do |o|
19
19
  predicate = nil
20
20
  value = nil
21
21
  key = nil
22
+ divisor = nil
22
23
  percentile = nil
23
24
 
24
25
  o.banner = "usage: exprc list|show|test|create|destroy|version [options]"
@@ -30,6 +31,7 @@ ARGV.options do |o|
30
31
  o.on("-p", "--predicate p", String, "predicate data in json") { |p| predicate = p }
31
32
  o.on("-v", "--value v", String, "value key") { |v| value = v }
32
33
  o.on("-k", "--key k", String, "partitioning key") { |k| key = k }
34
+ o.on("-i", "--divisor i", Float, "metric divisor") { |i| divisor = i }
33
35
  o.on("-l", "--percentile l", Integer, "percentile value") { |l| percentile = l }
34
36
  o.on("-h", "--help", "display this help") { abort(o.to_s) }
35
37
  o.parse!
@@ -43,7 +45,7 @@ ARGV.options do |o|
43
45
 
44
46
  case action
45
47
  when "version"
46
- puts("0.0.2")
48
+ puts("0.0.3")
47
49
  when "list"
48
50
  begin
49
51
  names = JSON.parse(RestClient.get("#{exprd_api_url}/metrics"))
@@ -66,6 +68,7 @@ ARGV.options do |o|
66
68
  puts("= predicate: #{info["predicate"]}") if info["predicate"]
67
69
  puts("= value: #{info["value"]}") if info["value"]
68
70
  puts("= key: #{info["key"]}") if info["key"]
71
+ puts("= divisor: #{info["divisor"]}") if info["divisor"]
69
72
  puts("= percentile: #{info["percentile"]}") if info["percentile"]
70
73
  puts("= frequency: #{info["frequency"]}")
71
74
  rescue => e
@@ -84,6 +87,7 @@ ARGV.options do |o|
84
87
  "predicate" => JSON.parse(predicate),
85
88
  "value" => value,
86
89
  "key" => key,
90
+ "divisor" => divisor,
87
91
  "percentile" => percentile,
88
92
  "frequency" => frequency}
89
93
  results = JSON.parse(RestClient.put("#{exprd_api_url}/metrics/#{name}/tests", JSON.dump(params)))
@@ -107,6 +111,7 @@ ARGV.options do |o|
107
111
  "predicate" => JSON.parse(predicate),
108
112
  "value" => value,
109
113
  "key" => key,
114
+ "divisor" => divisor,
110
115
  "percentile" => percentile,
111
116
  "frequency" => frequency}
112
117
  RestClient.put("#{exprd_api_url}/metrics/#{name}", JSON.dump(params))
@@ -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.2"
12
+ gem.version = "0.0.3"
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.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-03 00:00:00.000000000 Z
12
+ date: 2012-04-04 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: CLI to exprd.
15
15
  email: