Sha256: aeb8513d0410ae9261080f6e03d34806cad72fea5b4806e4757438ef344b84e0

Contents?: true

Size: 619 Bytes

Versions: 27

Compression:

Stored size: 619 Bytes

Contents

require "pact_broker/integrations/integration"

module PactBroker
  module Integrations
    class Repository
      def create_for_pact(consumer_id, provider_id)
        if Integration.where(consumer_id: consumer_id, provider_id: provider_id).empty?
          Integration.new(
            consumer_id: consumer_id,
            provider_id: provider_id,
            created_at: Sequel.datetime_class.now
          ).insert_ignore
        end
        nil
      end

      def delete(consumer_id, provider_id)
        Integration.where(consumer_id: consumer_id, provider_id: provider_id).delete
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
pact_broker-2.107.1 lib/pact_broker/integrations/repository.rb
pact_broker-2.107.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/integrations/repository.rb
pact_broker-2.106.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.105.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.104.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.103.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.102.2 lib/pact_broker/integrations/repository.rb
pact_broker-2.102.1 lib/pact_broker/integrations/repository.rb
pact_broker-2.102.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.101.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.100.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.99.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.98.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.97.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.96.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.95.1 lib/pact_broker/integrations/repository.rb
pact_broker-2.95.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.94.0 lib/pact_broker/integrations/repository.rb
pact_broker-2.93.4 lib/pact_broker/integrations/repository.rb