Sha256: 4e9ceb31e06555d65276702e88492acccb50d6ec4784967473062690be74a2b4
Contents?: true
Size: 845 Bytes
Versions: 11
Compression:
Stored size: 845 Bytes
Contents
# frozen_string_literal: true module Bridgetown module Commands module ConfigurationOverridable def self.included(klass) desc = "The environment used for this command (aka development, test, production, etc.)" klass.class_option :environment, aliases: "-e", desc: desc end # Create a full Bridgetown configuration with the options passed in as overrides # # options - the configuration overrides # # Returns a full Bridgetown configuration def configuration_with_overrides(options) return options if options.is_a?(Bridgetown::Configuration) Bridgetown.configuration(options).tap do |new_config| Bridgetown::Current.preloaded_configuration = new_config end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems