visage-app 0.2.4 → 0.2.5
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.
- data/VERSION +1 -1
- data/bin/visage +4 -1
- data/features/{visage.feature → cli.feature} +6 -0
- data/features/json.feature +4 -4
- data/features/step_definitions/visage_steps.rb +7 -2
- data/lib/visage/collectd/json.rb +1 -1
- data/lib/visage/collectd/rrds.rb +1 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/bin/visage
CHANGED
@@ -4,7 +4,7 @@ require 'pathname'
|
|
4
4
|
|
5
5
|
require 'socket'
|
6
6
|
fqdn = Socket.gethostbyname(Socket.gethostname).first
|
7
|
-
|
7
|
+
$stdout.sync = true
|
8
8
|
@root = Pathname.new(File.dirname(__FILE__)).parent.expand_path
|
9
9
|
action = ARGV[0]
|
10
10
|
|
@@ -22,6 +22,9 @@ when "start"
|
|
22
22
|
puts
|
23
23
|
puts "will be running at http://#{fqdn}:9292/"
|
24
24
|
puts
|
25
|
+
require @root.join('lib/visage-app')
|
26
|
+
puts "Looking for RRDs in #{Visage::Config.rrddir}"
|
27
|
+
puts
|
25
28
|
|
26
29
|
config = @root.join('lib/visage/config.ru').to_s
|
27
30
|
server = Rack::Server.new(:config => config, :Port => 9292)
|
@@ -9,3 +9,9 @@ Feature: command line utility
|
|
9
9
|
When I start the visage server helper with "visage start"
|
10
10
|
Then a visage web server should be running
|
11
11
|
|
12
|
+
Scenario: Seeing where Visage is getting its data from
|
13
|
+
Given the "visage" gem is installed
|
14
|
+
When I start the visage server helper with "visage start"
|
15
|
+
Then I should see "Looking for RRDs in /.*collectd" on the terminal
|
16
|
+
|
17
|
+
|
data/features/json.feature
CHANGED
@@ -51,13 +51,13 @@ Feature: Export data
|
|
51
51
|
And each plugin instance should have a different color
|
52
52
|
|
53
53
|
Examples:
|
54
|
-
| path
|
55
|
-
| cpu-0/cpu-user
|
56
|
-
|
|
54
|
+
| path |
|
55
|
+
| cpu-0/cpu-user |
|
56
|
+
| memory/memory-used |
|
57
57
|
|
58
58
|
Scenario: Retrieve single plugin instance with a color definition
|
59
59
|
Given a list of hosts exist
|
60
|
-
When I visit "
|
60
|
+
When I visit "load/load" on the first available host
|
61
61
|
Then the request should succeed
|
62
62
|
Then I should receive valid JSON
|
63
63
|
And the plugin instance should have a color
|
@@ -6,15 +6,20 @@ When /^I start the visage server helper with "([^"]*)"$/ do |cmd|
|
|
6
6
|
@root = Pathname.new(File.dirname(__FILE__)).parent.parent.expand_path
|
7
7
|
command = "#{@root.join('bin')}/#{cmd}"
|
8
8
|
|
9
|
-
pipe = IO.popen(command)
|
9
|
+
@pipe = IO.popen(command, "r")
|
10
10
|
sleep 2 # so the visage server has a chance to boot
|
11
11
|
|
12
12
|
# clean up the visage server when the tests finish
|
13
13
|
at_exit do
|
14
|
-
Process.kill("KILL", pipe.pid)
|
14
|
+
Process.kill("KILL", @pipe.pid)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
Then /^a visage web server should be running$/ do
|
19
19
|
`ps -eo cmd |grep ^visage`.size.should > 0
|
20
20
|
end
|
21
|
+
|
22
|
+
Then /^I should see "([^"]*)" on the terminal$/ do |string|
|
23
|
+
output = @pipe.read(250)
|
24
|
+
output.should =~ /#{string}/
|
25
|
+
end
|
data/lib/visage/collectd/json.rb
CHANGED
data/lib/visage/collectd/rrds.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 5
|
9
|
+
version: 0.2.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Lindsay Holmwood
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-08-11 00:00:00 +10:00
|
18
18
|
default_executable: visage
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- Rakefile
|
102
102
|
- VERSION
|
103
103
|
- bin/visage
|
104
|
+
- features/cli.feature
|
104
105
|
- features/json.feature
|
105
106
|
- features/site.feature
|
106
107
|
- features/step_definitions/form_steps.rb
|
@@ -110,7 +111,6 @@ files:
|
|
110
111
|
- features/step_definitions/visage_steps.rb
|
111
112
|
- features/step_definitions/webrat_steps.rb
|
112
113
|
- features/support/env.rb
|
113
|
-
- features/visage.feature
|
114
114
|
- lib/visage-app.rb
|
115
115
|
- lib/visage/collectd/json.rb
|
116
116
|
- lib/visage/collectd/profile.rb
|