pact_broker 2.116.0 → 2.117.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +28 -0
 - data/Gemfile +10 -5
 - data/lib/pact_broker/api/contracts/dry_validation_errors_formatter.rb +3 -0
 - data/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb +1 -1
 - data/lib/pact_broker/api/decorators/version_decorator.rb +3 -1
 - data/lib/pact_broker/api/resources/clean.rb +1 -1
 - data/lib/pact_broker/api/resources/index.rb +48 -0
 - data/lib/pact_broker/api/resources/latest_provider_pacts_for_branch.rb +26 -0
 - data/lib/pact_broker/api/resources/pact_versions_for_branch.rb +15 -1
 - data/lib/pact_broker/api/resources/provider_pacts_for_consumer_branch.rb +47 -0
 - data/lib/pact_broker/api/resources/provider_pacts_for_verification.rb +2 -2
 - data/lib/pact_broker/api/resources/provider_states.rb +9 -3
 - data/lib/pact_broker/api.rb +9 -0
 - data/lib/pact_broker/app.rb +0 -1
 - data/lib/pact_broker/config/runtime_configuration.rb +1 -1
 - data/lib/pact_broker/doc/views/index/branch-pact-versions.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/latest-branch-pact-versions.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/latest-main-branch-pact-versions.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/latest-provider-pacts-with-branch.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/latest-provider-pacts-with-main-branch.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown +3 -1
 - data/lib/pact_broker/doc/views/index/main-branch-pact-versions.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/provider-pacts-with-branch.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/provider-pacts-with-main-branch.markdown +7 -0
 - data/lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown +2 -0
 - data/lib/pact_broker/doc/views/pact/provider-states.markdown +10 -3
 - data/lib/pact_broker/pacts/pact_publication.rb +1 -1
 - data/lib/pact_broker/pacts/pact_publication_selector_dataset_module.rb +8 -0
 - data/lib/pact_broker/pacts/provider_state_service.rb +10 -2
 - data/lib/pact_broker/pacts/repository.rb +30 -0
 - data/lib/pact_broker/pacts/service.rb +20 -0
 - data/lib/pact_broker/tasks/clean_task.rb +1 -0
 - data/lib/pact_broker/ui/controllers/can_i_deploy.rb +2 -2
 - data/lib/pact_broker/ui/controllers/clusters.rb +1 -1
 - data/lib/pact_broker/ui/controllers/dashboard.rb +2 -2
 - data/lib/pact_broker/ui/controllers/error_test.rb +1 -1
 - data/lib/pact_broker/ui/controllers/groups.rb +1 -1
 - data/lib/pact_broker/ui/controllers/index.rb +2 -2
 - data/lib/pact_broker/ui/controllers/matrix.rb +3 -3
 - data/lib/pact_broker/ui/controllers/pacts.rb +1 -1
 - data/lib/pact_broker/ui/view_models/index_item.rb +1 -1
 - data/lib/pact_broker/ui/view_models/index_item_branch_head.rb +1 -1
 - data/lib/pact_broker/ui/view_models/index_item_provider_branch_head.rb +1 -1
 - data/lib/pact_broker/ui/view_models/index_items.rb +1 -1
 - data/lib/pact_broker/ui/view_models/matrix_branch.rb +1 -1
 - data/lib/pact_broker/ui/view_models/matrix_deployed_version.rb +1 -1
 - data/lib/pact_broker/ui/view_models/matrix_line.rb +1 -1
 - data/lib/pact_broker/ui/view_models/matrix_lines.rb +2 -2
 - data/lib/pact_broker/ui/view_models/matrix_released_version.rb +1 -1
 - data/lib/pact_broker/ui/view_models/matrix_tag.rb +1 -1
 - data/lib/pact_broker/version.rb +1 -1
 - data/pact_broker.gemspec +8 -4
 - metadata +93 -15
 - data/lib/pact_broker/dashboard/service.rb +0 -0
 - data/lib/pact_broker/ui/view_models/clusters.rb +0 -0
 - /data/lib/pact_broker/config/{basic_auth_configuration.rb → runtime_configuration_basic_auth_methods.rb} +0 -0
 - /data/lib/pact_broker/tags/{head_pact_tags.rb → head_pact_tag.rb} +0 -0
 - /data/lib/pact_broker/ui/controllers/{base_controller.rb → base.rb} +0 -0
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c52b0ab9c14e0eff3a49143fa09d4205ba9c1d9c16e96fd8e88bc74fb2b798d2
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: bf44ad81e1676d10d8af2912875726cdc50e91bbfbd10b02b62d689d7590fbaa
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0f9ef0b473f58fd3b60c4c6e61125041bf93002d5cff4fe03f589583ca4bff47e719a23bd14220c18a78e0ce662cb0dfcda0947c94b253d96c7caf4bfdb55238
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 8558c5f412cd6bbbdf21b1af7e235c7f3f78b6e871a7584d7654319758043c7652d341cab21e4b00c1f6014bd5e950bd7484a4eb1ec5e384dcb09237d8e0db2d
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <a name="v2.117.1"></a>
         
     | 
| 
      
 2 
     | 
    
         
            +
            ### v2.117.1 (2025-11-02)
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #### Bug Fixes
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            * dashboard loading after zeitwerk rename prep	 ([13112e2f](/../../commit/13112e2f))
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            <a name="v2.117.0"></a>
         
     | 
| 
      
 9 
     | 
    
         
            +
            ### v2.117.0 (2025-10-28)
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            #### Features
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            * add provider pacts by branch endpoints	 ([0ccff2ec](/../../commit/0ccff2ec))
         
     | 
