vikingio 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82673e848156299dbfd0d031352d52d872435620
4
- data.tar.gz: cd4dc18085fe19a7794c01d002f0e2789ad84654
3
+ metadata.gz: 31bd2e9506aea117564016c4a9d8d7f9903f1014
4
+ data.tar.gz: 47bfc0357efe013c43214da9e1ab0eadab49ddd2
5
5
  SHA512:
6
- metadata.gz: 2f998edb0b94f5ac7fe632f4e2bfa07414e8cf21343aafcb89d1aa449c565b34c9b855adb62208c305a515db7616b286b819337dae8e9772ba1e31bcfc23ec12
7
- data.tar.gz: 64bafd179627a05cadf58aff2da768a1891ff998977551bcb195f7e09359230e3661b88ef4cfa7251b86a8cab66895b4f5d42569fa9c5fe0b9c453ded7580606
6
+ metadata.gz: 22c5b516c02c9bf0fd05fca9167983f4f8821160bc4ff1f893b7379e2ea0612e00e84449c9b7336fd0b043a7a3dd64930086bb3c810ce97c71160a5a7667fc53
7
+ data.tar.gz: b6e3ea596734095146b630ae5b0b0ee1a7495a688fdf42879dcd3ce2414f86c1e2895f2ddcbb568626a7f3b4f67618eef8791ee50b052f501b118f7c15bbb413
Binary file
Binary file
@@ -7,7 +7,8 @@ module VikingIO
7
7
 
8
8
  def self.get_status(user_key, app_key)
9
9
  uri = URI.join(BASE_PATH, "apps/status")
10
- http = Net::HTTP.new(uri.host, uri.port)
10
+ http = Net::HTTP.new(uri.host, uri.port)
11
+ http.use_ssl = true
11
12
  req = Net::HTTP::Get.new(uri.path)
12
13
  req['x-vikingio-user-key'] = user_key
13
14
  req['x-vikingio-app-key'] = app_key
@@ -108,8 +109,9 @@ module VikingIO
108
109
 
109
110
  def self.create_app(name)
110
111
  uri = URI.join(BASE_PATH, "apps")
111
-
112
- http = Net::HTTP.new(uri.host, uri.port)
112
+
113
+ http = Net::HTTP.new(uri.host, uri.port)
114
+ http.use_ssl = true
113
115
  req = Net::HTTP::Post.new(uri.path)
114
116
  req['x-vikingio-user-key'] = VikingIO::CLI.get_netrc_key
115
117
  req.set_form_data({"name" => name})
@@ -124,9 +126,10 @@ module VikingIO
124
126
  def self.create_node(name, app_key)
125
127
  return nil if name == "" || name == nil
126
128
 
127
- uri = URI.join(BASE_PATH, "nodes")
129
+ uri = URI.join(BASE_PATH, "nodes")
128
130
 
129
- http = Net::HTTP.new(uri.host, uri.port)
131
+ http = Net::HTTP.new(uri.host, uri.port)
132
+ http.use_ssl = true
130
133
  req = Net::HTTP::Post.new(uri.path)
131
134
  req['x-vikingio-user-key'] = VikingIO::CLI.get_netrc_key
132
135
  req['x-vikingio-app-key'] = app_key
@@ -250,10 +250,10 @@ module VikingIO
250
250
  if self.compile_nodes(tmp_dir, node_data)
251
251
  pids = []
252
252
 
253
- node_data.each do |node|
254
- default_port += 1
253
+ node_data.each do |node|
255
254
  exe_file = "#{tmp_dir}/VikingIO/#{node["node_class"]}.exe"
256
- pids << spawn("DYLD_LIBRARY_PATH=#{UNITY_MONO_DLL_PATH_OSX} #{UNITY_MONO_PATH_OSX} #{exe_file} #{default_port}")
255
+ pids << spawn("DYLD_LIBRARY_PATH=#{UNITY_MONO_DLL_PATH_OSX} #{UNITY_MONO_PATH_OSX} #{exe_file} #{default_port}")
256
+ default_port += 1
257
257
  end
258
258
 
259
259
  begin
@@ -1,5 +1,5 @@
1
1
  module VikingIO
2
2
  module CLI
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
data/templates/Program.cs CHANGED
@@ -8,15 +8,15 @@ namespace VikingIO.ServerNode
8
8
  {
9
9
  class Program
10
10
  {
11
- static void Main(string[] args)
12
- {
13
- if (args.Length == 0)
14
- {
15
- Console.WriteLine("Supply port as first argument.");
16
- return;
17
- }
18
- VikingServer.Instance.SetNode(new [MODULE_NAME]());
19
- VikingServer.Instance.Start("[APP_NAME]", int.Parse(args[0]));
20
- }
11
+ static void Main(string[] args)
12
+ {
13
+ if (args.Length == 0)
14
+ {
15
+ Console.WriteLine("Supply port as first argument.");
16
+ return;
17
+ }
18
+ VikingServer.Instance.SetNode(new [MODULE_NAME]());
19
+ VikingServer.Instance.Start("[APP_NAME]", int.Parse(args[0]));
21
20
  }
21
+ }
22
22
  }
@@ -6,14 +6,10 @@ using VikingIO.Network;
6
6
  using VikingIO.Network.Messaging;
7
7
 
8
8
  public class [SERVER_NAME] : IVikingNode
9
- {
10
- int tick = 0;
11
- VikingServer server;
12
-
13
- public void Start(VikingServer server)
9
+ {
10
+ public void Start()
14
11
  {
15
- Console.WriteLine("[[SERVER_NAME]] Start");
16
- this.server = server;
12
+ Console.WriteLine("[[SERVER_NAME]] Start");
17
13
  }
18
14
 
19
15
  public void OnConnect(NetConnection conn)
@@ -32,8 +28,8 @@ public class [SERVER_NAME] : IVikingNode
32
28
  }
33
29
 
34
30
  public void Update(float dt)
35
- {
36
-
31
+ {
32
+
37
33
  }
38
34
 
39
35
  public void FixedUpdate(float dt)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vikingio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Campbell