Sha256: 171d9afbd1683c3cf05a0db097385f66d6845e2a8ab6dcfeeb20f3cea682f81f

Contents?: true

Size: 492 Bytes

Versions: 16

Compression:

Stored size: 492 Bytes

Contents

require 'rack'

use Rack::Static, root: '.', urls: %w(
  /index.html
  /profile.html
  /entries.html
  /entries.rss
  /favicon.png
  /entries
  /stylesheets
  /javascripts
  /images
)

map '/' do
  run ->(env) {
    if env['PATH_INFO'] == '/'
      [
        200,
        {'Content-Type'  => 'text/html', 'Cache-Control' => 'public, max-age=86400'},
        File.open('index.html', File::RDONLY)
      ]
    else
      [404, {'Content-Type'  => 'text/plain'}, ['Not Found']]
    end
  }
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
retter-1.0.0.pre spec/fixtures/sites/site-0.2.5/config.ru
retter-0.2.5 lib/retter/generator/skel/config.ru
retter-0.2.4 lib/retter/generator/skel/config.ru
retter-0.2.3 lib/retter/generator/skel/config.ru
retter-0.2.2 lib/retter/generator/skel/config.ru
retter-0.2.1 lib/retter/generator/skel/config.ru
retter-0.2.0 lib/retter/generator/skel/config.ru
retter-0.1.3 lib/retter/generator/skel/config.ru
retter-0.1.2 lib/retter/generator/skel/config.ru
retter-0.1.1 lib/retter/generator/skel/config.ru
retter-0.1.0 lib/retter/generator/skel/config.ru
retter-0.0.4 lib/generator/skel/config.ru
retter-0.0.3 lib/generator/skel/config.ru
retter-0.0.2 lib/generator/skel/config.ru
retter-0.0.1 lib/generator/skel/config.ru
retter-0.0.0 lib/generator/skel/config.ru