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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cdb5203bcc1ad4cbaf87342487740c06fae1771
4
- data.tar.gz: d79b0ae6670422edd6e973db1cce0dab5c6ccaf8
3
+ metadata.gz: 99d60b8d548437fba5b584e562822d51df19eb37
4
+ data.tar.gz: a147b0437814527ad63e149294c27024138ad128
5
5
  SHA512:
6
- metadata.gz: 0e833bbe42f82f397d15636e608df4a6a29a58028df6629f455a67da705e96cff5e14b675704be3b4b29b908ee2e092ad9b788b8066687932d8e467eb5b90fa5
7
- data.tar.gz: 30e945f64b8cc97d0ffd65e770dcc20404aa2f38517d623fbf8dbefa3c72a5a6bc43710e9e0a28d1b863c98dddeb935dccc3983e5815266766f41e77d4b49269
6
+ metadata.gz: 1890464eb03b35dc019f87b08f4e293cfca310ba96293efc0dba3822aa9f7c2163bdc3748e454393fbc608cb44d2cf8ba8ab3c706e588cc15079d08ec5b1cb71
7
+ data.tar.gz: 8bc108c3b95a1a36cac4b9bac1cf2aa9f41e968fa5ba73d77043cb777848006341c9d0f6f00f2407a7eb702811b222530383304cc0efd8a33af5f736dd7d390e
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # BootSlackBot
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/boot_slack_bot`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ ## Why you should use BootSlackBot ?
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
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
- TODO: Write usage instructions here
26
-
27
- ## Development
22
+ First , you create a `boot_slack_bot.rb` in your config/initializers :
28
23
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
24
+ ```ruby
25
+ BootSlackBot.configure do |config|
26
+ config.slack_hook = "ENV['YOUR_SLACK_HOOK_URL']"
27
+ end
28
+ ```
32
29
 
33
- ## Contributing
30
+ Finally , wake up your bot , you can add this code on anywhere you like :
34
31
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/boot_slack_bot. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
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).
@@ -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, body: { text: message }.to_json, headers: json_headers)
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
@@ -1,3 +1,3 @@
1
1
  module BootSlackBot
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
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.5
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-07-19 00:00:00.000000000 Z
11
+ date: 2018-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty