kennel 1.135.1 → 1.135.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: 24069caa804f546ea584129a0c300e0ceb974798a3015a7c70a9a0f0b2423da6
4
- data.tar.gz: 9fb59fc2d21a839ebd965f5f72b604c75d1bac64e1591cd51614c1ec0f24d947
3
+ metadata.gz: 8928631a86f3c83bfabba16aea02f9ed8bc853ddbb7c316495dc15081fe90239
4
+ data.tar.gz: 63b5107f2a19fd90a4a3b79d6da278956c50dc873162725395f74701e02b9d3b
5
5
  SHA512:
6
- metadata.gz: b566afcb3f60379a20cce4bcdea77238ec4dcbfc243ce6c1c0c5017710e4037591a55fca1c4dd7963539fa919710cff422d19beb1cc05414572266c7b9a7be1f
7
- data.tar.gz: 717abf8426124a8be7d9f36ece88226adf56a3543673f0260a7295d5884748e91269fb0a75babd91ba05d4f8928cf1fe8e8255b95f54919039775f65cd1f601c
6
+ metadata.gz: 42d9bdc4fba36067d3fc65cf86ef19159c66a0a57fe1d1ab709a598d77eacc843cb591904b8c652a1dbc49626d2ae8ad4ca8bbf170e72485a7de2183513f71bd
7
+ data.tar.gz: 36f1d3207327b416667438ecb304882dbf3ac1b6da9fc066033efc6d47098995a863eb3096cc19d2ff064d09ae7d452a0e9a53b7f6f378d2bb30de66650ea578
@@ -5,7 +5,8 @@ module Kennel
5
5
  include TemplateVariables
6
6
 
7
7
  READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [
8
- :author_handle, :author_name, :modified_at, :deleted_at, :url, :is_read_only, :notify_list, :restricted_roles
8
+ :author_handle, :author_name, :modified_at, :deleted_at, :url, :is_read_only, :notify_list, :restricted_roles,
9
+ :tags
9
10
  ]
10
11
  TRACKING_FIELD = :description
11
12
  REQUEST_DEFAULTS = {
@@ -72,8 +73,6 @@ module Kennel
72
73
  template_variable_presets: nil
73
74
  }.freeze
74
75
 
75
- TAG_PREFIX = /^team:/
76
-
77
76
  settings(
78
77
  :title, :description, :definitions, :widgets, :layout_type, :template_variable_presets, :reflow_type,
79
78
  :tags
@@ -85,7 +84,10 @@ module Kennel
85
84
  widgets: -> { [] },
86
85
  template_variable_presets: -> { DEFAULTS.fetch(:template_variable_presets) },
87
86
  reflow_type: -> { layout_type == "ordered" ? "auto" : nil },
88
- tags: -> { project.team.tags } # ideally project.tags but that causes diffs
87
+ tags: -> do # not inherited by default to make onboarding to using dashboard tags simple
88
+ team = project.team
89
+ team.tag_dashboards ? team.tags : []
90
+ end
89
91
  )
90
92
 
91
93
  class << self
@@ -153,9 +155,7 @@ module Kennel
153
155
  all_widgets = render_definitions(definitions) + widgets
154
156
  expand_q all_widgets
155
157
  tags = tags()
156
-
157
- # TODO: remove this once dd UI shows all tags ... maybe remove team tag once that is usable vis UI
158
- tags_as_string = (project.team.tag_dashboards && !tags.empty? ? " (#{tags.join(" ")})" : "")
158
+ tags_as_string = (tags.empty? ? "" : " (#{tags.join(" ")})")
159
159
 
160
160
  json = super.merge(
161
161
  layout_type: layout_type,
@@ -163,8 +163,7 @@ module Kennel
163
163
  description: description,
164
164
  template_variables: render_template_variables,
165
165
  template_variable_presets: template_variable_presets,
166
- widgets: all_widgets,
167
- tags: tags.grep(TAG_PREFIX)
166
+ widgets: all_widgets
168
167
  )
169
168
 
170
169
  json[:reflow_type] = reflow_type if reflow_type # setting nil breaks create with "ordered"
@@ -151,7 +151,7 @@ module Kennel
151
151
  rescue StandardError
152
152
  if unfiltered_validation_errors.empty?
153
153
  @unfiltered_validation_errors = nil
154
- raise PrepareError, safe_tracking_id # FIXME: this makes errors hard to debug when running tests
154
+ raise PrepareError, safe_tracking_id
155
155
  end
156
156
  end
157
157
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.135.1"
3
+ VERSION = "1.135.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.135.1
4
+ version: 1.135.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: 2023-03-01 00:00:00.000000000 Z
11
+ date: 2023-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs