Removed extensions URI Builder

Safe to remove since it's no longer needed.

Issue: 352
Milestone: minor
This commit is contained in:
Brooke Kuhlmann
2026-07-30 17:02:14 -06:00
parent b49bcc8a44
commit 7bc55b36bb
2 changed files with 0 additions and 49 deletions
-17
View File
@@ -1,17 +0,0 @@
# frozen_string_literal: true
module Terminus
module Aspects
module Extensions
# A specialized URI builder based template and data to produce an array of fully formed URIs.
class URIBuilder
include Deps["aspects.extensions.contextualizer", renderer: "liquid.basic"]
def call extension, template
contextualizer.call(extension)
.then { |data| renderer.call(template, data).split }
end
end
end
end
end
@@ -1,32 +0,0 @@
# frozen_string_literal: true
require "hanami_helper"
RSpec.describe Terminus::Aspects::Extensions::URIBuilder do
subject(:builder) { described_class.new }
describe "#call" do
let :extension do
Factory.structs[
:extension,
fields: [
{"keyname" => "one", "default" => 1},
{"keyname" => "two", "default" => 2}
]
]
end
it "answers URIs with default data" do
expect(builder.call(extension, "https://test.io")).to contain_exactly("https://test.io")
end
it "answers URIs with custom data" do
template = <<~CONTENT
https://test.io/{{extension.values.one}}
https://test.io/{{extension.values.two}}
CONTENT
expect(builder.call(extension, template)).to eq(%w[https://test.io/1 https://test.io/2])
end
end
end