Sha256: c60538ef3936a27c38ea72ecf7823f2b3b1f112447f5d051cbff511e28d49d70

Contents?: true

Size: 700 Bytes

Versions: 3

Compression:

Stored size: 700 Bytes

Contents

require "middleware-cli/version"
require "middleware-cli/list"
require "middleware-cli/formatter"
require "middleware-cli/extract_middleware"
require 'thor'

module MiddlewareCli
  class Interface < Thor

    desc "list", "List your project's middleware"

    def list
      List.display
    end

    desc "view [middleware path]", "Generate view for your middlewares"

    option :name
    option :terminal, type: :boolean
    def view(middlware_path = 'middlewares')
      ExtractMiddleware.execute(middlware_path, options)
    end

    desc "create [Name] [Path]", "Generate Middleware"

    def create(name, path = 'app/middlewares')
      Formatter.create_template(name, path)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
middleware-cli-1.1.0 lib/middleware-cli.rb
middleware-cli-1.0.0 lib/middleware-cli.rb
middleware-cli-0.1.0 lib/middleware-cli.rb