class Sequelizer::CLI
Public Instance Methods
config()
click to toggle source
# File lib/sequelizer/cli.rb, line 52 def config opts = Options.new pp opts.to_hash pp opts.extensions end
init_env()
click to toggle source
# File lib/sequelizer/cli.rb, line 39 def init_env if File.exist?('.env') puts ".env already exists! I'm too cowardly to overwrite it!" puts "Here's what I would have put in there:" puts make_env(options) exit(1) end File.open('.env', 'w') do |file| file.puts make_env(options) end end
update_gemfile()
click to toggle source
# File lib/sequelizer/cli.rb, line 10 def update_gemfile GemfileModifier.new(options).modify end
Private Instance Methods
make_env(options)
click to toggle source
# File lib/sequelizer/cli.rb, line 59 def make_env(options) options.map do |key, value| "SEQUELIZER_#{key.upcase}=#{value}" end.join("\n") end