pie 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- 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
|