Closed jeremyf closed 3 years ago
The Huborg::Client#push_template! should be able to replace strings in the template with mapped values.
Huborg::Client#push_template!
I'm envisioning something like this:
client = Huborg::Client.new( github_access_token: ENV.fetch("GITHUB_ACCESS_TOKEN"), org_names: ENV.fetch("GITHUB_ORG_NAME") ) client.push_template!( template: "/path/to/file/on/your/system", filename: "relative/path/in/repository" ) do |pusher| pusher.template.gsub!("{{ library }}", pusher.repo.name) end
I'm not sold on the interface, but am trying to say that we should expose a copy of the template that we are going to push up to the given repository. That copy, we should be able to run string-like commands against.
See https://github.com/samvera/iiif_manifest/pull/51
The
Huborg::Client#push_template!
should be able to replace strings in the template with mapped values.I'm envisioning something like this:
I'm not sold on the interface, but am trying to say that we should expose a copy of the template that we are going to push up to the given repository. That copy, we should be able to run string-like commands against.
See https://github.com/samvera/iiif_manifest/pull/51