completion-kit 0.5.17 → 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: 4ce9123debaea45400d854ccca1cef4ca1c93a486bb397213f7e7998c8748ca2
4
- data.tar.gz: 4fc585bef631af5ee454a8e86bfd7cbdf95303d0e100e5405a644b1ca85fae2b
3
+ metadata.gz: 25e795a8d94b2f0984e65d312eb152ffabcda8e7929a52529906ff1fab6cfa4f
4
+ data.tar.gz: 91110f1c5736d0c6d3c12ef5aa5a75b66ffe0d565cf5777bd9f2d322936e01d5
5
5
  SHA512:
6
- metadata.gz: 37321a08941fbdc87e43698a18db78ef3adb100831449e128a5487004e93714ea494361b07a2aec4b55b8b723aae39e0a8c38f5f7b82f377e365269eeb3ffa0c
7
- data.tar.gz: 8744ac203aeb30e7dceda1fad9cd70b5f1b31c8f4eed156ed66b7ed8e33a8be92955d4d025fbfd313d0c8389c117ca0ac44f551dd7251da4148c00430da75ec4
6
+ metadata.gz: 87678468d49193e088d4b1c6c28abe5a63ef67de679cfeb894dd64238810d456e7505bae78224e2c330860f177deff8bf834fab0a1c9abdca4e2cafd81e5463b
7
+ data.tar.gz: 2755a9885f3242017dce04a91680f4499b5cd8907f1043f9bab41d46651ec234ebe4c0f03886b72a0dac421a8787f56923da884b6d5112f85c409392dbfea969
@@ -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, **url_options.except(:host, :protocol, :script_name))
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, **url_options.except(:host, :protocol, :script_name))
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, **url_options.except(:host, :protocol, :script_name))
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)
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.5.17"
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.17
4
+ version: 0.5.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin