Skip to content

Commit

Permalink
Move method lists to the Web::Server::Base description.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jun 19, 2013
1 parent 0486f44 commit 430258f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 40 deletions.
42 changes: 42 additions & 0 deletions lib/ronin/web/server/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,48 @@ module Server
# with additional {Helpers helper methods} and Sinatra
# {Conditions conditions}.
#
# ## Routing Methods
#
# * {Helpers::ClassMethods#any any}: registers a route that responds to
# `GET`, `POST`, `PUT`, `PATCH`, `DELETE` and `OPTIONS` requests.
# * {Helpers::ClassMethods#default default}: registers the default route.
# * {Helpers::ClassMethods#file file}: mounts a file at the given path.
# a given file.
# * {Helpers::ClassMethods#files files}: monts multiple files.
# given paths.
# * {Helpers::ClassMethods#directory directory}: mounts a directory at
# the given path.
# * {Helpers::ClassMethods#directories directories}: mounts multiple
# directories.
# * {Helpers::ClassMethods#public_dir public_dir}: mounts a directory
# at the root.
# * {Helpers::ClassMethods#host host}: mounts a Rack app for the given
# vhost.
# * {Helpers::ClassMethods#map map}: mounts a Rack app at the given
# path.
# * {Helpers::ClassMethods#proxy proxy}: mounts a {Proxy} at an optional
# path.
#
# ## Helper Methods
#
# * {Helpers#h h}: escapes HTML entities.
# * {Helpers#file file}: sends a file.
# * {Helpers#mime_type_for mime_type_for}: returns the MIME type for the
# file.
# * {Helpers#content_type_for content_type_for}: sets the `Content-Type`
# for the file.
#
# ## Routing Conditions
#
# * {Conditions::ClassMethods#ip_address ip_address}: filters requests
# based on their IP address.
# * {Conditions::ClassMethods#host host}: filters requests based on the
# `Host` header.
# * {Conditions::ClassMethods#referer referer}: filters requests based on
# the `Referer` header.
# * {Conditions::ClassMethods#campaign campaign}: filters requests based
# on whether their IP address is targeted by a Campaign.
#
class Base < Sinatra::Base

include Server::Helpers
Expand Down
9 changes: 0 additions & 9 deletions lib/ronin/web/server/conditions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ module Server
#
# Defines Sinatra routing conditions.
#
# * {Conditions::ClassMethods#ip_address ip_address}: filters requests
# based on their IP address.
# * {Conditions::ClassMethods#host host}: filters requests based on the
# `Host` header.
# * {Conditions::ClassMethods#referer referer}: filters requests based on
# the `Referer` header.
# * {Conditions::ClassMethods#campaign campaign}: filters requests based
# on whether their IP address is targeted by a Campaign.
#
# @api semipublic
#
# @since 0.3.0
Expand Down
31 changes: 0 additions & 31 deletions lib/ronin/web/server/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,6 @@ module Server
#
# Provides Sinatra routing and helper methods.
#
# ## Routing Methods
#
# * {Helpers::ClassMethods#any any}: registers a route that responds to
# `GET`, `POST`, `PUT`, `PATCH`, `DELETE` and `OPTIONS` requests.
# * {Helpers::ClassMethods#default default}: registers the default route.
# * {Helpers::ClassMethods#file file}: mounts a file at the given path.
# a given file.
# * {Helpers::ClassMethods#files files}: monts multiple files.
# given paths.
# * {Helpers::ClassMethods#directory directory}: mounts a directory at
# the given path.
# * {Helpers::ClassMethods#directories directories}: mounts multiple
# directories.
# * {Helpers::ClassMethods#public_dir public_dir}: mounts a directory
# at the root.
# * {Helpers::ClassMethods#host host}: mounts a Rack app for the given
# vhost.
# * {Helpers::ClassMethods#map map}: mounts a Rack app at the given
# path.
# * {Helpers::ClassMethods#proxy proxy}: mounts a {Proxy} at an optional
# path.
#
# ## Helper Methods
#
# * {Helpers#h h}: escapes HTML entities.
# * {Helpers#file file}: sends a file.
# * {Helpers#mime_type_for mime_type_for}: returns the MIME type for the
# file.
# * {Helpers#content_type_for content_type_for}: sets the `Content-Type`
# for the file.
#
module Helpers

include Rack::Utils
Expand Down

0 comments on commit 430258f

Please sign in to comment.