Sha256: 0561bdc9f5105ee61edc1618eb3b26527295597437c755f193d3130c0706f4ba

Contents?: true

Size: 1.01 KB

Versions: 17

Compression:

Stored size: 1.01 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}/spec.db"

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

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

  Dir.glob('../app/helpers/*.rb')     { |h| require h.chomp }
  Dir.glob('../app/models/*.rb')      { |m| require m.chomp }
  Dir.glob('../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/spec/spec.rb
gennaro-0.3.6.4 templates/authentication/spec/spec.rb
gennaro-0.3.6.3 templates/authentication/spec/spec.rb
gennaro-0.3.6.2 templates/authentication/spec/spec.rb
gennaro-0.3.6.1 templates/authentication/spec/spec.rb
gennaro-0.3.6 templates/authentication/spec/spec.rb
gennaro-0.3.5 templates/authentication/spec/spec.rb
gennaro-0.3.4.2 templates/authentication/spec/spec.rb
gennaro-0.3.4.1 templates/authentication/spec/spec.rb
gennaro-0.3.4 templates/authentication/spec/spec.rb
gennaro-0.3.3 templates/authentication/spec/spec.rb
gennaro-0.3.2.3 templates/authentication/spec/spec.rb
gennaro-0.3.2.2 templates/authentication/spec/spec.rb
gennaro-0.3.2.1 templates/authentication/spec/spec.rb
gennaro-0.3.2 templates/authentication/spec/spec.rb
gennaro-0.3.1.3 templates/authentication/spec/spec.rb
gennaro-0.3.1.2 templates/authentication/spec/spec.rb