lib/pennyworth/container.rb in pennyworth-12.1.0 vs lib/pennyworth/container.rb in pennyworth-12.2.0
- old
+ new
@@ -2,19 +2,18 @@
require "dry-container"
require "logger"
require "http"
require "pastel"
+require "spek"
module Pennyworth
# Provides a global gem container for injection into other objects.
module Container
extend Dry::Container::Mixin
- SPEC_PATH = "#{__dir__}/../../pennyworth.gemspec".freeze
-
register(:configuration) { Configuration::Loader.call }
- register(:specification) { Gem::Specification.load SPEC_PATH }
+ register(:specification) { Spek::Loader.call "#{__dir__}/../../pennyworth.gemspec" }
register(:environment) { ENV }
register(:kernel) { Kernel }
register(:http) { HTTP }
register(:colorizer) { Pastel.new enabled: $stdout.tty? }