Sha256: 722d490ec4e22622c6671944488a944cf34b78fe601b97d35001cfda0ce658dd

Contents?: true

Size: 868 Bytes

Versions: 39

Compression:

Stored size: 868 Bytes

Contents

# frozen_string_literal: true

require "rails/source_annotation_extractor"

module Rails
  module Command
    class NotesCommand < Base # :nodoc:
      class_option :annotations, aliases: "-a", desc: "Filter by specific annotations, e.g. Foobar TODO", type: :array

      desc "notes", "Show comments in your code annotated with FIXME, OPTIMIZE, and TODO"
      def perform(*)
        boot_application!

        display_annotations
      end

      private
        def display_annotations
          annotations = options[:annotations] || Rails::SourceAnnotationExtractor::Annotation.tags
          tag = (annotations.length > 1)

          Rails::SourceAnnotationExtractor.enumerate annotations.join("|"), tag: tag, dirs: directories
        end

        def directories
          Rails::SourceAnnotationExtractor::Annotation.directories
        end
    end
  end
end

Version data entries

39 entries across 39 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/railties-7.1.3.4/lib/rails/commands/notes/notes_command.rb
railties-8.0.1 lib/rails/commands/notes/notes_command.rb
railties-8.0.0.1 lib/rails/commands/notes/notes_command.rb
railties-7.2.2.1 lib/rails/commands/notes/notes_command.rb
railties-7.1.5.1 lib/rails/commands/notes/notes_command.rb
railties-8.0.0 lib/rails/commands/notes/notes_command.rb
railties-7.2.2 lib/rails/commands/notes/notes_command.rb
railties-7.1.5 lib/rails/commands/notes/notes_command.rb
railties-8.0.0.rc2 lib/rails/commands/notes/notes_command.rb
railties-7.2.1.2 lib/rails/commands/notes/notes_command.rb
railties-7.1.4.2 lib/rails/commands/notes/notes_command.rb
railties-8.0.0.rc1 lib/rails/commands/notes/notes_command.rb
railties-7.2.1.1 lib/rails/commands/notes/notes_command.rb
railties-7.1.4.1 lib/rails/commands/notes/notes_command.rb
railties-8.0.0.beta1 lib/rails/commands/notes/notes_command.rb
omg-railties-8.0.0.alpha9 lib/rails/commands/notes/notes_command.rb
omg-railties-8.0.0.alpha8 lib/rails/commands/notes/notes_command.rb
omg-railties-8.0.0.alpha7 lib/rails/commands/notes/notes_command.rb
omg-railties-8.0.0.alpha4 lib/rails/commands/notes/notes_command.rb
omg-railties-8.0.0.alpha3 lib/rails/commands/notes/notes_command.rb