joyce 0.2.1 → 0.2.2

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: 60ec74ff063b3e763564765de9410f810050d2b3
4
- data.tar.gz: c1796900f78a0588eb10face710a15baf8ec974b
3
+ metadata.gz: fc2c30bbb31acf3d09e48b999632bfa3fc088f2d
4
+ data.tar.gz: b1d12f30d0b2173b8d16d6dee1359722b7fe4e5a
5
5
  SHA512:
6
- metadata.gz: 1318ca2c5993560d7392551515acd2e651e012e22e967827852ab64b7d4a7685f42a67bacc4c96b968aff9c10539d071ecb639dbb81bcb22d0e3c751a9894b18
7
- data.tar.gz: d52eab14b3164c7fe2419c6a708d6f4016be0826e05f75cb21d6e6b5ea95925b83c78cde2130b38b4e8c0c037cbc99eef73c2add070a1f50c36e98dcc114a1ad
6
+ metadata.gz: f44031c862c06e85c7057931f42cfad3fe18fb523ce7d58d44a5106a72c72f9d96ac4a036c698b09f658dc4b9f67913836b871c950c29e7c531e27410302b423
7
+ data.tar.gz: 8a613409719e53c1bd0c90c66315040fd3c5db2af82c56c665b3ac155d288bda7c59500ab2235d7ea0589d5fe8ab671f1737444f45ad4c34d783a06ba512e3f8
data/bin/joyce CHANGED
@@ -5,10 +5,11 @@ if File.directory?(File.join(root,'.git'))
5
5
  Dir.chdir(root) do
6
6
  begin
7
7
  require 'bundler/setup'
8
+ require_relative '../example/main.rb'
8
9
  rescue LoadError => e
9
10
  warn e.message
10
11
  warn "Run `gem install bundler` to install Bundler"
11
- exit -1
12
+ exit(-1)
12
13
  end
13
14
  end
14
15
  end
@@ -25,7 +25,7 @@ module Example
25
25
  class Application < Joyce::Application
26
26
  viewed_with Example::SampleAppView
27
27
 
28
- def setup
28
+ def setup(*)
29
29
  GameView.create(active_player_id: player_id)
30
30
  sim.params[:active_player_id] = player_id
31
31
  end
data/example/main.rb CHANGED
@@ -3,6 +3,6 @@ require 'rubygems'
3
3
  # require 'bundler/setup'
4
4
 
5
5
  require 'joyce'
6
- require 'application'
6
+ require_relative 'lib/application'
7
7
 
8
8
  Example::Application.kickstart!
@@ -35,7 +35,19 @@ module Joyce
35
35
  end
36
36
 
37
37
  def sim
38
- @simulation ||= RemoteSim.current
38
+ @simulation ||= self.class.simulation_class.current # RemoteSim.current
39
+ end
40
+
41
+ def self.simulation_class
42
+ if connect_immediately?
43
+ RemoteSim
44
+ else
45
+ Metacosm::Simulation
46
+ end
47
+ end
48
+
49
+ def self.connect_immediately?
50
+ false
39
51
  end
40
52
 
41
53
  def view
data/lib/joyce/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Joyce
2
2
  # joyce version
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joyce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Weissman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-27 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gosu