1
0
Fork 0
forked from OpenNeo/impress

support concurrent requests. now demands thin and nginx, but hey. it works

This commit is contained in:
Emi Matchu 2010-10-10 18:46:58 -04:00
parent 60f3d237e8
commit e85c50bf62
11 changed files with 100 additions and 43 deletions

22
Gemfile
View file

@ -1,7 +1,23 @@
source 'http://rubygems.org' source 'http://rubygems.org'
gem 'rails', '3.0.0' gem 'rails', '3.0.0'
gem 'sqlite3-ruby', '~> 1.3.1', :require => 'sqlite3' #gem 'sqlite3-ruby', '~> 1.3.1', :require => 'sqlite3'
# async wrappers
gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git'
gem 'rack-fiber_pool', :require => 'rack/fiber_pool'
gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git', :require => [
'em-synchrony',
'em-synchrony/em-http'
]
# async activerecord requires
gem 'mysqlplus', :git => 'git://github.com/oldmoe/mysqlplus.git', :require => 'mysqlplus'
gem 'em-mysqlplus', :git => 'git://github.com/igrigorik/em-mysqlplus.git', :require => 'em-activerecord'
# async http requires
gem 'em-http-request',:git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http'
gem 'addressable', :require => 'addressable/uri'
gem 'compass', '~> 0.10.1' gem 'compass', '~> 0.10.1'
gem 'haml', '~> 3.0.18' gem 'haml', '~> 3.0.18'
@ -9,10 +25,6 @@ gem 'rdiscount', '~> 1.6.5'
gem 'RocketAMF', '~> 0.2.1' gem 'RocketAMF', '~> 0.2.1'
gem 'will_paginate', '~> 3.0.pre2' gem 'will_paginate', '~> 3.0.pre2'
group :development do
gem 'mysql'
end
group :test do group :test do
gem 'factory_girl_rails', '~> 1.0' gem 'factory_girl_rails', '~> 1.0'
gem 'rspec-rails', '~> 2.0.0.beta.22' gem 'rspec-rails', '~> 2.0.0.beta.22'

View file

@ -1,3 +1,37 @@
GIT
remote: git://github.com/eventmachine/eventmachine.git
revision: 704fbf62677d21b91d0051a04554d4b27eecee2e
specs:
eventmachine (0.12.11)
GIT
remote: git://github.com/igrigorik/em-http-request.git
revision: f069bb9b68335496c8f32475b79e448847befdae
specs:
em-http-request (0.2.14)
addressable (>= 2.0.0)
eventmachine (>= 0.12.9)
GIT
remote: git://github.com/igrigorik/em-mysqlplus.git
revision: db0feabdc0117ca5e97df35f259e76a4d9ba8a60
specs:
em-mysqlplus (0.1.5)
eventmachine (>= 0.12.9)
GIT
remote: git://github.com/igrigorik/em-synchrony.git
revision: 31ae2eabdd630e9b3382e33b8054676ca5450528
specs:
em-synchrony (0.1.5)
eventmachine (>= 0.12.9)
GIT
remote: git://github.com/oldmoe/mysqlplus.git
revision: 2daef86c487ec1c531ecfe84ed342d15a1c89554
specs:
mysqlplus (0.1.1)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
@ -29,6 +63,7 @@ GEM
activemodel (= 3.0.0) activemodel (= 3.0.0)
activesupport (= 3.0.0) activesupport (= 3.0.0)
activesupport (3.0.0) activesupport (3.0.0)
addressable (2.2.1)
arel (1.0.1) arel (1.0.1)
activesupport (~> 3.0.0) activesupport (~> 3.0.0)
builder (2.1.2) builder (2.1.2)
@ -48,9 +83,9 @@ GEM
mime-types mime-types
treetop (>= 1.4.5) treetop (>= 1.4.5)
mime-types (1.16) mime-types (1.16)
mysql (2.8.1)
polyglot (0.3.1) polyglot (0.3.1)
rack (1.2.1) rack (1.2.1)
rack-fiber_pool (0.9.0)
rack-mount (0.6.13) rack-mount (0.6.13)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (0.5.6) rack-test (0.5.6)
@ -82,7 +117,6 @@ GEM
rspec-expectations (= 2.0.0.beta.22) rspec-expectations (= 2.0.0.beta.22)
rspec-rails (2.0.0.beta.22) rspec-rails (2.0.0.beta.22)
rspec (= 2.0.0.beta.22) rspec (= 2.0.0.beta.22)
sqlite3-ruby (1.3.1)
thor (0.14.2) thor (0.14.2)
treetop (1.4.8) treetop (1.4.8)
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
@ -94,12 +128,17 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
RocketAMF (~> 0.2.1) RocketAMF (~> 0.2.1)
addressable
compass (~> 0.10.1) compass (~> 0.10.1)
em-http-request!
em-mysqlplus!
em-synchrony!
eventmachine!
factory_girl_rails (~> 1.0) factory_girl_rails (~> 1.0)
haml (~> 3.0.18) haml (~> 3.0.18)
mysql mysqlplus!
rack-fiber_pool
rails (= 3.0.0) rails (= 3.0.0)
rdiscount (~> 1.6.5) rdiscount (~> 1.6.5)
rspec-rails (~> 2.0.0.beta.22) rspec-rails (~> 2.0.0.beta.22)
sqlite3-ruby (~> 1.3.1)
will_paginate (~> 3.0.pre2) will_paginate (~> 3.0.pre2)

