Module: PactBroker::Services
- Extended by:
- Services
- Included in:
- Api::Resources::BaseResource, BuildHttpOptions, Contracts::Service, Deployments::DeployedVersionService, Groups::Service, Index::Service, Integrations::EventListener, Integrations::Service, Matrix::Service, Pacticipants::Service, Pacts::PactsForVerificationRepository, Pacts::Service, Services, Tags::Service, Test::TestDataBuilder, UI::Controllers::CanIDeploy, UI::Controllers::Dashboard, UI::Controllers::ErrorTest, UI::Controllers::Groups, UI::Controllers::Index, UI::Controllers::Matrix, UI::Controllers::Pacts, Verifications::Service, Versions::BranchRepository, Versions::BranchVersionRepository, Versions::Service, Webhooks::EventListener, Webhooks::ExecutionConfigurationCreator, Webhooks::Service, Webhooks::TriggerService
- Defined in:
- lib/pact_broker/services.rb
Constant Summary collapse
- SERVICE_FACTORIES =
{}
Instance Method Summary collapse
- #badge_service ⇒ Object
- #branch_service ⇒ Object
- #certificate_service ⇒ Object
- #contract_service ⇒ Object
- #deployed_version_service ⇒ Object
- #environment_service ⇒ Object
- #get_service(name) ⇒ Object
- #group_service ⇒ Object
- #index_service ⇒ Object
- #integration_service ⇒ Object
- #label_service ⇒ Object
- #matrix_service ⇒ Object
- #metrics_service ⇒ Object
- #pact_service ⇒ Object
- #pacticipant_service ⇒ Object
-
#register_default_services ⇒ Object
rubocop: disable Metrics/MethodLength.
- #register_service(name, &block) ⇒ Object
- #released_version_service ⇒ Object
- #tag_service ⇒ Object
- #verification_service ⇒ Object
- #version_service ⇒ Object
- #webhook_service ⇒ Object
- #webhook_trigger_service ⇒ Object
Instance Method Details
#badge_service ⇒ Object
52 53 54 |
# File 'lib/pact_broker/services.rb', line 52 def badge_service get_service(:badge_service) end |
#branch_service ⇒ Object
92 93 94 |
# File 'lib/pact_broker/services.rb', line 92 def branch_service get_service(:branch_service) end |
#certificate_service ⇒ Object
60 61 62 |
# File 'lib/pact_broker/services.rb', line 60 def certificate_service get_service(:certificate_service) end |
#contract_service ⇒ Object
88 89 90 |
# File 'lib/pact_broker/services.rb', line 88 def contract_service get_service(:contract_service) end |
#deployed_version_service ⇒ Object
80 81 82 |
# File 'lib/pact_broker/services.rb', line 80 def deployed_version_service get_service(:deployed_version_service) end |
#environment_service ⇒ Object
76 77 78 |
# File 'lib/pact_broker/services.rb', line 76 def environment_service get_service(:environment_service) end |
#get_service(name) ⇒ Object
12 13 14 |
# File 'lib/pact_broker/services.rb', line 12 def get_service(name) SERVICE_FACTORIES[name].call end |
#group_service ⇒ Object
36 37 38 |
# File 'lib/pact_broker/services.rb', line 36 def group_service get_service(:group_service) end |
#index_service ⇒ Object
16 17 18 |
# File 'lib/pact_broker/services.rb', line 16 def index_service get_service(:index_service) end |
#integration_service ⇒ Object
64 65 66 |
# File 'lib/pact_broker/services.rb', line 64 def integration_service get_service(:integration_service) end |
#label_service ⇒ Object
32 33 34 |
# File 'lib/pact_broker/services.rb', line 32 def label_service get_service(:label_service) end |
#matrix_service ⇒ Object
56 57 58 |
# File 'lib/pact_broker/services.rb', line 56 def matrix_service get_service(:matrix_service) end |
#metrics_service ⇒ Object
72 73 74 |
# File 'lib/pact_broker/services.rb', line 72 def metrics_service get_service(:metrics_service) end |
#pact_service ⇒ Object
20 21 22 |
# File 'lib/pact_broker/services.rb', line 20 def pact_service get_service(:pact_service) end |
#pacticipant_service ⇒ Object
24 25 26 |
# File 'lib/pact_broker/services.rb', line 24 def pacticipant_service get_service(:pacticipant_service) end |
#register_default_services ⇒ Object
rubocop: disable Metrics/MethodLength
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/pact_broker/services.rb', line 97 def register_default_services register_service(:index_service) do require "pact_broker/index/service" Index::Service end register_service(:metrics_service) do require "pact_broker/metrics/service" Metrics::Service end register_service(:matrix_service) do require "pact_broker/matrix/service" Matrix::Service end register_service(:pact_service) do require "pact_broker/pacts/service" Pacts::Service end register_service(:pacticipant_service) do require "pact_broker/pacticipants/service" Pacticipants::Service end register_service(:tag_service) do require "pact_broker/tags/service" Tags::Service end register_service(:label_service) do require "pact_broker/labels/service" Labels::Service end register_service(:group_service) do require "pact_broker/groups/service" Groups::Service end register_service(:webhook_service) do require "pact_broker/webhooks/service" Webhooks::Service end register_service(:version_service) do require "pact_broker/versions/service" Versions::Service end register_service(:verification_service) do require "pact_broker/verifications/service" Verifications::Service end register_service(:badge_service) do require "pact_broker/badges/service" Badges::Service end register_service(:certificate_service) do require "pact_broker/certificates/service" Certificates::Service end register_service(:integration_service) do require "pact_broker/integrations/service" Integrations::Service end register_service(:webhook_trigger_service) do require "pact_broker/webhooks/trigger_service" Webhooks::TriggerService end register_service(:environment_service) do require "pact_broker/deployments/environment_service" Deployments::EnvironmentService end register_service(:deployed_version_service) do require "pact_broker/deployments/deployed_version_service" PactBroker::Deployments::DeployedVersionService end register_service(:released_version_service) do require "pact_broker/deployments/released_version_service" PactBroker::Deployments::ReleasedVersionService end register_service(:contract_service) do require "pact_broker/contracts/service" PactBroker::Contracts::Service end register_service(:branch_service) do require "pact_broker/versions/branch_service" PactBroker::Versions::BranchService end end |
#register_service(name, &block) ⇒ Object
8 9 10 |
# File 'lib/pact_broker/services.rb', line 8 def register_service(name, &block) SERVICE_FACTORIES[name] = block end |
#released_version_service ⇒ Object
84 85 86 |
# File 'lib/pact_broker/services.rb', line 84 def released_version_service get_service(:released_version_service) end |
#tag_service ⇒ Object
28 29 30 |
# File 'lib/pact_broker/services.rb', line 28 def tag_service get_service(:tag_service) end |
#verification_service ⇒ Object
48 49 50 |
# File 'lib/pact_broker/services.rb', line 48 def verification_service get_service(:verification_service) end |
#version_service ⇒ Object
44 45 46 |
# File 'lib/pact_broker/services.rb', line 44 def version_service get_service(:version_service) end |
#webhook_service ⇒ Object
40 41 42 |
# File 'lib/pact_broker/services.rb', line 40 def webhook_service get_service(:webhook_service) end |
#webhook_trigger_service ⇒ Object
68 69 70 |
# File 'lib/pact_broker/services.rb', line 68 def webhook_trigger_service get_service(:webhook_trigger_service) end |