| 
      
 14 
     | 
    
         
            +
            * PACT-4511/updated matrix decorator to return app instance for an env if present (#838)	 ([8bc24e72](/../../commit/8bc24e72))
         
     | 
| 
      
 15 
     | 
    
         
            +
            * support provider states by branch/env	 ([f4db396f](/../../commit/f4db396f))
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            #### Bug Fixes
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            * update hal relations for provider pacts	 ([b6e8e8e3](/../../commit/b6e8e8e3))
         
     | 
| 
      
 20 
     | 
    
         
            +
            * drop pact-support pin	 ([3c7eb4c5](/../../commit/3c7eb4c5))
         
     | 
| 
      
 21 
     | 
    
         
            +
            * fixed the text fixtures (#826)	 ([28035c27](/../../commit/28035c27))
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            * **test**
         
     | 
| 
      
 24 
     | 
    
         
            +
              * update expectation of webhook_certificates source format dependant on rb version	 ([5364c1b1](/../../commit/5364c1b1))
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            * **deps**
         
     | 
| 
      
 27 
     | 
    
         
            +
              * add mutex_m/csv/ostruct/pstore	 ([075d2522](/../../commit/075d2522))
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       1 
29 
     | 
    
         
             
            <a name="v2.116.0"></a>
         
     | 
| 
       2 
30 
     | 
    
         
             
            ### v2.116.0 (2025-07-04)
         
     | 
| 
       3 
31 
     | 
    
         | 
    
        data/Gemfile
    CHANGED
    
    | 
         @@ -9,8 +9,7 @@ gem "conventional-changelog", "~>1.3" 
     | 
|
| 
       9 
9 
     | 
    
         
             
            gem "bump", "~> 0.5"
         
     | 
| 
       10 
10 
     | 
    
         
             
            gem "padrino-core", ">= 0.16.0.pre3", require: false
         
     | 
| 
       11 
11 
     | 
    
         
             
            gem "rackup", "~> 2.2"
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            gem "pact-support", github: "pact-foundation/pact-support", branch: "release-1.21.3.rc1"
         
     | 
| 
      
 12 
     | 
    
         
            +
            gem "thor", "~> 1.4" # thor is secondary dependency but bumping here to avoid CVEs
         
     | 
| 
       14 
13 
     | 
    
         | 
| 
       15 
14 
     | 
    
         
             
            group :development do
         
     | 
| 
       16 
15 
     | 
    
         
             
              gem "pry-byebug"
         
     | 
| 
         @@ -22,7 +21,13 @@ end 
     | 
|
| 
       22 
21 
     | 
    
         | 
| 
       23 
22 
     | 
    
         
             
            group :test do
         
     | 
| 
       24 
23 
     | 
    
         
             
              gem "simplecov", :require => false
         
     | 
| 
       25 
     | 
    
         
            -
               
     | 
| 
      
 24 
     | 
    
         
            +
              if ENV["X_PACT_DEVELOPMENT"] == "true"
         
     | 
| 
      
 25 
     | 
    
         
            +
                gem "pact", path: "../pact-ruby"
         
     | 
| 
      
 26 
     | 
    
         
            +
                gem "pact-ffi", path: "../pact-ruby-ffi"
         
     | 
| 
      
 27 
     | 
    
         
            +
              else
         
     | 
| 
      
 28 
     | 
    
         
            +
                gem "pact", "~>1.14"
         
     | 
| 
      
 29 
     | 
    
         
            +
                gem "pact-ffi", "~>0.4.28"
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
       26 
31 
     | 
    
         
             
              gem "rspec-pact-matchers", "~>0.1"
         
     | 
| 
       27 
32 
     | 
    
         
             
              gem "bundler-audit", "~>0.4"
         
     | 
| 
       28 
33 
     | 
    
         
             
              gem "webmock", "~>3.9"
         
     | 
| 
         @@ -35,11 +40,11 @@ group :test do 
     | 
|
| 
       35 
40 
     | 
    
         
             
              gem "approvals", ">=0.0.24", "<1.0.0"
         
     | 
| 
       36 
41 
     | 
    
         
             
              gem "tzinfo", "~>2.0"
         
     | 
| 
       37 
42 
     | 
    
         
             
              gem "faraday-retry", "~>2.0"
         
     | 
| 
       38 
     | 
    
         
            -
              gem "openapi_first", "2. 
     | 
| 
      
 43 
     | 
    
         
            +
              gem "openapi_first", "~>2.0"
         
     | 
| 
       39 
44 
     | 
    
         
             
            end
         
     | 
| 
       40 
45 
     | 
    
         | 
| 
       41 
46 
     | 
    
         
             
            group :pg, optional: true do
         
     | 
| 
       42 
     | 
    
         
            -
              gem "pg", "~>1. 
     | 
| 
      
 47 
     | 
    
         
            +
              gem "pg", "~>1.6"
         
     | 
| 
       43 
48 
     | 
    
         
             
            end
         
     | 
| 
       44 
49 
     | 
    
         | 
| 
       45 
50 
     | 
    
         
             
            group :mysql, optional: true do
         
     | 
| 
         @@ -41,6 +41,9 @@ module PactBroker 
     | 
|
| 
       41 
41 
     | 
    
         
             
                        add_error(errors_hash, error.path.first, "#{error.path.last} #{error.text} (at index #{error.path[1]})")
         
     | 
| 
       42 
42 
     | 
    
         
             
                      elsif error_path_classes == [Symbol, Integer]
         
     | 
| 
       43 
43 
     | 
    
         
             
                        add_error(errors_hash, error.path.first, "#{error.text} (at index #{error.path[1]})")
         
     | 
| 
      
 44 
     | 
    
         
            +
                      elsif error_path_classes == [Symbol, Symbol, Integer]
         
     | 
| 
      
 45 
     | 
    
         
            +
                        # this should be refactored to dynamically handle patterns instead of hardcoding the patterns
         
     | 
| 
      
 46 
     | 
    
         
            +
                        add_error(errors_hash, error.path.first, "#{error.path[1]} #{error.text} (at index #{error.path[2]})")
         
     | 
| 
       44 
47 
     | 
    
         
             
                      else
         
     | 
| 
       45 
48 
     | 
    
         
             
                        # Don't have any usecases for this - will deal with it when it happens
         
     | 
| 
       46 
49 
     | 
    
         
             
                        raise PactBroker::Error, "Cannot currently format an error message with path classes #{error_path_classes}"
         
     | 
| 
         @@ -5,7 +5,7 @@ require "pact_broker/logging" 
     | 
|
| 
       5 
5 
     | 
    
         
             
            module PactBroker
         
     | 
| 
       6 
6 
     | 
    
         
             
              module Api
         
     | 
| 
       7 
7 
     | 
    
         
             
                module Contracts
         
     | 
| 
       8 
     | 
    
         
            -
                  class  
     | 
| 
      
 8 
     | 
    
         
            +
                  class PactsForVerificationJsonQuerySchema < BaseContract
         
     | 
| 
       9 
9 
     | 
    
         
             
                    json do
         
     | 
| 
       10 
10 
     | 
    
         
             
                      optional(:providerVersionBranch).maybe(:string)
         
     | 
| 
       11 
11 
     | 
    
         
             
                      optional(:providerVersionTags).maybe(:array?)
         
     | 
| 
         @@ -83,7 +83,9 @@ module PactBroker 
     | 
|
| 
       83 
83 
     | 
    
         
             
                          name: deployed_version.environment.display_name,
         
     | 
| 
       84 
84 
     | 
    
         
             
                          href: deployed_version_url(deployed_version, context.fetch(:base_url)),
         
     | 
| 
       85 
85 
     | 
    
         
             
                          currently_deployed: deployed_version.currently_deployed
         
     | 
| 
       86 
     | 
    
         
            -
                        }
         
     | 
| 
      
 86 
     | 
    
         
            +
                        }.tap do |hash|
         
     | 
| 
      
 87 
     | 
    
         
            +
                          hash[:application_instance] = deployed_version.application_instance unless deployed_version.application_instance.nil?
         
     | 
| 
      
 88 
     | 
    
         
            +
                        end
         
     | 
| 
       87 
89 
     | 
    
         
             
                      end
         
     | 
| 
       88 
90 
     | 
    
         
             
                    end
         
     | 
| 
       89 
91 
     | 
    
         | 
| 
         @@ -19,7 +19,7 @@ module PactBroker 
     | 
|
| 
       19 
19 
     | 
    
         
             
                    def process_post
         
     | 
| 
       20 
20 
     | 
    
         
             
                      if content_type_json?
         
     | 
| 
       21 
21 
     | 
    
         
             
                        keep_selectors = (params[:keep] || []).collect do | hash |
         
     | 
| 
       22 
     | 
    
         
            -
                          PactBroker:: 
     | 
| 
      
 22 
     | 
    
         
            +
                          PactBroker::DB::Clean::Selector.new(hash)
         
     | 
| 
       23 
23 
     | 
    
         
             
                        end
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
                        result = PactBroker::DB::Clean.call(Sequel::Model.db, { keep: keep_selectors })
         
     | 
| 
         @@ -49,6 +49,54 @@ module PactBroker 
     | 
|
| 
       49 
49 
     | 
    
         
             
                          title: "All versions of a pact for a given consumer, provider and consumer version tag",
         
     | 
| 
       50 
50 
     | 
    
         
             
                          templated: false
         
     | 
| 
       51 
51 
     | 
    
         
             
                        },
         
     | 
| 
      
 52 
     | 
    
         
            +
                        "pb:branch-pact-versions" =>
         
     | 
| 
      
 53 
     | 
    
         
            +
                        {
         
     | 
| 
      
 54 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}",
         
     | 
| 
      
 55 
     | 
    
         
            +
                          title: "All versions of pacts for a provider, for a named consumers branch",
         
     | 
| 
      
 56 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 57 
     | 
    
         
            +
                        },
         
     | 
| 
      
 58 
     | 
    
         
            +
                        "pb:latest-branch-pact-versions" =>
         
     | 
| 
      
 59 
     | 
    
         
            +
                        {
         
     | 
| 
      
 60 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}/latest",
         
     | 
| 
      
 61 
     | 
    
         
            +
                          title: "Latest version of pact for a provider, for a named consumers branch",
         
     | 
| 
      
 62 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 63 
     | 
    
         
            +
                        },
         
     | 
| 
      
 64 
     | 
    
         
            +
                        "pb:main-branch-pact-versions" =>
         
     | 
| 
      
 65 
     | 
    
         
            +
                        {
         
     | 
| 
      
 66 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/consumer/{consumer}/branch",
         
     | 
| 
      
 67 
     | 
    
         
            +
                          title: "All versions of pacts for a provider, for a named consumers main branch",
         
     | 
| 
      
 68 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 69 
     | 
    
         
            +
                        },
         
     | 
| 
      
 70 
     | 
    
         
            +
                        "pb:latest-main-branch-pact-versions" =>
         
     | 
| 
      
 71 
     | 
    
         
            +
                        {
         
     | 
| 
      
 72 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/consumer/{consumer}/branch/latest",
         
     | 
| 
      
 73 
     | 
    
         
            +
                          title: "Latest version of pact for a provider, for a named consumers main branch",
         
     | 
| 
      
 74 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 75 
     | 
    
         
            +
                        },
         
     | 
| 
      
 76 
     | 
    
         
            +
                        "pb:provider-pacts-with-main-branch" =>
         
     | 
| 
      
 77 
     | 
    
         
            +
                        {
         
     | 
| 
      
 78 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/branch",
         
     | 
| 
      
 79 
     | 
    
         
            +
                          title: "All pacts for a provider, for any consumers main branch",
         
     | 
| 
      
 80 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 81 
     | 
    
         
            +
                        },
         
     | 
| 
      
 82 
     | 
    
         
            +
                        "pb:provider-pacts-with-branch" =>
         
     | 
| 
      
 83 
     | 
    
         
            +
                        {
         
     | 
| 
      
 84 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/branch/{branch}",
         
     | 
| 
      
 85 
     | 
    
         
            +
                          title: "All pacts for a provider, for any consumers named branch",
         
     | 
| 
      
 86 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 87 
     | 
    
         
            +
                        },
         
     | 
| 
      
 88 
     | 
    
         
            +
                        "pb:latest-provider-pacts-with-main-branch" =>
         
     | 
| 
      
 89 
     | 
    
         
            +
                        {
         
     | 
| 
      
 90 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/branch/latest",
         
     | 
| 
      
 91 
     | 
    
         
            +
                          title: "Latest pact for a provider, for any consumers main branch",
         
     | 
| 
      
 92 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 93 
     | 
    
         
            +
                        },
         
     | 
