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 +4 -4
- data/lib/meshchat/cli.rb +1 -0
- data/lib/meshchat/net/client.rb +18 -17
- data/lib/meshchat/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7d8d8d4b7f7900d40c67f3abbd06a4165e8b5c4
|
4
|
+
data.tar.gz: ba4e6f5e887a564baf24d70dea89938787d99570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a08bb6a68534c357f4c95db9b2849f3e174a944adb66cc41df356bf2c910f1e4618a7b6c623dfa7737a2f288a0d47709e4f61803fd17e890dcc1b78bdd7f6050
|
7
|
+
data.tar.gz: 741af34bce7faef140f4bb99b26c18c6159bbd73ac9bafde471653361221e6a2c0a7ebe4927aab42ad3fe2576a3a7e2f892420746a6a2651211998fe43bc3d05
|
data/lib/meshchat/cli.rb
CHANGED
data/lib/meshchat/net/client.rb
CHANGED
@@ -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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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.
|
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
|
data/lib/meshchat/version.rb
CHANGED
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.
|
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-
|
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.
|
261
|
+
summary: MeshChat-0.6.7
|
262
262
|
test_files: []
|
263
|
-
has_rdoc:
|