Sha256: e2ee3d756353143ff611ca9e7cff8e1a467461b3f6d9eb9fd545573e9df086df

Contents?: true

Size: 993 Bytes

Versions: 12

Compression:

Stored size: 993 Bytes

Contents

require "cogger"
require "containable"
require "etcher"
require "runcom"
require "spek"

<% namespace do %>
  # Provides a global gem container for injection into other objects.
  module Container
    extend Containable

    register :registry do
      Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
                      .add_loader(:yaml, self[:defaults_path])
                      .add_loader(:yaml, self[:xdg_config].active)
    end

    register(:settings) { Etcher.call(self[:registry]).dup }
    register(:specification) { Spek::Loader.call "#{__dir__}/<%= Array.new(2 + settings.project_levels, "../").join %><%= settings.project_name %>.gemspec" }
    register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
    register(:xdg_config) { Runcom::Config.new "<%= settings.project_path %>/configuration.yml" }
    register(:logger) { Cogger.new id: "<%= settings.project_name %>" }
    register :io, STDOUT
  end
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gemsmith-23.0.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.10.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.9.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.8.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.7.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.6.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.5.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.4.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.3.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.2.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.1.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
gemsmith-22.0.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb