Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. rake aborted!
  2. ArgumentError: Unknown key: :find_options. Valid keys are: :type, :permission, :timestamp, :author_key, :scope
  3. /home/developer/projects/redmine/redmine-3.3.1/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb:32:in `acts_as_activity_provider'
  4.  
  5. require File.join(File.dirname(__FILE__), '../../app/models', 'hudson_build')
  6.  
  7. class UpdateBuilding < ActiveRecord::Migration
  8. def self.up
  9. HudsonBuild.update_all "building = 'true'", "building = 't'"
  10. HudsonBuild.update_all "building = 'false'", "building = 'f'"
  11. end
  12.  
  13. def self.down
  14. HudsonBuild.update_all "building = 't'", "building = 'true'"
  15. HudsonBuild.update_all "building = 'f'", "building = 'false'"
  16. end
  17. end
  18.  
  19. require 'hudson_api_error'
  20. require 'hudson_exceptions'
  21. require 'rexml_helper'
  22. include RexmlHelper
  23.  
  24. class HudsonBuild < ActiveRecord::Base
  25. unloadable
  26. has_many :changesets, :class_name => 'HudsonBuildChangeset', :dependent => :destroy
  27. has_one :test_result, :class_name => 'HudsonBuildTestResult', :dependent => :destroy
  28. has_many :artifacts, :class_name => 'HudsonBuildArtifact', :dependent => :destroy
  29. belongs_to :job, :class_name => 'HudsonJob', :foreign_key => 'hudson_job_id'
  30. belongs_to :author, :class_name => 'User', :foreign_key => 'caused_by'
  31.  
  32. validates_presence_of :hudson_job_id, :number
  33. validates_uniqueness_of :number, :scope => :hudson_job_id
  34.  
  35. acts_as_event :title => Proc.new {|o|
  36. retval = "#{l(:label_build)} #{o.job.name} #{o.number}: #{o.result}" unless o.building?
  37. retval = "#{l(:label_build)} #{o.job.name} #{o.number}: #{l(:notice_building)}" if o.building?
  38. retval
  39. },
  40. :description => Proc.new{|o|
  41. items = []
  42. items << o.test_result.description_for_activity if o.test_result != nil
  43. items << HudsonBuildChangeset.description_for_activity(o.changesets) if o.changesets.length > 0
  44. items.join("; ")
  45. },
  46. :datetime => :finished_at
  47.  
  48. acts_as_activity_provider :type => 'hudson',
  49. :timestamp => "#{HudsonBuild.table_name}.finished_at",
  50. :author_key => "#{HudsonBuild.table_name}.caused_by",
  51. :find_options => {:include => {:job => :project}},
  52. :permission => :view_hudson
  53.  
  54. include HudsonHelper
  55. extend RexmlHelper
  56.  
  57. :find_options => {:include => {:job => :project}},
  58.  
  59. :scope => includes(:project),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement