Sha256: a50a0da71fbb3c1a2dbd988ac004619b11fa76cc529e36b643b445148f20d02c

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

require 'rscm'
require 'damagecontrol/tracker'

module DamageControl

  class Build
    def small_image
      exit_code == 0 ? "/images/green-16.gif" : "/images/red-16.gif"
    end
  end

  # Add some generic web capabilities to the RSCM classes
  module Web
    module Configuration

      def selected?
        false
      end

      # Returns the short lowercase name. Used for javascript and render_partial.
      def short
        $1.downcase if self.class.name =~ /.*::(.*)/
      end

    end
  end
end

class RSCM::AbstractSCM
  include DamageControl::Web::Configuration
end

class DamageControl::Tracker::Base
  include DamageControl::Web::Configuration
end

class DamageControl::Project
  include DamageControl::Web::Configuration
end

class RSCM::Change
  ICONS = {
    MODIFIED => "/images/16x16/document_edit.png",
    DELETED => "/images/16x16/document_delete.png",
    ADDED => "/images/16x16/document_add.png",
    MOVED => "/images/16x16/document_exchange.png",
  }
    
  def icon
    ICONS[@status] || "/images/16x16/document_warning.png"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
damagecontrol-0.5.0.1391 app/controllers/rscm_ext.rb
damagecontrol-0.5.0.1392 app/controllers/rscm_ext.rb
damagecontrol-0.5.0.1393 app/controllers/rscm_ext.rb
damagecontrol-0.5.0.1404 app/controllers/rscm_ext.rb