Sha256: 7f5d5d2784142670ce8ede230349881e6cd8be36d56c8501f9a6b2b379ca7f78

Contents?: true

Size: 618 Bytes

Versions: 9

Compression:

Stored size: 618 Bytes

Contents

# frozen_string_literal: true

require "dry/container"
require "open3"
require "spek"

module Gemsmith
  # Provides a global gem container for injection into other objects.
  module Container
    extend Dry::Container::Mixin

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

    merge Rubysmith::Container

    register(:configuration) { Gemsmith::Configuration::Loader.call }
    register(:specification) { Spek::Loader.call "#{__dir__}/../../gemsmith.gemspec" }
    register(:environment) { ENV }
    register(:executor) { Open3 }
    register(:kernel) { Kernel }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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