milou 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/watchdog +2 -0
- data/lib/watchdog/detox.rb +7 -5
- data/lib/watchdog/hacker.rb +46 -0
- data/lib/watchdog/version.rb +1 -1
- data/lib/watchdog.rb +6 -0
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df81326dc5e5454d15d4ed6611611fffc3d2f00723b5bdf584702828e68eb702
|
4
|
+
data.tar.gz: b958f56028ebac211ce2414a1a511e0c2116bd6a11831aa33e4ae7a2e419b7ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d4fdc65b08a6b465173f8b1cd4766b4acd98956ab928ce6a97e1162c8709ac5ccbbb62c75af06dbc621111f90468a08f65f186f9bc7a289dd13cf244f432a54
|
7
|
+
data.tar.gz: db0c028274f4dac4709e2b3ac3388936139fab7a83cc935fe9092d824f7abd071635dca1b0aaf35e691d5045df9a9bada03f317fe5f08edaa2803204d8e4cae5
|
data/bin/watchdog
CHANGED
data/lib/watchdog/detox.rb
CHANGED
@@ -52,13 +52,15 @@ module Watchdog
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
headers = {
|
56
|
+
'Content-Type' => 'application/json',
|
57
|
+
'X-API-KEY' => ENV['WATCHDOG_AUTH_TOKEN']
|
58
|
+
}
|
59
|
+
|
55
60
|
response = HTTParty.post(
|
56
61
|
ENV['WATCHDOG_API_URL'],
|
57
|
-
body
|
58
|
-
headers
|
59
|
-
'Content-Type' => 'application/json',
|
60
|
-
'Authorization' => ENV['WATCHDOG_AUTH_TOKEN']
|
61
|
-
}
|
62
|
+
:body => run.to_json,
|
63
|
+
:headers => headers
|
62
64
|
)
|
63
65
|
|
64
66
|
puts "Watchdog response: #{response}"
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
module Watchdog
|
4
|
+
class Hacker
|
5
|
+
def initialize()
|
6
|
+
end
|
7
|
+
|
8
|
+
def run
|
9
|
+
send_test
|
10
|
+
end
|
11
|
+
|
12
|
+
# Watchdog runner
|
13
|
+
def send_test
|
14
|
+
run = {
|
15
|
+
test_run: {
|
16
|
+
commit_branch: "main",
|
17
|
+
commit_sha: "awugdadba",
|
18
|
+
commit_timestamp: "2022-05-27 17:42:31 +0100",
|
19
|
+
test_suite_name: "Test Suite v3",
|
20
|
+
test_results: [
|
21
|
+
{ status: "FAIL", test: "TEST-1", time: "50.028" },
|
22
|
+
{ status: "PASS", test: "TEST-2", time: "31.363" },
|
23
|
+
]
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
puts "ENV"
|
28
|
+
puts ENV['WATCHDOG_TEST_SUIT_NAME']
|
29
|
+
puts ENV['WATCHDOG_AUTH_TOKEN']
|
30
|
+
puts ENV['WATCHDOG_API_URL']
|
31
|
+
|
32
|
+
headers = {
|
33
|
+
'Content-Type' => 'application/json',
|
34
|
+
'X-API-KEY' => ENV['WATCHDOG_AUTH_TOKEN']
|
35
|
+
}
|
36
|
+
puts headers
|
37
|
+
response = HTTParty.post(
|
38
|
+
ENV['WATCHDOG_API_URL'],
|
39
|
+
:body => run.to_json,
|
40
|
+
:headers => headers
|
41
|
+
)
|
42
|
+
|
43
|
+
puts "Watchdog response: #{response}"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/watchdog/version.rb
CHANGED
data/lib/watchdog.rb
CHANGED
@@ -2,10 +2,16 @@ require 'dotenv'
|
|
2
2
|
Dotenv.load
|
3
3
|
|
4
4
|
require_relative 'watchdog/detox'
|
5
|
+
require_relative 'watchdog/hacker'
|
5
6
|
|
6
7
|
module Watchdog
|
7
8
|
def self.run_detox
|
8
9
|
runner = Watchdog::Detox.new
|
9
10
|
runner.run
|
10
11
|
end
|
12
|
+
|
13
|
+
def self.run_hacker
|
14
|
+
runner = Watchdog::Hacker.new
|
15
|
+
runner.run
|
16
|
+
end
|
11
17
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: milou
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: dotenv
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.7.6
|
20
20
|
type: :runtime
|
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:
|
26
|
+
version: 2.7.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: httparty
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.20.0
|
34
34
|
type: :runtime
|
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: 0.20.0
|
41
41
|
description: Watchdog SDK to communicate with the Watchdog API
|
42
42
|
email:
|
43
43
|
- ops@gaspardbruno.com
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- bin/watchdog
|
50
50
|
- lib/watchdog.rb
|
51
51
|
- lib/watchdog/detox.rb
|
52
|
+
- lib/watchdog/hacker.rb
|
52
53
|
- lib/watchdog/version.rb
|
53
54
|
homepage: https://github.com/Gaspard-Bruno/watchdog-ruby-gem
|
54
55
|
licenses:
|