boot_slack_bot 0.0.5 → 0.0.6
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 +13 -18
- data/lib/boot_slack_bot/api.rb +2 -2
- data/lib/boot_slack_bot/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: 99d60b8d548437fba5b584e562822d51df19eb37
|
4
|
+
data.tar.gz: a147b0437814527ad63e149294c27024138ad128
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1890464eb03b35dc019f87b08f4e293cfca310ba96293efc0dba3822aa9f7c2163bdc3748e454393fbc608cb44d2cf8ba8ab3c706e588cc15079d08ec5b1cb71
|
7
|
+
data.tar.gz: 8bc108c3b95a1a36cac4b9bac1cf2aa9f41e968fa5ba73d77043cb777848006341c9d0f6f00f2407a7eb702811b222530383304cc0efd8a33af5f736dd7d390e
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# BootSlackBot
|
2
2
|
|
3
|
-
|
3
|
+
## Why you should use BootSlackBot ?
|
4
4
|
|
5
|
-
|
5
|
+
It's a very simple gem helps you call your slack bot easily ! You don't need to require any `'net/http'` or
|
6
|
+
`'uri'` from ruby package ! I've already done it for you . All you need is just writing a very short code .
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
@@ -16,28 +17,22 @@ And then execute:
|
|
16
17
|
|
17
18
|
$ bundle
|
18
19
|
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install boot_slack_bot
|
22
|
-
|
23
20
|
## Usage
|
24
21
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
22
|
+
First , you create a `boot_slack_bot.rb` in your config/initializers :
|
28
23
|
|
29
|
-
|
30
|
-
|
31
|
-
|
24
|
+
```ruby
|
25
|
+
BootSlackBot.configure do |config|
|
26
|
+
config.slack_hook = "ENV['YOUR_SLACK_HOOK_URL']"
|
27
|
+
end
|
28
|
+
```
|
32
29
|
|
33
|
-
|
30
|
+
Finally , wake up your bot , you can add this code on anywhere you like :
|
34
31
|
|
35
|
-
|
32
|
+
```ruby
|
33
|
+
BootSlackBot.say('Yolo ! Your slack bot is installed !')
|
34
|
+
```
|
36
35
|
|
37
36
|
## License
|
38
37
|
|
39
38
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
-
|
41
|
-
## Code of Conduct
|
42
|
-
|
43
|
-
Everyone interacting in the BootSlackBot project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/boot_slack_bot/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/boot_slack_bot/api.rb
CHANGED
@@ -5,8 +5,8 @@ module BootSlackBot
|
|
5
5
|
if web_hook.blank?
|
6
6
|
raise StandardError, 'Web Hook URL is blank !'
|
7
7
|
else
|
8
|
-
HTTParty.post(web_hook,
|
9
|
-
end
|
8
|
+
HTTParty.post(web_hook, payload: { text: message }.to_json, headers: json_headers)
|
9
|
+
end
|
10
10
|
end
|
11
11
|
|
12
12
|
def json_headers
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boot_slack_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- diepsohung
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|