View file

@ -1,4 +1,6 @@
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)
use Rack::FiberPool
run OpenneoImpressItems::Application run OpenneoImpressItems::Application

View file

@ -18,6 +18,10 @@ OpenneoImpressItems::Application.configure do
config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log config.active_support.deprecation = :log
config.serve_static_assets = true
config.threadsafe!
end end
RemoteImpressHost = 'beta.impress.openneo.net' RemoteImpressHost = 'beta.impress.openneo.net'

View file

@ -29,7 +29,7 @@ OpenneoImpressItems::Application.configure do
# Disable Rails's static asset server # Disable Rails's static asset server
# In production, Apache or nginx will already do this # In production, Apache or nginx will already do this
config.serve_static_assets = false config.serve_static_assets = true
# Enable serving of images, stylesheets, and javascripts from an asset server # Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com" # config.action_controller.asset_host = "http://assets.example.com"
@ -38,7 +38,7 @@ OpenneoImpressItems::Application.configure do
# config.action_mailer.raise_delivery_errors = false # config.action_mailer.raise_delivery_errors = false
# Enable threaded mode # Enable threaded mode
# config.threadsafe! config.threadsafe!
config.active_support.deprecation = :log config.active_support.deprecation = :log
end end

View file

@ -2,87 +2,87 @@
body.bp { body.bp {
text-align: center; text-align: center;
} }
/* line 48, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 48, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
* html body.bp legend { * html body.bp legend {
margin: 0px -8px 16px 0; margin: 0px -8px 16px 0;
padding: 0; padding: 0;
} }
/* line 52, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 52, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
html > body.bp p code { html > body.bp p code {
*white-space: normal; *white-space: normal;
} }
/* line 67, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 67, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp .container { body.bp .container {
text-align: left; text-align: left;
} }
/* line 69, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 69, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp sup { body.bp sup {
vertical-align: text-top; vertical-align: text-top;
} }
/* line 71, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 71, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp sub { body.bp sub {
vertical-align: text-bottom; vertical-align: text-bottom;
} }
/* line 73, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 73, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp hr { body.bp hr {
margin: -8px auto 11px; margin: -8px auto 11px;
} }
/* line 75, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 75, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp img { body.bp img {
-ms-interpolation-mode: bicubic; -ms-interpolation-mode: bicubic;
} }
/* line 77, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 77, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp fieldset { body.bp fieldset {
padding-top: 0; padding-top: 0;
} }
/* line 79, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 79, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp textarea { body.bp textarea {
overflow: auto; overflow: auto;
} }
/* line 82, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 82, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp input.text { body.bp input.text {
margin: 0.5em 0; margin: 0.5em 0;
background-color: white; background-color: white;
border: 1px solid #bbbbbb; border: 1px solid #bbbbbb;
} }
/* line 86, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 86, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp input.text:focus { body.bp input.text:focus {
border: 1px solid #666666; border: 1px solid #666666;
} }
/* line 88, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 88, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp input.title { body.bp input.title {
margin: 0.5em 0; margin: 0.5em 0;
background-color: white; background-color: white;
border: 1px solid #bbbbbb; border: 1px solid #bbbbbb;
} }
/* line 92, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 92, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp input.title:focus { body.bp input.title:focus {
border: 1px solid #666666; border: 1px solid #666666;
} }
/* line 94, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 94, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp input.checkbox { body.bp input.checkbox {
position: relative; position: relative;
top: 0.25em; top: 0.25em;
} }
/* line 97, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 97, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp input.radio { body.bp input.radio {
position: relative; position: relative;
top: 0.25em; top: 0.25em;
} }
/* line 100, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 100, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp input.button { body.bp input.button {
position: relative; position: relative;
top: 0.25em; top: 0.25em;
} }
/* line 103, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 103, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp textarea { body.bp textarea {
margin: 0.5em 0; margin: 0.5em 0;
} }
/* line 105, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 105, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp select { body.bp select {
margin: 0.5em 0; margin: 0.5em 0;
} }
/* line 107, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */ /* line 107, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_ie.scss */
body.bp button { body.bp button {
position: relative; position: relative;
top: 0.25em; top: 0.25em;

View file

@ -6,11 +6,11 @@ body.bp {
background: none; background: none;
font-size: 10pt; font-size: 10pt;
} }
/* line 52, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 52, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp .container { body.bp .container {
background: none; background: none;
} }
/* line 54, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 54, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp hr { body.bp hr {
background: #cccccc; background: #cccccc;
color: #cccccc; color: #cccccc;
@ -20,54 +20,54 @@ body.bp hr {
padding: 0; padding: 0;
border: none; border: none;
} }
/* line 62, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 62, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp hr.space { body.bp hr.space {
background: white; background: white;
color: white; color: white;
} }
/* line 65, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 65, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp h1, body.bp h2, body.bp h3, body.bp h4, body.bp h5, body.bp h6 { body.bp h1, body.bp h2, body.bp h3, body.bp h4, body.bp h5, body.bp h6 {
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
} }
/* line 67, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 67, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp code { body.bp code {
font-size: 0.9em; font-size: 0.9em;
font-family: "andale mono", "lucida console", monospace; font-family: "andale mono", "lucida console", monospace;
} }
/* line 72, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 72, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp a img { body.bp a img {
border: none; border: none;
} }
/* line 75, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 75, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp a:link, body.bp a:visited { body.bp a:link, body.bp a:visited {
background: transparent; background: transparent;
font-weight: 700; font-weight: 700;
text-decoration: underline; text-decoration: underline;
} }
/* line 79, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 79, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp p img.top { body.bp p img.top {
margin-top: 0; margin-top: 0;
} }
/* line 81, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 81, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp blockquote { body.bp blockquote {
margin: 1.5em; margin: 1.5em;
padding: 1em; padding: 1em;
font-style: italic; font-style: italic;
font-size: 0.9em; font-size: 0.9em;
} }
/* line 86, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 86, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp .small { body.bp .small {
font-size: 0.9em; font-size: 0.9em;
} }
/* line 88, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 88, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp .large { body.bp .large {
font-size: 1.1em; font-size: 1.1em;
} }
/* line 90, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 90, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp .quiet { body.bp .quiet {
color: #999999; color: #999999;
} }
/* line 92, ../../../../../.rvm/gems/ruby-1.9.2-preview3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */ /* line 92, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body.bp .hide { body.bp .hide {
display: none; display: none;
} }

BIN
vendor/cache/addressable-2.2.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-fiber_pool-0.9.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.