class Dockerify::Cli
Public Instance Methods
new(path = '.')
click to toggle source
# File lib/dockerify/cli.rb, line 7 def new(path = '.') result = runner.build(path) unless result.compact.empty? puts result puts production_db_instruction end end
remove(path = '.')
click to toggle source
# File lib/dockerify/cli.rb, line 16 def remove(path = '.') puts "This command will remove the files: Dockerfile, etc." result = yes?("Are you sure?") if result result = runner.remove(path) if result.compact.empty? puts "No Dockerify-related files found." else puts result end else puts "Aborting" end end
Private Instance Methods
production_db_instruction()
click to toggle source
# File lib/dockerify/cli.rb, line 37 def production_db_instruction <<-EOF Copy the following values to your config/database.yml file. production: adapter: postgresql encoding: unicode database: postgres pool: 5 username: postgres password: host: db EOF end
runner()
click to toggle source
# File lib/dockerify/cli.rb, line 33 def runner Dockerify::Runner.new end