kaseya 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.template +4 -0
- data/.gitignore +3 -1
- data/kaseya.gemspec +5 -4
- data/lib/kaseya/bms/client/tickets.rb +4 -0
- data/lib/kaseya/bms/http_errors.rb +2 -2
- data/lib/kaseya/bms.rb +1 -1
- data/lib/kaseya/connection.rb +2 -3
- data/lib/kaseya/response.rb +1 -1
- data/lib/kaseya/version.rb +1 -1
- data/lib/kaseya/vsa/client/alarms.rb +19 -0
- data/lib/kaseya/vsa/client/assets.rb +11 -0
- data/lib/kaseya/vsa/client/logs.rb +7 -0
- data/lib/kaseya/vsa/client.rb +12 -0
- data/lib/kaseya/vsa/http_errors.rb +2 -2
- data/lib/kaseya/vsa/json_errors.rb +1 -1
- data/lib/kaseya/vsa.rb +2 -2
- data/lib/kaseya.rb +1 -0
- metadata +36 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94e0d3ecfa7451e7a2cfc5545e6bbfee00c6b178500ed4ba5cccf466f7abc31b
|
4
|
+
data.tar.gz: 71ad0f0316370bf15b72fc79b1e922bf77e0e9357dc9754136f4519d47780e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd92a57f3cf460bdbbdae7afeb31a79883f2a4f0be346e87b0bc3775940583c0272d3e17623d21493729f79c3adcc90ef7f1cd3094d0c28284cba8ca9043d2c1
|
7
|
+
data.tar.gz: 3fbcad66ca43de9f97f9e2aa391f826cb0fb6f9b53cb704f18be61188cded930176404ce89bbe26711e68856b2986b03d558b35911003f4b0b3e0d3bb9952106
|
data/.env.template
ADDED
data/.gitignore
CHANGED
data/kaseya.gemspec
CHANGED
@@ -23,12 +23,13 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 1
|
27
|
-
spec.add_development_dependency "rake", "
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
27
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
29
|
spec.add_development_dependency "byebug"
|
30
|
+
spec.add_development_dependency "webmock"
|
31
|
+
spec.add_development_dependency "dotenv"
|
30
32
|
|
31
|
-
spec.add_dependency "faraday", "~>
|
32
|
-
spec.add_dependency "faraday_middleware", "~> 0.13.1"
|
33
|
+
spec.add_dependency "faraday", "~> 1.0"
|
33
34
|
spec.add_dependency "activesupport", ">= 5.0"
|
34
35
|
end
|
data/lib/kaseya/bms.rb
CHANGED
data/lib/kaseya/connection.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require "faraday"
|
2
|
-
require "faraday_middleware"
|
3
2
|
|
4
3
|
module Kaseya
|
5
4
|
class Connection
|
@@ -15,7 +14,7 @@ module Kaseya
|
|
15
14
|
conn.use klass
|
16
15
|
end
|
17
16
|
|
18
|
-
conn.authorization :Bearer, @token
|
17
|
+
conn.request :authorization, :Bearer, @token
|
19
18
|
conn.request :json
|
20
19
|
conn.response :json
|
21
20
|
conn.adapter Faraday.default_adapter
|
@@ -57,4 +56,4 @@ module Kaseya
|
|
57
56
|
end
|
58
57
|
end
|
59
58
|
end
|
60
|
-
end
|
59
|
+
end
|
data/lib/kaseya/response.rb
CHANGED
data/lib/kaseya/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Kaseya::VSA
|
2
|
+
class Client::Alarms < Api
|
3
|
+
def all(params = {})
|
4
|
+
get_many "assetmgmt/alarms/true", params
|
5
|
+
end
|
6
|
+
|
7
|
+
def new_alarms(params = {})
|
8
|
+
get_many "assetmgmt/alarms/false", params
|
9
|
+
end
|
10
|
+
|
11
|
+
def find(id)
|
12
|
+
get_one "assetmgmt/alarms/#{id}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def close(id)
|
16
|
+
put "assetmgmt/alarms/#{id}/close"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/kaseya/vsa/client.rb
CHANGED
@@ -19,5 +19,17 @@ module Kaseya::VSA
|
|
19
19
|
def organizations
|
20
20
|
@organizations ||= Client::Organizations.new(@connection)
|
21
21
|
end
|
22
|
+
|
23
|
+
def assets
|
24
|
+
@assets ||= Client::Assets.new(@connection)
|
25
|
+
end
|
26
|
+
|
27
|
+
def alarms
|
28
|
+
@alarms ||= Client::Alarms.new(@connection)
|
29
|
+
end
|
30
|
+
|
31
|
+
def logs
|
32
|
+
@logs ||= Client::Logs.new(@connection)
|
33
|
+
end
|
22
34
|
end
|
23
35
|
end
|
data/lib/kaseya/vsa.rb
CHANGED
@@ -26,7 +26,7 @@ module Kaseya
|
|
26
26
|
faraday.use JsonErrors
|
27
27
|
faraday.use HttpErrors
|
28
28
|
|
29
|
-
faraday.authorization :Basic, auth
|
29
|
+
faraday.request :authorization, :Basic, auth
|
30
30
|
faraday.request :url_encoded
|
31
31
|
faraday.response :json
|
32
32
|
faraday.adapter Faraday.default_adapter
|
@@ -39,4 +39,4 @@ module Kaseya
|
|
39
39
|
raise Kaseya::ConnectionFailed, e.message
|
40
40
|
end
|
41
41
|
end
|
42
|
-
end
|
42
|
+
end
|
data/lib/kaseya.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaseya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Bisnett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,33 +67,47 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
76
|
-
type: :
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: dotenv
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: faraday
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
103
|
+
version: '1.0'
|
90
104
|
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
110
|
+
version: '1.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: activesupport
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +129,7 @@ executables: []
|
|
115
129
|
extensions: []
|
116
130
|
extra_rdoc_files: []
|
117
131
|
files:
|
132
|
+
- ".env.template"
|
118
133
|
- ".gitignore"
|
119
134
|
- ".rspec"
|
120
135
|
- ".travis.yml"
|
@@ -152,6 +167,9 @@ files:
|
|
152
167
|
- lib/kaseya/vsa/api.rb
|
153
168
|
- lib/kaseya/vsa/client.rb
|
154
169
|
- lib/kaseya/vsa/client/agents.rb
|
170
|
+
- lib/kaseya/vsa/client/alarms.rb
|
171
|
+
- lib/kaseya/vsa/client/assets.rb
|
172
|
+
- lib/kaseya/vsa/client/logs.rb
|
155
173
|
- lib/kaseya/vsa/client/machine_groups.rb
|
156
174
|
- lib/kaseya/vsa/client/organizations.rb
|
157
175
|
- lib/kaseya/vsa/configuration.rb
|
@@ -178,8 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
196
|
- !ruby/object:Gem::Version
|
179
197
|
version: '0'
|
180
198
|
requirements: []
|
181
|
-
|
182
|
-
rubygems_version: 2.7.6.2
|
199
|
+
rubygems_version: 3.1.6
|
183
200
|
signing_key:
|
184
201
|
specification_version: 4
|
185
202
|
summary: Ruby client for the Kaseya BMS and VSA APIs
|