Skip to content

Commit

Permalink
Merge branch 'master' into heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
natew committed Mar 27, 2012
2 parents f1c02e3 + a1dc5ee commit 93bbe0b
Show file tree
Hide file tree
Showing 7 changed files with 210 additions and 47 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -4,8 +4,11 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global

# Ignore bundler config
# Ignore bundler cruft
/.bundle
/vendor/ruby
/vendor/cache
/bin/

# Ignore the default SQLite database.
/db/*.sqlite3
Expand All @@ -14,4 +17,5 @@
/log/*.log
/tmp


deploy.rb
48 changes: 48 additions & 0 deletions .rvmrc
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory

# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
# Only full ruby name is supported here, for short names use:
# echo "rvm use 1.9.3" > .rvmrc
environment_id="ruby-1.9.3-p0@obtvse"

# Uncomment the following lines if you want to verify rvm version per project
# rvmrc_rvm_version="1.10.3" # 1.10.1 seams as a safe start
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
# return 1
# }

# First we attempt to load the desired environment directly from the environment
# file. This is very fast and efficient compared to running through the entire
# CLI and selector. If you want feedback on which environment was used then
# insert the word 'use' after --create as this triggers verbose mode.
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
then
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
else
# If the environment file has not yet been created, use the RVM CLI to select.
rvm --create "$environment_id" || {
echo "Failed to create RVM environment '${environment_id}'."
return 1
}
fi

# If you use bundler, this might be useful to you:
# if [[ -s Gemfile ]] && {
# ! builtin command -v bundle >/dev/null ||
# builtin command -v bundle | grep $rvm_path/bin/bundle >/dev/null
# }
# then
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
# gem install bundler
# fi
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
# then
# bundle install | grep -vE '^Using|Your bundle is complete'
# fi
52 changes: 38 additions & 14 deletions Gemfile
@@ -1,27 +1,51 @@
source 'https://rubygems.org'

gem 'rails', '3.2.0'
gem 'rails', '~> 3'

# Extention libraries
gem 'thin', '~> 1'

# Rendering engines and vendor libraries
gem 'jquery-rails', '~> 2'
gem 'rdiscount'
gem 'stringex', :git => 'git://github.com/rsl/stringex.git'
gem 'kaminari'
gem 'dalli'

group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'uglifier', '>= 1.0.3'
# Misc libraries
# gem 'bcrypt-ruby', '~> 3', require: 'bcrypt'
gem 'stringex', '~> 1', git: 'git://github.com/rsl/stringex.git'
gem 'kaminari', '~> 0.13'

group :production do
# gem 'newrelic_rpm', '~> 3'
# gem 'dalli', '~> 1'
gem 'pg', '~> 0.13'
end

group :development do
gem 'capistrano'
gem 'sqlite3'
end
# gem 'heroku', '~> 2'
# gem 'capistrano', '~> '
gem 'guard', '~> 1'
gem 'guard-rspec', '~> 0.6'
gem 'guard-spork', '~> 0.5'

group :production do
gem 'pg'
gem 'rails_best_practices', '~> 1'
end

group :test do
gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
gem 'capybara', '~> 1'
gem 'spork', '~> 0.9'
gem 'database_cleaner', '~> 0.7'
end

group :development, :test do
gem 'foreman', '~> 0.40'
gem 'sqlite3', '~> 1', platform: [:ruby, :mswin, :mingw]
gem 'rspec-rails', '~> 2'
gem 'faker', '~> 1'
gem 'factory_girl_rails', '~> 1'
end

gem 'jquery-rails'
group :assets do
gem 'sass-rails', '~> 3'
gem 'coffee-rails', '~> 3'
gem 'uglifier', '~> 1'
end
140 changes: 113 additions & 27 deletions Gemfile.lock
Expand Up @@ -36,17 +36,51 @@ GEM
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.0)
capistrano (2.9.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
dalli (1.1.5)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.1)
ffi (~> 1.0.6)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
colored (1.2)
daemons (1.1.8)
database_cleaner (0.7.2)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.3.0)
multi_json (~> 1.0)
highline (1.6.11)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
railties (>= 3.0.0)
faker (1.0.1)
i18n (~> 0.4)
ffi (1.0.11)
foreman (0.41.0)
thor (>= 0.13.6)
foreman (0.41.0-x86-mingw32)
thor (>= 0.13.6)
win32console (~> 1.3.0)
guard (1.0.1)
ffi (>= 0.5.0)
thor (~> 0.14.6)
guard-rspec (0.6.0)
guard (>= 0.10.0)
guard-spork (0.5.2)
guard (>= 0.10.0)
spork (>= 0.8.4)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
Expand All @@ -64,16 +98,12 @@ GEM
treetop (~> 1.4.8)
mime-types (1.18)
multi_json (1.1.0)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.3.0)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
pg (0.12.2)
pg (0.12.2-x86-mingw32)
nokogiri (1.5.2)
nokogiri (1.5.2-x86-mingw32)
pg (0.13.2)
pg (0.13.2-x86-mingw32)
polyglot (0.3.3)
progressbar (0.10.0)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
Expand All @@ -89,6 +119,13 @@ GEM
activesupport (= 3.2.0)
bundler (~> 1.0)
railties (= 3.2.0)
rails_best_practices (1.9.0)
activesupport
colored
erubis
i18n
progressbar
sexp_processor
railties (3.2.0)
actionpack (= 3.2.0)
activesupport (= 3.2.0)
Expand All @@ -100,17 +137,44 @@ GEM
rdiscount (1.6.8)
rdoc (3.12)
json (~> 1.4)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.9.0)
rubyzip (0.9.6.1)
sass (3.1.15)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.20.0)
childprocess (>= 0.2.5)
ffi (~> 1.0)
multi_json (~> 1.0)
rubyzip
sexp_processor (3.1.0)
spork (0.9.0)
spork (0.9.0-x86-mingw32)
win32-process
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
sqlite3 (1.3.5-x86-mingw32)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
Expand All @@ -120,20 +184,42 @@ GEM
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
win32-api (1.4.8-x86-mingw32)
win32-process (0.6.5)
windows-pr (>= 1.1.2)
win32console (1.3.0-x86-mingw32)
windows-api (0.4.1)
win32-api (>= 1.4.5)
windows-pr (1.2.1)
win32-api (>= 1.4.5)
windows-api (>= 0.3.0)
xpath (0.1.4)
nokogiri (~> 1.3)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
capistrano
dalli
jquery-rails
kaminari
pg
rails (= 3.2.0)
capybara (~> 1)
coffee-rails (~> 3)
database_cleaner (~> 0.7)
factory_girl_rails (~> 1)
faker (~> 1)
foreman (~> 0.40)
guard (~> 1)
guard-rspec (~> 0.6)
guard-spork (~> 0.5)
jquery-rails (~> 2)
kaminari (~> 0.13)
pg (~> 0.13)
rails (~> 3)
rails_best_practices (~> 1)
rdiscount
sass-rails (~> 3.2.3)
sqlite3
stringex!
uglifier (>= 1.0.3)
rspec-rails (~> 2)
sass-rails (~> 3)
spork (~> 0.9)
sqlite3 (~> 1)
stringex (~> 1)!
thin (~> 1)
uglifier (~> 1)
2 changes: 1 addition & 1 deletion config/environments/production.rb
Expand Up @@ -40,7 +40,7 @@
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

# Use a different cache store in production
config.cache_store = :dalli_store
# config.cache_store = :dalli_store

# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
Expand Down
8 changes: 4 additions & 4 deletions config/initializers/session_store.rb
Expand Up @@ -7,7 +7,7 @@
# (create the session table with "rails generate session_migration")
Obtvse::Application.config.session_store :active_record_store

if Rails.env.production?
require 'action_dispatch/middleware/session/dalli_store'
Rails.application.config.session_store :dalli_store, :memcache_server => ['host1', 'host2'], :namespace => 'sessions', :key => '_foundation_session', :expire_after => 31.days
end
# if Rails.env.production?
# require 'action_dispatch/middleware/session/dalli_store'
# Rails.application.config.session_store :dalli_store, :memcache_server => ['host1', 'host2'], :namespace => 'sessions', :key => '_foundation_session', :expire_after => 31.days
# end
1 change: 1 addition & 0 deletions db/schema.rb
@@ -1,3 +1,4 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
Expand Down

0 comments on commit 93bbe0b

Please sign in to comment.