Sha256: 95f593a2963df432736c44aed90977cfd776f007d2123663c0f274d2c4d627f3

Contents?: true

Size: 949 Bytes

Versions: 104

Compression:

Stored size: 949 Bytes

Contents

lib = File.expand_path("../../../", __FILE__)
$:.unshift(lib)

require "memoist"
require "terraspace" # for interface

require "terraspace_plugin_<%= name %>/version"
require "terraspace_plugin_<%= name %>/autoloader"
TerraspacePlugin<%= camel_name %>::Autoloader.setup

module TerraspacePlugin<%= camel_name %>
  class Error < StandardError; end

  # Friendlier method for config/plugins/<%= name %>.rb. Example:
  #
  #     TerraspacePlugin<%= camel_name %>.configure do |config|
  #       config.resource.property = "value"
  #     end
  #
  def configure(&block)
    Interfaces::Config.instance.configure(&block)
  end

  def config
    Interfaces::Config.instance.config
  end

  extend self
end

Terraspace::Plugin.register("<%= name %>",
  backend: "PROVIDER_BACKEND",
  config_class: TerraspacePlugin<%= camel_name %>::Interfaces::Config,
  layer_class: TerraspacePlugin<%= camel_name %>::Interfaces::Layer,
  root: File.dirname(__dir__),
)

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.16 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.15 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.14 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.13 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.12 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.11 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.10 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.9 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.8 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.7 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.6 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.5 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.4 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.3 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.2 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.1 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.2.0 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.1.7 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt
terraspace-2.1.6 lib/templates/plugin/core/lib/terraspace_plugin_%name%.rb.tt