Author: assaf
Date: Tue Nov 18 15:32:40 2008
New Revision: 718774

URL: http://svn.apache.org/viewvc?rev=718774&view=rev
Log:
Not using presenters for now.
Waiting for ticket 937 to be fixed.

Added:
    ode/sandbox/singleshot/doc/README_FOR_APP
Modified:
    ode/sandbox/singleshot/.gitignore
    ode/sandbox/singleshot/app/controllers/activity_controller.rb
    ode/sandbox/singleshot/app/controllers/application.rb
    ode/sandbox/singleshot/spec/controllers/authentication_spec.rb
    ode/sandbox/singleshot/spec/models/activity_spec.rb

Modified: ode/sandbox/singleshot/.gitignore
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/.gitignore?rev=718774&r1=718773&r2=718774&view=diff
==============================================================================
--- ode/sandbox/singleshot/.gitignore (original)
+++ ode/sandbox/singleshot/.gitignore Tue Nov 18 15:32:40 2008
@@ -4,4 +4,5 @@
 .DS_Store
 secret.key
 vendor
+doc/api
 index

Modified: ode/sandbox/singleshot/app/controllers/activity_controller.rb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/controllers/activity_controller.rb?rev=718774&r1=718773&r2=718774&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/controllers/activity_controller.rb (original)
+++ ode/sandbox/singleshot/app/controllers/activity_controller.rb Tue Nov 18 
15:32:40 2008
@@ -29,8 +29,8 @@
         @graph = for_stakeholder.for_dates(Date.current - 1.month)
       end
       want.atom { @root_url = activity_url }
-      want.json { render :json=>presenting(@activities) }
-      want.xml { render :xml=>presenting(@activities) }
+      want.json { render :json=>@activities }
+      want.xml { render :xml=>@activities }
     end
   end
 

Modified: ode/sandbox/singleshot/app/controllers/application.rb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/controllers/application.rb?rev=718774&r1=718773&r2=718774&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/controllers/application.rb (original)
+++ ode/sandbox/singleshot/app/controllers/application.rb Tue Nov 18 15:32:40 
2008
@@ -72,5 +72,5 @@
   before_filter do |controller|
     Time.zone = controller.authenticated.timezone rescue nil
   end
-
+  
 end

Added: ode/sandbox/singleshot/doc/README_FOR_APP
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/doc/README_FOR_APP?rev=718774&view=auto
==============================================================================
--- ode/sandbox/singleshot/doc/README_FOR_APP (added)
+++ ode/sandbox/singleshot/doc/README_FOR_APP Tue Nov 18 15:32:40 2008
@@ -0,0 +1 @@
+

Modified: ode/sandbox/singleshot/spec/controllers/authentication_spec.rb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/spec/controllers/authentication_spec.rb?rev=718774&r1=718773&r2=718774&view=diff
==============================================================================
--- ode/sandbox/singleshot/spec/controllers/authentication_spec.rb (original)
+++ ode/sandbox/singleshot/spec/controllers/authentication_spec.rb Tue Nov 18 
15:32:40 2008
@@ -3,9 +3,11 @@
 class AuthenticationTestController < ApplicationController
 
   def index
+    render :nothing=>true
   end
 
   def feed
+    render :nothing=>true
   end
 end
 

Modified: ode/sandbox/singleshot/spec/models/activity_spec.rb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/spec/models/activity_spec.rb?rev=718774&r1=718773&r2=718774&view=diff
==============================================================================
--- ode/sandbox/singleshot/spec/models/activity_spec.rb (original)
+++ ode/sandbox/singleshot/spec/models/activity_spec.rb Tue Nov 18 15:32:40 2008
@@ -119,8 +119,12 @@
   end
 
   it 'should not return the same activity twice' do
+    # FIXME: broken, see ticket 937:
+    # 
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/937-size-method-ignores-group-by-on-has_many
     Task.create! defaults(:creator=>person('person'), 
:observers=>person('person'))
-    Activity.for_stakeholder(person('person')).size.should == 1
+    # Two stakeholders, one task: must not return/count cartesian product
+    Activity.for_stakeholder(person('person')).count(:id).should == 1
+    Activity.for_stakeholder(person('person')).all.size.should == 1
   end
 
   it 'should not eager load dependencies' do
@@ -128,7 +132,6 @@
   end
 end
 
-
 describe Activity, 'recently_added' do
   it 'should return recently added activities' do
     Activity.recently_added.proxy_options[:order].downcase.split.should == 
['created_at', 'desc']


Reply via email to