chat_notifier 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b345042cb02425e4111b2895d482919d53042479e3d31024628dfbeed9a613d2
|
4
|
+
data.tar.gz: 530e457fa2b8b1fa13325180d7faf7cc8b75d5eabcf753203e8d2ebee0f9818d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61d479f99e2393f84b76bd2733b1cc7defd04d4e21aecea9a332a2873e35f001c90eefd335c0d82f4836ad0e335b86c67a3f45aed52ae5a4efea5b3cc45295c
|
7
|
+
data.tar.gz: 572f34fe2117c051b5df7f108c540c4c3ab208fb93b077b5443801762046cdaea8f492e5cd0963cd86f60928624104cd7b4ae1598fa4f22ac61788cf627c2781
|
data/README.md
CHANGED
@@ -14,6 +14,29 @@ Add to your `spec_helper.rb` or `rails_helper.rb`:
|
|
14
14
|
|
15
15
|
```
|
16
16
|
require "chat_notifier/rspec_formatter"
|
17
|
+
|
18
|
+
config.add_formatter "ChatNotifier::RspecFormatter" if ENV["CI"]
|
19
|
+
```
|
20
|
+
|
21
|
+
Add to your config/application.rb within your namespaced module
|
22
|
+
|
23
|
+
```
|
24
|
+
def self.sha
|
25
|
+
`git rev-parse --short HEAD`.chomp
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.branch
|
29
|
+
`git branch --show-current`.chomp
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
Add these variables to your env files
|
34
|
+
|
35
|
+
```
|
36
|
+
NOTIFY_SLACK_WEBHOOK_URL
|
37
|
+
NOTIFY_SLACK_NOTIFY_CHANNEL
|
38
|
+
NOTIFY_CURRENT_REPOSITORY_URL
|
39
|
+
NOTIFY_TEST_RUN_ID
|
17
40
|
```
|
18
41
|
|
19
42
|
### Debug your Slack setup
|
@@ -22,14 +45,15 @@ Create rake task to test the connection to your Slack channel
|
|
22
45
|
|
23
46
|
```ruby
|
24
47
|
namespace :chat_notifier do
|
48
|
+
desc "Tests chat notifier"
|
25
49
|
task debug: :environment do
|
26
|
-
unless ENV["
|
27
|
-
puts "You MUST set the environment variables for:\
|
50
|
+
unless ENV["NOTIFY_SLACK_WEBHOOK_URL"]
|
51
|
+
puts "You MUST set the environment variables for:\nNOTIFY_SLACK_WEBHOOK_URL"
|
28
52
|
return
|
29
53
|
end
|
30
54
|
ENV["DEBUG"] = "1"
|
31
|
-
ENV["
|
32
|
-
ENV["
|
55
|
+
ENV["NOTIFY_CURRENT_REPOSITORY_URL"] = "https://example.com"
|
56
|
+
ENV["NOTIFY_TEST_RUN_ID"] = "9999"
|
33
57
|
require "chat_notifier"
|
34
58
|
|
35
59
|
failure = ChatNotifier::DebugExceptionLocation.new(location: "fake/path.rb")
|
@@ -12,11 +12,11 @@ module ChatNotifier
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def webhook_url
|
15
|
-
settings.fetch("
|
15
|
+
settings.fetch("NOTIFY_SLACK_WEBHOOK_URL", nil)
|
16
16
|
end
|
17
17
|
|
18
18
|
def channel
|
19
|
-
settings.fetch("
|
19
|
+
settings.fetch("NOTIFY_SLACK_NOTIFY_CHANNEL", nil)
|
20
20
|
end
|
21
21
|
|
22
22
|
def payload(data)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chat_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Gay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Send test results to chat
|
14
14
|
email:
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.4.
|
56
|
+
rubygems_version: 3.4.10
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Notify chat of test results
|