Skip to content

Commit

Permalink
Initial commit, blank Sinatra application
Browse files Browse the repository at this point in the history
  • Loading branch information
karmi committed Jan 1, 2011
0 parents commit 83ac15d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
tmp/**/*
config/config.rb
Gemfile.lock
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'http://rubygems.org'

gem 'rake'
gem 'sinatra'
18 changes: 18 additions & 0 deletions application.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'bundler'
Bundler.require(:default, :guides)

require 'config/config.rb'

module RubyonrailsCz
class Application < Sinatra::Base

enable :logging, :dump_errors, :raise_errors

use Rack::Auth::Basic do |username, password|
username == Config::USERNAME && password == Config::PASSWORD
end

end
end

RubyonrailsCz::Application.run! if __FILE__ == $0
2 changes: 2 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require ::File.expand_path('../application', __FILE__)
run RubyonrailsCz::Application
7 changes: 7 additions & 0 deletions config/config.example.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module RubyonrailsCz
module Config
USERNAME = 'admin'
PASSWORD = 'admin'
GUIDES = '/www/rubyonrails.cz/guides'
end
end

0 comments on commit 83ac15d

Please sign in to comment.