s-3po 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/s-3po/generator.rb +8 -0
- data/lib/s-3po.rb +6 -0
- data/s-3po.gemspec +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: 5534a0273b457003e6efb4559b03922a54ddb260
|
4
|
+
data.tar.gz: df93ec41046fd6b6e841e2cf8d3aaf8763543f42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b10e34853cc749b02f0c9bba592741cdb5eff564562d7611169b4ff62fc7fe74543f9098b2f81143f908f4f3fb888694456a3e9f0e41139b257aa332f263b4a
|
7
|
+
data.tar.gz: 463c6c21d7a511c74d5ea1bd99e6f3af6cf8d49678b46513b8b3d310583e57ad08fc7936d7fce09cbcc5ced4360fce6c7648e934402ecfb4500d07bbde4952f5
|
data/README.md
CHANGED
@@ -44,7 +44,7 @@ puts json
|
|
44
44
|
# => {"type":"message","channel":"CABC123","text":"<!channel>: what's up, ya all?","id":0}
|
45
45
|
```
|
46
46
|
|
47
|
-
See [YARD Doc](http://www.rubydoc.info/
|
47
|
+
See [YARD Doc](http://www.rubydoc.info/gems/s-3po) for more info.
|
48
48
|
|
49
49
|
## What's Next
|
50
50
|
|
data/lib/s-3po/generator.rb
CHANGED
@@ -5,6 +5,14 @@ module S3PO
|
|
5
5
|
|
6
6
|
class Generator
|
7
7
|
|
8
|
+
def self.generate_ping(id = nil)
|
9
|
+
@id ||= 0
|
10
|
+
msg = {type: 'ping'}
|
11
|
+
msg[:id] = id ? id : @id
|
12
|
+
@id += 1 unless id
|
13
|
+
return JSON.fast_generate(msg)
|
14
|
+
end
|
15
|
+
|
8
16
|
def self.generate_message(message, id = nil)
|
9
17
|
@id ||= 0
|
10
18
|
obj = message.object
|
data/lib/s-3po.rb
CHANGED
data/s-3po.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s-3po
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken J.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Slack message formatter gem
|
14
14
|
email:
|