kennel 1.110.0 → 1.112.0

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: 96f333547d6fe858544175909310a96c5b65507eb8d265285b4ee0b56550ac23
4
- data.tar.gz: b4cb7c9a09c432a8faa5ba57746e4f14ee07730de89e3616c88a512db6ab1d5a
3
+ metadata.gz: d0daaf865eea8c23b97ab763827ecf7a7addbe7cc3f8683d9c2ec0ba2b5115d5
4
+ data.tar.gz: ffbffb714491fae59ef58738fb90dea0533571b1694a372cfd99269a9c74c321
5
5
  SHA512:
6
- metadata.gz: dee8590a0796078c82563b38fba653bbf3a3f6596ccc46206665810fe2c19a98de932a310ac4a524dc6ab63f041b5dffe61d0c19d15bd253d09f44a4b8d88e0f
7
- data.tar.gz: ccc05391cf707a64ab70c2e8afe9ba26f9c6fab4632a5f9abdae567504930ec91583989f805ec9cd20d1242068097c258123277d85ea0d605c69c415cc4a67e3
6
+ metadata.gz: d59cbb2e220bfc906d3842618704ddd09ed1636eab7923985efd75d5631b9c8a065f5026ec74a77b4da4112190b8798675aa538a6b97a2aecf96d0c90611a532
7
+ data.tar.gz: 7e55958dc660217e230f5b1670c890d81619b042b181d29f68288115a4f05cf5d7aff9571aabf8937886379c30cb74188d139bbdbc9d7420e3f27c5faad939ec
@@ -8,6 +8,9 @@ module Kennel
8
8
  :deleted, :id, :created, :created_at, :creator, :org_id, :modified, :modified_at,
9
9
  :klass, :tracking_id # added by syncer.rb
10
10
  ].freeze
11
+ ALLOWED_KENNEL_ID_CHARS = "a-zA-Z_\\d.-"
12
+ ALLOWED_KENNEL_ID_FULL = "[#{ALLOWED_KENNEL_ID_CHARS}]+:[#{ALLOWED_KENNEL_ID_CHARS}]+"
13
+ ALLOWED_KENNEL_ID_REGEX = /\A#{ALLOWED_KENNEL_ID_FULL}\z/.freeze
11
14
 
12
15
  settings :id, :kennel_id
13
16
 
@@ -25,7 +28,7 @@ module Kennel
25
28
  end
26
29
 
27
30
  def parse_tracking_id(a)
28
- a[self::TRACKING_FIELD].to_s[/-- Managed by kennel (\S+:\S+)/, 1]
31
+ a[self::TRACKING_FIELD].to_s[/-- Managed by kennel (#{ALLOWED_KENNEL_ID_FULL})/, 1]
29
32
  end
30
33
 
31
34
  # TODO: combine with parse into a single method or a single regex
@@ -76,7 +79,9 @@ module Kennel
76
79
  def tracking_id
77
80
  @tracking_id ||= begin
78
81
  id = "#{project.kennel_id}:#{kennel_id}"
79
- raise ValidationError, "#{id} kennel_id cannot include whitespace" if id.match?(/\s/) # <-> parse_tracking_id
82
+ unless id.match?(ALLOWED_KENNEL_ID_REGEX) # <-> parse_tracking_id
83
+ raise ValidationError, "#{id} must match #{ALLOWED_KENNEL_ID_REGEX}"
84
+ end
80
85
  id
81
86
  end
82
87
  end
@@ -53,8 +53,11 @@ module Kennel
53
53
  super
54
54
 
55
55
  # tags come in a semi-random order and order is never updated
56
- expected[:tags]&.sort!
57
- actual[:tags].sort!
56
+ expected[:tags] = expected[:tags]&.sort
57
+ actual[:tags] = actual[:tags]&.sort
58
+
59
+ expected[:locations] = expected[:locations]&.sort
60
+ actual[:locations] = actual[:locations]&.sort
58
61
 
59
62
  ignore_default(expected, actual, DEFAULTS)
60
63
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.110.0"
3
+ VERSION = "1.112.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.110.0
4
+ version: 1.112.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-15 00:00:00.000000000 Z
11
+ date: 2022-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday