mina_slack 0.0.1 → 0.0.2

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: 20f6870dd617727f1fe75965a4faefc79ec22467
4
- data.tar.gz: 58ebe59ad0ed8dd6f866c0c6f4179c18002f8bf5
3
+ metadata.gz: abccc5e2c5adfee95c30feec5c4a08267bda2033
4
+ data.tar.gz: 8b32dc9b8a84bc34c0ff290818a492704c5cb2f5
5
5
  SHA512:
6
- metadata.gz: d03754cc58849445c37526c1d315a51753d8403d9a024e7e789d0569b4b70c2c77609f0c70d0cdb78459dd8a5cd69feb6ae193555546b5602b5c3a773e410944
7
- data.tar.gz: 3145fefd7c43b2991b74fbf91d42792aa9a7259d5c32b26d4e4b296d1e1c49b53caafbc651c4e43ffb322d3210f890f5c22ab9b8623d8946b767bfb818e4fb7d
6
+ metadata.gz: 8dc7c70392b0a3f486e97f43703554a8bcc82dece4f92c8840ba980dab8ce3c92d119b3b438030b802388935d3303111b8aa9cfe282f9da8bd4706e55ab65c7b
7
+ data.tar.gz: 8b8fe04a9733efff041a3d9d01e5915a70a36dddec69148e9a1de147ff9bb132975f5e8f8c9a6ce93294c6cd589c1f6f22671b7457c263558f68da4bbb372b71
data/README.md CHANGED
@@ -14,7 +14,7 @@ using [Mina] (http://nadarei.co/mina).
14
14
  ...
15
15
  # Required mina_slack options
16
16
  set :slack_api_token, 'xxxyyyzzz'
17
- set :slack_channels, ['#general']
17
+ set :slack_channels, ['#general', '@mbajur', '#nerd']
18
18
 
19
19
  task :deploy do
20
20
  deploy do
@@ -38,11 +38,13 @@ using [Mina] (http://nadarei.co/mina).
38
38
  | Option | Description |
39
39
  | ------------------------- | ------------------------------------------------------------------------------------ |
40
40
  | *__slack_api_token__** | API auth token. |
41
- | *__slack_channels__** | Channels where notifications will be sent to. |
42
- | *slack_username* | Name of bot. |
43
- | *slack_author* | Author of a deploy displayed in deploy messages. |
44
- | *slack_link_names* | Find and link channel names and usernames. |
45
- | *slack_parse* | Change how messages are treated. [Read more] (https://api.slack.com/docs/formatting) |
41
+ | *__slack_channels__** | Array of channels (or users) where notifications will be sent to. |
42
+ | *slack_username* | Name of bot. <br> _default: Deploy_ |
43
+ | *slack_author* | Author of a deploy displayed in deploy messages. <br> _default: Someone_ |
44
+ | *slack_link_names* | Find and link channel names and usernames. <br> _default: 1_ |
45
+ | *slack_parse* | Change how messages are treated. [Read more] (https://api.slack.com/docs/formatting) <br> _default: full_ |
46
+ | *slack_icon_url* | URL to an image to use as the icon for this message <br> _default: nil_ |
47
+ | *slack_icon_emoji* | emoji to use as the icon for this message. Overrides `slack_icon_url`. <br> _default: :slack:_ |
46
48
 
47
49
  __* required options__
48
50
 
@@ -4,29 +4,37 @@ require 'json'
4
4
  # Any and all of these settings can be overriden in your `deploy.rb`.
5
5
 
6
6
  # ### slack_api_token
7
- # API auth token.
7
+ # Sets the slack api auth token.
8
8
  set_default :slack_api_token, ''
9
9
 
10
10
  # ### slack_channels
11
- # Channels where notifications will be sent to.
11
+ # Sets the channels where notifications will be sent to.
12
12
  set_default :slack_channels, []
13
13
 
14
14
  # ### slack_username
15
- # Name of bot.
15
+ # Sets the notification 'from' user label
16
16
  set_default :slack_username, 'Deploy'
17
17
 
18
18
  # ### slack_author
19
- # Author of a deploy displayed in deploy messages.
19
+ # Sets the deployment author name
20
20
  set_default :slack_author, 'Someone'
21
21
 
22
22
  # ### slack_link_names
23
- # Find and link channel names and usernames.
23
+ # Sets the deployment author name
24
24
  set_default :slack_link_names, 1
25
25
 
26
26
  # ### slack_parse
27
- # Change how messages are treated. [Read more] (https://api.slack.com/docs/formatting)
27
+ # Sets the deployment author name
28
28
  set_default :slack_parse, 'full'
29
29
 
30
+ # ### icon_url
31
+ # URL to an image to use as the icon for this message
32
+ set_default :slack_icon_url, ''
33
+
34
+ # ### icon_emoji
35
+ # Sets emoji to use as the icon for this message. Overrides `slack_icon_url`
36
+ set_default :slack_icon_emoji, ':slack:'
37
+
30
38
  # ## Control Tasks
31
39
  namespace :slack do
32
40
 
@@ -62,7 +70,7 @@ namespace :slack do
62
70
  end
63
71
 
64
72
  def send_message(params = {})
65
- queue %[curl -X POST https://slack.com/api/chat.postMessage -d "token=#{slack_api_token}&channel=#{params[:channel]}&username=#{slack_username}&text=#{params[:text]}&attachments='[{"fields": [{"value": "Value"}]}]'&parse=#{slack_parse}&link_names=#{link_names}" --silent > /dev/null]
73
+ queue %[curl -X POST https://slack.com/api/chat.postMessage -d "token=#{slack_api_token}&channel=#{params[:channel]}&username=#{slack_username}&text=#{params[:text]}&attachments='[{"fields": [{"value": "Value"}]}]'&parse=#{slack_parse}&link_names=#{link_names}&icon_url=#{slack_icon_url}&icon_emoji=#{slack_icon_emoji}" --silent > /dev/null]
66
74
  end
67
75
 
68
76
  end
@@ -1,3 +1,3 @@
1
1
  module MinaSlack
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina_slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bajur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-03 00:00:00.000000000 Z
11
+ date: 2014-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mina
@@ -37,7 +37,6 @@ files:
37
37
  - LICENSE
38
38
  - MIT-LICENSE
39
39
  - README.md
40
- - README.rdoc
41
40
  - Rakefile
42
41
  - lib/mina_slack.rb
43
42
  - lib/mina_slack/tasks.rb
@@ -1,3 +0,0 @@
1
- = MinaSlack
2
-
3
- This project rocks and uses MIT-LICENSE.