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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4463848af58380d572ae98692d9b149fef2f0d3
4
- data.tar.gz: 7d314d025b36187ba97c8edc10d3a8576b542f66
3
+ metadata.gz: c5452e9c53e54bf14ba771aa904f4dd7f12eda49
4
+ data.tar.gz: 97ea45869a4fff13bd6f6ec27d1a4c1c2eacfea5
5
5
  SHA512:
6
- metadata.gz: ac6277a888409cac47245b0e74b4f687fa313ad3d36b41fe454e8b539b8b85ef6280ffba51f4746c7f600a13ffc2a523ab1f9db24264ce6caba3fbcc9e428da3
7
- data.tar.gz: 15bcb4bc2788c8e57b721106fa63b71df72284f01252cf61bd2ee1e1917715f6fec51c2fbfa9a4f3a051844a85ca5be0f9090ddf978984230f919be922f1e366
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.0)
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.1)
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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Laziness
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2016-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine