berlin-ai 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/berlin-ai.gemspec CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_dependency 'sinatra', '>=1.2.6'
18
18
  s.add_dependency 'yajl-ruby', '>=0.8.2'
19
+ s.add_dependency 'sinatra-reloader', '>=0.5.0'
19
20
 
20
21
  s.files = [
21
22
  'LICENSE',
data/lib/berlin-ai.rb CHANGED
@@ -8,9 +8,18 @@ end
8
8
 
9
9
  # Parse options
10
10
  OptionParser.new do |opts|
11
- opts.on("-p N", Integer, "Set running port to N") do |p|
11
+ opts.on("-p N", "--port=N", Integer, "Set running port to N") do |p|
12
12
  set :port, p
13
13
  end
14
+
15
+ opts.on("--debug", "Run in debug mode (reloads code at each request)") do |p|
16
+ if p
17
+ require 'sinatra/reloader'
18
+ configure do |c|
19
+ c.also_reload $0
20
+ end
21
+ end
22
+ end
14
23
  end.parse!
15
24
 
16
25
  # Sinatra options
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Berlin
2
2
  module AI
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- BUILD = 9
5
+ BUILD = 10
6
6
 
7
7
  VERSION = "#{MAJOR}.#{MINOR}.#{BUILD}"
8
8
  end
data/test/test_ai.rb CHANGED
@@ -3,7 +3,7 @@ require 'berlin-ai'
3
3
 
4
4
  class Berlin::AI::Game
5
5
  def turn_moves
6
- @map.controlled_nodes.collect do |node|
6
+ map.controlled_nodes.collect do |node|
7
7
  {
8
8
  :from => node.id,
9
9
  :to => node.adjacent_nodes.sample.id,
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berlin-ai
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 9
10
- version: 0.0.9
9
+ - 10
10
+ version: 0.0.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christian Blais
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-05-22 00:00:00 -04:00
20
+ date: 2011-05-23 00:00:00 -04:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -52,6 +52,22 @@ dependencies:
52
52
  version: 0.8.2
53
53
  type: :runtime
54
54
  version_requirements: *id002
55
+ - !ruby/object:Gem::Dependency
56
+ name: sinatra-reloader
57
+ prerelease: false
58
+ requirement: &id003 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ hash: 11
64
+ segments:
65
+ - 0
66
+ - 5
67
+ - 0
68
+ version: 0.5.0
69
+ type: :runtime
70
+ version_requirements: *id003
55
71
  description: Berlin Artificial Intelligence
56
72
  email:
57
73
  - christ.blais@gmail.com