meshchat 0.6.6 → 0.6.7

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: afaa05b2f2275270b28cee240cb4947e0322f115
4
- data.tar.gz: 8138c2a530c183e549301717d25d06961c8475ed
3
+ metadata.gz: b7d8d8d4b7f7900d40c67f3abbd06a4165e8b5c4
4
+ data.tar.gz: ba4e6f5e887a564baf24d70dea89938787d99570
5
5
  SHA512:
6
- metadata.gz: beab3e9eaf88eb0b8c33661a6aeebdd27a056fb8819311c1b57003e452233de00d25914fe024c1536a18eac026280b4f695593b1c6d5ec1b5a4bad96960b4a07
7
- data.tar.gz: 5bb8c1ee8278a4253b01ced4bd2d5f3a11c5fc8489d3a92974efece3c30b92cdd3327f9c134cb878a8736ce47d4b47cf05de5a4cc65f7043930d70404d143fe2
6
+ metadata.gz: a08bb6a68534c357f4c95db9b2849f3e174a944adb66cc41df356bf2c910f1e4618a7b6c623dfa7737a2f288a0d47709e4f61803fd17e890dcc1b78bdd7f6050
7
+ data.tar.gz: 741af34bce7faef140f4bb99b26c18c6159bbd73ac9bafde471653361221e6a2c0a7ebe4927aab42ad3fe2576a3a7e2f892420746a6a2651211998fe43bc3d05
@@ -95,6 +95,7 @@ module MeshChat
95
95
  end
96
96
 
97
97
  def create_input(msg)
98
+ Display.debug("input: #{msg}")
98
99
  handler = Input.create(msg)
99
100
  handler.handle
100
101
  rescue => e
@@ -16,28 +16,29 @@ module MeshChat
16
16
  Thread.new(node, message) do |node, message|
17
17
  begin
18
18
  payload = Client.payload_for(node, message)
19
- rescue => e
20
- Display.info "Public key encryption for #{node.alias_name} failed"
21
- return
22
- end
23
19
 
24
- begin
25
- Curl::Easy.http_post(node.location, payload.to_json) do |c|
26
- c.headers['Accept'] = 'application/json'
27
- c.headers['Content-Type'] = 'application/json'
28
- if MeshChat::Settings.debug?
29
- puts message.render
30
- c.verbose = true
31
- c.on_debug do |type, data|
32
- puts data
20
+ # TODO: this is horrible, come up with something better / abstract it
21
+ begin
22
+ Curl::Easy.http_post(node.location, payload.to_json) do |c|
23
+ c.headers['Accept'] = 'application/json'
24
+ c.headers['Content-Type'] = 'application/json'
25
+ if MeshChat::Settings.debug?
26
+ puts message.render
27
+ c.verbose = true
28
+ c.on_debug do |type, data|
29
+ puts data
30
+ end
33
31
  end
34
32
  end
33
+ rescue => e
34
+ node.update(online: false)
35
+ Display.info "#{node.alias_name} has ventured offline"
36
+ Display.debug("#{message.class.name}: Issue connectiong to #{node.alias_name}@#{node.location}")
37
+ Display.debug(e.message)
35
38
  end
39
+
36
40
  rescue => e
37
- node.update(online: false)
38
- Display.info "#{node.alias_name} has ventured offline"
39
- Display.debug("#{message.class.name}: Issue connectiong to #{node.alias_name}@#{node.location}")
40
- Display.debug(e.message)
41
+ Display.info "Public key encryption for #{node.alias_name} failed"
41
42
  end
42
43
  end
43
44
  end
@@ -1,3 +1,3 @@
1
1
  module MeshChat
2
- VERSION = '0.6.6'
2
+ VERSION = '0.6.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meshchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - L. Preston Sego III
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-27 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -258,6 +258,5 @@ rubyforge_project:
258
258
  rubygems_version: 2.4.8
259
259
  signing_key:
260
260
  specification_version: 4
261
- summary: MeshChat-0.6.6
261
+ summary: MeshChat-0.6.7
262
262
  test_files: []
263
- has_rdoc: