class PhilColumns::Cli::Reset
Public Class Methods
env_option()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 17 def self.env_option option :env, type: :string, aliases: '-e', desc: "The environment to execute in", default: 'development' end
env_option_description()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 21 def self.env_option_description %(When --env[-e] option, override the environment. Default: development.) end
handle_argument_error( command, error, _, __ )
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 85 def self.handle_argument_error( command, error, _, __ ) method = "handle_argument_error_for_#{command.name}" if respond_to?( method ) send( method, command, error ) else handle_argument_error_default( command, error ) end end
handle_argument_error_default( command, error )
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 95 def self.handle_argument_error_default( command, error ) $stdout.puts "Incorrect usage of generate subcommand: #{command.name}" $stdout.puts " #{error.message}", '' $stdout.puts "For correct usage:" $stdout.puts " phil_columns generate help #{command.name}" end
handle_no_command_error( name )
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 102 def self.handle_no_command_error( name ) $stdout.puts "Unrecognized command: #{name}" end
operation_option()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 25 def self.operation_option option :operation, type: :string, aliases: '-o', desc: "The operation: all or any", default: 'any' end
operation_option_description()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 29 def self.operation_option_description %(When --operation[-o] option, override the operation to one of any or all. Default: any.) end
skip_on_purge_description()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 37 def self.skip_on_purge_description %(When --no-skip, override the skip_tables_on_purge configuration. Otherwise, the tables specified in the skip_tables_on_purge configuration will be skipped.) end
skip_option()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 33 def self.skip_option option :skip, type: :boolean, desc: "When true, skip tables listed in config", default: true end
version_option()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 42 def self.version_option option :version, type: :string, aliases: '-v', desc: "The version to execute to", default: 'all' end
version_option_description()
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 46 def self.version_option_description %(When --version[-v] option, override the version. Default: all. Provide the timestamp from the beginning of the seed file name as the version parameter. When seeding up, the specified version is included in the seed set. When seeding down the specified version is not included in the set.) end
Public Instance Methods
data( *tags )
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 70 def data( *tags ) PhilColumns::Command::Reset::Data.new( options.merge( tags: tags )).execute end
schema( *tags )
click to toggle source
# File lib/phil_columns/cli/reset.rb, line 81 def schema( *tags ) PhilColumns::Command::Reset::Schema.new( options ).execute end