daikon 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/daikon.gemspec +1 -4
- data/lib/daikon.rb +1 -1
- data/lib/daikon/client.rb +12 -7
- data/lib/daikon/daemon.rb +1 -1
- data/spec/daemon_spec.rb +1 -1
- metadata +2 -5
- data/features/daikon.feature +0 -9
- data/features/step_definitions/daikon_steps.rb +0 -0
- data/features/support/env.rb +0 -13
data/daikon.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{daikon}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nick Quaranto"]
|
@@ -27,9 +27,6 @@ Gem::Specification.new do |s|
|
|
27
27
|
"Rakefile",
|
28
28
|
"bin/daikon",
|
29
29
|
"daikon.gemspec",
|
30
|
-
"features/daikon.feature",
|
31
|
-
"features/step_definitions/daikon_steps.rb",
|
32
|
-
"features/support/env.rb",
|
33
30
|
"lib/daikon.rb",
|
34
31
|
"lib/daikon/client.rb",
|
35
32
|
"lib/daikon/configuration.rb",
|
data/lib/daikon.rb
CHANGED
data/lib/daikon/client.rb
CHANGED
@@ -33,6 +33,13 @@ module Daikon
|
|
33
33
|
logger.info message if logger
|
34
34
|
end
|
35
35
|
|
36
|
+
def exception(error)
|
37
|
+
log error.to_s
|
38
|
+
error.backtrace.each do |line|
|
39
|
+
log line
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
36
43
|
def request(method, path, options = {})
|
37
44
|
options[:method] = method.to_s.upcase
|
38
45
|
options[:path] = path
|
@@ -63,7 +70,7 @@ module Daikon
|
|
63
70
|
push :put, "/api/v1/commands/#{id}.json", {"response" => pretty.string.strip}
|
64
71
|
end
|
65
72
|
rescue *EXCEPTIONS => ex
|
66
|
-
|
73
|
+
exception(ex)
|
67
74
|
end
|
68
75
|
|
69
76
|
def rotate_monitor(start, stop)
|
@@ -74,13 +81,13 @@ module Daikon
|
|
74
81
|
|
75
82
|
push :post, "/api/v1/summaries.json", payload
|
76
83
|
rescue *EXCEPTIONS => ex
|
77
|
-
|
84
|
+
exception(ex)
|
78
85
|
end
|
79
86
|
|
80
87
|
def report_info
|
81
88
|
push :post, "/api/v1/infos.json", redis.info
|
82
89
|
rescue *EXCEPTIONS => ex
|
83
|
-
|
90
|
+
exception(ex)
|
84
91
|
end
|
85
92
|
|
86
93
|
def evaluate_redis(command)
|
@@ -89,8 +96,7 @@ module Daikon
|
|
89
96
|
begin
|
90
97
|
Shellwords.shellwords(command.to_s)
|
91
98
|
rescue Exception => e
|
92
|
-
|
93
|
-
e.backtrace.each {|bt| STDERR.puts bt}
|
99
|
+
exception(e)
|
94
100
|
return e.message
|
95
101
|
end
|
96
102
|
return "No command received." unless argv[0]
|
@@ -98,8 +104,7 @@ module Daikon
|
|
98
104
|
begin
|
99
105
|
execute_redis(argv)
|
100
106
|
rescue Exception => e
|
101
|
-
|
102
|
-
e.backtrace.each {|bt| STDERR.puts bt}
|
107
|
+
exception(e)
|
103
108
|
e.message
|
104
109
|
end
|
105
110
|
end
|
data/lib/daikon/daemon.rb
CHANGED
data/spec/daemon_spec.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 7
|
8
|
-
-
|
9
|
-
version: 0.7.
|
8
|
+
- 3
|
9
|
+
version: 0.7.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nick Quaranto
|
@@ -160,9 +160,6 @@ files:
|
|
160
160
|
- Rakefile
|
161
161
|
- bin/daikon
|
162
162
|
- daikon.gemspec
|
163
|
-
- features/daikon.feature
|
164
|
-
- features/step_definitions/daikon_steps.rb
|
165
|
-
- features/support/env.rb
|
166
163
|
- lib/daikon.rb
|
167
164
|
- lib/daikon/client.rb
|
168
165
|
- lib/daikon/configuration.rb
|
data/features/daikon.feature
DELETED
File without changes
|
data/features/support/env.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
begin
|
3
|
-
Bundler.setup(:default, :development)
|
4
|
-
rescue Bundler::BundlerError => e
|
5
|
-
$stderr.puts e.message
|
6
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
-
exit e.status_code
|
8
|
-
end
|
9
|
-
|
10
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
11
|
-
require 'daikon'
|
12
|
-
|
13
|
-
require 'rspec/expectations'
|