Sha256: f853c576909cc942fc5a3005735e94b5b8595c6328b7ca04e381c28fb0ee8ba5

Contents?: true

Size: 763 Bytes

Versions: 11

Compression:

Stored size: 763 Bytes

Contents

module YARD
  module Server

    #
    # The YARD::Server::Router needs the following modification,
    # otherwise it perfectly suited for the requirements documents
    #
    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

11 entries across 11 versions & 2 rubygems

Version Path
yard-cucumber-2.0.0 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.8 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.7 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.6 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.5 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.4 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.3 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.2 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.1 lib/yard/server/router.rb
cucumber-in-the-yard-1.7.0 lib/yard/server/router.rb
cucumber-in-the-yard-1.6.4 lib/yard/server/router.rb