meshchat 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +0 -0
  3. data/README.md +0 -0
  4. data/lib/meshchat.rb +0 -0
  5. data/lib/meshchat/cli.rb +10 -1
  6. data/lib/meshchat/cli/base.rb +0 -0
  7. data/lib/meshchat/cli/input.rb +9 -8
  8. data/lib/meshchat/command/base.rb +0 -0
  9. data/lib/meshchat/command/config.rb +0 -0
  10. data/lib/meshchat/command/exit.rb +0 -0
  11. data/lib/meshchat/command/identity.rb +0 -0
  12. data/lib/meshchat/command/import.rb +0 -0
  13. data/lib/meshchat/command/init.rb +1 -1
  14. data/lib/meshchat/command/irb.rb +0 -0
  15. data/lib/meshchat/command/listen.rb +0 -0
  16. data/lib/meshchat/command/ping.rb +0 -0
  17. data/lib/meshchat/command/ping_all.rb +0 -0
  18. data/lib/meshchat/command/server.rb +0 -0
  19. data/lib/meshchat/command/share.rb +0 -0
  20. data/lib/meshchat/command/stop_listening.rb +0 -0
  21. data/lib/meshchat/command/whisper.rb +0 -0
  22. data/lib/meshchat/command/who.rb +0 -0
  23. data/lib/meshchat/config/hash_file.rb +0 -0
  24. data/lib/meshchat/config/settings.rb +0 -0
  25. data/lib/meshchat/database.rb +0 -0
  26. data/lib/meshchat/display.rb +0 -0
  27. data/lib/meshchat/display/base.rb +0 -0
  28. data/lib/meshchat/display/manager.rb +0 -0
  29. data/lib/meshchat/encryption.rb +0 -0
  30. data/lib/meshchat/encryption/aes_rsa.rb +0 -0
  31. data/lib/meshchat/encryption/passthrough.rb +0 -0
  32. data/lib/meshchat/instance.rb +0 -0
  33. data/lib/meshchat/message.rb +0 -0
  34. data/lib/meshchat/message/base.rb +0 -0
  35. data/lib/meshchat/message/chat.rb +0 -0
  36. data/lib/meshchat/message/disconnection.rb +0 -0
  37. data/lib/meshchat/message/node_list.rb +0 -0
  38. data/lib/meshchat/message/node_list_diff.rb +0 -0
  39. data/lib/meshchat/message/node_list_hash.rb +0 -0
  40. data/lib/meshchat/message/ping.rb +0 -0
  41. data/lib/meshchat/message/ping_reply.rb +0 -0
  42. data/lib/meshchat/message/relay.rb +0 -0
  43. data/lib/meshchat/message/whisper.rb +0 -0
  44. data/lib/meshchat/models/entry.rb +0 -0
  45. data/lib/meshchat/net/client.rb +0 -0
  46. data/lib/meshchat/net/listener/errors.rb +0 -0
  47. data/lib/meshchat/net/listener/request.rb +0 -0
  48. data/lib/meshchat/net/listener/request_processor.rb +0 -0
  49. data/lib/meshchat/net/listener/server.rb +0 -0
  50. data/lib/meshchat/net/request.rb +0 -0
  51. data/lib/meshchat/notifier/base.rb +0 -0
  52. data/lib/meshchat/version.rb +1 -1
  53. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 710116e03c53eb697697204b0fcc82f03dd65f0b
4
- data.tar.gz: d296660e62b2dca5dcdfb7338045217c7b14da8e
3
+ metadata.gz: 27ef6f4b14b820a63c9a026876540a9ddd75a364
4
+ data.tar.gz: 9a5fe73e74cd8580d12200ff81d78350730bc9e2
5
5
  SHA512:
6
- metadata.gz: 41acfb1c0c96b46fd6f39c5e76d9892c3eb24ee0ecc28b32119f45a2bf950f9f5daea6b1e6b5de2f619b2a5b5130dd7233e81f9c9531f440583f938582d89775
7
- data.tar.gz: 5edd7cee532eb5ecc845178a50d5a5a042357c0d9b2e7912d3137f652d12a3f1a21f189bb951616dc79c793da3c35ee7addd8e1eb9759198cdf40a529a46bbc6
6
+ metadata.gz: 5497a247e9c63b15340e5685e31b983f2f33dbd25d58a37e78bc5b3c8665127767a58612e0277d8814881bd4e473cdb65c3f86d76f43bcc311fb91093abba82b
7
+ data.tar.gz: 42f734ecf56e0bdfb4a2dda287d113e54f2f20cde039e5f4950ff6cb3de8415376f7691841dec1a84100b5194a7b89f0e5d48a43a3370749aefc954315446d87
File without changes
data/README.md CHANGED
File without changes
File without changes
@@ -51,9 +51,14 @@ module MeshChat
51
51
  to: :instance
52
52
 
53
53
  def create(input_klass)
54
+ @input_klass = input_klass
54
55
  @instance = new(input_klass)
55
56
  end
56
57
 
58
+ def get_input
59
+ instance.get_input
60
+ end
61
+
57
62
  def instance
58
63
  # default input collector
59
64
  @instance ||= new
@@ -75,7 +80,7 @@ module MeshChat
75
80
  end
76
81
 
77
82
  def process_input
78
- msg = _input_device.get_input
83
+ msg = get_input
79
84
  create_input(msg)
80
85
  rescue SystemExit, Interrupt
81
86
  close_program
@@ -85,6 +90,10 @@ module MeshChat
85
90
  Display.error e.backtrace.join("\n").colorize(:red)
86
91
  end
87
92
 
93
+ def get_input
94
+ _input_device.get_input
95
+ end
96
+
88
97
  def create_input(msg)
89
98
  handler = Input.create(msg)
90
99
  handler.handle
File without changes
@@ -6,9 +6,17 @@ module MeshChat
6
6
  attr_accessor :_input
7
7
 
8
8
  class << self
9
+ def is_command?(input)
10
+ input[0, 1] == COMMAND
11
+ end
12
+
13
+ def is_whisper?(input)
14
+ input[0, 1] == WHISPER
15
+ end
16
+
9
17
  def create(input)
10
18
  klass =
11
- if is_command(input)
19
+ if is_command?(input)
12
20
  Command::Base
13
21
  elsif is_whisper?(input)
14
22
  Command::Whisper
@@ -20,13 +28,6 @@ module MeshChat
20
28
  klass.new(input)
21
29
  end
22
30
 
23
- def is_command(input)
24
- input[0, 1] == COMMAND
25
- end
26
-
27
- def is_whisper?(input)
28
- input[0, 1] == WHISPER
29
- end
30
31
  end
31
32
 
32
33
  def initialize(input)
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -25,7 +25,7 @@ module MeshChat
25
25
 
26
26
  def confirm?(msg)
27
27
  Display.warning(msg + ' (Y/N)')
28
- response = gets
28
+ response = MeshChat::CLI.get_input
29
29
  response = response.chomp
30
30
  ['yes', 'y'].include?(response.downcase)
31
31
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module MeshChat
2
- VERSION = '0.6.4'
2
+ VERSION = '0.6.5'
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.4
4
+ version: 0.6.5
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-23 00:00:00.000000000 Z
11
+ date: 2015-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -255,9 +255,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  version: '0'
256
256
  requirements: []
257
257
  rubyforge_project:
258
- rubygems_version: 2.4.7
258
+ rubygems_version: 2.4.8
259
259
  signing_key:
260
260
  specification_version: 4
261
- summary: MeshChat-0.6.4
261
+ summary: MeshChat-0.6.5
262
262
  test_files: []
263
263
  has_rdoc: