hydeweb 0.0.1.pre2 → 0.0.1.pre3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/hyde/init.rb +10 -5
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1.pre2
1
+ 0.0.1.pre3
data/lib/hyde/init.rb CHANGED
@@ -6,14 +6,19 @@ $:.unshift File.dirname(__FILE__) + "/.."
6
6
  require 'hyde'
7
7
 
8
8
  class Main < Sinatra::Base
9
- configure do
10
- # $log = Logger.new(File.join('log', "#{Sinatra::Application.environment}.log"))
11
- end
9
+ @@project ||= Hyde::Project.new
10
+
11
+ get '/-' do
12
+ @@project.files.inject("") do |a, path|
13
+ a << "<li><a href='#{path}'>#{path}</a></li>"
14
+ a
15
+ end
16
+ end
12
17
 
13
18
  get '/*' do
14
19
  begin
15
- @project ||= Hyde::Project.new
16
- @project.render params[:splat].to_s
20
+ path = params[:splat][0]
21
+ @@project.render path
17
22
  rescue Hyde::NotFound
18
23
  raise Sinatra::NotFound
19
24
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 0
8
8
  - 1
9
- - pre2
10
- version: 0.0.1.pre2
9
+ - pre3
10
+ version: 0.0.1.pre3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rico Sta. Cruz