meshchat 0.6.0 → 0.6.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: d133b88895ed07267fb0e6b02806c2ebe998ce59
4
- data.tar.gz: b01e8f93f830e3ecc211ff165947479319fd600b
3
+ metadata.gz: 5671565391401b5aabfdbc5b5fbf4fd3fbb4f669
4
+ data.tar.gz: c8f10685c22c6ed97b17723d5dfacac3078b1607
5
5
  SHA512:
6
- metadata.gz: 81e2789b1f3ad8d44cfba19a8e736f330e78564743530909c94aa036d5b381749775036754f72af6a40bde5b2ff2856be051d61521230a05346ddfae7c0f0b86
7
- data.tar.gz: d6678a4ff966e8e5de7a73057f109e8a41badb5baf12387a13b5190ea083221514cf0619915e3d4302a960b803c515b13853c31b19f4418dd675c8d3d0100008
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
- For now, all that needs to be implemented is the Display.
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)
@@ -1,3 +1,3 @@
1
1
  module MeshChat
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
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.0
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.0
288
+ summary: MeshChat-0.6.1
289
289
  test_files: []
290
290
  has_rdoc: