Class: Egg::CLI
- Inherits:
-
Thor
- Object
- Thor
- Egg::CLI
- Defined in:
- lib/egg/cli.rb
Overview
Defines the CLI interface to egg functions
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
39 40 41 42 |
# File 'lib/egg/cli.rb', line 39 def build config = Configuration.load "./egg_config.rb" config.docker_pull_build end |
#init ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/egg/cli.rb', line 11 def init config = Templates["egg_config.rb"] if File.exist?("egg_config.rb") && ![:force] print "egg has already been initialized! (maybe you want to --force)\n" exit(1) else File.write("egg_config.rb", config.result) print "Wrote example egg_config.rb, customize it to suit your app" end end |
#readme ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/egg/cli.rb', line 23 def readme # Print out the readme readme_path = File.("../../../doc/README.md", __FILE__) File.open(readme_path, "r") do |f| print(f.read) end end |
#setup ⇒ Object
32 33 34 35 36 |
# File 'lib/egg/cli.rb', line 32 def setup config = Configuration.load "./egg_config.rb" config.run_setup print "Use `docker-compose up` to start your application." end |