slackbotsy 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: fa9bc08a9f6c3eefde0721c316949e9e27b090be
4
- data.tar.gz: eb9fe06c0bba73c389f313e587df2d3da16246f6
3
+ metadata.gz: 31f24d009fd5353c55c4770a11199e72024d66a2
4
+ data.tar.gz: 33499607ad383af24785d7ebf5692c095bb64ca6
5
5
  SHA512:
6
- metadata.gz: 4e0adaf5ad407a01b98188695737b2c7191b9ad36e2953afc60bd9aaf5fdbd58e36bae85246993c13e5f47d571c46b96c928b936cb6a3835dffa0d080a3f66e7
7
- data.tar.gz: 1d453ddc941778d9845669cd400d0c11f84a1d38926dc5a13a22ce4bbb0c3e13b20fd296fdb6b360b436907606039e14d0077609fcbba4516ff5fd7f2bc7fab6
6
+ metadata.gz: 4434d540a6c80966dfe3a17ca4bf800c6081955f2a629f5c7bcc979e65334aa7c7c1c63112e6b4e98eb982d1cdad698213f964fa9e024ffb73fe92a2af2cea3b
7
+ data.tar.gz: 8b244f0a94af60e551c9fa227d29e330cc17891e9bc1ac62d6b7ae9c0c0e0a745a2f5ee19984dac2646be83a8f1df21b0530736969589ebe4f90701adee7b74a
@@ -41,6 +41,11 @@ module Slackbotsy
41
41
  return nil # so as not to trigger text in outgoing webhook reply
42
42
  end
43
43
 
44
+ def attach(text, attachment, options = {})
45
+ options = { attachments: [ attachment ] }.merge(options)
46
+ say(text, options)
47
+ end
48
+
44
49
  ## add regex to things to hear
45
50
  def hear(regex, &block)
46
51
  @regexes[regex] = block
@@ -61,8 +66,9 @@ module Slackbotsy
61
66
 
62
67
  ## format any replies for http response
63
68
  if responses
64
- text = responses.compact.join('\n')
65
- %Q[{"text": "#{text}"}]
69
+ # text = responses.compact.join('\n')
70
+ # %Q[{"text": "#{text}"}]
71
+ { text: responses.compact.join("\n") }.to_json
66
72
  end
67
73
  end
68
74
 
@@ -1,3 +1,3 @@
1
1
  module Slackbotsy
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: slackbotsy
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
  - Richard Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-17 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler