Sha256: 64e13e4379f9236109e1a4325cb0446eb9c9693a035c05c1351127e31f763bad
Contents?: true
Size: 848 Bytes
Versions: 12
Compression:
Stored size: 848 Bytes
Contents
require 'pact_broker/domain/tag' require 'pact_broker/repositories/helpers' module PactBroker module Tags class Repository include PactBroker::Repositories::Helpers def create args Domain::Tag.new(name: args.fetch(:name), version: args.fetch(:version)).save end def find args PactBroker::Domain::Tag .select(:tags__name, :tags__version_id, :tags__created_at, :tags__updated_at) .join(:versions, {id: :version_id}) .join(:pacticipants, {pacticipants__id: :versions__pacticipant_id}) .where(name_like(:tags__name, args.fetch(:tag_name))) .where(name_like(:versions__number, args.fetch(:pacticipant_version_number))) .where(name_like(:pacticipants__name, args.fetch(:pacticipant_name))) .single_record end end end end
Version data entries
12 entries across 12 versions & 1 rubygems