scout_api 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +13 -7
- data/Gemfile +1 -1
- data/Gemfile.lock +1 -1
- data/lib/scout_api/server.rb +0 -11
- data/lib/scout_api/version.rb +1 -1
- data/lib/scout_api.rb +12 -11
- data/scout_api.gemspec +5 -5
- data/test/server_test.rb +0 -2
- metadata +17 -19
data/CHANGELOG
CHANGED
@@ -1,16 +1,22 @@
|
|
1
|
-
== 0.
|
1
|
+
== 1.0.2
|
2
2
|
|
3
|
-
|
3
|
+
* Removed Server#active_alerts. This XML is not being returned.
|
4
|
+
* Changed require calls to relative paths
|
5
|
+
* No longer requiring a specific version of HTTParty to fix compatibly issues w/Ruby Gems 1.6+
|
4
6
|
|
5
|
-
== 0.
|
7
|
+
== 1.0.1
|
6
8
|
|
7
|
-
*
|
8
|
-
* Documentation updates
|
9
|
+
* Removed debugging output in Metric#to_sparkline
|
9
10
|
|
10
11
|
== 1.0.0
|
11
12
|
|
12
13
|
* Updates for YARD documentation formatting
|
13
14
|
|
14
|
-
==
|
15
|
+
== 0.9.1
|
16
|
+
|
17
|
+
* Fixed Ruby 1.9.2 issue accessing Server#key
|
18
|
+
* Documentation updates
|
19
|
+
|
20
|
+
== 0.9.0
|
15
21
|
|
16
|
-
|
22
|
+
Initial release.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/lib/scout_api/server.rb
CHANGED
@@ -33,10 +33,6 @@ class Scout::Server < Hashie::Mash
|
|
33
33
|
attr_reader :metrics
|
34
34
|
|
35
35
|
def initialize(hash) #:nodoc:
|
36
|
-
if hash['active_alerts']
|
37
|
-
@alert_hash = hash['active_alerts']
|
38
|
-
hash.delete('active_alerts')
|
39
|
-
end
|
40
36
|
@metrics = Scout::MetricProxy.new(self)
|
41
37
|
super(hash)
|
42
38
|
end
|
@@ -144,13 +140,6 @@ class Scout::Server < Hashie::Mash
|
|
144
140
|
end
|
145
141
|
end
|
146
142
|
|
147
|
-
# Active alerts for this server
|
148
|
-
#
|
149
|
-
# @return [Array] An array of {Scout::Alert} objects
|
150
|
-
def active_alerts
|
151
|
-
@active_alerts ||= @alert_hash.map { |a| decorate_with_server(Scout::Alert.new(a)) }
|
152
|
-
end
|
153
|
-
|
154
143
|
# Recent alerts for this server
|
155
144
|
#
|
156
145
|
# @return [Array] An array of {Scout::Alert} objects
|
data/lib/scout_api/version.rb
CHANGED
data/lib/scout_api.rb
CHANGED
@@ -3,17 +3,18 @@ require 'hashie'
|
|
3
3
|
require 'httparty'
|
4
4
|
require 'nokogiri'
|
5
5
|
require 'cgi'
|
6
|
-
require 'scout_api/version'
|
7
|
-
require 'scout_api/account'
|
8
|
-
require 'scout_api/server'
|
9
|
-
require 'scout_api/plugin'
|
10
|
-
require 'scout_api/trigger'
|
11
|
-
require 'scout_api/alert'
|
12
|
-
require 'scout_api/group.rb'
|
13
|
-
require 'scout_api/metric.rb'
|
14
|
-
require 'scout_api/person'
|
15
|
-
require 'scout_api/metric_proxy'
|
16
|
-
require 'scout_api/metric_calculation'
|
6
|
+
require File.expand_path('../scout_api/version.rb', __FILE__)
|
7
|
+
require File.expand_path('../scout_api/account.rb', __FILE__)
|
8
|
+
require File.expand_path('../scout_api/server.rb', __FILE__)
|
9
|
+
require File.expand_path('../scout_api/plugin.rb', __FILE__)
|
10
|
+
require File.expand_path('../scout_api/trigger.rb', __FILE__)
|
11
|
+
require File.expand_path('../scout_api/alert.rb', __FILE__)
|
12
|
+
require File.expand_path('../scout_api/group.rb', __FILE__)
|
13
|
+
require File.expand_path('../scout_api/metric.rb', __FILE__)
|
14
|
+
require File.expand_path('../scout_api/person.rb', __FILE__)
|
15
|
+
require File.expand_path('../scout_api/metric_proxy.rb', __FILE__)
|
16
|
+
require File.expand_path('../scout_api/metric_calculation.rb', __FILE__)
|
17
|
+
|
17
18
|
|
18
19
|
|
19
20
|
module Scout
|
data/scout_api.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{scout_api}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jesse Newland", "Derek Haynes"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-10-07}
|
13
13
|
s.description = %q{A library for interacting with Scout (http://scoutapp.com), a hosted server monitoring service. Query for metric data, manage servers, and more.}
|
14
14
|
s.email = %q{support@scoutapp.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -73,20 +73,20 @@ Gem::Specification.new do |s|
|
|
73
73
|
|
74
74
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
75
75
|
s.add_runtime_dependency(%q<hashie>, ["~> 0.1.8"])
|
76
|
-
s.add_runtime_dependency(%q<httparty>, ["
|
76
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0"])
|
77
77
|
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
78
78
|
s.add_development_dependency(%q<fakeweb>, [">= 0"])
|
79
79
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.0"])
|
80
80
|
else
|
81
81
|
s.add_dependency(%q<hashie>, ["~> 0.1.8"])
|
82
|
-
s.add_dependency(%q<httparty>, ["
|
82
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
83
83
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
84
84
|
s.add_dependency(%q<fakeweb>, [">= 0"])
|
85
85
|
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
86
86
|
end
|
87
87
|
else
|
88
88
|
s.add_dependency(%q<hashie>, ["~> 0.1.8"])
|
89
|
-
s.add_dependency(%q<httparty>, ["
|
89
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
90
90
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
91
91
|
s.add_dependency(%q<fakeweb>, [">= 0"])
|
92
92
|
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
data/test/server_test.rb
CHANGED
@@ -25,8 +25,6 @@ class ServerTest < Test::Unit::TestCase
|
|
25
25
|
servers = Scout::Server.all
|
26
26
|
assert_equal 2, servers.size
|
27
27
|
assert servers.first.is_a?(Scout::Server)
|
28
|
-
assert servers.last.active_alerts.first.is_a?(Scout::Alert)
|
29
|
-
assert servers.last.active_alerts.first.title =~ /Passenger/
|
30
28
|
end
|
31
29
|
|
32
30
|
def test_plugin
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jesse Newland
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-10-07 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -31,26 +31,24 @@ dependencies:
|
|
31
31
|
- 1
|
32
32
|
- 8
|
33
33
|
version: 0.1.8
|
34
|
-
requirement: *id001
|
35
34
|
prerelease: false
|
36
|
-
|
35
|
+
requirement: *id001
|
37
36
|
type: :runtime
|
37
|
+
name: hashie
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
44
|
+
hash: 3
|
45
45
|
segments:
|
46
46
|
- 0
|
47
|
-
|
48
|
-
- 0
|
49
|
-
version: 0.5.0
|
50
|
-
requirement: *id002
|
47
|
+
version: "0"
|
51
48
|
prerelease: false
|
52
|
-
|
49
|
+
requirement: *id002
|
53
50
|
type: :runtime
|
51
|
+
name: httparty
|
54
52
|
- !ruby/object:Gem::Dependency
|
55
53
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
56
54
|
none: false
|
@@ -61,10 +59,10 @@ dependencies:
|
|
61
59
|
segments:
|
62
60
|
- 0
|
63
61
|
version: "0"
|
64
|
-
requirement: *id003
|
65
62
|
prerelease: false
|
66
|
-
|
63
|
+
requirement: *id003
|
67
64
|
type: :runtime
|
65
|
+
name: nokogiri
|
68
66
|
- !ruby/object:Gem::Dependency
|
69
67
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
68
|
none: false
|
@@ -75,10 +73,10 @@ dependencies:
|
|
75
73
|
segments:
|
76
74
|
- 0
|
77
75
|
version: "0"
|
78
|
-
requirement: *id004
|
79
76
|
prerelease: false
|
80
|
-
|
77
|
+
requirement: *id004
|
81
78
|
type: :development
|
79
|
+
name: fakeweb
|
82
80
|
- !ruby/object:Gem::Dependency
|
83
81
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
84
82
|
none: false
|
@@ -91,10 +89,10 @@ dependencies:
|
|
91
89
|
- 5
|
92
90
|
- 0
|
93
91
|
version: 1.5.0
|
94
|
-
requirement: *id005
|
95
92
|
prerelease: false
|
96
|
-
|
93
|
+
requirement: *id005
|
97
94
|
type: :development
|
95
|
+
name: jeweler
|
98
96
|
description: A library for interacting with Scout (http://scoutapp.com), a hosted server monitoring service. Query for metric data, manage servers, and more.
|
99
97
|
email: support@scoutapp.com
|
100
98
|
executables: []
|