Sha256: e24122870612882e8e5b6511fb27a7bfbe3d0f67789ae7e8cebfeab5ad8eb722
Contents?: true
Size: 1.12 KB
Versions: 52
Compression:
Stored size: 1.12 KB
Contents
# -*- encoding : utf-8 -*- require "optparse" module Decko module Commands class RakeCommand class Parser < OptionParser def initialize command, opts super() do |parser| parser.banner = "Usage: decko #{command} [options]\n\n" \ "Run decko:#{command} task on the production "\ " database specified in config/database.yml\n\n" parser.on("--production", "-p", "#{command} production database (default)") do opts[:envs] = ["production"] end parser.on("--test", "-t", "#{command} test database") do opts[:envs] = ["test"] end parser.on("--development", "-d", "#{command} development database") do opts[:envs] = ["development"] end parser.on("--all", "-a", "#{command} production, test, and development database") do opts[:envs] = %w(production development test) end end end end end end end
Version data entries
52 entries across 52 versions & 1 rubygems