Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ gem 'starter_generators'

gem 'kaminari'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
Expand Down Expand Up @@ -48,3 +46,13 @@ gem 'bcrypt-ruby', '~> 3.0.0'

# Use debugger
# gem 'debugger', group: [:development, :test]

group :production do
gem 'pg'
gem 'rails_12factor'
end

group :development do
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
end
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ GEM
mime-types (1.23)
minitest (4.7.5)
multi_json (1.7.7)
pg (0.16.0)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
Expand All @@ -69,6 +70,11 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.0)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.1)
railties (4.0.0)
actionpack (= 4.0.0)
activesupport (= 4.0.0)
Expand Down Expand Up @@ -119,7 +125,9 @@ DEPENDENCIES
jbuilder (~> 1.2)
jquery-rails
kaminari
pg
rails (= 4.0.0)
rails_12factor
sass-rails (~> 4.0.0)
sdoc
sqlite3
Expand Down
1 change: 1 addition & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
== README
Vince has arrived

This README would normally document whatever steps are necessary to get the
application up and running.
Expand Down
10 changes: 10 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,14 @@ def current_user
end

helper_method :current_user
before_filter :authenticate

def authenticate
if Rails.env.staging?
authenticate_or_request_with_http_basic do |username, password|
username == ENV["HTTP_USERNAME"] && password == ENV["HTTP_PASSWORD"]
end
end
end

end