meshchat 0.6.0 → 0.6.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/README.md +2 -2
- data/lib/meshchat/message/node_list.rb +6 -0
- data/lib/meshchat/net/listener/request_processor.rb +4 -2
- data/lib/meshchat/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: 5671565391401b5aabfdbc5b5fbf4fd3fbb4f669
|
4
|
+
data.tar.gz: c8f10685c22c6ed97b17723d5dfacac3078b1607
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35054ce9d7603e797f94da7f785f4e3c43d8a401e4523c915e1614d048bcdfbe671c3ac956da94daa70c630ddc7f702bd1f2232ac757355a2b3cc3989f8b4f59
|
7
|
+
data.tar.gz: 0dc75c02103b3fff808102fb4bb32e5f6e451f558d1479d0bf2b3d452c93a7d2a34f2b011697490397abcb231724998cfb8239b624a95f376088f86ce52a5c15
|
data/README.md
CHANGED
@@ -6,14 +6,14 @@ This is the core functionality for implementing a [mesh-chat](https://github.com
|
|
6
6
|
|
7
7
|
See [Spiced Gracken](https://github.com/NullVoxPopuli/spiced_gracken)
|
8
8
|
|
9
|
-
|
10
|
-
Take a look at `Display::Base` to see what you need to override.
|
9
|
+
In order to use meshchat with your own interface, you only need to pass in your own implementations of `Display::Base` and `CLI::Base`
|
11
10
|
|
12
11
|
```ruby
|
13
12
|
MeshChat.start(
|
14
13
|
client_name: NAME, # name of your client
|
15
14
|
client_version: VERSION, # version of your client
|
16
15
|
display: ui, # your class of your implementation of `Display::Base`
|
16
|
+
input: input, # your class of your implementation of `CLI::Base`
|
17
17
|
on_display_start: ->{ MeshChat::CLI.check_startup_settings } # optional
|
18
18
|
)
|
19
19
|
```
|
@@ -16,6 +16,12 @@ module MeshChat
|
|
16
16
|
received_list = message
|
17
17
|
we_only_have, they_only_have = Node.diff(received_list)
|
18
18
|
|
19
|
+
if they_only_have.present?
|
20
|
+
they_only_have.each do |n|
|
21
|
+
Node.from_json(n).save!
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
19
25
|
if we_only_have.present?
|
20
26
|
location = payload['sender']['location']
|
21
27
|
|
@@ -7,11 +7,13 @@ module MeshChat
|
|
7
7
|
|
8
8
|
def process(raw)
|
9
9
|
request = Request.new(raw)
|
10
|
-
|
11
10
|
message = request.message
|
12
|
-
update_sender_info(request.json)
|
13
11
|
|
12
|
+
# handle the message
|
14
13
|
Display.present_message message
|
14
|
+
|
15
|
+
# then update the sender info in the db
|
16
|
+
update_sender_info(request.json)
|
15
17
|
end
|
16
18
|
|
17
19
|
def update_sender_info(json)
|
data/lib/meshchat/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meshchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L. Preston Sego III
|
@@ -285,6 +285,6 @@ rubyforge_project:
|
|
285
285
|
rubygems_version: 2.4.7
|
286
286
|
signing_key:
|
287
287
|
specification_version: 4
|
288
|
-
summary: MeshChat-0.6.
|
288
|
+
summary: MeshChat-0.6.1
|
289
289
|
test_files: []
|
290
290
|
has_rdoc:
|