Commit 5f38014ae2c5f075b7edc0d52b92e68afa89ff0f

Authored by Victor Costa
Committed by Rodrigo Souto
1 parent b223ac66

rails3: fix grape initialization

Showing 3 changed files with 8 additions and 6 deletions   Show diff stats
@@ -19,6 +19,10 @@ gem 'gettext', '~> 2.2.1', :require => false @@ -19,6 +19,10 @@ gem 'gettext', '~> 2.2.1', :require => false
19 gem 'locale', '~> 2.0.5' 19 gem 'locale', '~> 2.0.5'
20 gem 'whenever', :require => false 20 gem 'whenever', :require => false
21 gem 'eita-jrails', '>= 0.9.5', :require => 'jrails' 21 gem 'eita-jrails', '>= 0.9.5', :require => 'jrails'
  22 +gem 'grape', '0.2.1'
  23 +
  24 +# FIXME list here all actual dependencies (i.e. the ones in debian/control),
  25 +# with their GEM names (not the Debian package names)
22 26
23 # asset pipeline 27 # asset pipeline
24 gem 'uglifier', '>= 1.0.3' 28 gem 'uglifier', '>= 1.0.3'
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
@@ -10,11 +10,9 @@ require &quot;config/environment&quot; @@ -10,11 +10,9 @@ require &quot;config/environment&quot;
10 #run ActionController::Dispatcher.new 10 #run ActionController::Dispatcher.new
11 11
12 rails_app = Rack::Builder.new do 12 rails_app = Rack::Builder.new do
13 - use Rails::Rack::LogTailer  
14 - use Rails::Rack::Static  
15 - run ActionController::Dispatcher.new 13 + run Noosfero::Application
16 end 14 end
17 - 15 +
18 run Rack::Cascade.new([ 16 run Rack::Cascade.new([
19 API::API, 17 API::API,
20 rails_app 18 rails_app