pie 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +12 -1
  2. data/lib/pie.rb +7 -14
  3. data/lib/place.rb +4 -2
  4. metadata +20 -36
data/README.md CHANGED
@@ -34,8 +34,13 @@ Someday there will be UI to change pages.
34
34
 
35
35
  Bugs and features are tracked here: http://www.pivotaltracker.com/projects/115060
36
36
 
37
- I want to try to resist adding any new features until we have no bugs and kid-friendly error messages. Help is welcome. Feel free to fork and submit pull requests or just tweet or email ideas.
37
+ If you are trying to develop a game or a book using pie and have a question, ask in the [pie dev group](http://groups.google.com/group/pie-dev)
38
38
 
39
+ ## If you want to help improve pie itself...
40
+
41
+ I want to try to resist adding any new features until we have no bugs and kid-friendly error messages. Help is welcome. Feel free to fork and submit pull requests or join the google group http://groups.google.com/group/pie-cooks
42
+
43
+ Sarah's talk on the making of pie: [slides](http://www.slideshare.net/sarah.allen/the-making-of-pie)
39
44
 
40
45
  ## Pie Contributors
41
46
 
@@ -51,3 +56,9 @@ Contributors
51
56
  * Dan Steinicke
52
57
  * Akira Matsuda
53
58
  * Chad Fowler
59
+
60
+ ## Related Projects
61
+
62
+ * [hosted IDE](http://pie-bakery.heroku.com) ([source code](https://github.com/blazingcloud/pie-bakery))
63
+ * [mobile-pie](https://github.com/blazingcloud/mobile-pie)
64
+
data/lib/pie.rb CHANGED
@@ -1,5 +1,9 @@
1
1
  module Pie
2
-
2
+ attr_accessor :places
3
+
4
+ def initialize
5
+ @places = {}
6
+ end
3
7
  def self.[](key)
4
8
  (@map ||= {})[key]
5
9
  end
@@ -51,14 +55,7 @@ module Pie
51
55
  end
52
56
 
53
57
  def place(options)
54
- new_place = Place.new(options)
55
- name = new_place.name
56
- #self.instance_eval %{
57
- # def #{name}
58
- # places[:#{name}]
59
- # end
60
- #}
61
- places[new_place.name] = new_place
58
+ Place.new(places, options)
62
59
  end
63
60
 
64
61
  def method_missing name
@@ -78,11 +75,7 @@ module Pie
78
75
  def current_image
79
76
  images[current_place.name] if current_place
80
77
  end
81
-
82
- def places
83
- Pie.places
84
- end
85
-
78
+
86
79
  def language(language)
87
80
  Pie.language = language
88
81
  end
data/lib/place.rb CHANGED
@@ -2,10 +2,12 @@ class Pie::Place
2
2
 
3
3
  attr_reader :name, :description, :paths
4
4
 
5
- def initialize(options)
5
+ def initialize(places, options)
6
6
  @paths = {}
7
+ @places = places
7
8
  extract_standard_options(options)
8
9
  extract_name_and_description(options)
10
+ @places[@name] = self
9
11
  end
10
12
 
11
13
  def to_s
@@ -15,7 +17,7 @@ class Pie::Place
15
17
  def path(nodes)
16
18
  nodes.each do |place_name, direction|
17
19
  paths[place_name] = direction
18
- Pie.places[place_name].paths[name] = direction.opposite unless !direction.respond_to?(:dead_end?) || direction.dead_end?
20
+ @places[place_name].paths[name] = direction.opposite unless !direction.respond_to?(:dead_end?) || direction.dead_end?
19
21
  end
20
22
  end
21
23
 
metadata CHANGED
@@ -1,32 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pie
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 9
9
- version: 0.2.9
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.10
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Sarah Allen, Sarah Mei, Rich Kilmer
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-11-14 00:00:00 -06:00
12
+ date: 2011-08-07 00:00:00.000000000 -07:00
18
13
  default_executable:
19
14
  dependencies: []
20
-
21
15
  description:
22
16
  email:
23
- executables:
17
+ executables:
24
18
  - pie
25
19
  extensions: []
26
-
27
20
  extra_rdoc_files: []
28
-
29
- files:
21
+ files:
30
22
  - lib/direction.rb
31
23
  - lib/pie.rb
32
24
  - lib/pie_server.rb
@@ -40,34 +32,26 @@ files:
40
32
  has_rdoc: true
41
33
  homepage: http://github.com/blazingcloud/pie
42
34
  licenses: []
43
-
44
35
  post_install_message:
45
36
  rdoc_options: []
46
-
47
- require_paths:
37
+ require_paths:
48
38
  - lib
49
- required_ruby_version: !ruby/object:Gem::Requirement
39
+ required_ruby_version: !ruby/object:Gem::Requirement
50
40
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- version: "0"
57
- required_rubygems_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
46
  none: false
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- segments:
63
- - 0
64
- version: "0"
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
65
51
  requirements: []
66
-
67
52
  rubyforge_project:
68
- rubygems_version: 1.3.7
53
+ rubygems_version: 1.6.2
69
54
  signing_key:
70
55
  specification_version: 3
71
56
  summary: Pie, a language for developing games and books
72
57
  test_files: []
73
-