Sha256: e5fd9cb0d8525638988bf87ecfecdc35a86f8ea7afcc1645185d88a08490c28b

Contents?: true

Size: 656 Bytes

Versions: 36

Compression:

Stored size: 656 Bytes

Contents

module PactBroker
  module Api
    module Contracts
      module PacticipantNameValidation

        include PactBroker::Messages

        def name_in_pact_present
          unless name_in_pact
            errors.add(:'name', validation_message("pact_missing_pacticipant_name", pacticipant: pacticipant))
          end
        end

        def name_not_blank
          if blank? name
            errors.add(:'name', validation_message("blank"))
          end
        end

        def blank? string
          string && string.strip.empty?
        end

        def empty? string
          string.nil? || blank?(string)
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
pact_broker-2.93.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.92.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.91.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.90.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.89.1 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.89.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.88.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.87.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.86.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.85.1 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.85.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.84.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.83.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.82.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.81.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.80.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb