Sha256: 3a70a536f44f4b62d91b1256ccff6cc26e76785f452488337d5cc51ea924e3ac

Contents?: true

Size: 645 Bytes

Versions: 33

Compression:

Stored size: 645 Bytes

Contents

require "thor"
require "random_password"
require "site_hook/config_sections"

module SiteHook
  module Commands
    class ConfigClass < Thor
      # def __version
      # puts SiteHook::VERSION
      # end
      # map ['-v', '--version'] => __version

      desc "mkpass [options]", "create a hook password"
      method_option(:length, type: :numeric, banner: "LENGTH", aliases: ["-l"], default: 20)

      def mkpass
        puts RandomPassword.new(length: options[:length]).generate
      end

      desc "inspect [options]", "output the configuration"

      def inspect
        puts SiteHook::Config.new.inspect
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
site_hook-1.0.10 lib/site_hook/commands/config_class.rb
site_hook-1.0.9 lib/site_hook/commands/config_class.rb
site_hook-1.0.8 lib/site_hook/commands/config_class.rb
site_hook-1.0.7 lib/site_hook/commands/config_class.rb
site_hook-1.0.6 lib/site_hook/commands/config_class.rb
site_hook-1.0.5 lib/site_hook/commands/config_class.rb
site_hook-1.0.4 lib/site_hook/commands/config_class.rb
site_hook-1.0.3 lib/site_hook/commands/config_class.rb
site_hook-1.0.2 lib/site_hook/commands/config_class.rb
site_hook-1.0.1 lib/site_hook/commands/config_class.rb
site_hook-1.0.0 lib/site_hook/commands/config_class.rb
site_hook-0.9.20 lib/site_hook/commands/config_class.rb
site_hook-0.9.19 lib/site_hook/commands/config_class.rb