Sha256: 75231d41dd48590e2bd83fbf03976db74620dc7e580c3d38aac5d027f0b2d841
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
class Freighthop::CLI::Init def self.match?(*args) args.first == 'init' end attr_reader :language def initialize(*args) end def run if Freighthop::Config.exist? puts "This directory already contains a #{Freighthop::Config.file.basename}" exit 1 end puts "Writing a new config to #{Freighthop::Config.file.basename}" Freighthop::Config.write(default_config) end def default_config { 'freighthop::cpus' => 2, 'freighthop::ram' => 512, 'freighthop::languages' => ['ruby'], 'freighthop::web::servers' => ['nginx'], 'freighthop::web::nginx::upstream_port' => 3000, 'freighthop::database::servers' => ['postgres'], 'freighthop::database::postgres::db_names' => [], 'freighthop::database::postgres::users' => [], 'freighthop::ppas' => [], 'freighthop::packages' => [], } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
freighthop-0.3.3 | lib/freighthop/cli/init.rb |
freighthop-0.3.2 | lib/freighthop/cli/init.rb |
freighthop-0.3.1 | lib/freighthop/cli/init.rb |
freighthop-0.3.0 | lib/freighthop/cli/init.rb |