look_out 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.md +6 -0
- data/lib/look_out/rspec/look_out_formatter.rb +40 -26
- data/lib/look_out/version.rb +1 -1
- data/lib/look_out.rb +1 -9
- metadata +1 -3
- data/lib/look_out/cast.rb +0 -10
- data/lib/look_out/client.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b38ed28a46424bb2710d88f326eaabfabec22b36788e0963ee2d7edaf54d4f32
|
4
|
+
data.tar.gz: 51530a257f84d5d1b2d2e3a66478bc890193eb308a405d4f42b0cdda740cb017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0634faf10e0361b6ad1977b92ad35630821ab25071588f37eec0aee3a4c07b273524d1184a412dfa51b6c40c389d617e1bfa4a49a16e50f2891f81baf31cf80
|
7
|
+
data.tar.gz: 5d8fe87c49e868ed83599f189b2f7566d0f19d8d26049774f7afa3b9da9eac657f1b988761cea04a0a3ef0053d5447f0239185bda960d7cba43ddad04e7ba43e
|
data/History.md
CHANGED
@@ -12,38 +12,52 @@ module LookOut
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
response = LookOut::Cast.create(
|
16
|
-
api_key: LookOut.config.api_key,
|
17
|
-
user: LookOut.config.user,
|
18
|
-
data: output_hash,
|
19
|
-
repo: LookOut.config.repo,
|
20
|
-
sha: sha,
|
21
|
-
env: env
|
22
|
-
)
|
23
|
-
|
24
15
|
hydra = Typhoeus::Hydra.hydra
|
25
16
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
17
|
+
if LookOut.config.first_mate_api_key
|
18
|
+
first_mate_request = Typhoeus::Request.new(
|
19
|
+
'https://first-mate.sea-aye.com/v1/casts',
|
20
|
+
method: :post,
|
21
|
+
headers: { 'Content-Type' => 'application/json' },
|
22
|
+
body: {
|
23
|
+
api_key: LookOut.config.first_mate_api_key,
|
24
|
+
data: output_hash,
|
25
|
+
cast: {
|
26
|
+
user: LookOut.config.user,
|
27
|
+
sha: sha,
|
28
|
+
env: env
|
29
|
+
}
|
30
|
+
}.to_json
|
31
|
+
)
|
32
|
+
|
33
|
+
hydra.queue(first_mate_request)
|
34
|
+
end
|
35
|
+
|
36
|
+
if LookOut.config.red_cove_api_key && defined?(SimpleCov)
|
37
|
+
red_request = Typhoeus::Request.new(
|
38
|
+
'https://red-cove.sea-aye.com/v1/sails',
|
39
|
+
method: :post,
|
40
|
+
body: {
|
41
|
+
api_key: LookOut.config.red_cove_api_key,
|
42
|
+
data: SimpleCov.result.to_hash['RSpec'].to_json,
|
43
|
+
sail: {
|
44
|
+
uid: uid,
|
45
|
+
sha: sha,
|
46
|
+
env: env
|
47
|
+
}
|
36
48
|
}
|
37
|
-
|
38
|
-
|
49
|
+
)
|
50
|
+
hydra.queue(red_request)
|
51
|
+
end
|
39
52
|
|
40
|
-
hydra.queue(red_request)
|
41
53
|
hydra.run
|
42
54
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
55
|
+
if ENV['LOOK_OUT_VERBOSE']
|
56
|
+
pp first_mate_request
|
57
|
+
pp first_mate_request&.response
|
58
|
+
pp red_request
|
59
|
+
pp red_request&.response
|
60
|
+
end
|
47
61
|
end
|
48
62
|
|
49
63
|
private
|
data/lib/look_out/version.rb
CHANGED
data/lib/look_out.rb
CHANGED
@@ -1,12 +1,7 @@
|
|
1
|
-
require 'hashie'
|
2
|
-
require 'httparty'
|
3
1
|
require 'typhoeus'
|
4
2
|
require 'utils/compact'
|
5
3
|
|
6
4
|
require 'look_out/version'
|
7
|
-
require 'look_out/client'
|
8
|
-
|
9
|
-
require 'look_out/cast'
|
10
5
|
|
11
6
|
module LookOut
|
12
7
|
class << self
|
@@ -16,12 +11,9 @@ module LookOut
|
|
16
11
|
def self.configure
|
17
12
|
self.config ||= Configuration.new
|
18
13
|
yield(config)
|
19
|
-
|
20
|
-
# Allow overriding base_uri.
|
21
|
-
self.config.base_uri ||= 'https://api.sea-aye.com/v1'
|
22
14
|
end
|
23
15
|
|
24
16
|
class Configuration
|
25
|
-
attr_accessor :
|
17
|
+
attr_accessor :user, :red_cove_api_key, :first_mate_api_key
|
26
18
|
end
|
27
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: look_out
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Hood
|
@@ -218,8 +218,6 @@ files:
|
|
218
218
|
- bin/console
|
219
219
|
- bin/setup
|
220
220
|
- lib/look_out.rb
|
221
|
-
- lib/look_out/cast.rb
|
222
|
-
- lib/look_out/client.rb
|
223
221
|
- lib/look_out/rspec/look_out_formatter.rb
|
224
222
|
- lib/look_out/version.rb
|
225
223
|
- lib/utils/compact.rb
|
data/lib/look_out/cast.rb
DELETED
data/lib/look_out/client.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
module LookOut
|
2
|
-
# Encapsulates the configuration of each client before JIT before requests
|
3
|
-
# are made. This allows us to use our configuration which won't have been
|
4
|
-
# available until runtime, not load time.
|
5
|
-
module Client
|
6
|
-
def client
|
7
|
-
base_uri LookOut.config.base_uri
|
8
|
-
headers('Content-Type' => 'application/json')
|
9
|
-
self
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|