gameoverseer 0.1.3 → 0.1.4

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: dc1d90c8155b62e40a08e8c8987686264990b2e7
4
- data.tar.gz: 1d2d48e384a4c599fb75bb93c6698aeaaaf5a7c8
3
+ metadata.gz: f6234daab36afe1acaa8be59667cf2c146c5f0b6
4
+ data.tar.gz: 288aebd6aa6deaeb6d2418e6fa8bd15556217000
5
5
  SHA512:
6
- metadata.gz: 520d1046beb53d18155082fad0c6c1a53997af2775f1d705343a6d9b58ad11f0b687e8a9ef25ae0976c5caaa06d113ea5ffa5df26bf23d437f324f5bd83f7f4d
7
- data.tar.gz: 63649b30b5d5fdf85050a20aa5df3f059a6636336f495434c1fb9549bd2b58dc69d2da7a7fa5baf9c2c7658e43224bee8010c8561a270bf03f89cf5a00d3021b
6
+ metadata.gz: 3accaad6d8a65d2d86964c9e21e51069dfbf80b0b1c08b791b9eef41e1b6b85ec74274d0013d27862c502da29f40837e6f57f5c3647756f8b446543042f0e181
7
+ data.tar.gz: 71fb9aed37fe69dd81269ee1da1a6264c8b3402ee149701a654e2677ee8ac502037224298c0a2fcd5ef0fb009b671859d0aa04a11cfc93c121213d470710342e
data/gameoverseer.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ["lib", "bin"]
18
18
 
19
- s.add_runtime_dependency "gosu", "0.10.6"
19
+ s.add_runtime_dependency "gosu", ">=0.10.6"
20
20
  s.add_runtime_dependency "concurrent-ruby"
21
21
  s.add_runtime_dependency "renet"
22
22
  s.add_runtime_dependency "multi_json"
@@ -1,4 +1,4 @@
1
1
  module GameOverseer
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  RELEASE_NAME = "Blank Slate" # 1.0 is to be "Ice Crystal"
4
4
  end
