Sha256: d1c8b01fea07dc26d47d43ce733350d49703bdd1d0863a8316c6f90c80787c14

Contents?: true

Size: 700 Bytes

Versions: 63

Compression:

Stored size: 700 Bytes

Contents

# frozen_string_literal: true
module YARD
  module Server
    module Commands
      # Serves static content when no other router matches a request
      class StaticFileCommand < LibraryCommand
        include StaticFileHelpers

        DefaultMimeTypes['js'] = 'text/javascript'

        # Defines the paths used to search for static assets. To define an
        # extra path, use {YARD::Server.register_static_path} rather than
        # modifying this constant directly. Also note that files in the
        # document root will always take precedence over these paths.
        STATIC_PATHS = []

        def run
          static_template_file? || not_found
        end
      end
    end
  end
end

Version data entries

63 entries across 62 versions & 9 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.7/lib/yard/server/commands/static_file_command.rb
yard-0.9.7 lib/yard/server/commands/static_file_command.rb
yard-0.9.6 lib/yard/server/commands/static_file_command.rb