Commit cc2c96240cc11a76d027998d4f30b90ea1aa4d47
1 parent
043bbbd1
Exists in
staging
and in
4 other branches
rails3: fix grape initialization
Showing
3 changed files
with
6 additions
and
8 deletions
Show diff stats
Gemfile
| @@ -15,6 +15,7 @@ gem 'thin' | @@ -15,6 +15,7 @@ gem 'thin' | ||
| 15 | gem 'hpricot' | 15 | gem 'hpricot' |
| 16 | gem 'nokogiri' | 16 | gem 'nokogiri' |
| 17 | gem 'rake', :require => false | 17 | gem 'rake', :require => false |
| 18 | +gem 'grape', '0.2.1' | ||
| 18 | 19 | ||
| 19 | # FIXME list here all actual dependencies (i.e. the ones in debian/control), | 20 | # FIXME list here all actual dependencies (i.e. the ones in debian/control), |
| 20 | # with their GEM names (not the Debian package names) | 21 | # with their GEM names (not the Debian package names) |
app/models/comment.rb
| @@ -21,12 +21,12 @@ class Comment < ActiveRecord::Base | @@ -21,12 +21,12 @@ class Comment < ActiveRecord::Base | ||
| 21 | scope :without_reply, :conditions => ['reply_of_id IS NULL'] | 21 | scope :without_reply, :conditions => ['reply_of_id IS NULL'] |
| 22 | 22 | ||
| 23 | #FIXME make this test | 23 | #FIXME make this test |
| 24 | - named_scope :newer_than, lambda { |reference_id| | 24 | + scope :newer_than, lambda { |reference_id| |
| 25 | {:conditions => ["comments.id > #{reference_id}"]} | 25 | {:conditions => ["comments.id > #{reference_id}"]} |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | #FIXME make this test | 28 | #FIXME make this test |
| 29 | - named_scope :older_than, lambda { |reference_id| | 29 | + scope :older_than, lambda { |reference_id| |
| 30 | {:conditions => ["comments.id < #{reference_id}"]} | 30 | {:conditions => ["comments.id < #{reference_id}"]} |
| 31 | } | 31 | } |
| 32 | 32 |
config.ru
| 1 | # This file is used by Rack-based servers to start the application. | 1 | # This file is used by Rack-based servers to start the application. |
| 2 | 2 | ||
| 3 | require ::File.expand_path('../config/environment', __FILE__) | 3 | require ::File.expand_path('../config/environment', __FILE__) |
| 4 | -run Noosfero::Application | ||
| 5 | 4 | ||
| 6 | rails_app = Rack::Builder.new do | 5 | rails_app = Rack::Builder.new do |
| 7 | - use Rails::Rack::LogTailer | ||
| 8 | - use Rails::Rack::Static | ||
| 9 | - run ActionController::Dispatcher.new | 6 | + run Noosfero::Application |
| 10 | end | 7 | end |
| 11 | - | 8 | + |
| 12 | run Rack::Cascade.new([ | 9 | run Rack::Cascade.new([ |
| 13 | API::API, | 10 | API::API, |
| 14 | rails_app | 11 | rails_app |
| 15 | -]) | ||
| 16 | \ No newline at end of file | 12 | \ No newline at end of file |
| 13 | +]) |