slack-cli 0.2 → 0.3

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: 6d3066b6a543153736161a8adf8318f842b72593
4
- data.tar.gz: 3821402745930730c261b70000ce8d8f27b3e14a
3
+ metadata.gz: 24f3b17a38ebc8f000fdf7ac9494383c88b2c3b5
4
+ data.tar.gz: 222ffe16c01af2acbf672c76ae57949c97d03da5
5
5
  SHA512:
6
- metadata.gz: 347edd091865b61746d54c2ee3e5bd2ec803c048f124882dba64a0174b6a3e4f3b432d6b06cd3388b7284efcaab0e8e5f1f8eb9fe418f320a810a5f5d9abc200
7
- data.tar.gz: 06a5732714759e48b97e359f62d7509e9789b3aeadb733b181ccd4f129b8490086b459a51fea742e3b7f472c6a474aabc5d8a44a4208be625f91fc534a84a8ff
6
+ metadata.gz: c7f2efe9ed8b4ca0e29c136926112856ff2d56d33ae0f48bfad0088e7cfe5b212ebfdb61ecd2d720082aae5f68ccf4e40c63317980ce046b07fba55ea90f8a8e
7
+ data.tar.gz: 5b3762ba786d26efe09e3c3428f0a60c08edf017682f2994d80b105339a5271203303311f63615a0af7e6dd9ff73c1de4b0f7c5e379a6087e353e5e34b49adab
@@ -30,7 +30,14 @@ client.auth_test
30
30
 
31
31
  nbr_try = 0
32
32
  begin
33
- client.chat_postMessage(channel: channel, text: message, as_user: true)
33
+ params = {channel: channel, text: message, as_user: true}
34
+ if options[slack_name]['as_user'] != nil and options[slack_name]['as_user'] == false
35
+ params[:as_user] = false
36
+ params[:username] = options[slack_name]['as_user_username'] if options[slack_name]['as_user_username']
37
+ params[:icon_emoji] = options[slack_name]['as_user_emoji'] if options[slack_name]['as_user_emoji']
38
+ end
39
+ p params
40
+ client.chat_postMessage(params)
34
41
  rescue Exception => e
35
42
  if nbr_try == 0 and e.message == 'channel_not_found'
36
43
  channel = "@#{channel}"
@@ -1,5 +1,5 @@
1
1
  module Slack
2
2
  module Cli
3
- VERSION = '0.2'
3
+ VERSION = '0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaëtan JUVIN
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-10 00:00:00.000000000 Z
11
+ date: 2016-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler