sheatsb (owner)

Revisions

gist: 109672 Download_button fork
public
Public Clone URL: git://gist.github.com/109672.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Template created by You've Got Rails (http://www.youvegotrails.com)
 
gem 'sqlite3-ruby', :lib => 'sqlite3'
gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
gem 'activemerchant', :lib => 'active_merchant'
gem 'aws-s3', :lib => 'aws/s3'
gem 'fastercsv'
gem 'hpricot', :source => 'http://code.whytheluckystiff.net'
gem 'thoughtbot-shoulda', :lib => 'shoulda', :source => 'http://gems.github.com'
gem 'RedCloth', :lib => 'redcloth'
plugin 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git'
plugin 'exception_notifier', :git => 'git://github.com/rails/exception_notification.git'
plugin 'role_requirement', :git => 'git://github.com/timcharper/role_requirement.git'
plugin 'authlogic', :git => 'git://github.com/binarylogic/authlogic.git'
plugin 'ssl_requirement', :git => 'git://github.com/rails/ssl_requirement.git'
# Install gems on local system
 
rake('gems:install', :sudo => true) if yes?('Install gems on local system? (y/n)')
 
 
 
 
# Use database (active record) session store
 
rake('db:sessions:create')
 
initializer 'session_store.rb', <<-FILE
 
ActionController::Base.session = { :session_key => '_#{(1..6).map { |x| (65 + rand(26)).chr }.join}_session', :secret => '#{(1..40).map { |x| (65 + rand(26)).chr }.join}' }
 
ActionController::Base.session_store = :active_record_store
 
FILE
 
 
# Generate roles for User
 
generate("roles", "Role User")
 
 
 
 
# Create .gitignore file
 
file '.gitignore', <<-FILE
 
.DS_Store
 
log/*.log
 
tmp/**/*
 
config/database.yml
 
db/*.sqlite3
 
FILE
 
 
 
# Set up git repository
 
git :init
 
git :add => '.'