Sha256: 06bfb7f20d8174ecd2cc629d26d76a9100e75db3c16def7e26e02c45c69cad7f

Contents?: true

Size: 614 Bytes

Versions: 3

Compression:

Stored size: 614 Bytes

Contents

require 'tailog/version'
require 'tailog/ext/file'
require 'sinatra/base'
require 'active_support/configurable'

module Tailog
  include ActiveSupport::Configurable

  config_accessor :log_path do
    File.expand_path("log", Dir.pwd)
  end

  class App < Sinatra::Base
    set :root, File.expand_path("../../app", __FILE__)
    set :public_folder do "#{root}/assets" end
    set :views do "#{root}/views" end

    helpers do
      def h(text)
        Rack::Utils.escape_html(text)
      end
    end

    get '/' do
      if params[:seek]
        erb :ajax
      else
        erb :index
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tailog-0.1.6 lib/tailog.rb
tailog-0.1.5 lib/tailog.rb
tailog-0.1.4 lib/tailog.rb