Class: Boxing::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/boxing/config.rb

Overview

The config of boxing

Since:

  • 0.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Config

Returns a new instance of Config.

Since:

  • 0.5.0



21
22
23
24
25
26
27
28
29
30
# File 'lib/boxing/config.rb', line 21

def initialize(&block)
  @name = 'myapp'
  @root = '/src/app'
  @port = 9292
  @health_check_path = '/status'
  @assets_precompile = false
  @exclude_groups = default_exclude_groups

  instance_exec(self, &block) if defined?(yield)
end

Instance Attribute Details

#assets_precompileObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def assets_precompile
  @assets_precompile
end

#build_packagesObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def build_packages
  @build_packages
end

#commandObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def command
  @command
end

#entrypointObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def entrypoint
  @entrypoint
end

#exclude_groupsObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def exclude_groups
  @exclude_groups
end

#health_checkObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def health_check
  @health_check
end

#health_check_pathObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def health_check_path
  @health_check_path
end

#ignoresObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def ignores
  @ignores
end

#nameObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def name
  @name
end

#node_versionObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def node_version
  @node_version
end

#portObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def port
  @port
end

#registryObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def registry
  @registry
end

#revisionObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def revision
  @revision
end

#rootString

Returns the application root.

Returns:

  • (String)

    the application root



12
13
14
# File 'lib/boxing/config.rb', line 12

def root
  @root
end

#runtime_packagesObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def runtime_packages
  @runtime_packages
end

#sentry_releaseObject

Since:

  • 0.5.0



12
13
14
# File 'lib/boxing/config.rb', line 12

def sentry_release
  @sentry_release
end

Instance Method Details

#default_exclude_groupsObject

Since:

  • 0.11.0



33
34
35
36
37
# File 'lib/boxing/config.rb', line 33

def default_exclude_groups
  return %w[development test cli] if defined?(Hanami)

  %w[development test]
end