Sha256: 6fc42475e4c3a7087241dc3251ff8b852df41d78c2c3dfbaf31e12965d1261f9
Contents?: true
Size: 670 Bytes
Versions: 2
Compression:
Stored size: 670 Bytes
Contents
require 'sinatra/base' module PowIndex class App < Sinatra::Base POW_PATH = "#{ENV['HOME']}/.pow" enable :inline_templates get '/' do @pows = Dir[POW_PATH + "/*"].map { |link| File.basename(link) } haml :index end end end __END__ @@ index %html %head %title pow index %link{:rel => 'stylesheet', :href => 'http://twitter.github.com/bootstrap/assets/css/bootstrap-1.2.0.min.css'} %body .container %h1 index %table.zebra-striped %tbody - @pows.each do |pow| %tr %td %a{:href => 'http://' + pow + '.dev'} = pow
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pow-index-0.0.1 | lib/pow-index.rb |
pow-index-0.0.0 | lib/pow-index.rb |