laziness 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/laziness/api/chat.rb +5 -0
- data/lib/laziness/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5452e9c53e54bf14ba771aa904f4dd7f12eda49
|
4
|
+
data.tar.gz: 97ea45869a4fff13bd6f6ec27d1a4c1c2eacfea5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9cc9e20f968377239f031a9422ed56df080c62eeec9c3436162709721dd5ef13cbc4865fe33e157d6b171915902e2a92f45aa389aa56972c7f74d3bcd6fceec
|
7
|
+
data.tar.gz: 0e6d34fbc2863c71c2e401f2a8bc16f58aa60dabb24631ab6ade4508c77dede162062a28d3baa09fcdc302e8b3e92fb92d8d58b1f7ec5081b50a2bca502a326e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
laziness (0.2.
|
4
|
+
laziness (0.2.1)
|
5
5
|
eventmachine
|
6
6
|
faye-websocket (>= 0.8.0)
|
7
7
|
hashie
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
safe_yaml (~> 1.0.0)
|
16
16
|
diff-lcs (1.2.5)
|
17
17
|
eventmachine (1.0.8)
|
18
|
-
faye-websocket (0.10.
|
18
|
+
faye-websocket (0.10.2)
|
19
19
|
eventmachine (>= 0.12.0)
|
20
20
|
websocket-driver (>= 0.5.1)
|
21
21
|
hashie (3.4.3)
|
data/lib/laziness/api/chat.rb
CHANGED
@@ -2,6 +2,11 @@ module Slack
|
|
2
2
|
module API
|
3
3
|
class Chat < Base
|
4
4
|
def create(text, channel, options={})
|
5
|
+
if (options.has_key?(:attachments))
|
6
|
+
attachments = options[:attachments]
|
7
|
+
attachments = JSON.dump(attachments) unless attachments.is_a?(String)
|
8
|
+
options = options.merge(attachments: attachments)
|
9
|
+
end
|
5
10
|
response = request :post, 'chat.postMessage', { text: text, channel: channel }.merge(options)
|
6
11
|
Slack::Chat.parse response, 'message'
|
7
12
|
end
|
data/lib/laziness/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: laziness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Wright
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|