garrison-api 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/garrison/api.rb +4 -0
- data/lib/garrison/api/alert.rb +20 -1
- data/lib/garrison/api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c2ae0db74546c3f6fff75275830323d4697a3a163a2d75afce2e271f099a1b29
|
4
|
+
data.tar.gz: dc0b7aa60d8507c4082c16173526f874fc30c29c6e511dae841bf89ed370ea57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c73f7832214609e5b83523c8a908da55eb91c35526232f614fd57f705988c34cc48c869a38fc128172f4c44f3d3b6e9478a9ee3175ad22f7b25e2e3dc0d74aa
|
7
|
+
data.tar.gz: c9a020c92477986897e5d08d2bee3047206e044a519b84cf36cb5aaaff946019bdb10cb84a4d280612ef1739cfec70cb58e6ab18cf97a9d4d434cb0502afeff7
|
data/lib/garrison/api.rb
CHANGED
data/lib/garrison/api/alert.rb
CHANGED
@@ -1,6 +1,23 @@
|
|
1
1
|
module Garrison
|
2
2
|
module Api
|
3
3
|
class Alert
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def obsolete_previous_runs(source)
|
7
|
+
raise ArgumentError, "No source defined" unless source
|
8
|
+
url = File.join(Api.configuration.url, 'api', 'v1', 'alerts', 'obsolete')
|
9
|
+
HTTParty.post(
|
10
|
+
url,
|
11
|
+
body: {
|
12
|
+
source: source,
|
13
|
+
agent_uuid: Api.configuration.uuid,
|
14
|
+
agent_run_uuid: Api.configuration.run_uuid,
|
15
|
+
}.to_json,
|
16
|
+
headers: { 'Content-Type' => 'application/json' }
|
17
|
+
)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
4
21
|
attr_accessor :type
|
5
22
|
attr_accessor :family
|
6
23
|
attr_accessor :source
|
@@ -40,7 +57,9 @@ module Garrison
|
|
40
57
|
urls: urls,
|
41
58
|
departments: departments,
|
42
59
|
no_repeat: no_repeat,
|
43
|
-
count: count
|
60
|
+
count: count,
|
61
|
+
agent_uuid: Api.configuration.uuid,
|
62
|
+
agent_run_uuid: Api.configuration.run_uuid,
|
44
63
|
}.to_json,
|
45
64
|
headers: { 'Content-Type' => 'application/json' }
|
46
65
|
)
|
data/lib/garrison/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: garrison-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Forward3D Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.7.7
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: RubyGem to talk to the Garrison API
|