| 
      
 94 
     | 
    
         
            +
                        "pb:latest-provider-pacts-with-branch" =>
         
     | 
| 
      
 95 
     | 
    
         
            +
                        {
         
     | 
| 
      
 96 
     | 
    
         
            +
                          href: base_url + "/pacts/provider/{provider}/branch/{branch}/latest",
         
     | 
| 
      
 97 
     | 
    
         
            +
                          title: "Latest pacts for a provider, for any consumers named branch",
         
     | 
| 
      
 98 
     | 
    
         
            +
                          templated: true
         
     | 
| 
      
 99 
     | 
    
         
            +
                        },
         
     | 
| 
       52 
100 
     | 
    
         
             
                        "pb:pacticipants" =>
         
     | 
| 
       53 
101 
     | 
    
         
             
                        {
         
     | 
| 
       54 
102 
     | 
    
         
             
                          href: base_url + "/pacticipants",
         
     | 
| 
         @@ -0,0 +1,26 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "pact_broker/api/resources/provider_pacts"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "pact_broker/configuration"
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "pact_broker/api/decorators/provider_pacts_decorator"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            module PactBroker
         
     | 
| 
      
 6 
     | 
    
         
            +
              module Api
         
     | 
| 
      
 7 
     | 
    
         
            +
                module Resources
         
     | 
| 
      
 8 
     | 
    
         
            +
                  class LatestProviderPactsForBranch < ProviderPacts
         
     | 
| 
      
 9 
     | 
    
         
            +
                    private
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                    def pacts
         
     | 
| 
      
 12 
     | 
    
         
            +
                      pact_service.find_latest_pacts_for_provider_by_consumer_branch(
         
     | 
| 
      
 13 
     | 
    
         
            +
                      provider_name, 
         
     | 
| 
      
 14 
     | 
    
         
            +
                      branch_name: identifier_from_path[:branch_name], 
         
     | 
| 
      
 15 
     | 
    
         
            +
                      main_branch: identifier_from_path[:branch_name].nil?,
         
     | 
| 
      
 16 
     | 
    
         
            +
                      )
         
     | 
| 
      
 17 
     | 
    
         
            +
                    end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                    def resource_title
         
     | 
| 
      
 20 
     | 
    
         
            +
                      suffix = identifier_from_path[:branch_name] ? " with consumer version branch '#{identifier_from_path[:branch_name]}'" : ""
         
     | 
| 
      
 21 
     | 
    
         
            +
                      "Latest pact versions for the provider #{identifier_from_path[:provider_name]}#{suffix}#{!!identifier_from_path[:main_branch] ? ' for main branch' : ''}"
         
     | 
| 
      
 22 
     | 
    
         
            +
                    end
         
     | 
| 
      
 23 
     | 
    
         
            +
                  end
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -14,13 +14,27 @@ module PactBroker 
     | 
|
| 
       14 
14 
     | 
    
         
             
                    end
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                    def allowed_methods
         
     | 
| 
       17 
     | 
    
         
            -
                      ["DELETE", "OPTIONS"]
         
     | 
| 
      
 17 
     | 
    
         
            +
                      ["GET", "DELETE", "OPTIONS"]
         
     | 
| 
       18 
18 
     | 
    
         
             
                    end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                    def resource_exists?
         
     | 
| 
       21 
21 
     | 
    
         
             
                      consumer && provider
         
     | 
| 
       22 
22 
     | 
    
         
             
                    end
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
      
 24 
     | 
    
         
            +
                    def to_json
         
     | 
| 
      
 25 
     | 
    
         
            +
                      decorator_class(:pact_versions_decorator).new(pacts).to_json(**decorator_options(identifier_from_path))
         
     | 
| 
      
 26 
     | 
    
         
            +
                    end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                    def pacts
         
     | 
| 
      
 29 
     | 
    
         
            +
                      @pacts ||= pact_service.find_pacts_for_provider_and_consumer_by_consumer_branch(
         
     | 
| 
      
 30 
     | 
    
         
            +
                        provider_name,
         
     | 
| 
      
 31 
     | 
    
         
            +
                        consumer_name,
         
     | 
| 
      
 32 
     | 
    
         
            +
                        branch_name: identifier_from_path[:branch_name],
         
     | 
| 
      
 33 
     | 
    
         
            +
                        main_branch: identifier_from_path[:branch_name].nil?,
         
     | 
| 
      
 34 
     | 
    
         
            +
                        latest: identifier_from_path[:resource_name] == "latest_pact_publications_for_main_branch" || identifier_from_path[:resource_name] == "latest_pact_publications_for_branch"
         
     | 
| 
      
 35 
     | 
    
         
            +
                      )
         
     | 
| 
      
 36 
     | 
    
         
            +
                    end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
       24 
38 
     | 
    
         
             
                    def delete_resource
         
     | 
| 
       25 
39 
     | 
    
         
             
                      pact_service.delete_all_pact_publications_between consumer_name, and: provider_name, branch_name: identifier_from_path[:branch_name]
         
     | 
| 
       26 
40 
     | 
    
         
             
                      set_post_deletion_response
         
     | 
| 
         @@ -0,0 +1,47 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "pact_broker/api/resources/base_resource"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "pact_broker/configuration"
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "pact_broker/api/decorators/provider_pacts_decorator"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            module PactBroker
         
     | 
| 
      
 6 
     | 
    
         
            +
              module Api
         
     | 
| 
      
 7 
     | 
    
         
            +
                module Resources
         
     | 
| 
      
 8 
     | 
    
         
            +
                  class ProviderPactsForConsumerBranch < BaseResource
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                    def content_types_provided
         
     | 
| 
      
 11 
     | 
    
         
            +
                      [["application/hal+json", :to_json]]
         
     | 
| 
      
 12 
     | 
    
         
            +
                    end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                    def allowed_methods
         
     | 
| 
      
 15 
     | 
    
         
            +
                      ["GET", "OPTIONS"]
         
     | 
| 
      
 16 
     | 
    
         
            +
                    end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                    def resource_exists?
         
     | 
| 
      
 19 
     | 
    
         
            +
                      !!provider
         
     | 
| 
      
 20 
     | 
    
         
            +
                    end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                    def policy_name
         
     | 
| 
      
 23 
     | 
    
         
            +
                      :'pacts::provider_pacts'
         
     | 
| 
      
 24 
     | 
    
         
            +
                    end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                    def to_json
         
     | 
| 
      
 27 
     | 
    
         
            +
                      decorator_class(:provider_pacts_decorator).new(pacts).to_json(**decorator_options(identifier_from_path.merge(title: resource_title)))
         
     | 
| 
      
 28 
     | 
    
         
            +
                    end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                    private
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                    def pacts
         
     | 
| 
      
 33 
     | 
    
         
            +
                      pact_service.find_pacts_for_provider_by_consumer_branch(
         
     | 
| 
      
 34 
     | 
    
         
            +
                      provider_name, 
         
     | 
| 
      
 35 
     | 
    
         
            +
                      branch_name: identifier_from_path[:branch_name], 
         
     | 
| 
      
 36 
     | 
    
         
            +
                      main_branch: identifier_from_path[:branch_name].nil?,
         
     | 
| 
      
 37 
     | 
    
         
            +
                      )
         
     | 
| 
      
 38 
     | 
    
         
            +
                    end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                    def resource_title
         
     | 
| 
      
 41 
     | 
    
         
            +
                      suffix = identifier_from_path[:branch_name] ? " with consumer version branch '#{identifier_from_path[:branch_name]}'" : ""
         
     | 
| 
      
 42 
     | 
    
         
            +
                      "All pact versions for the provider #{identifier_from_path[:provider_name]}#{suffix}#{!!identifier_from_path[:main_branch] ? ' for main branch' : ''}"
         
     | 
| 
      
 43 
     | 
    
         
            +
                    end
         
     | 
| 
      
 44 
     | 
    
         
            +
                  end
         
     | 
| 
      
 45 
     | 
    
         
            +
                end
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -73,9 +73,9 @@ module PactBroker 
     | 
|
| 
       73 
73 
     | 
    
         | 
| 
       74 
74 
     | 
    
         
             
                    def schema
         
     | 
| 
       75 
75 
     | 
    
         
             
                      if request.get?
         
     | 
| 
       76 
     | 
    
         
            -
                         
     | 
| 
      
 76 
     | 
    
         
            +
                        api_contract_class(:pacts_for_verification_query_string_schema)
         
     | 
| 
       77 
77 
     | 
    
         
             
                      elsif request.post?
         
     | 
| 
       78 
     | 
    
         
            -
                         
     | 
| 
      
 78 
     | 
    
         
            +
                        api_contract_class(:pacts_for_verification_json_query_schema)
         
     | 
| 
       79 
79 
     | 
    
         
             
                      end
         
     | 
| 
       80 
80 
     | 
    
         
             
                    end
         
     | 
| 
       81 
81 
     | 
    
         | 
| 
         @@ -25,12 +25,18 @@ module PactBroker 
     | 
|
| 
       25 
25 
     | 
    
         
             
                      :'pacts::pact'
         
     | 
| 
       26 
26 
     | 
    
         
             
                    end
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
                     
     | 
| 
      
 28 
     | 
    
         
            +
                    def environment_uuid
         
     | 
| 
      
 29 
     | 
    
         
            +
                      identifier_from_path[:environment_uuid]
         
     | 
| 
      
 30 
     | 
    
         
            +
                    end
         
     | 
| 
       29 
31 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
                     
     | 
| 
      
 32 
     | 
    
         
            +
                    def branch_name
         
     | 
| 
      
 33 
     | 
    
         
            +
                      identifier_from_path[:branch_name]
         
     | 
| 
      
 34 
     | 
    
         
            +
                    end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                    private
         
     | 
| 
       31 
37 
     | 
    
         | 
| 
       32 
38 
     | 
    
         
             
                    def provider_states
         
     | 
| 
       33 
     | 
    
         
            -
                      @provider_states ||= provider_state_service.list_provider_states(provider)
         
     | 
| 
      
 39 
     | 
    
         
            +
                      @provider_states ||= provider_state_service.list_provider_states(provider, branch_name, environment_uuid)
         
     | 
| 
       34 
40 
     | 
    
         
             
                    end
         
     | 
| 
       35 
41 
     | 
    
         
             
                  end
         
     | 
| 
       36 
42 
     | 
    
         
             
                end
         
     | 
    
        data/lib/pact_broker/api.rb
    CHANGED
    
    | 
         @@ -33,6 +33,9 @@ module PactBroker 
     | 
|
| 
       33 
33 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "versions"], Api::Resources::PactVersions, {resource_name: "pact_publications"}
         
     | 
