Sha256: 990e943f08c97d7928ed43e0636171e5141663990e05556189a3016b24c4eb42

Contents?: true

Size: 1.03 KB

Versions: 17

Compression:

Stored size: 1.03 KB

Contents

#--
#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
#                    Version 2, December 2004
#
#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
#   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#
#  0. You just DO WHAT THE FUCK YOU WANT TO.
#++

require 'sinatra/base'
require 'bcrypt'
require 'data_mapper'
require 'dm-sqlite-adapter'
require 'rack/csrf'

class ${ClassName} < Sinatra::Base
  db_path = File.join Dir.pwd, 'db'
  Dir.mkdir db_path unless Dir.exists? db_path
  DataMapper.setup :default, "sqlite3://#{db_path}/app.db"

  configure {
    use Rack::Session::Cookie,
      :path   => '/',
      :secret => '${GenerateString}'

    use Rack::Csrf,
      :raise => true,
      :field => '_csrf'
  }

  Dir.glob("#{Dir.pwd}/app/helpers/*.rb")     { |h| require h.chomp }
  Dir.glob("#{Dir.pwd}/app/models/*.rb")      { |m| require m.chomp }
  Dir.glob("#{Dir.pwd}/app/controllers/*.rb") { |c| require c.chomp }

  DataMapper.finalize
  DataMapper.auto_upgrade!
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
gennaro-0.3.6.5 templates/authentication/_class_name_.rb
gennaro-0.3.6.4 templates/authentication/_class_name_.rb
gennaro-0.3.6.3 templates/authentication/_class_name_.rb
gennaro-0.3.6.2 templates/authentication/_class_name_.rb
gennaro-0.3.6.1 templates/authentication/_class_name_.rb
gennaro-0.3.6 templates/authentication/_class_name_.rb
gennaro-0.3.5 templates/authentication/_class_name_.rb
gennaro-0.3.4.2 templates/authentication/_class_name_.rb
gennaro-0.3.4.1 templates/authentication/_class_name_.rb
gennaro-0.3.4 templates/authentication/_class_name_.rb
gennaro-0.3.3 templates/authentication/_class_name_.rb
gennaro-0.3.2.3 templates/authentication/_class_name_.rb
gennaro-0.3.2.2 templates/authentication/_class_name_.rb
gennaro-0.3.2.1 templates/authentication/_class_name_.rb
gennaro-0.3.2 templates/authentication/_class_name_.rb
gennaro-0.3.1.3 templates/authentication/_class_name_.rb
gennaro-0.3.1.2 templates/authentication/_class_name_.rb