pact_broker 2.93.3 → 2.93.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 945a04d666baecd644bffd53da2de97fad0af2cc6c1170ed7dabaa657ef71184
4
- data.tar.gz: 1eec76fd7c899f5547e3cd6c937589c0976c98642ee2d33be753cb4739e2ab61
3
+ metadata.gz: dd8313de32ee72fbd7202e9279130983eeccf2d5bc9c6ae589a5ed9700854cbd
4
+ data.tar.gz: 8f7d311c9cbec69ca70f4a2420409e6c4747fcb0d1ae0f9af4d04baaf10aa43a
5
5
  SHA512:
6
- metadata.gz: 5877ebb9cf131b6c8897c39c639e279daa5d785e252184f2cffbbd5376e18ae9936f11bcb879e08745ec63f00f5c4d65b4bc77ef1f93d64c5193c3b86810534c
7
- data.tar.gz: 2ed197a1ee3e6050688ed6074149210b7a8188fa3e60b68c12155f4b26eb3fe5def95ae4e13bc994f42a802b93540738240b59119b51b59bd2bfee3f9d030940
6
+ metadata.gz: baaf854e49a5d623279b2481933fb9e033289efba9b4d9350703d9dc9737dac367b6076938f8f309426480f0745d9fe181c8f7f296f8727e17584de498ea631e
7
+ data.tar.gz: ea459192ee83bce3c4fe1c307ad8f2ab3c0ed2734f40162cef0ae95033b81d0e3e7bc12d2765af52ae4a06a95ddfed8dfdca7b0c421e923aaa2ba4a172552bcf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ <a name="v2.93.4"></a>
2
+ ### v2.93.4 (2022-02-21)
3
+
4
+ #### Bug Fixes
5
+
6
+ * **matrix page**
7
+ * set correct base URL for links when a path is specified in the base URL ([8305456b](/../../commit/8305456b))
8
+
9
+ * handle DateTimes that come back from Sqlite as Strings ([1312a049](/../../commit/1312a049))
10
+
1
11
  <a name="v2.93.3"></a>
2
12
  ### v2.93.3 (2022-02-02)
3
13
 
@@ -23,7 +23,7 @@ module PactBroker
23
23
  end
24
24
 
25
25
  def postgres?
26
- adapter == "postgres"
26
+ adapter =~ /postgres/
27
27
  end
28
28
 
29
29
  def adapter
data/lib/db.rb CHANGED
@@ -71,7 +71,7 @@ module DB
71
71
  end
72
72
 
73
73
  def self.postgres?
74
- !!(PACT_BROKER_DB.adapter_scheme.to_s == "postgres")
74
+ !!(PACT_BROKER_DB.adapter_scheme.to_s =~ /postgres/)
75
75
  end
76
76
 
77
77
  PACT_BROKER_DB ||= connection_for_env ENV.fetch("RACK_ENV")
@@ -2,8 +2,16 @@ module PactBroker
2
2
  module Api
3
3
  module Decorators
4
4
  module FormatDateTime
5
+ # Keep this in sync with Sequel.datetime_class.
6
+ # Needs to be upgraded from DateTime to Time as Time is deprecated
7
+ DATE_TIME_CLASS = DateTime
8
+
5
9
  def self.call(date_time)
6
- date_time.to_time.utc.to_datetime.xmlschema if date_time
10
+ if date_time.is_a?(String)
11
+ DATE_TIME_CLASS.strptime(date_time).to_time.utc.to_datetime.xmlschema
12
+ elsif date_time
13
+ date_time.to_time.utc.to_datetime.xmlschema if date_time
14
+ end
7
15
  end
8
16
 
9
17
  def format_date_time(date_time)
@@ -72,7 +72,7 @@ module PactBroker
72
72
  end
73
73
 
74
74
  def postgres?
75
- database_credentials[:adapter] == "postgres"
75
+ database_credentials[:adapter] =~ /postgres/
76
76
  end
77
77
  private :postgres?
78
78
 
@@ -283,8 +283,6 @@ module PactBroker
283
283
 
284
284
  # rubocop: disable Metrics/CyclomaticComplexity
285
285
  def <=> other
286
- # elsif consumer || other.consumer
287
- # consumer_comparison(other)
288
286
  if overall_latest? || other.overall_latest?
289
287
  overall_latest_comparison(other)
290
288
  elsif latest_for_branch? || other.latest_for_branch?
@@ -297,6 +295,8 @@ module PactBroker
297
295
  currently_deployed_comparison(other)
298
296
  elsif currently_supported? || other.currently_supported?
299
297
  currently_supported_comparison(other)
298
+ elsif consumer || other.consumer
299
+ consumer_comparison(other)
300
300
  else
301
301
  0
302
302
  end
@@ -358,8 +358,8 @@ module PactBroker
358
358
  end
359
359
 
360
360
  def consumer_comparison(other)
361
- if consumer == other.consumer
362
- 0
361
+ if consumer && other.consumer
362
+ consumer <=> other.consumer
363
363
  else
364
364
  consumer ? -1 : 1
365
365
  end
@@ -36,7 +36,7 @@ module PactBroker
36
36
  end
37
37
 
38
38
  def postgres?
39
- Sequel::Model.db.adapter_scheme.to_s == "postgres"
39
+ Sequel::Model.db.adapter_scheme.to_s =~ /postgres/
40
40
  end
41
41
 
42
42
  def select_all_qualified
@@ -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::ViewDomain::MatrixLines.new(lines)
35
+ locals[:lines] = PactBroker::UI::ViewDomain::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
@@ -1,3 +1,3 @@
1
1
  module PactBroker
2
- VERSION = "2.93.3"
2
+ VERSION = "2.93.4"
3
3
  end
@@ -101,7 +101,7 @@ module Sequel
101
101
  end
102
102
 
103
103
  def postgres?
104
- model.db.adapter_scheme.to_s == "postgres"
104
+ model.db.adapter_scheme.to_s =~ /postgres/
105
105
  end
106
106
 
107
107
  def values_to_update
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.93.3
4
+ version: 2.93.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bethany Skurrie
8
8
  - Sergei Matheson
9
9
  - Warner Godfrey
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-02-10 00:00:00.000000000 Z
13
+ date: 2022-02-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -1211,7 +1211,7 @@ homepage: https://github.com/pact-foundation/pact_broker
1211
1211
  licenses:
1212
1212
  - MIT
1213
1213
  metadata: {}
1214
- post_install_message:
1214
+ post_install_message:
1215
1215
  rdoc_options: []
1216
1216
  require_paths:
1217
1217
  - lib
@@ -1227,7 +1227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1227
1227
  version: '0'
1228
1228
  requirements: []
1229
1229
  rubygems_version: 3.3.7
1230
- signing_key:
1230
+ signing_key:
1231
1231
  specification_version: 4
1232
1232
  summary: See description
1233
1233
  test_files: []