scout_api 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/scout_api/account.rb +9 -3
- data/lib/scout_api/version.rb +1 -1
- data/scout_api.gemspec +8 -8
- metadata +90 -96
data/Rakefile
CHANGED
data/lib/scout_api/account.rb
CHANGED
@@ -42,7 +42,12 @@ class Scout::Account
|
|
42
42
|
end
|
43
43
|
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
|
+
def self.all
|
47
|
+
response=get("/accounts_for_user.json", :exclude_param=>true)
|
48
|
+
(response.first && response.first['account']) ? response.map{|h| Hashie::Mash.new(h['account'])} : []
|
49
|
+
end
|
50
|
+
|
46
51
|
class << self
|
47
52
|
alias_method :http_get, :get
|
48
53
|
end
|
@@ -54,10 +59,11 @@ class Scout::Account
|
|
54
59
|
# Scout::Error is raised. Otherwise, the response.
|
55
60
|
#
|
56
61
|
# @return [HTTParty::Response]
|
57
|
-
def self.get(uri)
|
62
|
+
def self.get(uri, options={})
|
58
63
|
raise Scout::Error,
|
59
64
|
"Authentication is required (scout = Scout::Account.new('youraccountname', 'your@awesome.com', 'sekret'))" if param.nil?
|
60
|
-
|
65
|
+
|
66
|
+
uri = (options[:exclude_param] ? "" : "/#{param}") + uri + (uri.include?('?') ? '&' : '?') + "api_version=#{Scout::VERSION}"
|
61
67
|
#puts "GET: #{uri}"
|
62
68
|
response = http_get(uri)
|
63
69
|
response.code.to_s =~ /^(4|5)/ ? raise( Scout::Error,response['error'] ? response['error']['message'] : response.message) : response
|
data/lib/scout_api/version.rb
CHANGED
data/scout_api.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "1.1.
|
7
|
+
s.name = "scout_api"
|
8
|
+
s.version = "1.1.3"
|
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 =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2013-01-25"
|
13
|
+
s.description = "A library for interacting with Scout (http://scoutapp.com), a hosted server monitoring service. Query for metric data, manage servers, and more."
|
14
|
+
s.email = "support@scoutapp.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
17
|
"README.rdoc"
|
@@ -53,10 +53,10 @@ Gem::Specification.new do |s|
|
|
53
53
|
"test/server_test.rb",
|
54
54
|
"test/test_helper.rb"
|
55
55
|
]
|
56
|
-
s.homepage =
|
56
|
+
s.homepage = "https://scoutapp.com/info/api"
|
57
57
|
s.require_paths = ["lib"]
|
58
|
-
s.rubygems_version =
|
59
|
-
s.summary =
|
58
|
+
s.rubygems_version = "1.8.24"
|
59
|
+
s.summary = "API wrapper for scoutapp.com"
|
60
60
|
|
61
61
|
if s.respond_to? :specification_version then
|
62
62
|
s.specification_version = 3
|
metadata
CHANGED
@@ -1,104 +1,106 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout_api
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.3
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 2
|
10
|
-
version: 1.1.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Jesse Newland
|
14
9
|
- Derek Haynes
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
23
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
|
-
requirements:
|
26
|
-
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
32
|
-
requirement: *id001
|
33
|
-
prerelease: false
|
13
|
+
date: 2013-01-25 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
34
16
|
name: hashie
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
38
18
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
|
44
|
-
- 0
|
45
|
-
version: "0"
|
46
|
-
requirement: *id002
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
47
24
|
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
48
32
|
name: httparty
|
49
|
-
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
52
34
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
|
58
|
-
- 0
|
59
|
-
version: "0"
|
60
|
-
requirement: *id003
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :runtime
|
61
40
|
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
62
48
|
name: nokogiri
|
63
|
-
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
66
50
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
|
72
|
-
- 0
|
73
|
-
version: "0"
|
74
|
-
requirement: *id004
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
75
56
|
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
76
64
|
name: fakeweb
|
77
|
-
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
80
66
|
none: false
|
81
|
-
requirements:
|
82
|
-
- -
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
|
86
|
-
- 0
|
87
|
-
version: "0"
|
88
|
-
requirement: *id005
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
type: :development
|
89
72
|
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
90
80
|
name: jeweler
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
91
87
|
type: :development
|
92
|
-
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
description: A library for interacting with Scout (http://scoutapp.com), a hosted
|
96
|
+
server monitoring service. Query for metric data, manage servers, and more.
|
93
97
|
email: support@scoutapp.com
|
94
98
|
executables: []
|
95
|
-
|
96
99
|
extensions: []
|
97
|
-
|
98
|
-
extra_rdoc_files:
|
100
|
+
extra_rdoc_files:
|
99
101
|
- LICENSE
|
100
102
|
- README.rdoc
|
101
|
-
files:
|
103
|
+
files:
|
102
104
|
- .document
|
103
105
|
- CHANGELOG
|
104
106
|
- Gemfile
|
@@ -134,39 +136,31 @@ files:
|
|
134
136
|
- test/plugin_test.rb
|
135
137
|
- test/server_test.rb
|
136
138
|
- test/test_helper.rb
|
137
|
-
has_rdoc: true
|
138
139
|
homepage: https://scoutapp.com/info/api
|
139
140
|
licenses: []
|
140
|
-
|
141
141
|
post_install_message:
|
142
142
|
rdoc_options: []
|
143
|
-
|
144
|
-
require_paths:
|
143
|
+
require_paths:
|
145
144
|
- lib
|
146
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
145
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
146
|
none: false
|
148
|
-
requirements:
|
149
|
-
- -
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
|
152
|
-
segments:
|
147
|
+
requirements:
|
148
|
+
- - ! '>='
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
segments:
|
153
152
|
- 0
|
154
|
-
|
155
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
hash: 3814613272010756283
|
154
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
155
|
none: false
|
157
|
-
requirements:
|
158
|
-
- -
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
|
161
|
-
segments:
|
162
|
-
- 0
|
163
|
-
version: "0"
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
164
160
|
requirements: []
|
165
|
-
|
166
161
|
rubyforge_project:
|
167
|
-
rubygems_version: 1.
|
162
|
+
rubygems_version: 1.8.24
|
168
163
|
signing_key:
|
169
164
|
specification_version: 3
|
170
165
|
summary: API wrapper for scoutapp.com
|
171
166
|
test_files: []
|
172
|
-
|