Sha256: 1d9fbf891369917d8d6187b1f3e734576abc0d8bd32818d203a2c97ba0444891

Contents?: true

Size: 808 Bytes

Versions: 27

Compression:

Stored size: 808 Bytes

Contents

module YARD
  module Server

    #
    # The YARD::Server::Router needs the following modification,
    # so that it will provide routing for the features and tags commands
    # to their appropriate definitions
    #
    Router.class_eval do

      alias_method :core_route_list, :route_list

      #
      # Provide the full list of features and tags
      #
      def route_list(library, paths)
          
        if paths && !paths.empty? && paths.first =~ /^(?:features|tags)$/
          case paths.shift
          when "features"; cmd = Commands::ListFeaturesCommand
          when "tags"; cmd = Commands::ListTagsCommand
          end
          cmd.new(final_options(library, paths)).call(request)
        else
          core_route_list(library,paths)
        end
        
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 3 rubygems

Version Path
yard-nrser-cucumber-0.1.3 lib/yard/server/router.rb
yard-nrser-cucumber-0.1.2 lib/yard/server/router.rb
yard-nrser-cucumber-0.1.1 lib/yard/server/router.rb
yard-nrser-cucumber-0.1.0 lib/yard/server/router.rb
yard-cucumber-4.0.0 lib/yard/server/router.rb
yard-cucumber-3.1.0 lib/yard/server/router.rb
yard-cucumber-3.0.0 lib/yard/server/router.rb
yard-cucumber2-2.3.4 lib/yard/server/router.rb
yard-cucumber2-2.3.3 lib/yard/server/router.rb
yard-cucumber-2.3.2 lib/yard/server/router.rb
yard-cucumber-2.3.1 lib/yard/server/router.rb
yard-cucumber-2.3.0 lib/yard/server/router.rb
yard-cucumber-2.2.3 lib/yard/server/router.rb
yard-cucumber-2.2.2 lib/yard/server/router.rb
yard-cucumber-2.2.1 lib/yard/server/router.rb
yard-cucumber-2.2.0 lib/yard/server/router.rb
yard-cucumber-2.1.7 lib/yard/server/router.rb
yard-cucumber-2.1.6 lib/yard/server/router.rb
yard-cucumber-2.1.5 lib/yard/server/router.rb
yard-cucumber-2.1.4 lib/yard/server/router.rb