| 
       34 
34 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "versions", :consumer_version_number], Api::Resources::Pact, {resource_name: "pact_publication", deprecated: true} # Not the standard URL, but keep for backwards compatibility
         
     | 
| 
       35 
35 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "tag", :tag], Api::Resources::TaggedPactVersions, {resource_name: "tagged_pact_publications"}
         
     | 
| 
      
 36 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch"], Api::Resources::PactVersionsForBranch, {resource_name: "pact_publications_for_main_branch"}
         
     | 
| 
      
 37 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch", "latest"], Api::Resources::PactVersionsForBranch, {resource_name: "latest_pact_publications_for_main_branch"}
         
     | 
| 
      
 38 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch", :branch_name, "latest"], Api::Resources::PactVersionsForBranch, {resource_name: "latest_pact_publications_for_branch"}
         
     | 
| 
       36 
39 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch", :branch_name], Api::Resources::PactVersionsForBranch, {resource_name: "pact_publications_for_branch"}
         
     | 
| 
       37 
40 
     | 
    
         | 
| 
       38 
41 
     | 
    
         
             
                    # Pacts
         
     | 
| 
         @@ -43,10 +46,16 @@ module PactBroker 
     | 
|
| 
       43 
46 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "version", :consumer_version_number, "diff", "previous-distinct"], Api::Resources::PactContentDiff, {resource_name: "previous_distinct_pact_version_diff"}
         
     | 
| 
       44 
47 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "version", :consumer_version_number, "diff", "version", :comparison_consumer_version], Api::Resources::PactContentDiff, {resource_name: "pact_version_diff_by_consumer_version"}
         
     | 
| 
       45 
48 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "pact-version", :pact_version_sha, "diff", "pact-version", :comparison_pact_version_sha], Api::Resources::PactContentDiff, {resource_name: "pact_version_diff_by_pact_version_sha"}
         
     | 
| 
      
 49 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "branch", "latest"], Api::Resources::LatestProviderPactsForBranch, {resource_name: "latest_main_branch_provider_pact_publications"}
         
     | 
| 
      
 50 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "branch", :branch_name, "latest"], Api::Resources::LatestProviderPactsForBranch, {resource_name: "latest_branch_provider_pact_publications"}
         
     | 
| 
      
 51 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "branch", :branch_name], Api::Resources::ProviderPactsForConsumerBranch, {resource_name: "branch_provider_pact_publications"}
         
     | 
| 
      
 52 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "branch"], Api::Resources::ProviderPactsForConsumerBranch, {resource_name: "main_branch_provider_pact_publications"}
         
     | 
| 
       46 
53 
     | 
    
         | 
| 
       47 
54 
     | 
    
         
             
                    # Provider states
         
     | 
| 
       48 
55 
     | 
    
         | 
| 
       49 
56 
     | 
    
         
             
                    add ["pacts", "provider", :provider_name, "provider-states"], Api::Resources::ProviderStates, { resource_name: "provider_states" }
         
     | 
| 
      
 57 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "provider-states", "branch", :branch_name], Api::Resources::ProviderStates, { resource_name: "provider_states_for_branch" }
         
     | 
| 
      
 58 
     | 
    
         
            +
                    add ["pacts", "provider", :provider_name, "provider-states", "environment", :environment_uuid], Api::Resources::ProviderStates, { resource_name: "provider_states_for_environment" }
         
     | 
| 
       50 
59 
     | 
    
         | 
| 
       51 
60 
     | 
    
         | 
| 
       52 
61 
     | 
    
         
             
                    # Verifications
         
     | 
    
        data/lib/pact_broker/app.rb
    CHANGED
    
    | 
         @@ -23,7 +23,6 @@ require "rack/pact_broker/application_context" 
     | 
|
| 
       23 
23 
     | 
    
         
             
            require "sucker_punch"
         
     | 
| 
       24 
24 
     | 
    
         
             
            require "pact_broker/api/middleware/configuration"
         
     | 
| 
       25 
25 
     | 
    
         
             
            require "pact_broker/api/middleware/basic_auth"
         
     | 
| 
       26 
     | 
    
         
            -
            require "pact_broker/config/basic_auth_configuration"
         
     | 
| 
       27 
26 
     | 
    
         
             
            require "pact_broker/api/authorization/resource_access_policy"
         
     | 
| 
       28 
27 
     | 
    
         
             
            require "pact_broker/api/middleware/http_debug_logs"
         
     | 
| 
       29 
28 
     | 
    
         
             
            require "pact_broker/application_context"
         
     | 
| 
         @@ -3,7 +3,7 @@ require "pact_broker/config/runtime_configuration_logging_methods" 
     | 
|
| 
       3 
3 
     | 
    
         
             
            require "pact_broker/config/runtime_configuration_database_methods"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "pact_broker/config/runtime_configuration_coercion_methods"
         
     | 
| 
       5 
5 
     | 
    
         
             
            require "pact_broker/version"
         
     | 
| 
       6 
     | 
    
         
            -
            require "pact_broker/config/ 
     | 
| 
      
 6 
     | 
    
         
            +
            require "pact_broker/config/runtime_configuration_basic_auth_methods"
         
     | 
| 
       7 
7 
     | 
    
         
             
            require "pact_broker/string_refinements"
         
     | 
| 
       8 
8 
     | 
    
         
             
            require "pact_broker/hash_refinements"
         
     | 
| 
       9 
9 
     | 
    
         
             
            require "pact_broker/error"
         
     | 
| 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Latest pacts for provider with the specified consumer branch
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Allowed methods: `GET`
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Path: `/pacts/provider/{provider}/branch/{branch}/latest`
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Given a provider name and a consumer version branch name, this resource returns the latest pact for each consumer that has the specified branch.
         
     | 
| 
         @@ -1,5 +1,7 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Latest pacts for provider with the specified tag
         
     | 
| 
      
 1 
     | 
    
         
            +
            # Latest pacts for provider with the specified consumer version tag
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Allowed methods: `GET`
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
      
 5 
     | 
    
         
            +
            Path: `/pacts/provider/{provider}/latest/{tag}`
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
       5 
7 
     | 
    
         
             
            Given a provider name and a consumer version tag name, this resource returns the latest pact for each consumer that has the specified tag.
         
     | 
| 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Provider pacts with consumer branch
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Allowed methods: `GET`
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Path: `/pacts/provider/{provider}/branch/{branch}`
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Given a pacticipant name and a consumer branch, this resource returns all the pact versions for all consumers of this provider with the specified consumer branch. For most use cases, the `latest-provider-pacts-with-branch` relation will better serve consumer needs by only returning the latest pact version for specified consumer branches.
         
     | 
| 
         @@ -2,4 +2,6 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Allowed methods: `GET`
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
      
 5 
     | 
    
         
            +
            Path: `/pacts/provider/{provider}/tag/{tag}`
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
       5 
7 
     | 
    
         
             
            Given a pacticipant name and a consumer version tag, this resource returns all the pact versions for all consumers of this provider with the specified tag. The most common use of this resource is to find all the `production` pact versions for the mobile consumers of an API, so that backwards compatibility can be maintained.
         
     | 
| 
         @@ -2,12 +2,20 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Allowed methods: `GET`
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            Path: `/pacts/provider/{provider}/provider-states`
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
5 
     | 
    
         
             
            This resource returns a aggregated de-duplicated list of all provider states for a given provider.
         
     | 
