Module: PactBroker::Repositories
- Extended by:
- Repositories
- Included in:
- Contracts::Service, Groups::Service, Index::Service, Integrations::Service, Labels::Service, Matrix::Repository, Matrix::SelectorResolver, Matrix::Service, Pacticipants::Repository, Pacticipants::Service, Pacts::Diff, Pacts::PactsForVerificationRepository, Pacts::Repository, Pacts::Service, Repositories, Tags::Service, Test::TestDataBuilder, Verifications::Repository, Verifications::Service, Versions::BranchService, Versions::BranchVersionRepository, Versions::Repository, Versions::Service, Webhooks::Repository, Webhooks::Service, Webhooks::TriggerService
- Defined in:
- lib/pact_broker/repositories.rb,
lib/pact_broker/repositories/scopes.rb
Defined Under Namespace
Modules: Scopes
Constant Summary collapse
- REPOSITORY_FACTORIES =
{}
Instance Method Summary collapse
- #branch_repository ⇒ Object
- #branch_version_repository ⇒ Object
- #get_repository(name) ⇒ Object
- #integration_repository ⇒ Object
- #label_repository ⇒ Object
- #matrix_repository ⇒ Object
- #pact_repository ⇒ Object
- #pacticipant_repository ⇒ Object
-
#register_default_repositories ⇒ Object
rubocop: disable Metrics/MethodLength.
- #register_repository(name, &block) ⇒ Object
- #tag_repository ⇒ Object
- #verification_repository ⇒ Object
- #version_repository ⇒ Object
- #webhook_repository ⇒ Object
Instance Method Details
#branch_repository ⇒ Object
50 51 52 |
# File 'lib/pact_broker/repositories.rb', line 50 def branch_repository get_repository(:branch_repository) end |
#branch_version_repository ⇒ Object
54 55 56 |
# File 'lib/pact_broker/repositories.rb', line 54 def branch_version_repository get_repository(:branch_version_repository) end |
#get_repository(name) ⇒ Object
14 15 16 |
# File 'lib/pact_broker/repositories.rb', line 14 def get_repository(name) REPOSITORY_FACTORIES[name].call end |
#integration_repository ⇒ Object
58 59 60 |
# File 'lib/pact_broker/repositories.rb', line 58 def integration_repository get_repository(:integration_repository) end |
#label_repository ⇒ Object
34 35 36 |
# File 'lib/pact_broker/repositories.rb', line 34 def label_repository get_repository(:label_repository) end |
#matrix_repository ⇒ Object
46 47 48 |
# File 'lib/pact_broker/repositories.rb', line 46 def matrix_repository get_repository(:matrix_repository) end |
#pact_repository ⇒ Object
26 27 28 |
# File 'lib/pact_broker/repositories.rb', line 26 def pact_repository get_repository(:pact_repository) end |
#pacticipant_repository ⇒ Object
18 19 20 |
# File 'lib/pact_broker/repositories.rb', line 18 def pacticipant_repository get_repository(:pacticipant_repository) end |
#register_default_repositories ⇒ Object
rubocop: disable Metrics/MethodLength
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/pact_broker/repositories.rb', line 63 def register_default_repositories register_repository(:pacticipant_repository) do require "pact_broker/pacticipants/repository" Pacticipants::Repository.new end register_repository(:version_repository) do require "pact_broker/versions/repository" Versions::Repository.new end register_repository(:pact_repository) do PactBroker::Pacts::Repository.new end register_repository(:tag_repository) do require "pact_broker/tags/repository" Tags::Repository.new end register_repository(:label_repository) do require "pact_broker/labels/repository" Labels::Repository.new end register_repository(:webhook_repository) do require "pact_broker/webhooks/repository" Webhooks::Repository.new end register_repository(:verification_repository) do require "pact_broker/verifications/repository" Verifications::Repository.new end register_repository(:matrix_repository) do require "pact_broker/matrix/repository" Matrix::Repository.new end register_repository(:branch_repository) do require "pact_broker/versions/branch_repository" PactBroker::Versions::BranchRepository.new end register_repository(:branch_version_repository) do require "pact_broker/versions/branch_version_repository" PactBroker::Versions::BranchVersionRepository.new end register_repository(:integration_repository) do require "pact_broker/integrations/repository" PactBroker::Integrations::Repository.new end # rubocop: enable Metrics/MethodLength end |
#register_repository(name, &block) ⇒ Object
10 11 12 |
# File 'lib/pact_broker/repositories.rb', line 10 def register_repository(name, &block) REPOSITORY_FACTORIES[name] = block end |
#tag_repository ⇒ Object
30 31 32 |
# File 'lib/pact_broker/repositories.rb', line 30 def tag_repository get_repository(:tag_repository) end |
#verification_repository ⇒ Object
42 43 44 |
# File 'lib/pact_broker/repositories.rb', line 42 def verification_repository get_repository(:verification_repository) end |
#version_repository ⇒ Object
22 23 24 |
# File 'lib/pact_broker/repositories.rb', line 22 def version_repository get_repository(:version_repository) end |
#webhook_repository ⇒ Object
38 39 40 |
# File 'lib/pact_broker/repositories.rb', line 38 def webhook_repository get_repository(:webhook_repository) end |