Class: WebpackerUploader::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/webpacker_uploader/configuration.rb

Overview

This is the class which holds the configuration options.

Options are set and retrieved using WebpackerUploader.config and WebpackerUploader.configure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



28
29
30
31
32
33
34
# File 'lib/webpacker_uploader/configuration.rb', line 28

def initialize
  @ignored_extensions = []
  @logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT))
  @log_output = true
  @public_manifest_path = ::Webpacker.config.public_manifest_path
  @public_path = ::Webpacker.config.public_path
end

Instance Attribute Details

#ignored_extensionsArray

Returns the file extentions ignored by the uploader.

Returns:

  • (Array)

    the file extentions ignored by the uploader.



12
13
14
# File 'lib/webpacker_uploader/configuration.rb', line 12

def ignored_extensions
  @ignored_extensions
end

#log_outputBoolean Also known as: log_output?

Returns whether or not to log operations.

Returns:

  • (Boolean)

    whether or not to log operations.



18
19
20
# File 'lib/webpacker_uploader/configuration.rb', line 18

def log_output
  @log_output
end

#loggerActiveSupport::Logger

Returns the logger to use.

Returns:

  • (ActiveSupport::Logger)

    the logger to use.



15
16
17
# File 'lib/webpacker_uploader/configuration.rb', line 15

def logger
  @logger
end

#public_manifest_pathPathname

Returns the path to manifest.json, defaults to Webpacker public manifest path.

Returns:

  • (Pathname)

    the path to manifest.json, defaults to Webpacker public manifest path.



21
22
23
# File 'lib/webpacker_uploader/configuration.rb', line 21

def public_manifest_path
  @public_manifest_path
end

#public_pathPathname

Returns the public root path, defaults to Webpacker public root path.

Returns:

  • (Pathname)

    the public root path, defaults to Webpacker public root path.



24
25
26
# File 'lib/webpacker_uploader/configuration.rb', line 24

def public_path
  @public_path
end