Class: Arethusa::CLI
- Inherits:
-
Thor
- Object
- Thor
- Arethusa::CLI
show all
- Includes:
- Thor::Actions
- Defined in:
- lib/arethusa/cli.rb,
lib/arethusa/cli/version.rb,
lib/arethusa/cli/generator.rb,
lib/arethusa/cli/subcommand.rb,
lib/arethusa/cli/transformer.rb
Defined Under Namespace
Classes: Generator, Subcommand, Transformer
Constant Summary
collapse
- VERSION =
"0.1.0"
Instance Method Summary
collapse
Instance Method Details
#build ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/arethusa/cli.rb', line 20
def build
minify if options[:minify]
empty_directory('deployment')
@filename = "#{tar_name}#{ending}"
create_tgz
say_status(:built, archive_path)
end
|
#deploy(address, directory) ⇒ Object
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/arethusa/cli.rb', line 50
def deploy(address, directory)
@address = address
@directory = directory
@ssh_options = options[:options]
@archive = options[:file]
@small = options[:small]
minify if options[:minify] &! @archive
execute
say_status(:deployed, "at #{@address} - #{@directory}")
end
|
#merge(file) ⇒ Object
68
69
70
71
72
73
74
75
76
77
78
|
# File 'lib/arethusa/cli.rb', line 68
def merge(file)
@conf = read_conf(file)
@conf_dir = options[:base_path] || config_dir
traverse_and_include(@conf)
if options[:minify]
puts @conf.to_json
else
puts JSON.pretty_generate(@conf, indent: ' ')
end
end
|