baez_slack 0.0.7 → 0.0.8
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 +4 -4
- data/lib/modules/message_slack.rb +15 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb3bc49c86eba7e97f89077c3f16d001fdd28e977f3d0ef15fb80c71dd07e1be
|
4
|
+
data.tar.gz: 9e920d19322e211127c4cf8462c2027d733a845e471c687102be38fa5de8d514
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b47ddffbbb7eab57b5d448d5a705ac684061768d6ba357fcc81bd23e7fb7b5728bb7a198c1509d4596d21ceb35347a70d54d084d170a7f772810905111f87ae0
|
7
|
+
data.tar.gz: b0b663ad4cd442983b94016b3e27d1b535321e44c7dbff32814e4cbc02c381bae4c6531dd1e5f13b557560395effeea8ab1c01e1fc9942335adeb27bbc1804a9
|
@@ -53,6 +53,21 @@ module MessageSlack
|
|
53
53
|
thread_ts: @thread
|
54
54
|
end
|
55
55
|
|
56
|
+
def send_file(path, data, ts = nil)
|
57
|
+
file = path
|
58
|
+
discern_end(data, ts)
|
59
|
+
@web_client.files_upload channels: @channel,
|
60
|
+
icon_url: @bot_icon,
|
61
|
+
username: @bot_name,
|
62
|
+
thread_ts: @thread,
|
63
|
+
file: Faraday::UploadIO.new(file, 'text'),
|
64
|
+
title: File.basename(file),
|
65
|
+
filename: File.basename(file)
|
66
|
+
rescue Slack::Web::Api::Errors::SlackError => e
|
67
|
+
print e.message
|
68
|
+
false
|
69
|
+
end
|
70
|
+
|
56
71
|
def add_reaction(icon, channel, thread)
|
57
72
|
@web_client.reactions_add channel: channel,
|
58
73
|
name: icon,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baez_slack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luciano Adonis
|
@@ -85,8 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
|
-
|
89
|
-
rubygems_version: 2.7.6
|
88
|
+
rubygems_version: 3.0.3
|
90
89
|
signing_key:
|
91
90
|
specification_version: 4
|
92
91
|
summary: Core functions for any kind of interaction with Slack
|