| 
       8 
6 
     | 
    
         | 
| 
      
 7 
     | 
    
         
            +
            Path: `/pacts/provider/{provider}/provider-states`
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       9 
9 
     | 
    
         
             
            Provider states are collected from the latest pact on the main branch for any dependant consumers.
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
      
 11 
     | 
    
         
            +
            Path: `/pacts/provider/{provider}/provider-states/branch/{branch_name}`
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            Provider states are collected from the latest pacts on the specified branch for any dependant consumers.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            Path: `/pacts/provider/{provider}/provider-states/environment/{environment_name}`
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            Provider states are collected from the latest pacts in the specified environment for any dependant consumers.
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
       11 
19 
     | 
    
         
             
            Example response
         
     | 
| 
       12 
20 
     | 
    
         | 
| 
       13 
21 
     | 
    
         
             
            ```json
         
     | 
| 
         @@ -25,4 +33,3 @@ Example response 
     | 
|
| 
       25 
33 
     | 
    
         
             
                ]
         
     | 
| 
       26 
34 
     | 
    
         
             
            }
         
     | 
| 
       27 
35 
     | 
    
         
             
            ```
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
         @@ -3,7 +3,7 @@ require "pact_broker/dataset" 
     | 
|
| 
       3 
3 
     | 
    
         
             
            require "pact_broker/domain/pact"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "pact_broker/pacts/pact_version"
         
     | 
| 
       5 
5 
     | 
    
         
             
            require "pact_broker/integrations/integration"
         
     | 
| 
       6 
     | 
    
         
            -
            require "pact_broker/tags/ 
     | 
| 
      
 6 
     | 
    
         
            +
            require "pact_broker/tags/head_pact_tag"
         
     | 
| 
       7 
7 
     | 
    
         
             
            require "pact_broker/pacts/pact_publication_dataset_module"
         
     | 
| 
       8 
8 
     | 
    
         
             
            require "pact_broker/pacts/pact_publication_wip_dataset_module"
         
     | 
| 
       9 
9 
     | 
    
         
             
            require "pact_broker/pacts/eager_loaders"
         
     | 
| 
         @@ -44,6 +44,14 @@ module PactBroker 
     | 
|
| 
       44 
44 
     | 
    
         
             
                      .remove_overridden_revisions_from_complete_query
         
     | 
| 
       45 
45 
     | 
    
         
             
                  end
         
     | 
| 
       46 
46 
     | 
    
         | 
| 
      
 47 
     | 
    
         
            +
                  def for_main_branches
         
     | 
| 
      
 48 
     | 
    
         
            +
                    consumers_join = { Sequel[:pact_publications][:consumer_id] => Sequel[:consumers][:id] }
         
     | 
| 
      
 49 
     | 
    
         
            +
                    query = self
         
     | 
| 
      
 50 
     | 
    
         
            +
                    query
         
     | 
| 
      
 51 
     | 
    
         
            +
                      .join(:pacticipants, consumers_join, { table_alias: :consumers })
         
     | 
| 
      
 52 
     | 
    
         
            +
                      .remove_overridden_revisions_from_complete_query
         
     | 
| 
      
 53 
     | 
    
         
            +
                  end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
       47 
55 
     | 
    
         
             
                  def for_currently_deployed_versions(environment_name)
         
     | 
| 
       48 
