Sha256: 761cb608a7500d46ea8ec8d468005795d6761a46eaade2d91816c00a6f45624c
Contents?: true
Size: 897 Bytes
Versions: 9
Compression:
Stored size: 897 Bytes
Contents
# frozen_string_literal: true require 'thor' module Railsdock # Handle the application command line parsing # and the dispatch to various command objects # # @api public class CLI < Thor # Error raised by this runner Error = Class.new(StandardError) desc 'version', 'railsdock version' def version require_relative 'version' puts "Railsdock v#{Railsdock::VERSION}" end map %w[--version -v] => :version desc 'install', 'Install Railsdock in an existing rails application' method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information' def install(app_name = nil) if options[:help] invoke :help, ['install'] else require_relative 'commands/install' Railsdock::Commands::Install.new(options.merge(app_name: app_name)).execute end end end end
Version data entries
9 entries across 9 versions & 1 rubygems