SummonBot
SummonBot can summon slack bot only define your environment.
SummonBot is Wrapped gem Slack::Notifier
Installation
Add this line to your application's Gemfile:
gem 'summon_bot'
And then execute:
$ bundle
Or install it yourself as:
$ gem install summon_bot
Usage
First, define your environment for example
.env
SUMMON_BOT_SLACK__NATTSUNN=https://hooks.slack.com/services/XXXXXXXX/XXXXXXXX/XXXXXXXX
SummonBot::Slack.nattsunn.speak('notification')
=> #<Net::HTTPOK 200 OK readbody=true>
And this:
If you want to use dummy notification class, write this your code.
initializer/summon_bot.rb
instead.
SummonBot::Slack.instance_eval { @notifier_class = SummonBot::DummyNotifier }
Test command.
RAILS_ENV=test bundle exec rspec
License
The gem is available as open source under the terms of the MIT License.