Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
stefl committed Jun 26, 2012
0 parents commit af4e69d
Show file tree
Hide file tree
Showing 24 changed files with 1,278 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .components
@@ -0,0 +1,7 @@
---
:orm: mongoid
:test: none
:mock: none
:script: none
:renderer: haml
:stylesheet: none
7 changes: 7 additions & 0 deletions .gitignore
@@ -0,0 +1,7 @@
.DS_Store
log/**/*
tmp/**/*
bin/*
vendor/gems/*
!vendor/gems/cache/
.sass-cache/*
35 changes: 35 additions & 0 deletions Gemfile
@@ -0,0 +1,35 @@
source :rubygems

# Server requirements (defaults to WEBrick)
# gem 'thin'
# gem 'mongrel'

# Project requirements
gem 'rake'
gem 'sinatra-flash', :require => 'sinatra/flash'
gem 'activerecord', "3.1.5"
gem 'activemodel', "3.1.5"
gem 'activesupport', "3.1.5"

# Component requirements
gem 'haml'
gem 'mongoid'
gem 'bson_ext', :require => "mongo"

# Test requirements

# Padrino Stable Gem
gem "compass", "0.12.2.rc.0"
gem "susy", "1.0.rc.0"
gem 'padrino', '0.10.5'
gem 'unicorn'
gem 'maruku'
gem 'hashie'

# Or Padrino Edge
# gem 'padrino', :git => 'git://github.com/padrino/padrino-framework.git'

# Or Individual Gems
# %w(core gen helpers cache mailer admin).each do |g|
# gem 'padrino-' + g, '0.10.5'
# end
126 changes: 126 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,126 @@
GEM
remote: http://rubygems.org/
specs:
activemodel (3.1.5)
activesupport (= 3.1.5)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.5)
activemodel (= 3.1.5)
activesupport (= 3.1.5)
arel (~> 2.2.3)
tzinfo (~> 0.3.29)
activesupport (3.1.5)
multi_json (>= 1.0, < 1.3)
arel (2.2.3)
bson (1.6.4)
bson_ext (1.6.4)
bson (~> 1.6.4)
builder (3.0.0)
chunky_png (1.2.5)
compass (0.12.2.rc.0)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
diff-lcs (1.1.3)
fssm (0.2.9)
grit (2.4.1)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
haml (3.1.6)
hashie (1.2.0)
http_router (0.10.2)
rack (>= 1.0.0)
url_mount (~> 0.2.1)
i18n (0.6.0)
kgio (2.7.4)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
maruku (0.6.0)
syntax (>= 1.0.0)
mime-types (1.18)
mongo (1.6.2)
bson (~> 1.6.2)
mongoid (2.4.11)
activemodel (~> 3.1)
mongo (<= 1.6.2)
tzinfo (~> 0.3.22)
multi_json (1.2.0)
padrino (0.10.5)
padrino-admin (= 0.10.5)
padrino-cache (= 0.10.5)
padrino-core (= 0.10.5)
padrino-gen (= 0.10.5)
padrino-helpers (= 0.10.5)
padrino-mailer (= 0.10.5)
padrino-admin (0.10.5)
padrino-core (= 0.10.5)
padrino-helpers (= 0.10.5)
padrino-cache (0.10.5)
padrino-core (= 0.10.5)
padrino-core (0.10.5)
activesupport (~> 3.1.0)
http_router (~> 0.10.2)
sinatra (~> 1.3.1)
thor (~> 0.14.3)
tilt (~> 1.3.0)
padrino-gen (0.10.5)
bundler (~> 1.0)
grit (~> 2.4.1)
padrino-core (= 0.10.5)
padrino-helpers (0.10.5)
i18n (~> 0.6)
padrino-core (= 0.10.5)
padrino-mailer (0.10.5)
mail (~> 2.3.0)
padrino-core (= 0.10.5)
polyglot (0.3.3)
rack (1.4.1)
rack-protection (1.2.0)
rack
raindrops (0.9.0)
rake (0.9.2.2)
sass (3.2.0.alpha.244)
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
sinatra-flash (0.3.0)
sinatra (>= 1.0.0)
susy (1.0.rc.0)
compass (>= 0.12.2.rc.0)
sass (>= 3.2.0.alpha.237)
syntax (1.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
unicorn (4.3.1)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
url_mount (0.2.1)
rack

PLATFORMS
ruby

DEPENDENCIES
activemodel (= 3.1.5)
activerecord (= 3.1.5)
activesupport (= 3.1.5)
bson_ext
compass (= 0.12.2.rc.0)
haml
hashie
maruku
mongoid
padrino (= 0.10.5)
rake
sinatra-flash
susy (= 1.0.rc.0)
unicorn
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: bundle exec unicorn -p $PORT -c ./unicorn.rb
59 changes: 59 additions & 0 deletions app/app.rb
@@ -0,0 +1,59 @@
class LockIn < Padrino::Application
register Padrino::Rendering
register Padrino::Mailer
register Padrino::Helpers

enable :sessions

##
# Caching support
#
# register Padrino::Cache
# enable :caching
#
# You can customize caching store engines:
#
# set :cache, Padrino::Cache::Store::Memcache.new(::Memcached.new('127.0.0.1:11211', :exception_retry_limit => 1))
# set :cache, Padrino::Cache::Store::Memcache.new(::Dalli::Client.new('127.0.0.1:11211', :exception_retry_limit => 1))
# set :cache, Padrino::Cache::Store::Redis.new(::Redis.new(:host => '127.0.0.1', :port => 6379, :db => 0))
# set :cache, Padrino::Cache::Store::Memory.new(50)
# set :cache, Padrino::Cache::Store::File.new(Padrino.root('tmp', app_name.to_s, 'cache')) # default choice
#

##
# Application configuration options
#
# set :raise_errors, true # Raise exceptions (will stop application) (default for test)
# set :dump_errors, true # Exception backtraces are written to STDERR (default for production/development)
# set :show_exceptions, true # Shows a stack trace in browser (default for development)
# set :logging, true # Logging in STDOUT for development and file for production (default only for development)
# set :public_folder, "foo/bar" # Location for static assets (default root/public)
# set :reload, false # Reload application files (default in development)
# set :default_builder, "foo" # Set a custom form builder (default 'StandardFormBuilder')
# set :locale_path, "bar" # Set path for I18n translations (default your_app/locales)
# disable :sessions # Disabled sessions by default (enable if needed)
# disable :flash # Disables sinatra-flash (enabled by default if Sinatra::Flash is defined)
# layout :my_layout # Layout can be in views/layouts/foo.ext or views/foo.ext (default :application)
#

##
# You can configure for a specified environment like:
#
# configure :development do
# set :foo, :bar
# disable :asset_stamp # no asset timestamping for dev
# end
#

##
# You can manage errors like:
#
# error 404 do
# render 'errors/404'
# end
#
# error 505 do
# render 'errors/505'
# end
#
end
7 changes: 7 additions & 0 deletions app/controllers/events.rb
@@ -0,0 +1,7 @@
LockIn.controllers :events do
get :now_or_next, :map => "/" do
@event = Event.all.last
render :"events/next"
end

end
3 changes: 3 additions & 0 deletions app/controllers/responses.rb
@@ -0,0 +1,3 @@
LockIn.controllers :responses do

end
7 changes: 7 additions & 0 deletions app/helpers/events_helper.rb
@@ -0,0 +1,7 @@
# Helper methods defined here can be accessed in any controller or view in the application

LockIn.helpers do
# def simple_helper_method
# ...
# end
end
7 changes: 7 additions & 0 deletions app/helpers/responses_helper.rb
@@ -0,0 +1,7 @@
# Helper methods defined here can be accessed in any controller or view in the application

LockIn.helpers do
# def simple_helper_method
# ...
# end
end

0 comments on commit af4e69d

Please sign in to comment.