Sha256: fad65894f4db188e685412bc40cd04afeae4510354645f0b95d6469cac5ccff1

Contents?: true

Size: 740 Bytes

Versions: 15

Compression:

Stored size: 740 Bytes

Contents

# frozen_string_literal: true

require "cli-format"

module Jets::Command
  class RoutesCommand < Base # :nodoc:
    option :controller, aliases: :c, desc: "Filter by a specific controller, e.g. PostsController or Admin::PostsController"
    option :format, default: "table", desc: "Output formats: #{CliFormat.formats.join(', ')}" # csv, equal, json, space, table, tab
    option :grep, aliases: :g, desc: "Grep routes by a specific pattern"
    option :reject, aliases: :r, desc: "Reject filter routes by a specific pattern"

    desc "routes", "Print out your application routes"
    long_desc Help.text(:routes)
    def perform(*)
      require_application_and_environment!
      Jets::Router::Help.new(options).print
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jets-5.0.13 lib/jets/commands/routes/routes_command.rb
jets-5.0.12 lib/jets/commands/routes/routes_command.rb
jets-5.0.11 lib/jets/commands/routes/routes_command.rb
jets-5.0.10 lib/jets/commands/routes/routes_command.rb
jets-5.0.9 lib/jets/commands/routes/routes_command.rb
jets-5.0.8 lib/jets/commands/routes/routes_command.rb
jets-5.0.7 lib/jets/commands/routes/routes_command.rb
jets-5.0.6 lib/jets/commands/routes/routes_command.rb
jets-5.0.5 lib/jets/commands/routes/routes_command.rb
jets-5.0.4 lib/jets/commands/routes/routes_command.rb
jets-5.0.3 lib/jets/commands/routes/routes_command.rb
jets-5.0.2 lib/jets/commands/routes/routes_command.rb
jets-5.0.1 lib/jets/commands/routes/routes_command.rb
jets-5.0.0 lib/jets/commands/routes/routes_command.rb
jets-5.0.0.beta1 lib/jets/commands/routes/routes_command.rb