look_out 0.1.19 → 0.1.20

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb7455e2f829f41dfcd196dd9293c7ef7999ee537596c687071ce43e14f6e92e
4
- data.tar.gz: 58ab99b93432d0689fff0ba647d02be8b019ccd60cebfd4b535ec6f98049af75
3
+ metadata.gz: 791197ce4480f1fc042f40581cd96c5d2a90dbfccbf07c141e74c6e61885211e
4
+ data.tar.gz: 517974ca9751496ae635ab1a281a41f28f4532e8c930cc39528e90f57564a60f
5
5
  SHA512:
6
- metadata.gz: 5ad416845adee054c6c38aab68b5c7186ac54146254b6bb6ba8b3e79b8741c21e7792240f92ffd879074952fb025893b038642e1de318bff95b6a90a41ec3a93
7
- data.tar.gz: 790b5265cd4f6a9d871eaf6120ee6900fb43508ad18c824a209a77523c47b6f13ee753151941c36112a714247552395416f35ca08dd113889af2c1e0df31f58e
6
+ metadata.gz: d61bc203b149ad6d0863a84efb8fc5bd6fb4849fd1011666f1e1d1680991fdac5f1fa2329481ac0881fdac3a652e127a3fde31acb6bcfa13f4789b7ec93021b5
7
+ data.tar.gz: 1bed65bd9092b5aeb9840b02d69df05cff4eefc0c95c1fe9485d9d06b1da22d6a3df03fd15af48ee1fa7fd6a3fe1ef5d5fbc00a3ebc6bc5d716b061d83a343be
data/History.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 0.1.20/ 2020-04-18
3
+ ==================
4
+
5
+ * Use a single api key
6
+
2
7
  0.1.19 / 2020-04-16
3
8
  ==================
4
9
 
@@ -14,26 +14,24 @@ module LookOut
14
14
 
15
15
  hydra = Typhoeus::Hydra.hydra
16
16
 
17
- if LookOut.config.first_mate_api_key
18
- first_mate_request = Typhoeus::Request.new(
19
- "#{first_mate_host}/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
- )
17
+ first_mate_request = Typhoeus::Request.new(
18
+ "#{first_mate_host}/casts",
19
+ method: :post,
20
+ headers: { 'Content-Type' => 'application/json' },
21
+ body: {
22
+ api_key: LookOut.config.api_key,
23
+ data: output_hash,
24
+ cast: {
25
+ user: LookOut.config.user,
26
+ sha: sha,
27
+ env: env
28
+ }
29
+ }.to_json
30
+ )
32
31
 
33
- hydra.queue(first_mate_request)
34
- end
32
+ hydra.queue(first_mate_request)
35
33
 
36
- if LookOut.config.red_cove_api_key && defined?(SimpleCov)
34
+ if defined?(SimpleCov)
37
35
  SimpleCov.result.format!
38
36
  data = {
39
37
  'coverage' => SimpleCov.result.to_hash['RSpec']['coverage'].
@@ -43,7 +41,7 @@ module LookOut
43
41
  "#{red_cove_host}/sails",
44
42
  method: :post,
45
43
  body: {
46
- api_key: LookOut.config.red_cove_api_key,
44
+ api_key: LookOut.config.api_key,
47
45
  data: data.to_json,
48
46
  sail: {
49
47
  uid: uid,
@@ -57,16 +55,6 @@ module LookOut
57
55
 
58
56
  hydra.run
59
57
 
60
- if first_mate_request&.response&.code == 401
61
- STDERR.puts "\n[look-out] Cast rejected, check First Mate API Key.\n"
62
- STDERR.puts "[look-out] https://www.sea-aye.com/first-mate \n"
63
- end
64
-
65
- if red_request&.response&.code == 401
66
- STDERR.puts "\n[look-out] Sail rejected, check Red Cove API Key.\n"
67
- STDERR.puts "[look-out] https://www.sea-aye.com/red-cove \n"
68
- end
69
-
70
58
  if ENV['LOOK_OUT_VERBOSE']
71
59
  pp first_mate_request
72
60
  pp first_mate_request&.response
@@ -1,3 +1,3 @@
1
1
  module LookOut
2
- VERSION = '0.1.19'.freeze
2
+ VERSION = '0.1.20'.freeze
3
3
  end
data/lib/look_out.rb CHANGED
@@ -13,6 +13,6 @@ module LookOut
13
13
  end
14
14
 
15
15
  class Configuration
16
- attr_accessor :user, :red_cove_api_key, :first_mate_api_key
16
+ attr_accessor :user, :api_key
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: look_out
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-17 00:00:00.000000000 Z
11
+ date: 2020-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus