exprc 0.0.6 → 0.0.7

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 -7
  2. data/exprc.gemspec +1 -1
  3. metadata +2 -2
data/bin/exprc CHANGED
@@ -14,7 +14,6 @@ ARGV.options do |o|
14
14
  name = nil
15
15
  type = nil
16
16
  window = nil
17
- delay = nil
18
17
  frequency = nil
19
18
  predicate = nil
20
19
  predicate2 = nil
@@ -27,7 +26,6 @@ ARGV.options do |o|
27
26
  o.on("-n", "--name n", String, "name of metric") { |n| name = n }
28
27
  o.on("-t", "--type t", String, "type of metric") { |t| type = t }
29
28
  o.on("-w", "--window w", Integer, "window of metric in seconds") { |w| window = w }
30
- o.on("-d", "--delay d", Integer, "delay of metric in seconds") { |d| delay = d }
31
29
  o.on("-f", "--frequency f", Integer, "frequency of metric emits in seconds") { |f| frequency = f }
32
30
  o.on("-p", "--predicate p", String, "predicate data in json") { |p| predicate = p }
33
31
  o.on("-r", "--predicate2 r", String, "second predicate data in json") { |r| predicate2 = r }
@@ -43,7 +41,6 @@ ARGV.options do |o|
43
41
  params = {
44
42
  "type" => type,
45
43
  "window" => window,
46
- "delay" => delay,
47
44
  "predicate" => (predicate && JSON.parse(predicate)),
48
45
  "predicate2" => (predicate2 && JSON.parse(predicate2)),
49
46
  "value" => value,
@@ -55,12 +52,13 @@ ARGV.options do |o|
55
52
  abort("! error: an action is required (e.g list).\n\n#{o}") if (!action || action.empty?)
56
53
  abort("! error: unrecognized action #{action}.") if !%w{list show explain test create update destroy version}.include?(action)
57
54
  abort("! error: missing EXPRD_API_URL.\n\n#{o}") if (!exprd_api_url || exprd_api_url.empty?)
55
+ abort("! error: --dealy is no longer required and should be omitted.") if (ARGV.include?("-d") || ARGV.include?("--delay"))
58
56
  abort("! error: unrecognized args: #{ARGV.join(" ")}.") if !ARGV.empty?
59
57
 
60
58
  begin
61
59
  case action
62
60
  when "version"
63
- puts("0.0.6")
61
+ puts("0.0.7")
64
62
  when "list"
65
63
  names = JSON.parse(RestClient.get("#{exprd_api_url}/metrics"))
66
64
  names.each do |name|
@@ -72,7 +70,6 @@ ARGV.options do |o|
72
70
  puts("= name: #{name}")
73
71
  puts("= type: #{info["type"]}")
74
72
  puts("= window: #{info["window"]}")
75
- puts("= delay: #{info["delay"]}")
76
73
  puts("= predicate: #{info["predicate"]}") if info["predicate"]
77
74
  puts("= predicate2: #{info["predicate2"]}") if info["predicate2"]
78
75
  puts("= value: #{info["value"]}") if info["value"]
@@ -84,10 +81,10 @@ ARGV.options do |o|
84
81
  abort("! error: missing --name.\n\n#{o}") if (!name || name.empty?)
85
82
 
86
83
  if type
87
- #we are sending the params
84
+ # we are sending the params
88
85
  info = JSON.parse(RestClient.put("#{exprd_api_url}/metrics/#{name}/tests", JSON.dump(params)))
89
86
  else
90
- #we are getting a known metric
87
+ # we are getting a known metric
91
88
  info = JSON.parse(RestClient.get("#{exprd_api_url}/metrics/#{name}"))
92
89
  end
93
90
  puts("= name: #{name}")
@@ -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.6"
12
+ gem.version = "0.0.7"
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.6
4
+ version: 0.0.7
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-05-22 00:00:00.000000000 Z
12
+ date: 2012-06-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: CLI to exprd.
15
15
  email: