Permalink
Browse files

added heroku stuff

  • Loading branch information...
1 parent 218bf13 commit e5302a4a0e2b23211ca4c462c5bf4f92966fcad8 @CaDs committed Mar 22, 2013
Showing with 25 additions and 14 deletions.
  1. +10 −0 .gitignore
  2. +3 −7 Gemfile
  3. +4 −0 Gemfile.lock
  4. +2 −0 admin/app.rb
  5. +6 −7 config/database.rb
View
@@ -0,0 +1,10 @@
+.bundle
+vendor/bundle/*
+log/*.log
+log/
+tmp/**/*
+*.swp
+.DS_Store
+.svn
+.rvmrc
+.sass-cache
View
10 Gemfile
@@ -21,10 +21,6 @@ gem 'rack-test', :require => "rack/test", :group => "test"
# Padrino Stable Gem
gem 'padrino', '0.10.7'
-# 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.7'
-# end
+#Cache
+gem 'memcachier', :require => 'memcachier'
+gem 'dalli', :require => 'dalli'
View
@@ -15,6 +15,7 @@ GEM
arel (3.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.4)
+ dalli (2.6.2)
diff-lcs (1.2.1)
erubis (2.7.0)
http_router (0.10.2)
@@ -25,6 +26,7 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
+ memcachier (0.0.2)
mime-types (1.21)
multi_json (1.7.1)
mysql2 (0.3.11)
@@ -91,7 +93,9 @@ PLATFORMS
DEPENDENCIES
activerecord
bcrypt-ruby
+ dalli
erubis (~> 2.7.0)
+ memcachier
mysql2
padrino (= 0.10.7)
rack-test
View
@@ -2,9 +2,11 @@ class Admin < Padrino::Application
use ActiveRecord::ConnectionAdapters::ConnectionManagement
register Padrino::Rendering
register Padrino::Mailer
+ register Padrino::Cache
register Padrino::Helpers
register Padrino::Admin::AccessControl
+ set :cache, Padrino::Cache::Store::Memcache.new(::Dalli::Client.new)
##
# Application configuration options
#
View
@@ -1,3 +1,5 @@
+cleardb = URI.parse(ENV['DATABASE_URL'] || '')
+
ActiveRecord::Base.configurations[:development] = {
:adapter => 'mysql2',
:encoding => 'utf8',
@@ -15,13 +17,10 @@
:adapter => 'mysql2',
:encoding => 'utf8',
:reconnect => true,
- :database => 'tokyo_project_production',
- :pool => 5,
- :username => 'root',
- :password => '',
- :host => 'localhost',
- :socket => '/tmp/mysql.sock'
-
+ :database => cleardb.path[1..-1],
+ :username => cleardb.user,
+ :password => cleardb.password,
+ :host => cleardb.host
}
ActiveRecord::Base.configurations[:test] = {

0 comments on commit e5302a4

Please sign in to comment.