-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit, blank Sinatra application
- Loading branch information
0 parents
commit 83ac15d
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
tmp/**/* | ||
config/config.rb | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'http://rubygems.org' | ||
|
||
gem 'rake' | ||
gem 'sinatra' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require ::File.expand_path('../application', __FILE__) | ||
run RubyonrailsCz::Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |