pie 0.2.7 → 0.2.8
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.
- data/lib/pie_server.rb +7 -3
- metadata +2 -2
data/lib/pie_server.rb
CHANGED
@@ -8,11 +8,12 @@ class Pie::WebApp < Sinatra::Base
|
|
8
8
|
end
|
9
9
|
|
10
10
|
get '/:place_name' do
|
11
|
-
puts "
|
12
|
-
|
13
|
-
pie ||= settings.pie_data
|
11
|
+
puts "env= #{request.env.inspect}"
|
12
|
+
puts "request.env[PIE_DATA]= #{request.env["PIE_DATA"].inspect}"
|
14
13
|
pie ||= request.env["PIE_DATA"]
|
14
|
+
pie ||= settings.pie_data if settings.respond_to? :pie_data
|
15
15
|
puts "pie = #{pie.inspect}"
|
16
|
+
if pie
|
16
17
|
name = params[:place_name].to_sym
|
17
18
|
pie.current_place(name) unless name.nil?
|
18
19
|
puts "current place name is #{pie.current_place.name}"
|
@@ -21,6 +22,9 @@ class Pie::WebApp < Sinatra::Base
|
|
21
22
|
puts "current links are #{pie.current_place.paths.inspect}"
|
22
23
|
puts "displaying template: #{pie.template.inspect}"
|
23
24
|
erb pie.template, {}, {:pie => pie}
|
25
|
+
else
|
26
|
+
puts "NO PIE! AAAAAH!"
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
end
|