vidar 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -12
- data/Rakefile +1 -1
- data/lib/vidar/slack_notification.rb +14 -7
- data/lib/vidar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 550fa5fad13e11baf5d526d4f0bc9ec1355d1dba83b08ad6cda0a48907b770f0
|
4
|
+
data.tar.gz: e459ab46f1c3f0c68900af01d1a20f44506121b5da52d9305653748c458daa8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15b9365745e2993d24a8121649ae9e86000b7e5a30615805fbb3b526824c3d5aed5e09ff33cf2f11a6a40c947b8921e5bd9fc018bd52f0a320d624926391be17
|
7
|
+
data.tar.gz: e559f868fb17e582f495796d9090ad770012f62e11006739732b464e0ecba94e544559397fa3d3651438b6f06639fdaf9feda1c50973baf3e39431ec15199c8e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vidar (1.
|
4
|
+
vidar (1.3.0)
|
5
5
|
colorize
|
6
6
|
faraday
|
7
7
|
thor (~> 1.0)
|
@@ -29,19 +29,19 @@ GEM
|
|
29
29
|
rake (13.0.1)
|
30
30
|
regexp_parser (1.8.2)
|
31
31
|
rexml (3.2.4)
|
32
|
-
rspec (3.
|
33
|
-
rspec-core (~> 3.
|
34
|
-
rspec-expectations (~> 3.
|
35
|
-
rspec-mocks (~> 3.
|
36
|
-
rspec-core (3.
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-expectations (3.
|
32
|
+
rspec (3.10.0)
|
33
|
+
rspec-core (~> 3.10.0)
|
34
|
+
rspec-expectations (~> 3.10.0)
|
35
|
+
rspec-mocks (~> 3.10.0)
|
36
|
+
rspec-core (3.10.0)
|
37
|
+
rspec-support (~> 3.10.0)
|
38
|
+
rspec-expectations (3.10.0)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
40
|
+
rspec-support (~> 3.10.0)
|
41
|
+
rspec-mocks (3.10.0)
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
43
|
+
rspec-support (~> 3.10.0)
|
44
|
+
rspec-support (3.10.0)
|
45
45
|
rubocop (0.93.1)
|
46
46
|
parallel (~> 1.10)
|
47
47
|
parser (>= 2.7.1.5)
|
data/Rakefile
CHANGED
@@ -5,7 +5,6 @@ module Vidar
|
|
5
5
|
@revision = revision
|
6
6
|
@revision_name = revision_name
|
7
7
|
@build_url = build_url
|
8
|
-
@build_hostname = ::URI.parse(build_url || '').hostname
|
9
8
|
@deploy_name = deploy_config.name
|
10
9
|
@deploy_url = deploy_config.url
|
11
10
|
@default_color = deploy_config.default_color
|
@@ -20,12 +19,19 @@ module Vidar
|
|
20
19
|
end
|
21
20
|
|
22
21
|
def failure
|
23
|
-
message =
|
22
|
+
message = [
|
23
|
+
"Failed deploy of #{github_link} to #{deploy_link}.",
|
24
|
+
":fire: <!channel>",
|
25
|
+
build_link
|
26
|
+
]
|
24
27
|
perform_with data(message: message, color: failure_color)
|
25
28
|
end
|
26
29
|
|
27
30
|
def success
|
28
|
-
message =
|
31
|
+
message = [
|
32
|
+
"Successful deploy of #{github_link} to #{deploy_link}.",
|
33
|
+
build_link
|
34
|
+
]
|
29
35
|
perform_with data(message: message, color: success_color)
|
30
36
|
end
|
31
37
|
|
@@ -46,17 +52,18 @@ module Vidar
|
|
46
52
|
attr_reader :github, :revision, :revision_name,
|
47
53
|
:deploy_name, :deploy_url, :webhook_url,
|
48
54
|
:default_color, :success_color, :failure_color,
|
49
|
-
:connection, :build_url
|
55
|
+
:connection, :build_url
|
50
56
|
|
51
57
|
def data(message:, color:)
|
58
|
+
text = [message].flatten.compact.join("\n")
|
52
59
|
{
|
53
60
|
"attachments": [
|
54
61
|
{
|
55
62
|
"title": github,
|
56
63
|
"title_link": github_url,
|
57
64
|
"color": color,
|
58
|
-
"text":
|
59
|
-
"fallback":
|
65
|
+
"text": text,
|
66
|
+
"fallback": text,
|
60
67
|
}
|
61
68
|
]
|
62
69
|
}
|
@@ -75,7 +82,7 @@ module Vidar
|
|
75
82
|
end
|
76
83
|
|
77
84
|
def build_link
|
78
|
-
build_url && "<#{build_url}|View the build
|
85
|
+
build_url && "<#{build_url}|View the build.>"
|
79
86
|
end
|
80
87
|
end
|
81
88
|
end
|
data/lib/vidar/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|