Sha256: 68d26e79277568f5255528cb52f2fcf99d05f348594c612cc7d34ce56a3e15b8

Contents?: true

Size: 650 Bytes

Versions: 9

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

require "dry/container"

module Gemsmith
  module CLI
    module Actions
      # Provides a single container with application and action specific dependencies.
      module Container
        extend Dry::Container::Mixin

        config.registry = ->(container, key, value, _options) { container[key.to_s] = value }

        merge Gemsmith::Container

        register(:config) { Config.new }
        register(:build) { Build.new }
        register(:install) { Install.new }
        register(:publish) { Publish.new }
        register(:edit) { Edit.new }
        register(:view) { View.new }
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gemsmith-18.5.0 lib/gemsmith/cli/actions/container.rb
gemsmith-18.4.0 lib/gemsmith/cli/actions/container.rb
gemsmith-18.3.0 lib/gemsmith/cli/actions/container.rb
gemsmith-18.2.0 lib/gemsmith/cli/actions/container.rb
gemsmith-18.1.1 lib/gemsmith/cli/actions/container.rb
gemsmith-18.1.0 lib/gemsmith/cli/actions/container.rb
gemsmith-18.0.2 lib/gemsmith/cli/actions/container.rb
gemsmith-18.0.1 lib/gemsmith/cli/actions/container.rb
gemsmith-18.0.0 lib/gemsmith/cli/actions/container.rb