Module: Boxing
- Defined in:
- lib/boxing.rb,
lib/boxing/utils.rb,
lib/boxing/config.rb,
lib/boxing/command.rb,
lib/boxing/context.rb,
lib/boxing/package.rb,
lib/boxing/railtie.rb,
lib/boxing/version.rb,
lib/boxing/database.rb,
lib/boxing/template.rb,
lib/boxing/generator.rb
Overview
The tool to generate Dockerfile without config
Defined Under Namespace
Modules: Utils
Classes: Command, Config, Context, Database, Generator, Package, Railtie, Template
Constant Summary
collapse
- LOCK =
Mutex.new
- VERSION =
'0.11.0'
Class Method Summary
collapse
Class Method Details
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/boxing.rb', line 39
def config(&block)
return @config if @config
LOCK.synchronize do
return @config if @config
@config = Config.new(&block)
end
@config
end
|
61
62
63
64
65
66
67
|
# File 'lib/boxing.rb', line 61
def context
@context ||= Context.new(
config,
database,
dependencies
)
end
|
54
55
56
|
# File 'lib/boxing.rb', line 54
def database
@database ||= Database.new
end
|
.dependencies(groups = %i[default production]) ⇒ Bundler::Dependency
29
30
31
32
33
34
|
# File 'lib/boxing.rb', line 29
def dependencies(groups = %i[default production])
Bundler
.definition
.current_dependencies
.select { |dep| (dep.groups & groups).any? }
end
|
.loader ⇒ Object
This method is part of a private API.
You should avoid using this method if possible, as it may be removed or be changed in the future.
15
16
17
18
19
|
# File 'lib/boxing.rb', line 15
def loader
@loader ||= Zeitwerk::Loader.for_gem.tap do |loader|
loader.ignore("#{__dir__}/boxing/{railtie,hanami}.rb")
end
end
|