slack_notifier_wrapper 0.1.2 → 0.2.0
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/README.md +21 -16
- data/lib/slack_notifier_wrapper/helpers.rb +1 -1
- data/lib/slack_notifier_wrapper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 227ce10f0481221683c970ddf96e9a516620e58d
|
4
|
+
data.tar.gz: fc30a39bbf6029491d730cdc75b5cde4a79dfbdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4102a5d0c31a8079c1bb4a5861b4c133fcfbc650f0a82f5f10fc76a468fb6331982820271efdddd17a5acf4c54b20adf696d55b406f578b96a72ad98ecd83179
|
7
|
+
data.tar.gz: 7ceaaee631f59844ed9be242375860598f08334293501c7177faa8e54d964179c06b49f4031e57863188f5af4e4c521e30b291c240d4980f17445ccb04eaf06b
|
data/README.md
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# SlackNotifierWrapper
|
2
2
|
|
3
|
-
|
3
|
+
[slack-notifier](https://github.com/stevenosloan/slack-notifier) is an awesome gem for sending notifications to Slack with Ruby and this wrapper gem lets you push Slack notifications with a different syntax.
|
4
4
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
5
|
|
7
|
-
## Installation
|
6
|
+
## Installation & Setup
|
8
7
|
|
9
8
|
Add this line to your application's Gemfile:
|
10
9
|
|
@@ -12,27 +11,33 @@ Add this line to your application's Gemfile:
|
|
12
11
|
gem 'slack_notifier_wrapper'
|
13
12
|
```
|
14
13
|
|
15
|
-
|
14
|
+
Configure the gem with default settings:
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
```ruby
|
17
|
+
SlackNotifierWrapper.config do
|
18
|
+
slack_webhook_url "webhook url"
|
19
|
+
default_channel "#some-channel"
|
20
|
+
username "Bob"
|
21
|
+
icon_emoji ":bob:"
|
22
|
+
end
|
23
|
+
```
|
24
24
|
|
25
|
-
|
25
|
+
Use the gem to speak messages to the default Slack channel:
|
26
26
|
|
27
|
-
|
27
|
+
```ruby
|
28
|
+
SlackNotifierWrapper.speak("This is some message")
|
29
|
+
```
|
28
30
|
|
29
|
-
|
31
|
+
Access the notifier object directly and specify overrides if you'd like to override the defaults:
|
30
32
|
|
31
|
-
|
33
|
+
```ruby
|
34
|
+
notifier = SlackNotifierWrapper.notifier
|
35
|
+
notifier.ping "Whatever", channel: "#devnull"
|
36
|
+
```
|
32
37
|
|
33
38
|
## Contributing
|
34
39
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
40
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/MrPowers/slack_notifier_wrapper.
|
36
41
|
|
37
42
|
|
38
43
|
## License
|
@@ -5,7 +5,7 @@ module SlackNotifierWrapper
|
|
5
5
|
begin
|
6
6
|
send(method_name)
|
7
7
|
rescue Exception => e
|
8
|
-
attachment_message = "#{self.class}##{method_name} failed to execute"
|
8
|
+
attachment_message = "#{self.class}##{method_name} failed to execute: #{e.message}"
|
9
9
|
SlackNotifierWrapper.speak_attachments({ color: "danger", attachment_message: attachment_message })
|
10
10
|
raise e
|
11
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack_notifier_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MrPowers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|