kennel 1.93.0 → 1.94.2

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: f5c90741d459ffe101d85e766085ac9d2687eefa66039bf8956fb87d9ea6856f
4
- data.tar.gz: 7c1b63c19b108fa86220de5bb6dc96ce05dc4902335a4a8f653448d3c6adeca3
3
+ metadata.gz: a084e0be7ff70945f9cdc705440e520d8613627d237633e4d49c83cb51222229
4
+ data.tar.gz: a4d1ab3746d71351a9606f3084d24fd7eff4781df659f28263ac5803744ec1dc
5
5
  SHA512:
6
- metadata.gz: a015c03ac9583762088c11609f4f321effdab3789cb4f6f4f1b49409da8802db79c1f0c6ac781f524184aef4426fcdd10db3028d7423bced9f787cea9d697fe1
7
- data.tar.gz: 16385c8f90d7ce325931ddbfaea64e7238d9c33805ed934678f95789839460a3b1c851a5e2b9586173083d72c48eca2df59a67a8759d224de8f97db83cd78b95
6
+ metadata.gz: d69aad6485a1243c18880a4d257d4edf45c2c9f2cbd1c8c3935528a10e546db7f8d1922e8adef660ab79360b84c5a63891495fd487f3f889c091b5c1cffacb62
7
+ data.tar.gz: 94f9c351163a3e4efd6cb3a04a5c2068aa7810481203f4f8b937b6fd5e76615a96249cc99d0328c89bf3d6e247a62488bd2562801112fb6b58432ba6d2213617
@@ -132,8 +132,9 @@ module Kennel
132
132
  .gsub(": null", ": nil")
133
133
  .gsub(/(^\s*)"([a-zA-Z][a-zA-Z\d_]*)":/, "\\1\\2:") # "foo": 1 -> foo: 1
134
134
  .gsub(/: \[\n\s+\]/, ": []") # empty arrays on a single line
135
- .gsub(/^/, " ") # indent
136
135
  .gsub('q: "metadata"', "q: :metadata") # bring symbols back
136
+ .gsub(/^/, " ") # indent
137
+ pretty = convert_strings_to_heredoc(pretty)
137
138
 
138
139
  "\n#{pretty}\n "
139
140
  elsif k == :message
@@ -147,6 +148,20 @@ module Kennel
147
148
  end.join(",\n")
148
149
  end
149
150
 
151
+ def convert_strings_to_heredoc(text)
152
+ text.gsub(/^( *)([^" ]+ *)"([^"]+\\n[^"]+)"(,)?\n/) do
153
+ indent = $1
154
+ prefix = $2
155
+ string = $3
156
+ comma = $4
157
+ <<~CODE.gsub(/ +$/, "")
158
+ #{indent}#{prefix}<<~TXT#{comma}
159
+ #{indent} #{string.gsub("\\n", "\n#{indent} ").rstrip}
160
+ #{indent}TXT
161
+ CODE
162
+ end
163
+ end
164
+
150
165
  # sort dashboard widgets + nesting
151
166
  def sort_widgets(outer)
152
167
  outer[:widgets]&.each do |widgets|
@@ -6,7 +6,7 @@ module Kennel
6
6
  include OptionalValidations
7
7
 
8
8
  READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [
9
- :author_handle, :author_name, :modified_at, :url, :is_read_only, :notify_list
9
+ :author_handle, :author_name, :modified_at, :url, :is_read_only, :notify_list, :restricted_roles
10
10
  ]
11
11
  TRACKING_FIELD = :description
12
12
  REQUEST_DEFAULTS = {
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.93.0"
3
+ VERSION = "1.94.2"
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.93.0
4
+ version: 1.94.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-21 00:00:00.000000000 Z
11
+ date: 2021-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday