Sha256: 69ed9569719a48a3f30ee0f2e029d406fddf30d5eae9fcbbf8420fa5e0375955

Contents?: true

Size: 1017 Bytes

Versions: 36

Compression:

Stored size: 1017 Bytes

Contents

require "pact_broker/api/pact_broker_urls"
require "pact_broker/ui/helpers/url_helper"
require "pact_broker/date_helper"

module PactBroker
  module UI
    module ViewDomain
      class IndexItemBranchHead

        include PactBroker::Api::PactBrokerUrls

        def initialize branch_head, pacticipant_name
          @branch_head = branch_head
          @pacticipant_name = pacticipant_name
        end

        def branch_name
          branch_head.branch_name
        end

        def tooltip
          if branch_head.branch_version.auto_created
            "This is the latest pact from branch \"#{branch_name}\". This branch was automatically inferred from the first tag because the Pact Broker configuration setting `use_first_tag_as_branch` was true."
          else
            "This is the latest pact from branch \"#{branch_name}\"."
          end
        end

        def latest?
          true
        end

        private

        attr_reader :branch_head, :pacticipant_name
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
pact_broker-2.112.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.111.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.109.1 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.109.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.108.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.107.1 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.107.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.106.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.105.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.104.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.103.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.102.2 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.102.1 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.102.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.101.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.100.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.99.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.98.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb
pact_broker-2.97.0 lib/pact_broker/ui/view_models/index_item_branch_head.rb