chatbox 0.1.0 → 0.1.1
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/.travis.yml +1 -8
- data/README.md +16 -1
- data/lib/chatbox/draft.rb +5 -1
- data/lib/chatbox/fake_missing_keywords.rb +7 -0
- data/lib/chatbox/inbox.rb +5 -1
- data/lib/chatbox/outbox.rb +5 -1
- data/lib/chatbox/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6ad08c199c036d9537849e7dee035ff14a1084e
|
4
|
+
data.tar.gz: f0f6622961ca50cf53c19994a1e1cad8fbf25d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fe1ae1ce10604d614694ec7d2ad6d78b5ccdb002e4afc333e719f6b0d121a62b96325280746beb715735854450717a8d6542613bccff59ad1a5a8abf7790ff6
|
7
|
+
data.tar.gz: 35caadb705b534d891aa817e97a9562f13cfb929bc0f12e897abf3e6d48df5cb6bd2dbb63354913080a8287f0450363919bf37da6e096e2cabcb682385bfe930
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,22 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
```ruby
|
24
|
+
Person = Struct.new :chatbox_id
|
25
|
+
|
26
|
+
austin = Person.new 1
|
27
|
+
rachel = Person.new 2
|
28
|
+
|
29
|
+
Chatbox.deliver_message! from: austin, to: rachel, body: 'Hello! How are you?'
|
30
|
+
|
31
|
+
rachels_inbox = Chatbox.fetch_inbox_for rachel
|
32
|
+
message = rachels_inbox[0]
|
33
|
+
message.body # 'Hello! How are you?'
|
34
|
+
|
35
|
+
austins_outbox = Chatbox.fetch_outbox_for austin
|
36
|
+
message = austins_outbox[0]
|
37
|
+
message.body # 'Hello! How are you?'
|
38
|
+
```
|
24
39
|
|
25
40
|
## Contributing
|
26
41
|
|
data/lib/chatbox/draft.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
require 'chatbox/fake_missing_keywords'
|
2
|
+
|
1
3
|
module Chatbox
|
2
4
|
class Draft
|
3
|
-
|
5
|
+
include FakeMissingKeywords
|
6
|
+
|
7
|
+
def initialize(from: req(:from), to: req(:to), body: req(:body), store: req(:store))
|
4
8
|
@from_id = from.chatbox_id
|
5
9
|
@to_id = to.chatbox_id
|
6
10
|
@body = body
|
data/lib/chatbox/inbox.rb
CHANGED
data/lib/chatbox/outbox.rb
CHANGED
data/lib/chatbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chatbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Schneider
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- lib/chatbox.rb
|
85
85
|
- lib/chatbox/configuration.rb
|
86
86
|
- lib/chatbox/draft.rb
|
87
|
+
- lib/chatbox/fake_missing_keywords.rb
|
87
88
|
- lib/chatbox/inbox.rb
|
88
89
|
- lib/chatbox/memory_store.rb
|
89
90
|
- lib/chatbox/outbox.rb
|