completion-kit 0.5.16 → 0.5.18

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: 44ca1ebf41c36d1a0db28cd7963d28dce2fad193b58a260bfdef5557208ffd1b
4
- data.tar.gz: 82b93baa3544e4522c8e9f7551d0d23fb51bf22f9b6fab48664862c4cd96a084
3
+ metadata.gz: 25e795a8d94b2f0984e65d312eb152ffabcda8e7929a52529906ff1fab6cfa4f
4
+ data.tar.gz: 91110f1c5736d0c6d3c12ef5aa5a75b66ffe0d565cf5777bd9f2d322936e01d5
5
5
  SHA512:
6
- metadata.gz: 9c51360d6a20ce128f039953cfcf1c4eff81db63676c034a0e20f1d2506ccc4e8b46ce70137c503ce0c35d4f307f8e912c84363740434667f4f7d3d2c7850efd
7
- data.tar.gz: f8481312aec99fbfee9a5ca4e29fd12da91b3af4196ced84f831133b5b9f55ec4fdbadbca6cb0a853d85fbc002c1c9d916a65cc259e82f5bf7875d531639605e
6
+ metadata.gz: 87678468d49193e088d4b1c6c28abe5a63ef67de679cfeb894dd64238810d456e7505bae78224e2c330860f177deff8bf834fab0a1c9abdca4e2cafd81e5463b
7
+ data.tar.gz: 2755a9885f3242017dce04a91680f4499b5cd8907f1043f9bab41d46651ec234ebe4c0f03886b72a0dac421a8787f56923da884b6d5112f85c409392dbfea969
@@ -3172,10 +3172,11 @@ select.ck-input {
3172
3172
  cursor: pointer;
3173
3173
  }
3174
3174
 
3175
- .ck-metrics-table th:nth-child(1), .ck-metrics-table td:nth-child(1) { width: 16rem; white-space: nowrap; }
3175
+ .ck-metrics-table th:nth-child(1), .ck-metrics-table td:nth-child(1) { width: 18rem; white-space: normal; }
3176
3176
  .ck-metrics-table th:nth-child(2), .ck-metrics-table td:nth-child(2) { width: auto; }
3177
3177
  .ck-metrics-table th:nth-child(3), .ck-metrics-table td:nth-child(3) { width: 16rem; }
3178
3178
  .ck-metrics-table th:nth-child(4), .ck-metrics-table td:nth-child(4) { width: 3rem; }
3179
+ .ck-metrics-table td:nth-child(1) strong { overflow-wrap: anywhere; }
3179
3180
 
3180
3181
  .ck-datasets-table th:nth-child(1), .ck-datasets-table td:nth-child(1) { width: auto; }
3181
3182
  .ck-datasets-table th:nth-child(2), .ck-datasets-table td:nth-child(2) { width: 5rem; white-space: nowrap; }
@@ -180,15 +180,23 @@ module CompletionKit
180
180
  end
181
181
 
182
182
  def ck_run_path(run)
183
- CompletionKit::Engine.routes.url_helpers.run_path(run)
183
+ CompletionKit::Engine.routes.url_helpers.run_path(run, **ck_engine_path_options)
184
184
  end
185
185
 
186
186
  def ck_prompt_path(prompt)
187
- CompletionKit::Engine.routes.url_helpers.prompt_path(prompt)
187
+ CompletionKit::Engine.routes.url_helpers.prompt_path(prompt, **ck_engine_path_options)
188
188
  end
189
189
 
190
190
  def ck_dataset_path(dataset)
191
- CompletionKit::Engine.routes.url_helpers.dataset_path(dataset)
191
+ CompletionKit::Engine.routes.url_helpers.dataset_path(dataset, **ck_engine_path_options)
192
+ end
193
+
194
+ # Dynamic route segments owned by the host's mount scope (e.g. an
195
+ # `org_slug` from `scope "/orgs/:org_slug"`) live in `url_options[:_recall]`.
196
+ # The engine's url_helpers won't read them out of the nested recall hash to
197
+ # satisfy a required segment — they have to arrive as explicit kwargs.
198
+ def ck_engine_path_options
199
+ (url_options[:_recall] || {}).except(:controller, :action)
192
200
  end
193
201
 
194
202
  def ck_format_maybe_json(text)
@@ -28,7 +28,7 @@
28
28
  <% if @run.dataset %>
29
29
  <span class="ck-run-config__dataset">
30
30
  <%= link_to @run.dataset.name, dataset_path(@run.dataset), class: "ck-link" %>
31
- <span class="ck-run-config__dataset-meta"><%= dataset_lines.count %> rows</span>
31
+ <span class="ck-run-config__dataset-meta"><%= @run.dataset.row_count %> rows</span>
32
32
  <button type="button" class="ck-run-config__dataset-preview" onclick="document.getElementById('dataset-preview-<%= @run.id %>').showModal()">Preview</button>
33
33
  </span>
34
34
  <% else %>
@@ -93,7 +93,7 @@
93
93
  <header class="ck-modal__header">
94
94
  <div class="ck-modal__heading">
95
95
  <h2 class="ck-modal__title"><%= @run.dataset.name %></h2>
96
- <span class="ck-modal__meta"><%= dataset_lines.count %> rows</span>
96
+ <span class="ck-modal__meta"><%= @run.dataset.row_count %> rows</span>
97
97
  </div>
98
98
  <button type="button" class="ck-modal__close" aria-label="Close" onclick="this.closest('dialog').close()">×</button>
99
99
  </header>
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.5.16"
2
+ VERSION = "0.5.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: completion-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.5.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin