exprc 0.0.4 → 0.0.5

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 +6 -1
  2. data/exprc.gemspec +1 -1
  3. metadata +2 -2
data/bin/exprc CHANGED
@@ -17,6 +17,7 @@ ARGV.options do |o|
17
17
  delay = nil
18
18
  frequency = nil
19
19
  predicate = nil
20
+ predicate2 = nil
20
21
  value = nil
21
22
  key = nil
22
23
  divisor = nil
@@ -29,6 +30,7 @@ ARGV.options do |o|
29
30
  o.on("-d", "--delay d", Integer, "delay of metric in seconds") { |d| delay = d }
30
31
  o.on("-f", "--frequency f", Integer, "frequency of metric emits in seconds") { |f| frequency = f }
31
32
  o.on("-p", "--predicate p", String, "predicate data in json") { |p| predicate = p }
33
+ o.on("-r", "--predicate2 r", String, "second predicate data in json") { |r| predicate2 = r }
32
34
  o.on("-v", "--value v", String, "value key") { |v| value = v }
33
35
  o.on("-k", "--key k", String, "partitioning key") { |k| key = k }
34
36
  o.on("-i", "--divisor i", Float, "metric divisor") { |i| divisor = i }
@@ -45,7 +47,7 @@ ARGV.options do |o|
45
47
 
46
48
  case action
47
49
  when "version"
48
- puts("0.0.4")
50
+ puts("0.0.5")
49
51
  when "list"
50
52
  begin
51
53
  names = JSON.parse(RestClient.get("#{exprd_api_url}/metrics"))
@@ -66,6 +68,7 @@ ARGV.options do |o|
66
68
  puts("= window: #{info["window"]}")
67
69
  puts("= delay: #{info["delay"]}")
68
70
  puts("= predicate: #{info["predicate"]}") if info["predicate"]
71
+ puts("= predicate2: #{info["predicate2"]}") if info["predicate2"]
69
72
  puts("= value: #{info["value"]}") if info["value"]
70
73
  puts("= key: #{info["key"]}") if info["key"]
71
74
  puts("= divisor: #{info["divisor"]}") if info["divisor"]
@@ -85,6 +88,7 @@ ARGV.options do |o|
85
88
  "window" => window,
86
89
  "delay" => delay,
87
90
  "predicate" => (predicate && JSON.parse(predicate)),
91
+ "predicate2" => (predicate2 && JSON.parse(predicate2)),
88
92
  "value" => value,
89
93
  "key" => key,
90
94
  "divisor" => divisor,
@@ -109,6 +113,7 @@ ARGV.options do |o|
109
113
  "window" => window,
110
114
  "delay" => delay,
111
115
  "predicate" => (predicate && JSON.parse(predicate)),
116
+ "predicate2" => (predicate2 && JSON.parse(predicate2)),
112
117
  "value" => value,
113
118
  "key" => key,
114
119
  "divisor" => divisor,
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.4"
12
+ gem.version = "0.0.5"
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.4
4
+ version: 0.0.5
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-04 00:00:00.000000000 Z
12
+ date: 2012-04-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: CLI to exprd.
15
15
  email: