Sha256: 8f72886526c6c1843638acba3ec0918eeb2739a90ff8a8e25ae1f642f6f29343

Contents?: true

Size: 409 Bytes

Versions: 3

Compression:

Stored size: 409 Bytes

Contents

require 'miso'

$MISO_STATIC_ROOT = "_site"
$MISO_APP_ROOT = "_app"

app_dir_list = ::Dir[$MISO_APP_ROOT+'/*'].reject{|o| not ::File.directory?(o)}
app_dir_list.each do |app_folder|
  app = Miso.load app_folder
  app_name = app_folder.split('/')[-1]
  map '/'+app_name do
    use Miso::Rewrite, {:app_path => '/'+app_folder} 
    run app
  end
end

map '/' do 
  run Miso::StaticSite.new $MISO_STATIC_ROOT
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
misosoup-0.1.2 template/config.ru
misosoup-0.1.1 template/config.ru
misosoup-0.1.0 template/config.ru