Sha256: 3fb6cd0ac6df71706882b92d988ea730652fb7c26b0fce070187478421045b4f
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
require 'ginatra' require 'sprockets' require 'bootstrap-sass' map '/assets' do environment = Sprockets::Environment.new root_path = File.dirname __FILE__ environment.append_path "#{root_path}/public/js" environment.append_path "#{root_path}/public/css" environment.context_class.class_eval do def asset_path(path, options = {}) end end run environment end if Ginatra.config.git_clone_enabled? require 'mkmf' require 'git/webby' # Make the mkmf logger write file output to null if RUBY_VERSION[0] == '1' module Logging; @logfile = File::NULL; end else module MakeMakefile::Logging; @logfile = File::NULL; end end git_executable = find_executable 'git' raise 'Git executable not found in PATH' if git_executable.nil? root_path = File.dirname __FILE__ Git::Webby::HttpBackend.configure do |server| server.project_root = "#{root_path}/repos" server.git_path = git_executable server.get_any_file = true server.upload_pack = false server.receive_pack = false server.authenticate = false end run Rack::Cascade.new [Git::Webby::HttpBackend, Ginatra::App] else map '/' do run Ginatra::App end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ginatra-4.1.0 | config.ru |