@@ -1,13 +1,13 @@
1
- require "multi_json"
2
-
3
- PROTOCOLS = {
4
- # Client
5
- handshake_extend_hand: MultiJson.dump({'channel' => 'handshake', 'mode' => 'extend_hand'}),
6
- handshake_authenticate: "{'channel'=> 'handshake', \"mode\": \"authenticate\", \"data\": {\"auth_key\": \"public_key_encrypted_auth_key\"}}",
7
-
8
-
9
- # Server
10
- handshake_public_key: "{\"channel\": \"handshake\", \"mode\": \"public_key\", \"data\": {\"public_key\": \"really_long_string\"}}",
11
- handshake_authenticated: "{\"channel\": \"handshake\", \"mode\": \"authenticated\", \"data\": {\"code\": 200, \"message\": \"Successfully authenticated.\"}}",
12
- handshake_bad_authentication: "{\"channel\": \"handshake\", \"mode\": \"bad_authentication\", \"data\": {\"code\": 401, \"message\": \"Could not authenticate.\"}}"
13
- }
1
+ require "multi_json"
2
+
3
+ PROTOCOLS = {
4
+ # Client
5
+ handshake_extend_hand: MultiJson.dump({'channel' => 'handshake', 'mode' => 'extend_hand'}),
6
+ handshake_authenticate: "{'channel'=> 'handshake', \"mode\": \"authenticate\", \"data\": {\"auth_key\": \"public_key_encrypted_auth_key\"}}",
7
+
8
+
9
+ # Server
10
+ handshake_public_key: "{\"channel\": \"handshake\", \"mode\": \"public_key\", \"data\": {\"public_key\": \"really_long_string\"}}",
11
+ handshake_authenticated: "{\"channel\": \"handshake\", \"mode\": \"authenticated\", \"data\": {\"code\": 200, \"message\": \"Successfully authenticated.\"}}",
12
+ handshake_bad_authentication: "{\"channel\": \"handshake\", \"mode\": \"bad_authentication\", \"data\": {\"code\": 401, \"message\": \"Could not authenticate.\"}}"
13
+ }
@@ -1,36 +1,36 @@
1
- require "celluloid/io"
2
- require "multi_json"
3
- require "net/ssh"
4
- require_relative "protocol-lib"
5
-
6
- class TestClientAlpha
7
- include Celluloid::IO
8
- finalizer :finish
9
-
10
- def initialize(host, port)
11
- @client = UDPSocket.new
12
- @client.connect(host, port)
13
- run
14
- end
15
-
16
- def run
17
- @client.send("#{PROTOCOLS[:handshake_extend_hand]}", 0)
18
- socket = @client.recvfrom(1024)
19
- response = MultiJson.load(socket[0])
20
- public_key_pem = response['data']['public_key'] if response['mode'] == 'public_key'
21
- public_key = OpenSSL::PKey::RSA.new public_key_pem
22
- encrypted_auth_key_response = MultiJson.dump({'channel'=> 'handshake', 'mode' => 'authenticate', 'data' => {'auth_key' => "#{public_key.public_encrypt('HELLO_WORLD')}"}})
23
- p encrypted_auth_key_response
24
- @client.send("#{encrypted_auth_key_response}", 0)
25
- end
26
-
27
- def finish
28
- @client.close if @client
29
- end
30
- end
31
-
32
- start_time = Time.now
33
-
34
- TestClientAlpha.supervise('localhost', 56789)
35
-
36
- puts "Time to complete: #{Time.now-start_time}"
1
+ require "celluloid/io"
2
+ require "multi_json"
3
+ require "net/ssh"
4
+ require_relative "protocol-lib"
5
+
6
+ class TestClientAlpha
7
+ include Celluloid::IO
8
+ finalizer :finish
9
+
10
+ def initialize(host, port)
11
+ @client = UDPSocket.new
12
+ @client.connect(host, port)
13
+ run
14
+ end
15
+
16
+ def run
17
+ @client.send("#{PROTOCOLS[:handshake_extend_hand]}", 0)
18
+ socket = @client.recvfrom(1024)
19
+ response = MultiJson.load(socket[0])
20
+ public_key_pem = response['data']['public_key'] if response['mode'] == 'public_key'
21
+ public_key = OpenSSL::PKey::RSA.new public_key_pem
22
+ encrypted_auth_key_response = MultiJson.dump({'channel'=> 'handshake', 'mode' => 'authenticate', 'data' => {'auth_key' => "#{public_key.public_encrypt('HELLO_WORLD')}"}})
23
+ p encrypted_auth_key_response
24
+ @client.send("#{encrypted_auth_key_response}", 0)
25
+ end
26
+
27
+ def finish
28
+ @client.close if @client
29
+ end
30
+ end
31
+
32
+ start_time = Time.now
33
+
34
+ TestClientAlpha.supervise('localhost', 56789)
35
+
36
+ puts "Time to complete: #{Time.now-start_time}"
@@ -1,37 +1,37 @@
1
- require "celluloid/io"
2
- require "multi_json"
3
- require "net/ssh"
4
- require 'uri'
5
- require_relative "protocol-lib"
6
-
7
- class TestClientBeta
8
- include Celluloid::IO
9
- finalizer :finish
10
-
11
- def initialize(host, port)
12
- @client = Celluloid::IO::TCPSocket.new(host, port)
13
- run
14
- end
15
-
16
- def run
17
- @client.puts("#{PROTOCOLS[:handshake_extend_hand]}")
18
- line = @client.gets
19
- p line
20
- response = MultiJson.load(line)
21
- public_key_pem = response['data']['public_key'] if response['mode'] == 'public_key'
22
- public_key = OpenSSL::PKey::RSA.new public_key_pem
23
- encrypted_auth_key_response = MultiJson.dump({'channel'=> 'handshake', 'mode' => 'authenticate', 'data' => {'auth_key' => "#{public_key.public_encrypt('HELLO_WORLD')}".force_encoding("utf-8")}})
24
- p encrypted_auth_key_response
25
- @client.puts("#{encrypted_auth_key_response.inspect}")
26
- end
27
-
28
- def finish
29
- @client.close if @client
30
- end
31
- end
32
-
33
- start_time = Time.now
34
-
35
- TestClientBeta.supervise("127.0.0.1", 56789)
36
-
37
- puts "Time to complete: #{Time.now-start_time}"
1
+ require "celluloid/io"
2
+ require "multi_json"
3
+ require "net/ssh"
4
+ require 'uri'
5
+ require_relative "protocol-lib"
6
+
7
+ class TestClientBeta
8
+ include Celluloid::IO
9
+ finalizer :finish
10
+
11
+ def initialize(host, port)
12
+ @client = Celluloid::IO::TCPSocket.new(host, port)
13
+ run
14
+ end
15
+
16
+ def run
17
+ @client.puts("#{PROTOCOLS[:handshake_extend_hand]}")
18
+ line = @client.gets
19
+ p line
20
+ response = MultiJson.load(line)
21
+ public_key_pem = response['data']['public_key'] if response['mode'] == 'public_key'
22
+ public_key = OpenSSL::PKey::RSA.new public_key_pem
23
+ encrypted_auth_key_response = MultiJson.dump({'channel'=> 'handshake', 'mode' => 'authenticate', 'data' => {'auth_key' => "#{public_key.public_encrypt('HELLO_WORLD')}".force_encoding("utf-8")}})
24
+ p encrypted_auth_key_response
25
+ @client.puts("#{encrypted_auth_key_response.inspect}")
26
+ end
27
+
28
+ def finish
29
+ @client.close if @client
30
+ end
31
+ end
32
+
33
+ start_time = Time.now
34
+
35
+ TestClientBeta.supervise("127.0.0.1", 56789)
36
+
37
+ puts "Time to complete: #{Time.now-start_time}"
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gameoverseer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyberarm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-28 00:00:00.000000000 Z
11
+ date: 2016-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gosu
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.10.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.10.6
27
27
  - !ruby/object:Gem::Dependency
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.6.3
120
+ rubygems_version: 2.6.8
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Generic game server.