README.md in slacked-0.9.0 vs README.md in slacked-0.9.1
- old
+ new
@@ -1,20 +1,28 @@
[![Gem Version](https://badge.fury.io/rb/slacked.svg)](https://badge.fury.io/rb/slacked) [![Circle CI](https://circleci.com/gh/codelittinc/slacked.svg?style=svg)](https://circleci.com/gh/codelittinc/slacked)
# Slacked
-This is a super simple Slack integration for Rails. A use case for this would be to post a notification in Slack when a new User is created or a certain action has been taken in your application.
+This is a super simple Slack integration for Ruby and for Ruby and Rails applications. A use case for this would be to post a notification in Slack when a new User is created or a certain action has been taken in your application.
Are there other gems that provide similar functionality? Yes. Do some of them provide more flexibility? Yes. The point of this was to make installing and integrating a 30 second process.
This gem can be used with a rails application and enabled/disabled based on the environment config as you may see below
## Getting Started
-Add this line to your application's Gemfile:
+#### without rails
```ruby
+gem install slacked
+```
+
+
+#### With rails
+ Add this line to your application's Gemfile:
+
+```ruby
gem 'slacked'
```
And then execute:
@@ -22,11 +30,11 @@
Then run the installer:
$ bundle exec rails g slacked:install
-This will create a .env file in the root of the rails appication. Specify the Webhook Url and the message to be sent.
+This will create a .env file in the root of the rails application. Specify the Webhook Url and the message to be sent.
```ruby
SLACK_WEBHOOK= "WEBHOOK_URL"
SLACK_DEFAULT_MESSAGE= "TEST"
```
@@ -61,18 +69,31 @@
```ruby
Slacked.post_async
```
The last example will use the SLACK_DEFAULT_MESSAGE value
+### To pass the config:
+
+```ruby
+Slacked.post "I have a message from the underworld!", {icon_emoji: ':ghost:'}
+```
+
+or
+```ruby
+Slacked.post_async "Let's play fetch!", {icon_emoji: ':dog:'}
+```
+
+Right now we only have the config for the icon, if you need another one let us know or submit a pull request.
+
## Example
```ruby
class Post < ActiveRecord::Base
after_create :slacked
private
-
+
def slacked
Slacked.post 'post created!'
end
end
```
@@ -86,12 +107,13 @@
The default value is false
## Contributors
-- [Sean H.](https://github.com/seathony)
- [Kaio Magalhães](https://github.com/kaiomagalhaes)
+- [Lockyy](https://github.com/Lockyy)
+- [Sean H.](https://github.com/seathony)
+
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
-