Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rake aborted!
- ArgumentError: Unknown key: :find_options. Valid keys are: :type, :permission, :timestamp, :author_key, :scope
- /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'
- require File.join(File.dirname(__FILE__), '../../app/models', 'hudson_build')
- class UpdateBuilding < ActiveRecord::Migration
- def self.up
- HudsonBuild.update_all "building = 'true'", "building = 't'"
- HudsonBuild.update_all "building = 'false'", "building = 'f'"
- end
- def self.down
- HudsonBuild.update_all "building = 't'", "building = 'true'"
- HudsonBuild.update_all "building = 'f'", "building = 'false'"
- end
- end
- require 'hudson_api_error'
- require 'hudson_exceptions'
- require 'rexml_helper'
- include RexmlHelper
- class HudsonBuild < ActiveRecord::Base
- unloadable
- has_many :changesets, :class_name => 'HudsonBuildChangeset', :dependent => :destroy
- has_one :test_result, :class_name => 'HudsonBuildTestResult', :dependent => :destroy
- has_many :artifacts, :class_name => 'HudsonBuildArtifact', :dependent => :destroy
- belongs_to :job, :class_name => 'HudsonJob', :foreign_key => 'hudson_job_id'
- belongs_to :author, :class_name => 'User', :foreign_key => 'caused_by'
- validates_presence_of :hudson_job_id, :number
- validates_uniqueness_of :number, :scope => :hudson_job_id
- acts_as_event :title => Proc.new {|o|
- retval = "#{l(:label_build)} #{o.job.name} #{o.number}: #{o.result}" unless o.building?
- retval = "#{l(:label_build)} #{o.job.name} #{o.number}: #{l(:notice_building)}" if o.building?
- retval
- },
- :description => Proc.new{|o|
- items = []
- items << o.test_result.description_for_activity if o.test_result != nil
- items << HudsonBuildChangeset.description_for_activity(o.changesets) if o.changesets.length > 0
- items.join("; ")
- },
- :datetime => :finished_at
- acts_as_activity_provider :type => 'hudson',
- :timestamp => "#{HudsonBuild.table_name}.finished_at",
- :author_key => "#{HudsonBuild.table_name}.caused_by",
- :find_options => {:include => {:job => :project}},
- :permission => :view_hudson
- include HudsonHelper
- extend RexmlHelper
- :find_options => {:include => {:job => :project}},
- :scope => includes(:project),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement