Sha256: e6b7015ff050f674a9e7f01b793b1c3188afa82d5e116a0d6e32ffead5803d77

Contents?: true

Size: 894 Bytes

Versions: 11

Compression:

Stored size: 894 Bytes

Contents

require 'rake'

module Rake::Funnel::Integration::TeamCity
  class ProgressReport < Rake::Funnel::Integration::ProgressReport
    include Rake::Funnel::Integration

    def initialize
      super do
        task_starting do |task, args|
          next unless TeamCity.running?

          unless TeamCity.rake_runner?
            ServiceMessages.block_opened({ name: task.name })
          end
        end

        task_finished do |task, args, error|
          next unless TeamCity.running?

          if error.respond_to?(:inner_exception)
            error = error.inner_exception
          end

          ServiceMessages.build_problem({ description: error.message[0..4000 - 1] }) if error

          next if Rake::Funnel::Integration::TeamCity.rake_runner?

          ServiceMessages.block_closed({ name: task.name })
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rake-funnel-0.3.2.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.3.1.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.3.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.2.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.1.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.0.6.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.0.5.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.0.4.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.0.3.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.0.2.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.0.1.pre lib/rake/funnel/integration/teamcity/progress_report.rb