56 
     | 
    
         
             
                    deployed_versions_join = {
         
     | 
| 
       49 
57 
     | 
    
         
             
                      Sequel[:pact_publications][:consumer_version_id] => Sequel[:deployed_versions][:version_id]
         
     | 
| 
         @@ -11,8 +11,16 @@ module PactBroker 
     | 
|
| 
       11 
11 
     | 
    
         
             
                  extend PactBroker::Services
         
     | 
| 
       12 
12 
     | 
    
         
             
                  extend PactBroker::Repositories::Scopes
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                  def self.list_provider_states(provider)
         
     | 
| 
       15 
     | 
    
         
            -
                     
     | 
| 
      
 14 
     | 
    
         
            +
                  def self.list_provider_states(provider, branch_name = nil, environment_name = nil)
         
     | 
| 
      
 15 
     | 
    
         
            +
                    selector =
         
     | 
| 
      
 16 
     | 
    
         
            +
                      if branch_name
         
     | 
| 
      
 17 
     | 
    
         
            +
                        PactBroker::Pacts::Selector.latest_for_branch(branch_name)
         
     | 
| 
      
 18 
     | 
    
         
            +
                      elsif environment_name
         
     | 
| 
      
 19 
     | 
    
         
            +
                        PactBroker::Pacts::Selector.for_environment(environment_name)
         
     | 
| 
      
 20 
     | 
    
         
            +
                      else
         
     | 
| 
      
 21 
     | 
    
         
            +
                        PactBroker::Pacts::Selector.latest_for_main_branch
         
     | 
| 
      
 22 
     | 
    
         
            +
                      end
         
     | 
| 
      
 23 
     | 
    
         
            +
                    query = scope_for(PactPublication).eager_for_domain_with_content.for_provider_and_consumer_version_selector(provider, selector)
         
     | 
| 
       16 
24 
     | 
    
         
             
                    query.all.flat_map do | pact_publication |
         
     | 
| 
       17 
25 
     | 
    
         
             
                      { "providerStates" => pact_publication.to_domain.content_object.provider_states, "consumer" => pact_publication.to_domain.consumer.name }
         
     | 
| 
       18 
26 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -151,6 +151,36 @@ module PactBroker 
     | 
|
| 
       151 
151 
     | 
    
         
             
                    query.all.sort_by{ | p| p.consumer_name.downcase }.collect(&:to_head_pact)
         
     | 
| 
       152 
152 
     | 
    
         
             
                  end
         
     | 
| 
       153 
153 
     | 
    
         | 
| 
      
 154 
     | 
    
         
            +
                  def find_pacts_by_consumer_branch(provider_name, options = {})
         
     | 
| 
      
 155 
     | 
    
         
            +
                    consumer_name = options[:consumer]
         
     | 
| 
      
 156 
     | 
    
         
            +
                    latest = options.fetch(:latest, false)
         
     | 
| 
      
 157 
     | 
    
         
            +
                    branch = options[:branch_name]
         
     | 
| 
      
 158 
     | 
    
         
            +
                    main_branch = options.fetch(:main_branch, false)
         
     | 
| 
      
 159 
     | 
    
         
            +
                    
         
     | 
| 
      
 160 
     | 
    
         
            +
                    query = scope_for(PactPublication)
         
     | 
| 
      
 161 
     | 
    
         
            +
                              .eager_for_domain_with_content
         
     | 
| 
      
 162 
     | 
    
         
            +
                              .for_provider_name(provider_name)
         
     | 
| 
      
 163 
     | 
    
         
            +
                    
         
     | 
| 
      
 164 
     | 
    
         
            +
                    if consumer_name
         
     | 
| 
      
 165 
     | 
    
         
            +
                      query = query.for_consumer_name(consumer_name)
         
     | 
| 
      
 166 
     | 
    
         
            +
                    end
         
     | 
| 
      
 167 
     | 
    
         
            +
             
     | 
| 
      
 168 
     | 
    
         
            +
                    if main_branch
         
     | 
| 
      
 169 
     | 
    
         
            +
                      if latest
         
     | 
| 
      
 170 
     | 
    
         
            +
                        query = query.latest_for_main_branches
         
     | 
| 
      
 171 
     | 
    
         
            +
                      else
         
     | 
| 
      
 172 
     | 
    
         
            +
                        query = query.for_main_branches
         
     | 
| 
      
 173 
     | 
    
         
            +
                      end
         
     | 
| 
      
 174 
     | 
    
         
            +
                    else 
         
     | 
| 
      
 175 
     | 
    
         
            +
                      if latest
         
     | 
| 
      
 176 
     | 
    
         
            +
                        query = query.latest_for_consumer_branch(branch)
         
     | 
| 
      
 177 
     | 
    
         
            +
                      else
         
     | 
| 
      
 178 
     | 
    
         
            +
                        query = query.for_branch_name(branch)
         
     | 
| 
      
 179 
     | 
    
         
            +
                      end
         
     | 
| 
      
 180 
     | 
    
         
            +
                    end
         
     | 
| 
      
 181 
     | 
    
         
            +
                    query.all.sort_by{ | p| p.consumer_name.downcase }.collect(&:to_head_pact)
         
     | 
| 
      
 182 
     | 
    
         
            +
                  end
         
     | 
| 
      
 183 
     | 
    
         
            +
             
     | 
| 
       154 
184 
     | 
    
         
             
                  def find_for_verification(provider_name, consumer_version_selectors)
         
     | 
| 
       155 
185 
     | 
    
         
             
                    PactsForVerificationRepository.new.find(provider_name, consumer_version_selectors)
         
     | 
| 
       156 
186 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -95,6 +95,26 @@ module PactBroker 
     | 
|
| 
       95 
95 
     | 
    
         
             
                    pact_repository.find_latest_pacts_for_provider provider_name, options[:tag]
         
     | 
| 
       96 
96 
     | 
    
         
             
                  end
         
     | 
| 
       97 
97 
     | 
    
         | 
| 
      
 98 
     | 
    
         
            +
                  def find_latest_pacts_for_provider_by_consumer_branch provider_name, options = {}
         
     | 
| 
      
 99 
     | 
    
         
            +
                    options[:latest] = true
         
     | 
| 
      
 100 
     | 
    
         
            +
                    pact_repository.find_pacts_by_consumer_branch provider_name, options
         
     | 
| 
      
 101 
     | 
    
         
            +
                  end
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
                  def find_pacts_for_provider_by_consumer_branch provider_name, options = {}
         
     | 
| 
      
 104 
     | 
    
         
            +
                    pact_repository.find_pacts_by_consumer_branch provider_name, options
         
     | 
| 
      
 105 
     | 
    
         
            +
                  end
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
                  def find_pacts_for_provider_and_consumer_by_consumer_branch provider_name, consumer, options = {}
         
     | 
| 
      
 108 
     | 
    
         
            +
                    options[:consumer] = consumer
         
     | 
| 
      
 109 
     | 
    
         
            +
                    pact_repository.find_pacts_by_consumer_branch provider_name, options
         
     | 
| 
      
 110 
     | 
    
         
            +
                  end
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
                  def find_latest_pacts_for_provider_and_consumer_by_consumer_branch provider_name, consumer, options = {}
         
     | 
| 
      
 113 
     | 
    
         
            +
                    options[:consumer] = consumer
         
     | 
| 
      
 114 
     | 
    
         
            +
                    options[:latest] = true
         
     | 
| 
      
 115 
     | 
    
         
            +
                    pact_repository.find_pacts_by_consumer_branch provider_name, options
         
     | 
| 
      
 116 
     | 
    
         
            +
                  end
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
       98 
118 
     | 
    
         
             
                  def find_pact_versions_for_provider provider_name, options = {}
         
     | 
| 
       99 
119 
     | 
    
         
             
                    pact_repository.find_pact_versions_for_provider provider_name, options[:tag]
         
     | 
| 
       100 
120 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "pact_broker/ui/controllers/ 
     | 
| 
      
 1 
     | 
    
         
            +
            require "pact_broker/ui/controllers/base"
         
     | 
| 
       2 
2 
     | 
    
         
             
            require "pact_broker/ui/view_models/matrix_lines"
         
     | 
| 
       3 
3 
     | 
    
         
             
            require "pact_broker/matrix/unresolved_selector"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "pact_broker/matrix/parse_query"
         
     | 
| 
         @@ -20,7 +20,7 @@ module PactBroker 
     | 
|
| 
       20 
20 
     | 
    
         
             
                      selectors = [ PactBroker::Matrix::UnresolvedSelector.new(pacticipant_name: params[:pacticipant_name], latest: true, tag: params[:tag]) ]
         
     | 
| 
       21 
21 
     | 
    
         
             
                      options = { latestby: "cvp", limit: 100, tag: params[:to] }
         
     | 
| 
       22 
22 
     | 
    
         
             
                      result = matrix_service.find(selectors, options)
         
     | 
| 
       23 
     | 
    
         
            -
                      lines = PactBroker::UI:: 
     | 
| 
      
 23 
     | 
    
         
            +
                      lines = PactBroker::UI::ViewModels::MatrixLines.new(result, base_url: base_url)
         
     | 
| 
       24 
24 
     | 
    
         
             
                      locals = {
         
     | 
| 
       25 
25 
     | 
    
         
             
                        lines: lines,
         
     | 
| 
       26 
26 
     | 
    
         
             
                        selectors: create_selector_objects(selectors),
         
     | 
| 
         @@ -18,7 +18,7 @@ module PactBroker 
     | 
|
| 
       18 
18 
     | 
    
         
             
                    end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                    get "/" do
         
     | 
| 
       21 
     | 
    
         
            -
                      view_model =  
     | 
| 
      
 21 
     | 
    
         
            +
                      view_model = PactBroker::UI::ViewModels::IndexItems.new(pacticipant_service.find_index_items, base_url: base_url)
         
     | 
| 
       22 
22 
     | 
    
         
             
                      haml "clusters/show", locals: { relationships: view_model, base_url: base_url }, escape_html: true
         
     | 
| 
       23 
23 
     | 
    
         
             
                    end
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "pact_broker/ui/controllers/ 
     | 
| 
      
 1 
     | 
    
         
            +
            require "pact_broker/ui/controllers/base"
         
     | 
| 
       2 
2 
     | 
    
         
             
            require "pact_broker/ui/view_models/index_items"
         
     | 
| 
       3 
3 
     | 
    
         
             
            require "haml"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
         @@ -44,7 +44,7 @@ module PactBroker 
     | 
|
| 
       44 
44 
     | 
    
         
             
                                      []
         
     | 
| 
       45 
45 
     | 
    
         
             
                                    end
         
     | 
| 
       46 
46 
     | 
    
         | 
| 
       47 
     | 
    
         
            -
                      view_index_items =  
     | 
| 
      
 47 
     | 
    
         
            +
                      view_index_items = PactBroker::UI::ViewModels::IndexItems.new(index_items, base_url: base_url, view: view)
         
     | 
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
                      page = :'dashboard/show'
         
     | 
| 
       50 
50 
     | 
    
         
             
                      locals = {
         
     | 
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "pact_broker/ui/controllers/ 
     | 
| 
      
 1 
     | 
    
         
            +
            require "pact_broker/ui/controllers/base"
         
     | 
| 
       2 
2 
     | 
    
         
             
            require "pact_broker/ui/view_models/index_items"
         
     | 
| 
       3 
3 
     | 
    
         
             
            require "pact_broker/string_refinements"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "haml"
         
     | 
| 
         @@ -33,7 +33,7 @@ module PactBroker 
     | 
|
| 
       33 
33 
     | 
    
         
             
                        error_messages << "No pacticipants found matching: \"#{search}\""
         
     | 
| 
       34 
34 
     | 
    
         
             
                      end
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
                      view_index_items =  
     | 
| 
      
 36 
     | 
    
         
            +
                      view_index_items = PactBroker::UI::ViewModels::IndexItems.new(index_items, base_url: base_url)
         
     | 
| 
       37 
37 
     | 
    
         | 
| 
       38 
38 
     | 
    
         
             
                      page = tags ? :'index/show-with-tags' : :'index/show'
         
     | 
| 
       39 
39 
     | 
    
         
             
                      locals = {
         
     | 
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "pact_broker/ui/controllers/ 
     | 
| 
      
 1 
     | 
    
         
            +
            require "pact_broker/ui/controllers/base"
         
     | 
| 
       2 
2 
     | 
    
         
             
            require "pact_broker/ui/view_models/matrix_lines"
         
     | 
| 
       3 
3 
     | 
    
         
             
            require "pact_broker/matrix/unresolved_selector"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "pact_broker/matrix/parse_query"
         
     | 
| 
         @@ -32,7 +32,7 @@ module PactBroker 
     | 
|
| 
       32 
32 
     | 
    
         
             
                          errors = matrix_service.validate_selectors(selectors, options)
         
     | 
| 
       33 
33 
     | 
    
         
             
                          if errors.empty?
         
     | 
| 
       34 
34 
     | 
    
         
             
                            lines = matrix_service.find(selectors, options)
         
     | 
| 
       35 
     | 
    
         
            -
                            locals[:lines] = PactBroker::UI:: 
     | 
| 
      
 35 
     | 
    
         
            +
                            locals[:lines] = PactBroker::UI::ViewModels::MatrixLines.new(lines, base_url: base_url)
         
     | 
| 
       36 
36 
     | 
    
         
             
                            locals[:badge_url] = matrix_badge_url(selectors, lines, base_url)
         
     | 
| 
       37 
37 
     | 
    
         
             
                          else
         
     | 
| 
       38 
38 
     | 
    
         
             
                            locals[:errors] = errors
         
     | 
| 
         @@ -52,7 +52,7 @@ module PactBroker 
     | 
|
| 
       52 
52 
     | 
    
         
             
                                  ]
         
     | 
| 
       53 
53 
     | 
    
         
             
                      options = { latestby: "cvpv", limit: 100 }
         
     | 
| 
       54 
54 
     | 
    
         
             
                      lines = matrix_service.find(selectors, options)
         
     | 
| 
       55 
     | 
    
         
            -
                      lines = PactBroker::UI:: 
     | 
| 
      
 55 
     | 
    
         
            +
                      lines = PactBroker::UI::ViewModels::MatrixLines.new(lines, base_url: base_url)
         
     | 
| 
       56 
56 
     | 
    
         
             
                      locals =  {
         
     | 
| 
       57 
57 
     | 
    
         
             
                                  lines: lines,
         
     | 
| 
       58 
58 
     | 
    
         
             
                                  consumer_name: params[:consumer_name],
         
     | 
| 
         @@ -2,12 +2,12 @@ require "pact_broker/ui/view_models/matrix_line" 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module PactBroker
         
     | 
| 
       4 
4 
     | 
    
         
             
              module UI
         
     | 
| 
       5 
     | 
    
         
            -
                module  
     | 
| 
      
 5 
     | 
    
         
            +
                module ViewModels
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class MatrixLines < Array
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                    def initialize rows, options = {}
         
     | 
| 
       9 
9 
     | 
    
         
             
                      lines = rows.collect do | row |
         
     | 
| 
       10 
     | 
    
         
            -
                        PactBroker::UI:: 
     | 
| 
      
 10 
     | 
    
         
            +
                        PactBroker::UI::ViewModels::MatrixLine.new(row, options)
         
     | 
| 
       11 
11 
     | 
    
         
             
                      end
         
     | 
| 
       12 
12 
     | 
    
         
             
                      super(lines.sort)
         
     | 
| 
       13 
13 
     | 
    
         
             
                    end
         
     | 
    
        data/lib/pact_broker/version.rb
    CHANGED
    
    
    
        data/pact_broker.gemspec
    CHANGED
    
    | 
         @@ -57,11 +57,9 @@ Gem::Specification.new do |gem| 
     | 
|
| 
       57 
57 
     | 
    
         
             
              gem.add_runtime_dependency "sequel", "~> 5.90"
         
     | 
| 
       58 
58 
     | 
    
         
             
              gem.add_runtime_dependency "webmachine", ">= 2.0.0.beta", "< 3.0"
         
     | 
| 
       59 
59 
     | 
    
         
             
              gem.add_runtime_dependency "semver2", "~> 3.4.2"
         
     | 
| 
       60 
     | 
    
         
            -
              gem.add_runtime_dependency "rack", "~> 3. 
     | 
| 
      
 60 
     | 
    
         
            +
              gem.add_runtime_dependency "rack", "~> 3.2"
         
     | 
| 
       61 
61 
     | 
    
         
             
              gem.add_runtime_dependency "redcarpet", ">= 3.5.1", "~>3.5"
         
     | 
| 
       62 
     | 
    
         
            -
               
     | 
| 
       63 
     | 
    
         
            -
              # remove the Gemfile entry pointing to master
         
     | 
| 
       64 
     | 
    
         
            -
              # gem.add_runtime_dependency "pact-support" , ">= 1.21.3", "~> 1.21"
         
     | 
| 
      
 62 
     | 
    
         
            +
              gem.add_runtime_dependency "pact-support" , ">= 1.21.2", "~> 1.21"
         
     | 
| 
       65 
63 
     | 
    
         
             
              gem.add_runtime_dependency "haml", "~>5.0"
         
     | 
| 
       66 
64 
     | 
    
         
             
              gem.add_runtime_dependency "sucker_punch", "~>3.0"
         
     | 
| 
       67 
65 
     | 
    
         
             
              gem.add_runtime_dependency "rack-protection", "~> 4.1"
         
     | 
| 
         @@ -72,4 +70,10 @@ Gem::Specification.new do |gem| 
     | 
|
| 
       72 
70 
     | 
    
         
             
              gem.add_runtime_dependency "anyway_config", "~> 2.1"
         
     | 
| 
       73 
71 
     | 
    
         
             
              gem.add_runtime_dependency "request_store", "~> 1.5"
         
     | 
| 
       74 
72 
     | 
    
         
             
              gem.add_runtime_dependency "moments", "~> 0.2"
         
     | 
| 
      
 73 
     | 
    
         
            +
              # dropped in ruby 3.4 stdlib
         
     | 
| 
      
 74 
     | 
    
         
            +
              gem.add_runtime_dependency "mutex_m", "~> 0.3" # until as-notifications -> webmachine requires it
         
     | 
| 
      
 75 
     | 
    
         
            +
              gem.add_runtime_dependency "csv", "~> 3.0" # lib/pact_broker/api/decorators/relationships_csv_decorator.rb
         
     | 
| 
      
 76 
     | 
    
         
            +
              # dropped in ruby 3.5 stdlib
         
     | 
| 
      
 77 
     | 
    
         
            +
              gem.add_runtime_dependency "ostruct", "~> 0.5" 
         
     | 
| 
      
 78 
     | 
    
         
            +
              gem.add_development_dependency "pstore", "~> 0.1" # until webmachine requires it
         
     | 
| 
       75 
79 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pact_broker
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.117.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Bethany Skurrie
         
     | 
| 
         @@ -135,20 +135,14 @@ dependencies: 
     | 
|
| 
       135 
135 
     | 
    
         
             
                requirements:
         
     | 
| 
       136 
136 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       137 
137 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       138 
     | 
    
         
            -
                    version: '3. 
     | 
| 
       139 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       140 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       141 
     | 
    
         
            -
                    version: 3.1.16
         
     | 
| 
      
 138 
     | 
    
         
            +
                    version: '3.2'
         
     | 
| 
       142 
139 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       143 
140 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       144 
141 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       145 
142 
     | 
    
         
             
                requirements:
         
     | 
| 
       146 
143 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       147 
144 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       148 
     | 
    
         
            -
                    version: '3. 
     | 
| 
       149 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       150 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       151 
     | 
    
         
            -
                    version: 3.1.16
         
     | 
| 
      
 145 
     | 
    
         
            +
                    version: '3.2'
         
     | 
| 
       152 
146 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       153 
147 
     | 
    
         
             
              name: redcarpet
         
     | 
| 
       154 
148 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -169,6 +163,26 @@ dependencies: 
     | 
|
| 
       169 
163 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       170 
164 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       171 
165 
     | 
    
         
             
                    version: '3.5'
         
     | 
| 
      
 166 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 167 
     | 
    
         
            +
              name: pact-support
         
     | 
| 
      
 168 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 169 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 170 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 171 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 172 
     | 
    
         
            +
                    version: 1.21.2
         
     | 
| 
      
 173 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 174 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 175 
     | 
    
         
            +
                    version: '1.21'
         
     | 
| 
      
 176 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 177 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 178 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 179 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 180 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 181 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 182 
     | 
    
         
            +
                    version: 1.21.2
         
     | 
| 
      
 183 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 184 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 185 
     | 
    
         
            +
                    version: '1.21'
         
     | 
| 
       172 
186 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       173 
187 
     | 
    
         
             
              name: haml
         
     | 
| 
       174 
188 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -309,6 +323,62 @@ dependencies: 
     | 
|
| 
       309 
323 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       310 
324 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       311 
325 
     | 
    
         
             
                    version: '0.2'
         
     | 
| 
      
 326 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 327 
     | 
    
         
            +
              name: mutex_m
         
     | 
| 
      
 328 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 329 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 330 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 331 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 332 
     | 
    
         
            +
                    version: '0.3'
         
     | 
| 
      
 333 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 334 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 335 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 336 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 337 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 338 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 339 
     | 
    
         
            +
                    version: '0.3'
         
     | 
| 
      
 340 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 341 
     | 
    
         
            +
              name: csv
         
     | 
| 
      
 342 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 343 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 344 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 345 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 346 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 347 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 348 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 349 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 350 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 351 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 352 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 353 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 354 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 355 
     | 
    
         
            +
              name: ostruct
         
     | 
| 
      
 356 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 357 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 358 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 359 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 360 
     | 
    
         
            +
                    version: '0.5'
         
     | 
| 
      
 361 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 362 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 363 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 364 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 365 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 366 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 367 
     | 
    
         
            +
                    version: '0.5'
         
     | 
| 
      
 368 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 369 
     | 
    
         
            +
              name: pstore
         
     | 
| 
      
 370 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 371 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 372 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 373 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 374 
     | 
    
         
            +
                    version: '0.1'
         
     | 
| 
      
 375 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 376 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 377 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 378 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 379 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 380 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 381 
     | 
    
         
            +
                    version: '0.1'
         
     | 
| 
       312 
382 
     | 
    
         
             
            description: A server that stores and returns pact files generated by the pact gem.
         
     | 
| 
       313 
383 
     | 
    
         
             
              It enables head/prod cross testing of the consumer and provider projects.
         
     | 
| 
       314 
384 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -681,6 +751,7 @@ files: 
     | 
|
| 
       681 
751 
     | 
    
         
             
            - lib/pact_broker/api/resources/latest_pact.rb
         
     | 
| 
       682 
752 
     | 
    
         
             
            - lib/pact_broker/api/resources/latest_pacts.rb
         
     | 
| 
       683 
753 
     | 
    
         
             
            - lib/pact_broker/api/resources/latest_provider_pacts.rb
         
     | 
| 
      
 754 
     | 
    
         
            +
            - lib/pact_broker/api/resources/latest_provider_pacts_for_branch.rb
         
     | 
| 
       684 
755 
     | 
    
         
             
            - lib/pact_broker/api/resources/latest_verification_for_latest_pact.rb
         
     | 
| 
       685 
756 
     | 
    
         
             
            - lib/pact_broker/api/resources/latest_verification_for_pact.rb
         
     | 
| 
       686 
757 
     | 
    
         
             
            - lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb
         
     | 
| 
         @@ -708,6 +779,7 @@ files: 
     | 
|
| 
       708 
779 
     | 
    
         
             
            - lib/pact_broker/api/resources/pagination_methods.rb
         
     | 
| 
       709 
780 
     | 
    
         
             
            - lib/pact_broker/api/resources/previous_distinct_pact_version.rb
         
     | 
| 
       710 
781 
     | 
    
         
             
            - lib/pact_broker/api/resources/provider_pacts.rb
         
     | 
| 
      
 782 
     | 
    
         
            +
            - lib/pact_broker/api/resources/provider_pacts_for_consumer_branch.rb
         
     | 
| 
       711 
783 
     | 
    
         
             
            - lib/pact_broker/api/resources/provider_pacts_for_verification.rb
         
     | 
| 
       712 
784 
     | 
    
         
             
            - lib/pact_broker/api/resources/provider_states.rb
         
     | 
| 
       713 
785 
     | 
    
         
             
            - lib/pact_broker/api/resources/publish_contracts.rb
         
     | 
| 
         @@ -733,10 +805,10 @@ files: 
     | 
|
| 
       733 
805 
     | 
    
         
             
            - lib/pact_broker/build_http_options.rb
         
     | 
| 
       734 
806 
     | 
    
         
             
            - lib/pact_broker/certificates/certificate.rb
         
     | 
| 
       735 
807 
     | 
    
         
             
            - lib/pact_broker/certificates/service.rb
         
     | 
| 
       736 
     | 
    
         
            -
            - lib/pact_broker/config/basic_auth_configuration.rb
         
     | 
| 
       737 
808 
     | 
    
         
             
            - lib/pact_broker/config/load.rb
         
     | 
| 
       738 
809 
     | 
    
         
             
            - lib/pact_broker/config/repository.rb
         
     | 
| 
       739 
810 
     | 
    
         
             
            - lib/pact_broker/config/runtime_configuration.rb
         
     | 
| 
      
 811 
     | 
    
         
            +
            - lib/pact_broker/config/runtime_configuration_basic_auth_methods.rb
         
     | 
| 
       740 
812 
     | 
    
         
             
            - lib/pact_broker/config/runtime_configuration_coercion_methods.rb
         
     | 
| 
       741 
813 
     | 
    
         
             
            - lib/pact_broker/config/runtime_configuration_database_methods.rb
         
     | 
| 
       742 
814 
     | 
    
         
             
            - lib/pact_broker/config/runtime_configuration_logging_methods.rb
         
     | 
| 
         @@ -751,7 +823,6 @@ files: 
     | 
|
| 
       751 
823 
     | 
    
         
             
            - lib/pact_broker/contracts/contracts_to_publish.rb
         
     | 
| 
       752 
824 
     | 
    
         
             
            - lib/pact_broker/contracts/notice.rb
         
     | 
| 
       753 
825 
     | 
    
         
             
            - lib/pact_broker/contracts/service.rb
         
     | 
| 
       754 
     | 
    
         
            -
            - lib/pact_broker/dashboard/service.rb
         
     | 
| 
       755 
826 
     | 
    
         
             
            - lib/pact_broker/dataset.rb
         
     | 
| 
       756 
827 
     | 
    
         
             
            - lib/pact_broker/dataset/page.rb
         
     | 
| 
       757 
828 
     | 
    
         
             
            - lib/pact_broker/date_helper.rb
         
     | 
| 
         @@ -806,18 +877,26 @@ files: 
     | 
|
| 
       806 
877 
     | 
    
         
             
            - lib/pact_broker/doc/views/can-i-deploy.markdown
         
     | 
| 
       807 
878 
     | 
    
         
             
            - lib/pact_broker/doc/views/consumer-version.markdown
         
     | 
| 
       808 
879 
     | 
    
         
             
            - lib/pact_broker/doc/views/consumer.markdown
         
     | 
| 
      
 880 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/branch-pact-versions.markdown
         
     | 
| 
       809 
881 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/environment.markdown
         
     | 
| 
       810 
882 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/environments.markdown
         
     | 
| 
      
 883 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/latest-branch-pact-versions.markdown
         
     | 
| 
      
 884 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/latest-main-branch-pact-versions.markdown
         
     | 
| 
       811 
885 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/latest-pact-versions.markdown
         
     | 
| 
      
 886 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/latest-provider-pacts-with-branch.markdown
         
     | 
| 
      
 887 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/latest-provider-pacts-with-main-branch.markdown
         
     | 
| 
       812 
888 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown
         
     | 
| 
       813 
889 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/latest-provider-pacts.markdown
         
     | 
| 
       814 
890 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/latest-tagged-version.markdown
         
     | 
| 
       815 
891 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/latest-version.markdown
         
     | 
| 
      
 892 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/main-branch-pact-versions.markdown
         
     | 
| 
       816 
893 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/pacticipant-branch-version.markdown
         
     | 
| 
       817 
894 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/pacticipant-branch.markdown
         
     | 
| 
       818 
895 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/pacticipant-version-tag.markdown
         
     | 
| 
       819 
896 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/pacticipant-version.markdown
         
     | 
| 
       820 
897 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/pacticipants.markdown
         
     | 
| 
      
 898 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/provider-pacts-with-branch.markdown
         
     | 
| 
      
 899 
     | 
    
         
            +
            - lib/pact_broker/doc/views/index/provider-pacts-with-main-branch.markdown
         
     | 
| 
       821 
900 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown
         
     | 
| 
       822 
901 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/provider-pacts.markdown
         
     | 
| 
       823 
902 
     | 
    
         
             
            - lib/pact_broker/doc/views/index/publish-contracts.markdown
         
     | 
| 
         @@ -955,7 +1034,7 @@ files: 
     | 
|
| 
       955 
1034 
     | 
    
         
             
            - lib/pact_broker/services.rb
         
     | 
| 
       956 
1035 
     | 
    
         
             
            - lib/pact_broker/string_refinements.rb
         
     | 
| 
       957 
1036 
     | 
    
         
             
            - lib/pact_broker/tags/eager_loaders.rb
         
     | 
| 
       958 
     | 
    
         
            -
            - lib/pact_broker/tags/ 
     | 
| 
      
 1037 
     | 
    
         
            +
            - lib/pact_broker/tags/head_pact_tag.rb
         
     | 
| 
       959 
1038 
     | 
    
         
             
            - lib/pact_broker/tags/repository.rb
         
     | 
| 
       960 
1039 
     | 
    
         
             
            - lib/pact_broker/tags/service.rb
         
     | 
| 
       961 
1040 
     | 
    
         
             
            - lib/pact_broker/tasks.rb
         
     | 
| 
         @@ -968,7 +1047,7 @@ files: 
     | 
|
| 
       968 
1047 
     | 
    
         
             
            - lib/pact_broker/test/test_data_builder.rb
         
     | 
| 
       969 
1048 
     | 
    
         
             
            - lib/pact_broker/ui.rb
         
     | 
| 
       970 
1049 
     | 
    
         
             
            - lib/pact_broker/ui/app.rb
         
     | 
| 
       971 
     | 
    
         
            -
            - lib/pact_broker/ui/controllers/ 
     | 
| 
      
 1050 
     | 
    
         
            +
            - lib/pact_broker/ui/controllers/base.rb
         
     | 
| 
       972 
1051 
     | 
    
         
             
            - lib/pact_broker/ui/controllers/can_i_deploy.rb
         
     | 
| 
       973 
1052 
     | 
    
         
             
            - lib/pact_broker/ui/controllers/clusters.rb
         
     | 
| 
       974 
1053 
     | 
    
         
             
            - lib/pact_broker/ui/controllers/dashboard.rb
         
     | 
| 
         @@ -980,7 +1059,6 @@ files: 
     | 
|
| 
       980 
1059 
     | 
    
         
             
            - lib/pact_broker/ui/helpers/haml_helpers.rb
         
     | 
| 
       981 
1060 
     | 
    
         
             
            - lib/pact_broker/ui/helpers/matrix_helper.rb
         
     | 
| 
       982 
1061 
     | 
    
         
             
            - lib/pact_broker/ui/helpers/url_helper.rb
         
     | 
| 
       983 
     | 
    
         
            -
            - lib/pact_broker/ui/view_models/clusters.rb
         
     | 
| 
       984 
1062 
     | 
    
         
             
            - lib/pact_broker/ui/view_models/index_item.rb
         
     | 
| 
       985 
1063 
     | 
    
         
             
            - lib/pact_broker/ui/view_models/index_item_branch_head.rb
         
     | 
| 
       986 
1064 
     | 
    
         
             
            - lib/pact_broker/ui/view_models/index_item_provider_branch_head.rb
         
     | 
| 
         @@ -1209,7 +1287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       1209 
1287 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       1210 
1288 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       1211 
1289 
     | 
    
         
             
            requirements: []
         
     | 
| 
       1212 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 1290 
     | 
    
         
            +
            rubygems_version: 3.7.2
         
     | 
| 
       1213 
1291 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       1214 
1292 
     | 
    
         
             
            summary: See description
         
     | 
| 
       1215 
1293 
     | 
    
         
             
            test_files: []
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |