From cf4be299cd4850339e82ddbf0dd8f532ff9d698e Mon Sep 17 00:00:00 2001 From: Michael Bleigh Date: Sun, 14 Nov 2010 20:42:46 -0600 Subject: [PATCH] Removing docs from repo. --- .gitignore | 2 +- doc/Grape.html | 95 -- doc/Grape/API.html | 1436 ------------------------- doc/Grape/Endpoint.html | 894 --------------- doc/Grape/Middleware.html | 95 -- doc/Grape/Middleware/Auth.html | 93 -- doc/Grape/Middleware/Auth/Basic.html | 423 -------- doc/Grape/Middleware/Auth/OAuth2.html | 489 --------- doc/Grape/Middleware/Base.html | 803 -------------- doc/Grape/Middleware/Error.html | 247 ----- doc/Grape/Middleware/Formatter.html | 796 -------------- doc/Grape/Middleware/Prefixer.html | 245 ----- doc/Grape/Middleware/Versioner.html | 259 ----- doc/Grape/MiddlewareStack.html | 403 ------- doc/_index.html | 245 ----- doc/class_list.html | 36 - doc/css/common.css | 1 - doc/css/full_list.css | 53 - doc/css/style.css | 307 ------ doc/file.README.html | 137 --- doc/file_list.html | 38 - doc/frames.html | 13 - doc/index.html | 137 --- doc/js/app.js | 202 ---- doc/js/full_list.js | 149 --- doc/js/jquery.js | 154 --- doc/method_list.html | 627 ----------- doc/top-level-namespace.html | 88 -- 28 files changed, 1 insertion(+), 8466 deletions(-) delete mode 100644 doc/Grape.html delete mode 100644 doc/Grape/API.html delete mode 100644 doc/Grape/Endpoint.html delete mode 100644 doc/Grape/Middleware.html delete mode 100644 doc/Grape/Middleware/Auth.html delete mode 100644 doc/Grape/Middleware/Auth/Basic.html delete mode 100644 doc/Grape/Middleware/Auth/OAuth2.html delete mode 100644 doc/Grape/Middleware/Base.html delete mode 100644 doc/Grape/Middleware/Error.html delete mode 100644 doc/Grape/Middleware/Formatter.html delete mode 100644 doc/Grape/Middleware/Prefixer.html delete mode 100644 doc/Grape/Middleware/Versioner.html delete mode 100644 doc/Grape/MiddlewareStack.html delete mode 100644 doc/_index.html delete mode 100644 doc/class_list.html delete mode 100644 doc/css/common.css delete mode 100644 doc/css/full_list.css delete mode 100644 doc/css/style.css delete mode 100644 doc/file.README.html delete mode 100644 doc/file_list.html delete mode 100644 doc/frames.html delete mode 100644 doc/index.html delete mode 100644 doc/js/app.js delete mode 100644 doc/js/full_list.js delete mode 100644 doc/js/jquery.js delete mode 100644 doc/method_list.html delete mode 100644 doc/top-level-namespace.html diff --git a/.gitignore b/.gitignore index 48fe6d6124..00d8bab06d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ tmtags ## PROJECT::GENERAL coverage -rdoc +/doc pkg .rvmrc .bundle diff --git a/doc/Grape.html b/doc/Grape.html deleted file mode 100644 index 54615ab272..0000000000 --- a/doc/Grape.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - -Module: Grape - - - - - - - - - - - - - - - -

Module: Grape - - - -

- -
- - - - - - - - -
Defined in:
-
lib/grape.rb,
- lib/grape/api.rb,
lib/grape/endpoint.rb,
lib/grape/middleware/base.rb,
lib/grape/middleware/error.rb,
lib/grape/middleware_stack.rb,
lib/grape/middleware/prefixer.rb,
lib/grape/middleware/versioner.rb,
lib/grape/middleware/formatter.rb,
lib/grape/middleware/auth/basic.rb
-
- -
-
- -

Defined Under Namespace

-

- - - Modules: Middleware - - - - Classes: API, Endpoint, MiddlewareStack - - -

- - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Grape/API.html b/doc/Grape/API.html deleted file mode 100644 index b7c8979850..0000000000 --- a/doc/Grape/API.html +++ /dev/null @@ -1,1436 +0,0 @@ - - - - -Class: Grape::API - - - - - - - - - - - - - - - -

Class: Grape::API - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/api.rb
- -
-
- -

Overview

-
-

The API class is the primary entry point for creating Grape APIs. Users should subclass this class in order to build an API.

- -
-
-
- -
- - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Object) auth(type = nil, options = {}, &block) - - - -

-
-

Add an authentication type to the API. Currently only :http_basic is supported.

- -
-
-
- -
- - - - -
-
-
-
-108
-109
-110
-111
-112
-113
-114
-
-
# File 'lib/grape/api.rb', line 108
-
-def auth(type = nil, options = {}, &block)
-  if type
-    set(:auth, {:type => type.to_sym, :proc => block}.merge(options))
-  else
-    settings[:auth]
-  end
-end
-
-
-
- -
-

- - + (Object) call(env) - - - -

- - - - -
-
-
-
-23
-24
-25
-26
-
-
# File 'lib/grape/api.rb', line 23
-
-def call(env)
-  logger.info "#{env['REQUEST_METHOD']} #{env['PATH_INFO']}"
-  route_set.freeze.call(env)
-end
-
-
-
- -
-

- - + (Object) default_format(new_format = nil) - - - -

-
-

Specify the default format for the API’s serializers. Currently only :json is supported.

- -
-
-
- -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'lib/grape/api.rb', line 77
-
-def default_format(new_format = nil)
-  new_format ? set(:default_format, new_format.to_sym) : settings[:default_format]
-end
-
-
-
- -
-

- - + (Object) delete(*paths, &block) - - - -

- - - - -
-
-
-
-158
-
-
# File 'lib/grape/api.rb', line 158
-
-def delete(*paths, &block) route('DELETE', paths, &block) end
-
-
-
- -
-

- - + (Object) get(*paths, &block) - - - -

- - - - -
-
-
-
-154
-
-
# File 'lib/grape/api.rb', line 154
-
-def get(*paths, &block) route('GET', paths, &block) end
-
-
-
- -
-

- - + (Object) head(*paths, &block) - - - -

- - - - -
-
-
-
-157
-
-
# File 'lib/grape/api.rb', line 157
-
-def head(*paths, &block) route('HEAD', paths, &block) end
-
-
-
- -
-

- - + (Object) helpers(&block) - - - -

-
-

Add helper methods that will be accessible from any endpoint within this namespace (and child namespaces).

- -
-
-
- -
-

Examples:

- -

Define some helpers.

-
class ExampleAPI < Grape::API
-  helpers do
-    def current_user
-      User.find_by_id(params[:token])
-    end
-  end
-end
-
- -
- -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'lib/grape/api.rb', line 92
-
-def helpers(&block)
-  if block_given?
-    m = settings_stack.last[:helpers] || Module.new
-    m.class_eval &block
-    set(:helpers, m)
-  else
-    m = Module.new
-    settings_stack.each do |s|
-      m.send :include, s[:helpers] if s[:helpers]
-    end
-    m
-  end
-end
-
-
-
- -
-

- - + (Object) http_basic(options = {}, &block) - - - -

-
-

Add HTTP Basic authorization to the API.

- -
-
-
-

Parameters:

-
    - -
  • - - (Hash) - - - options - - - (defaults to: {}) - - - — -

    A hash of options.

    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - (String) - :realm - - - N/A - - - —

    “API Authorization” The HTTP Basic realm.

    - - -
- - - - -
- - - - -
-
-
-
-120
-121
-122
-123
-
-
# File 'lib/grape/api.rb', line 120
-
-def http_basic(options = {}, &block)
-  options[:realm] ||= "API Authorization"
-  auth :http_basic, options, &block
-end
-
-
-
- -
-

- - + (Object) logger - - - -

- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/grape/api.rb', line 13
-
-def logger
-  @logger ||= Logger.new($STDOUT)
-end
-
-
-
- -
-

- - + (Object) namespace(space = nil, &block) - - - - Also known as: - resource, group, resources - - -

- - - - -
-
-
-
-160
-161
-162
-163
-164
-165
-166
-167
-168
-
-
# File 'lib/grape/api.rb', line 160
-
-def namespace(space = nil, &block)
-  if space || block_given?
-    nest(block) do
-      set(:namespace, space.to_s) if space
-    end
-  else
-    Rack::Mount::Utils.normalize_path(settings_stack.map{|s| s[:namespace]}.join('/'))
-  end
-end
-
-
-
- -
-

- - + (Object) post(*paths, &block) - - - -

- - - - -
-
-
-
-155
-
-
# File 'lib/grape/api.rb', line 155
-
-def post(*paths, &block) route('POST', paths, &block) end
-
-
-
- -
-

- - + (Object) prefix(prefix = nil) - - - -

-
-

Define a root URL prefix for your entire API.

- -
-
-
- -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/grape/api.rb', line 50
-
-def prefix(prefix = nil)
-  prefix ? set(:root_prefix, prefix) : settings[:root_prefix]
-end
-
-
-
- -
-

- - + (Object) put(*paths, &block) - - - -

- - - - -
-
-
-
-156
-
-
# File 'lib/grape/api.rb', line 156
-
-def put(*paths, &block) route('PUT', paths, &block) end
-
-
-
- -
-

- - + (Object) reset! - - - -

- - - - -
-
-
-
-17
-18
-19
-20
-21
-
-
# File 'lib/grape/api.rb', line 17
-
-def reset!
-  @settings = [{}]
-  @route_set = Rack::Mount::RouteSet.new
-  @prototype = nil
-end
-
-
-
- -
-

- - + (Object) route(methods, paths, &block) - - - -

-
-

Defines a route that will be recognized by the Grape API.

- -
-
-
- -
-

Examples:

- -

Defining a basic route.

-
class MyAPI < Grape::API
-  route(:any, '/hello') do
-    {:hello => 'world'}
-  end
-end
-
- -
-

Parameters:

-
    - -
  • - - (HTTP Verb) - - - methods - - - - — -

    One or more HTTP verbs that are accepted by this route. Set to :any if you want any verb to be accepted.

    - -
  • - -
  • - - (String) - - - paths - - - - — -

    One or more strings representing the URL segment(s) for this route.

    - -
  • - -
- -
- - - - -
-
-
-
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-
-
# File 'lib/grape/api.rb', line 137
-
-def route(methods, paths, &block)
-  methods = Array(methods)
-  paths = ['/'] if paths == []
-  paths = Array(paths)
-  endpoint = build_endpoint(&block)
-  
-  methods.each do |method|
-    paths.each do |path|
-      path = Rack::Mount::Strexp.compile(compile_path(path))
-      route_set.add_route(endpoint, 
-        :path_info => path, 
-        :request_method => (method.to_s.upcase unless method == :any)
-      )
-    end
-  end
-end
-
-
-
- -
-

- - + (Object) scope(name = nil, &block) - - - -

-
-

Create a scope without affecting the URL.

- -
-
-
-

Parameters:

-
    - -
  • - - (Symbol) - - - name - - - (defaults to: nil) - - - — -

    Purely placebo, just allows to to name the scope to make the code more readable.

    - -
  • - -
- -
- - - - -
-
-
-
-177
-178
-179
-
-
# File 'lib/grape/api.rb', line 177
-
-def scope(name = nil, &block)
-  nest(block)
-end
-
-
-
- -
-

- - + (Object) set(key, value) - - - -

-
-

Set a configuration value for this namespace.

- -
-
-
-

Parameters:

-
    - -
  • - - (Symbol) - - - key - - - - — -

    The key of the configuration variable.

    - -
  • - -
  • - - (Object) - - - value - - - - — -

    The value to which to set the configuration variable.

    - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'lib/grape/api.rb', line 44
-
-def set(key, value)
-  @settings.last[key.to_sym] = value
-end
-
-
-
- -
-

- - + (Object) settings - - - -

-
-

Settings are a stack, so when we want to access them they are merged in the order pushed.

- -
-
-
- -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'lib/grape/api.rb', line 31
-
-def settings
-  @settings.inject({}){|f,h| f.merge!(h); f}
-end
-
-
-
- -
-

- - + (Object) settings_stack - - - -

- - - - -
-
-
-
-35
-36
-37
-
-
# File 'lib/grape/api.rb', line 35
-
-def settings_stack
-  @settings
-end
-
-
-
- -
-

- - + (Object) version(*new_versions, &block) - - - -

-
-

Specify an API version.

- -
-
-
- -
-

Examples:

- -

API with legacy support.

-
class MyAPI < Grape::API
-  version 'v2'
-
-  get '/main' do
-    {:some => 'data'}
-  end
-
-  version 'v1' do
-    get '/legacy' do
-      {:legacy => 'data'}
-    end
-  end
-end
-
- -
- -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'lib/grape/api.rb', line 70
-
-def version(*new_versions, &block)
-  new_versions.any? ? nest(block){ set(:version, new_versions) } : settings[:version]
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Endpoint.html b/doc/Grape/Endpoint.html deleted file mode 100644 index 5fc8d1cd78..0000000000 --- a/doc/Grape/Endpoint.html +++ /dev/null @@ -1,894 +0,0 @@ - - - - -Class: Grape::Endpoint - - - - - - - - - - - - - - - -

Class: Grape::Endpoint - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/endpoint.rb
- -
-
- -

Overview

-
-

An Endpoint is the proxy scope in which all routing blocks are executed. In other words, any methods on the instance level of this class may be called from inside a get, post, etc. block.

- -
-
-
- -
- -

Class Attribute Summary (collapse)

- - -

Instance Attribute Summary (collapse)

- - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - -
-

Class Attribute Details

- - - - -
-

- - + (Object) block - - - -

-
-

Returns the value of attribute block

- -
-
-
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/grape/endpoint.rb', line 19
-
-def block
-  @block
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Object) env (readonly) - - - -

-
-

Returns the value of attribute env

- -
-
-
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/grape/endpoint.rb', line 26
-
-def env
-  @env
-end
-
-
-
- - - - -
-

- - - (Object) request (readonly) - - - -

-
-

Returns the value of attribute request

- -
-
-
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/grape/endpoint.rb', line 26
-
-def request
-  @request
-end
-
-
-
- -
- - -
-

Class Method Details

- - -
-

- - + (Object) call(env) - - - -

- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/grape/endpoint.rb', line 22
-
-def self.call(env)
-  new.call(env)
-end
-
-
-
- -
-

- - + (Object) generate(&block) - - - -

- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'lib/grape/endpoint.rb', line 10
-
-def self.generate(&block)
-  c = Class.new(Grape::Endpoint)
-  c.class_eval do
-    @block = block
-  end
-  c
-end
-
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) call(env) - - - -

- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# File 'lib/grape/endpoint.rb', line 77
-
-def call(env)
-  @env = env
-  @header = {}
-  @request = Rack::Request.new(@env)
-  
-  response_text = instance_eval &self.class.block
-  
-  [status, header, [response_text]]
-end
-
-
-
- -
-

- - - (Object) error!(message, status = 403) - - - -

-
-

End the request and display an error to the end user with the specified message.

- -
-
-
-

Parameters:

-
    - -
  • - - (String) - - - message - - - - — -

    The message to display.

    - -
  • - -
  • - - (Integer) - - - status - - - (defaults to: 403) - - - — -

    the HTTP Status Code. Defaults to 403.

    - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'lib/grape/endpoint.rb', line 46
-
-def error!(message, status=403)
-  throw :error, :message => message, :status => status
-end
-
-
-
- -
-

- - - (Object) header(key = nil, val = nil) - - - -

-
-

Set an individual header or retrieve all headers that have been set.

- -
-
-
- -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-
-
# File 'lib/grape/endpoint.rb', line 69
-
-def header(key = nil, val = nil)
-  if key
-    val ? @header[key.to_s] = val : @header.delete(key.to_s)
-  else
-    @header
-  end
-end
-
-
-
- -
-

- - - (Object) params - - - -

-
-

The parameters passed into the request as well as parsed from URL segments.

- -
-
-
- -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'lib/grape/endpoint.rb', line 30
-
-def params
-  @params ||= request.params.merge(env['rack.routing_args'] || {}).inject({}) do |h,(k,v)|
-    h[k.to_s] = v
-    h[k.to_sym] = v
-    h
-  end
-end
-
-
-
- -
-

- - - (Object) status(status = nil) - - - -

-
-

Set or retrieve the HTTP status code.

- -
-
-
-

Parameters:

-
    - -
  • - - (Integer) - - - status - - - (defaults to: nil) - - - — -

    The HTTP Status Code to return for this request.

    - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'lib/grape/endpoint.rb', line 53
-
-def status(status = nil)
-  if status
-    @status = status
-  else
-    return @status if @status
-    case request.request_method.to_s.upcase
-      when 'POST'
-        201
-      else
-        200
-    end
-  end        
-end
-
-
-
- -
-

- - - (Object) version - - - -

-
-

The API version as specified in the URL.

- -
-
-
- -
- - - - -
-
-
-
-39
-
-
# File 'lib/grape/endpoint.rb', line 39
-
-def version; env['api.version'] end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware.html b/doc/Grape/Middleware.html deleted file mode 100644 index fa412306fc..0000000000 --- a/doc/Grape/Middleware.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - -Module: Grape::Middleware - - - - - - - - - - - - - - - -

Module: Grape::Middleware - - - -

- -
- - - - - - - - -
Defined in:
-
lib/grape.rb,
- lib/grape/middleware/base.rb,
lib/grape/middleware/error.rb,
lib/grape/middleware/prefixer.rb,
lib/grape/middleware/versioner.rb,
lib/grape/middleware/formatter.rb,
lib/grape/middleware/auth/basic.rb
-
- -
-
- -

Defined Under Namespace

-

- - - Modules: Auth - - - - Classes: Base, Error, Formatter, Prefixer, Versioner - - -

- - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Auth.html b/doc/Grape/Middleware/Auth.html deleted file mode 100644 index c0ef53ba8c..0000000000 --- a/doc/Grape/Middleware/Auth.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - -Module: Grape::Middleware::Auth - - - - - - - - - - - - - - - -

Module: Grape::Middleware::Auth - - - -

- -
- - - - - - - - -
Defined in:
-
lib/grape.rb,
- lib/grape/middleware/auth/basic.rb,
lib/grape/middleware/auth/oauth2.rb
-
- -
-
- -

Defined Under Namespace

-

- - - - - Classes: Basic, OAuth2 - - -

- - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Auth/Basic.html b/doc/Grape/Middleware/Auth/Basic.html deleted file mode 100644 index 4e11c54a7e..0000000000 --- a/doc/Grape/Middleware/Auth/Basic.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - -Class: Grape::Middleware::Auth::Basic - - - - - - - - - - - - - - - -

Class: Grape::Middleware::Auth::Basic - - - -

- -
- -
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware/auth/basic.rb
- -
-
- - - - - - - -

Instance Attribute Summary (collapse)

- - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Base

-

#after, #call, #call!, #default_options, #request, #response

-
-

Constructor Details

- -
-

- - - (Basic) initialize(app, options = {}, &authenticator) - - - -

-
-

A new instance of Basic

- -
-
-
- -
- - - - -
-
-
-
-9
-10
-11
-12
-
-
# File 'lib/grape/middleware/auth/basic.rb', line 9
-
-def initialize(app, options = {}, &authenticator)
-  super(app, options)
-  @authenticator = authenticator
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Object) authenticator (readonly) - - - -

-
-

Returns the value of attribute authenticator

- -
-
-
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/grape/middleware/auth/basic.rb', line 7
-
-def authenticator
-  @authenticator
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) basic_request - - - -

- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/grape/middleware/auth/basic.rb', line 14
-
-def basic_request
-  Rack::Auth::Basic::Request.new(env)
-end
-
-
-
- -
-

- - - (Object) before - - - -

- - - - -
-
-
-
-22
-23
-24
-25
-26
-
-
# File 'lib/grape/middleware/auth/basic.rb', line 22
-
-def before
-  unless authenticator.call(*credentials)
-    throw :error, :status => 401, :message => "API Authorization Failed."
-  end
-end
-
-
-
- -
-

- - - (Object) credentials - - - -

- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/grape/middleware/auth/basic.rb', line 18
-
-def credentials
-  basic_request.provided?? basic_request.credentials : [nil, nil]
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Auth/OAuth2.html b/doc/Grape/Middleware/Auth/OAuth2.html deleted file mode 100644 index d9a54db0e8..0000000000 --- a/doc/Grape/Middleware/Auth/OAuth2.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - -Class: Grape::Middleware::Auth::OAuth2 - - - - - - - - - - - - - - - -

Class: Grape::Middleware::Auth::OAuth2 - - - -

- -
- -
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware/auth/oauth2.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Base

-

#after, #call, #call!, #initialize, #request, #response

-
-

Constructor Details

- -

This class inherits a constructor from Grape::Middleware::Base

- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) before - - - -

- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'lib/grape/middleware/auth/oauth2.rb', line 10
-
-def before
-  if request['oauth_token']
-    verify_token(request['oauth_token'])
-  elsif env['Authorization'] && t = parse_authorization_header
-    verify_token(t)
-  end
-end
-
-
-
- -
-

- - - (Object) default_options - - - -

- - - - -
-
-
-
-3
-4
-5
-6
-7
-8
-
-
# File 'lib/grape/middleware/auth/oauth2.rb', line 3
-
-def default_options
-  {
-    :token_class => 'AccessToken',
-    :realm => 'OAuth API'
-  }
-end
-
-
-
- -
-

- - - (Object) error_out(status, error) - - - -

- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'lib/grape/middleware/auth/oauth2.rb', line 44
-
-def error_out(status, error)
-  throw :error, {
-    :message => 'The token provided has expired.',
-    :status => status,
-    :headers => {
-      'WWW-Authenticate' => "OAuth realm='#{options[:realm]}', error='#{error}'"
-    }
-  }
-end
-
-
-
- -
-

- - - (Object) parse_authorization_header - - - -

- - - - -
-
-
-
-38
-39
-40
-41
-42
-
-
# File 'lib/grape/middleware/auth/oauth2.rb', line 38
-
-def parse_authorization_header
-  if env['Authorization'] =~ /oauth (.*)/i
-    $1
-  end
-end
-
-
-
- -
-

- - - (Object) token_class - - - -

- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/grape/middleware/auth/oauth2.rb', line 18
-
-def token_class
-  @klass ||= eval(options[:token_class])
-end
-
-
-
- -
-

- - - (Object) verify_token(token) - - - -

- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'lib/grape/middleware/auth/oauth2.rb', line 22
-
-def verify_token(token)
-  if token = token_class.verify(token)
-    if token.expired?
-      error_out(401, 'expired_token')
-    else
-      if token.permission_for?(env)
-        env['api.token'] = token
-      else
-        error_out(403, 'insufficient_scope')
-      end
-    end
-  else
-    error_out(401, 'invalid_token')
-  end
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Base.html b/doc/Grape/Middleware/Base.html deleted file mode 100644 index 513950ac7b..0000000000 --- a/doc/Grape/Middleware/Base.html +++ /dev/null @@ -1,803 +0,0 @@ - - - - -Class: Grape::Middleware::Base - - - - - - - - - - - - - - - -

Class: Grape::Middleware::Base - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware/base.rb
- -
-
- -
-

Direct Known Subclasses

-

Auth::Basic, Auth::OAuth2, Error, Formatter, Prefixer, Versioner

-
- - -

Instance Attribute Summary (collapse)

- - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Base) initialize(app, options = {}) - - - -

-
-

A new instance of Base

- -
-
-
-

Parameters:

-
    - -
  • - - (Rack Application) - - - app - - - - — -

    The standard argument for a Rack middleware.

    - -
  • - -
  • - - (Hash) - - - options - - - (defaults to: {}) - - - — -

    A hash of options, simply stored for use by subclasses.

    - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-
-
# File 'lib/grape/middleware/base.rb', line 8
-
-def initialize(app, options = {})
-  @app = app
-  @options = default_options.merge(options)
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Object) app (readonly) - - - -

-
-

Returns the value of attribute app

- -
-
-
- -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/grape/middleware/base.rb', line 4
-
-def app
-  @app
-end
-
-
-
- - - - -
-

- - - (Object) env (readonly) - - - -

-
-

Returns the value of attribute env

- -
-
-
- -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/grape/middleware/base.rb', line 4
-
-def env
-  @env
-end
-
-
-
- - - - -
-

- - - (Object) options (readonly) - - - -

-
-

Returns the value of attribute options

- -
-
-
- -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/grape/middleware/base.rb', line 4
-
-def options
-  @options
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Response?) after - - - -

-
-
- This method is abstract. -
-
-

Called after the application is called in the middleware lifecycle.

- -
-
-
-

Returns:

-
    - -
  • - - (Response, nil) - - - - - — -

    a Rack SPEC response or nil to call the application afterwards.

    - -
  • - -
- -
- - - - -
-
-
-
-32
-
-
# File 'lib/grape/middleware/base.rb', line 32
-
-def after; end
-
-
-
- -
-

- - - (Object) before - - - -

-
-
- This method is abstract. -
-
-

Called before the application is called in the middleware lifecycle.

- -
-
-
- -
- - - - -
-
-
-
-28
-
-
# File 'lib/grape/middleware/base.rb', line 28
-
-def before; end
-
-
-
- -
-

- - - (Object) call(env) - - - -

- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/grape/middleware/base.rb', line 15
-
-def call(env)
-  dup.call!(env)
-end
-
-
-
- -
-

- - - (Object) call!(env) - - - -

- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-
-
# File 'lib/grape/middleware/base.rb', line 19
-
-def call!(env)
-  @env = env
-  before
-  @app_response = @app.call(@env)
-  after || @app_response
-end
-
-
-
- -
-

- - - (Object) default_options - - - -

- - - - -
-
-
-
-13
-
-
# File 'lib/grape/middleware/base.rb', line 13
-
-def default_options; {} end
-
-
-
- -
-

- - - (Object) request - - - -

- - - - -
-
-
-
-34
-35
-36
-
-
# File 'lib/grape/middleware/base.rb', line 34
-
-def request
-  Rack::Request.new(self.env)
-end
-
-
-
- -
-

- - - (Object) response - - - -

- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/grape/middleware/base.rb', line 38
-
-def response
-  Rack::Response.new(@app_response)
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Error.html b/doc/Grape/Middleware/Error.html deleted file mode 100644 index a8ac65d837..0000000000 --- a/doc/Grape/Middleware/Error.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - -Class: Grape::Middleware::Error - - - - - - - - - - - - - - - -

Class: Grape::Middleware::Error - - - -

- -
- -
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware/error.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Base

-

#after, #before, #call, #default_options, #initialize, #request, #response

-
-

Constructor Details

- -

This class inherits a constructor from Grape::Middleware::Base

- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) call!(env) - - - -

- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-
-
# File 'lib/grape/middleware/error.rb', line 6
-
-def call!(env)
-  @env = env
-  result = catch :error do
-    @app.call(@env)
-  end
-  
-  result ||= {}
-  result.is_a?(Hash) ? error_response(result) : result
-end
-
-
-
- -
-

- - - (Object) error_response(error = {}) - - - -

- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/grape/middleware/error.rb', line 16
-
-def error_response(error = {})
-  Rack::Response.new([(error[:message] || options[:default_message])], error[:status] || 403, error[:headers] || {}).finish
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Formatter.html b/doc/Grape/Middleware/Formatter.html deleted file mode 100644 index 8b2c7568c4..0000000000 --- a/doc/Grape/Middleware/Formatter.html +++ /dev/null @@ -1,796 +0,0 @@ - - - - -Class: Grape::Middleware::Formatter - - - - - - - - - - - - - - - -

Class: Grape::Middleware::Formatter - - - -

- -
- -
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware/formatter.rb
- -
-
- - -

Constant Summary

- -
- -
CONTENT_TYPES = - -
-
{
-  :xml => 'application/xml',
-  :json => 'application/json',
-  :atom => 'application/atom+xml',
-  :rss => 'application/rss+xml',
-  :txt => 'text/plain'
-}
-
- -
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Base

-

#call, #call!, #initialize, #request, #response

-
-

Constructor Details

- -

This class inherits a constructor from Grape::Middleware::Base

- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) after - - - -

- - - - -
-
-
-
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'lib/grape/middleware/formatter.rb', line 76
-
-def after
-  status, headers, bodies = *@app_response
-  bodymap = []
-  bodies.each do |body|
-    bodymap << case env['api.format']
-      when :json
-        encode_json(body)
-      when :txt
-        encode_txt(body)
-    end
-  end
-  headers['Content-Type'] = 'application/json'
-  Rack::Response.new(bodymap, status, headers).to_a
-end
-
-
-
- -
-

- - - (Object) before - - - -

- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
# File 'lib/grape/middleware/formatter.rb', line 34
-
-def before
-  fmt = format_from_extension || format_from_header || options[:default_format]
-          
-  if content_types.key?(fmt)
-    env['api.format'] = fmt          
-  else
-    throw :error, :status => 406, :message => 'The requested format is not supported.'
-  end
-end
-
-
-
- -
-

- - - (Object) content_types - - - -

- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/grape/middleware/formatter.rb', line 22
-
-def content_types
-  CONTENT_TYPES.merge(options[:content_types])
-end
-
-
-
- -
-

- - - (Object) default_options - - - -

- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-
-
# File 'lib/grape/middleware/formatter.rb', line 15
-
-def default_options
-  { 
-    :default_format => :txt,
-    :content_types => {}
-  }
-end
-
-
-
- -
-

- - - (Object) encode_json(object) - - - -

- - - - -
-
-
-
-91
-92
-93
-94
-95
-96
-97
-98
-99
-
-
# File 'lib/grape/middleware/formatter.rb', line 91
-
-def encode_json(object)
-  if object.respond_to? :serializable_hash
-    MultiJson.encode(object.serializable_hash)
-  elsif object.respond_to? :to_json
-    object.to_json
-  else
-    MultiJson.encode(object)
-  end
-end
-
-
-
- -
-

- - - (Object) encode_txt(object) - - - -

- - - - -
-
-
-
-101
-102
-103
-
-
# File 'lib/grape/middleware/formatter.rb', line 101
-
-def encode_txt(object)
-  object.respond_to?(:to_txt) ? object.to_txt : object.to_s
-end
-
-
-
- -
-

- - - (Object) format_from_extension - - - -

- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'lib/grape/middleware/formatter.rb', line 44
-
-def format_from_extension
-  parts = request.path.split('.')
-  hit = parts.last.to_sym
-  
-  if parts.size <= 1
-    nil
-  else
-    hit
-  end
-end
-
-
-
- -
-

- - - (Object) format_from_header - - - -

- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'lib/grape/middleware/formatter.rb', line 55
-
-def format_from_header
-  mime_array.each do |t| 
-    if mime_types.key?(t)
-      return mime_types[t]
-    end
-  end
-  nil
-end
-
-
-
- -
-

- - - (Object) headers - - - -

- - - - -
-
-
-
-30
-31
-32
-
-
# File 'lib/grape/middleware/formatter.rb', line 30
-
-def headers
-  env.dup.inject({}){|h,(k,v)| h[k.downcase] = v; h}
-end
-
-
-
- -
-

- - - (Object) mime_array - - - -

- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'lib/grape/middleware/formatter.rb', line 64
-
-def mime_array
-  accept = headers['accept']
-  if accept
-    accept.gsub(/\b/,'').
-      scan(/(\w+\/[\w+]+)(?:;[^,]*q=([0-9.]+)[^,]*)?/i).
-      sort_by{|a| -a[1].to_f}.
-      map{|a| a[0]}
-  else
-    []
-  end
-end
-
-
-
- -
-

- - - (Object) mime_types - - - -

- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/grape/middleware/formatter.rb', line 26
-
-def mime_types
-  content_types.invert
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Prefixer.html b/doc/Grape/Middleware/Prefixer.html deleted file mode 100644 index 00bba8b2fa..0000000000 --- a/doc/Grape/Middleware/Prefixer.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - -Class: Grape::Middleware::Prefixer - - - - - - - - - - - - - - - -

Class: Grape::Middleware::Prefixer - - - -

- -
- -
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware/prefixer.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Base

-

#after, #call, #call!, #default_options, #initialize, #request, #response

-
-

Constructor Details

- -

This class inherits a constructor from Grape::Middleware::Base

- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) before - - - -

- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-
-
# File 'lib/grape/middleware/prefixer.rb', line 13
-
-def before
-  if env['PATH_INFO'].index(prefix) == 0
-    env['PATH_INFO'].sub!(prefix, '')
-    env['PATH_INFO'] = Rack::Mount::Utils.normalize_path(env['PATH_INFO'])
-  end
-end
-
-
-
- -
-

- - - (Object) prefix - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-11
-
-
# File 'lib/grape/middleware/prefixer.rb', line 7
-
-def prefix
-  prefix = options[:prefix] || ""
-  prefix = Rack::Mount::Utils.normalize_path(prefix)
-  prefix
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/Middleware/Versioner.html b/doc/Grape/Middleware/Versioner.html deleted file mode 100644 index 2725988519..0000000000 --- a/doc/Grape/Middleware/Versioner.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - -Class: Grape::Middleware::Versioner - - - - - - - - - - - - - - - -

Class: Grape::Middleware::Versioner - - - -

- -
- -
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware/versioner.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Base

-

#after, #call, #call!, #initialize, #request, #response

-
-

Constructor Details

- -

This class inherits a constructor from Grape::Middleware::Base

- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) before - - - -

- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'lib/grape/middleware/versioner.rb', line 12
-
-def before
-  pieces = env['PATH_INFO'].split('/')
-  potential_version = pieces[1]
-  if potential_version =~ options[:pattern]
-    if options[:versions] && !options[:versions].include?(potential_version)
-      throw :error, :status => 404, :message => "404 API Version Not Found"
-    end
-    
-    truncated_path = "/#{pieces[2..-1].join('/')}"
-    env['api.version'] = potential_version
-    env['PATH_INFO'] = truncated_path
-  end
-end
-
-
-
- -
-

- - - (Object) default_options - - - -

- - - - -
-
-
-
-6
-7
-8
-9
-10
-
-
# File 'lib/grape/middleware/versioner.rb', line 6
-
-def default_options
-  {
-    :pattern => /.*/i
-  }
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Grape/MiddlewareStack.html b/doc/Grape/MiddlewareStack.html deleted file mode 100644 index 5268eed3ed..0000000000 --- a/doc/Grape/MiddlewareStack.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - -Class: Grape::MiddlewareStack - - - - - - - - - - - - - - - -

Class: Grape::MiddlewareStack - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/grape/middleware_stack.rb
- -
-
- - - -

Instance Attribute Summary (collapse)

- - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (MiddlewareStack) initialize - - - -

-
-

A new instance of MiddlewareStack

- -
-
-
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/grape/middleware_stack.rb', line 7
-
-def initialize
-  @stack = []
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Object) stack (readonly) - - - -

-
-

Returns the value of attribute stack

- -
-
-
- -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/grape/middleware_stack.rb', line 5
-
-def stack
-  @stack
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) to_app(app) - - - -

-
-

Apply this middleware stack to a Rack application.

- -
-
-
- -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'lib/grape/middleware_stack.rb', line 26
-
-def to_app(app)
-  b = Rack::Builder.new
-  for middleware in stack
-    b.use *middleware
-  end
-  b.run app
-  b.to_app
-end
-
-
-
- -
-

- - - (Object) use(klass, *args) - - - -

-
-

Add a new middleware to the stack. Syntax is identical to normal middleware #use functionality.

- -
-
-
-

Parameters:

-
    - -
  • - - (Class) - - - klass - - - - — -

    The middleware class.

    - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'lib/grape/middleware_stack.rb', line 16
-
-def use(klass, *args)
-  if index = @stack.index(@stack.find{|a| a.first == klass})
-    @stack[index] = [klass, *args]
-  else
-    @stack << [klass, *args]
-  end
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/_index.html b/doc/_index.html deleted file mode 100644 index 49e97fe5c3..0000000000 --- a/doc/_index.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - -Documentation by YARD 0.6.1 - - - - - - - - - - - - - - - -
-

Documentation by YARD 0.6.1

-

Alphabetic Index

- - -

File Listing

- - -
- -

Namespace Listing A-Z

- - - - - - - - -
- - -
    -
  • A
  • -
      - -
    • - API - - (Grape) - -
    • - -
    • - Auth - - (Grape::Middleware) - -
    • - -
    -
- - -
    -
  • B
  • -
      - -
    • - Base - - (Grape::Middleware) - -
    • - -
    • - Basic - - (Grape::Middleware::Auth) - -
    • - -
    -
- - -
    -
  • E
  • -
      - -
    • - Endpoint - - (Grape) - -
    • - -
    • - Error - - (Grape::Middleware) - -
    • - -
    -
- - -
    -
  • F
  • -
      - -
    • - Formatter - - (Grape::Middleware) - -
    • - -
    -
- - -
    -
  • G
  • - -
- - - - - -
    -
  • O
  • -
      - -
    • - OAuth2 - - (Grape::Middleware::Auth) - -
    • - -
    -
- - -
- - -
    -
  • P
  • -
      - -
    • - Prefixer - - (Grape::Middleware) - -
    • - -
    -
- - -
    -
  • V
  • -
      - -
    • - Versioner - - (Grape::Middleware) - -
    • - -
    -
- -
-
- - - - - \ No newline at end of file diff --git a/doc/class_list.html b/doc/class_list.html deleted file mode 100644 index d50188fac6..0000000000 --- a/doc/class_list.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - -
-

Class List

- - - - -
- - - diff --git a/doc/css/common.css b/doc/css/common.css deleted file mode 100644 index cf25c45233..0000000000 --- a/doc/css/common.css +++ /dev/null @@ -1 +0,0 @@ -/* Override this file with custom rules */ \ No newline at end of file diff --git a/doc/css/full_list.css b/doc/css/full_list.css deleted file mode 100644 index f95e4e68e6..0000000000 --- a/doc/css/full_list.css +++ /dev/null @@ -1,53 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; } -#full_list ul { padding: 0; } -#full_list li { padding: 5px; padding-left: 12px; margin: 0; font-size: 1.1em; list-style: none; } -#noresults { padding: 7px 12px; } -#content.insearch #noresults { margin-left: 7px; } -ul.collapsed ul, ul.collapsed li { display: none; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.r1 { background: #f0f0f0; } -li.r2 { background: #fafafa; } -li:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a:link, a:visited { text-decoration: none; color: #05a; } -li.clicked { background: #05a; color: #ccc; } -li.clicked a:link, li.clicked a:visited { color: #eee; } -li.clicked a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } -#nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; } -#nav a:link, #nav a:visited { color: #358; } -#nav a:hover { background: transparent; color: #5af; } - -.frames #content h1 { margin-top: 0; } -.frames li { white-space: nowrap; cursor: normal; } -.frames li small { display: block; font-size: 0.8em; } -.frames li small:before { content: ""; } -.frames li small:after { content: ""; } -.frames li small.search_info { display: none; } -.frames #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } -.frames #content.insearch #search { background-position: center right; } -.frames #search input { width: 110px; } -.frames #nav { display: block; } - -#full_list.insearch li { display: none; } -#full_list.insearch li.found { display: list-item; padding-left: 10px; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/doc/css/style.css b/doc/css/style.css deleted file mode 100644 index c752b11073..0000000000 --- a/doc/css/style.css +++ /dev/null @@ -1,307 +0,0 @@ -body { - padding: 0 20px; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; -} -body.frames { padding: 0 5px; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; -} -h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right; } -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.docstring .object_link { font-family: monospace; } - -.note { - color: #222; - -moz-border-radius: 3px; -webkit-border-radius: 3px; - background: #e3e4e3; border: 1px solid #d5d5d5; padding: 7px 10px; - display: block; -} -.note.todo { background: #ffffc5; border-color: #ececaa; } -.note.returns_void { background: #efefef; } -.note.deprecated { background: #ffe5e5; border-color: #e9dada; } -.note.private { background: #ffffc5; border-color: #ececaa; } -.note.title { text-transform: lowercase; padding: 1px 5px; margin-left: 5px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; } -h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; } -.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; } -.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; } -.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; } -.note.title.private { background: #d5d5d5; border-color: #c5c5c5; } - -h3.inherited { - font-style: italic; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-weight: normal; - padding: 0; - margin: 0; - margin-top: 12px; - margin-bottom: 3px; - font-size: 13px; -} -p.inherited { - padding: 0; - margin: 0; - margin-left: 25px; -} - -dl.box { - width: 520px; - font-size: 1em; -} -dl.box dt { - float: left; - display: block; - width: 100px; - margin: 0; - text-align: right; - font-weight: bold; - border: 1px solid #aaa; - border-width: 1px 0px 0px 1px; - padding: 6px 0; - padding-right: 10px; -} -dl.box dd { - float: left; - display: block; - width: 380px; - margin: 0; - padding: 6px 0; - padding-right: 20px; - border: 1px solid #aaa; - border-width: 1px 1px 0 0; -} -dl.box .last { - border-bottom: 1px solid #aaa; -} -dl.box .r1 { background: #eee; } - -ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; } -#files { padding-left: 15px; font-size: 1.1em; } - -#files { padding: 0; } -#files li { list-style: none; display: inline; padding: 7px 12px; line-height: 35px; } - -dl.constants { margin-left: 40px; } -dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; } -dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; } - -.summary_desc { margin-left: 32px; display: block; font-family: sans-serif; } -.summary_desc tt { font-size: 0.9em; } -dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; } -dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; } -dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; } -dl.constants .discussion *:first-child { margin-top: 0; } -dl.constants .discussion *:last-child { margin-bottom: 0; } - -.method_details { border-top: 1px dotted #aaa; margin-top: 15px; padding-top: 0; } -.method_details.first { border: 0; } -p.signature { - font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace; - padding: 6px 10px; margin-top: 18px; - background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px; -} -p.signature tt { font-family: Monaco, Consolas, Courier, monospace; } -p.signature .overload { display: block; } -p.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; } -p.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; } -p.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; } - -.tags h3 { font-size: 1em; margin-bottom: 0; } -.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; } -.tags ul li { margin-bottom: 3px; } -.tags ul .name { font-family: monospace; font-weight: bold; } -.tags ul .note { padding: 3px 6px; } -.tags { margin-bottom: 12px; } - -.tags .examples h3 { margin-bottom: 10px; } -.tags .examples h4 { padding: 0; margin: 0; margin-left: 15px; font-weight: bold; font-size: 0.9em; } - -.tags .overload .overload_item { list-style: none; margin-bottom: 25px; } -.tags .overload .overload_item .signature { - padding: 2px 8px; - background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px; -} -.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; } -.tags .overload .docstring { margin-top: 15px; } - -.defines { display: none; } - -#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; } - -.showSource { font-size: 0.9em; } -.showSource a:link, .showSource a:visited { text-decoration: none; color: #666; } - -#content a:link, #content a:visited { text-decoration: none; color: #05a; } -#content a:hover { background: #ffffa5; } -.docstring { margin-right: 6em; } - -ul.summary { - list-style: none; - font-family: monospace; - font-size: 1em; - line-height: 1.5em; -} -ul.summary a:link, ul.summary a:visited { - text-decoration: none; font-size: 1.1em; -} -ul.summary li { margin-bottom: 5px; } -.summary .summary_signature { - padding: 1px 10px; - background: #eaeaff; border: 1px solid #dfdfe5; - -moz-border-radius: 3px; -webkit-border-radius: 3px; -} -.summary_signature:hover { background: #eeeeff; cursor: pointer; } -ul.summary.compact li { display: inline; margin-right: 5px; line-height: 2.6em;} -ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; } -#content .summary_signature:hover a:link, -#content .summary_signature:hover a:visited { - background: transparent; - color: #48f; -} - -p.inherited a { font-family: monospace; font-size: 0.9em; } -p.inherited { word-spacing: 5px; font-size: 1.2em; } - -p.children { font-size: 1.2em; } -p.children a { font-size: 0.9em; } -p.children strong { font-size: 0.8em; } -p.children strong.modules { padding-left: 5px; } - -ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; } -ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; } -ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,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) no-repeat top center; } -ul.fullTree li:first-child { padding-top: 0; background: transparent; } -ul.fullTree li:last-child { padding-bottom: 0; } -.showAll ul.fullTree { display: block; } -.showAll .inheritName { display: none; } - -#search { position: absolute; right: 14px; top: 0px; } -#search a:link, #search a:visited { - display: block; float: left; margin-right: 4px; - padding: 8px 10px; text-decoration: none; color: #05a; - border: 1px solid #d8d8e5; - -moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomright: 3px; - -webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-right-radius: 3px; - background: #eaf0ff; - -webkit-box-shadow: -1px 1px 3px #ddd; -} -#search a:hover { background: #f5faff; color: #06b; } -#search a.active { - background: #568; padding-bottom: 20px; color: #fff; border: 1px solid #457; - -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; - -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -} -#search a.inactive { color: #999; } -.frames #search { display: none; } -.inheritanceTree, .toggleDefines { float: right; } - -#menu { font-size: 1.3em; color: #bbb; top: -5px; position: relative; } -#menu .title, #menu a { font-size: 0.7em; } -#menu .title a { font-size: 1em; } -#menu .title { color: #555; } -#menu a:link, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; } -#menu a:hover { color: #05a; } -#menu .noframes { display: none; } -.frames #menu .noframes { display: inline; float: right; } - -#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; } -#footer a:link, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; } -#footer a:hover { color: #05a; } - -#listing ul.alpha { font-size: 1.1em; } -#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; } -#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; } -#listing ul.alpha ul { margin: 0; padding-left: 15px; } -#listing ul small { color: #666; font-size: 0.7em; } - -li.r1 { background: #f0f0f0; } -li.r2 { background: #fafafa; } - -#search_frame { - z-index: 9999; - background: #fff; - display: none; - position: absolute; - top: 36px; - right: 18px; - width: 500px; - height: 80%; - overflow-y: scroll; - border: 1px solid #999; - border-collapse: collapse; - -webkit-box-shadow: -7px 5px 25px #aaa; - -moz-box-shadow: -7px 5px 25px #aaa; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; -} - -#content ul.summary li.deprecated a:link, -#content ul.summary li.deprecated a:visited { text-decoration: line-through; font-style: italic; } - -#toc { - padding: 20px; padding-right: 30px; border: 1px solid #ddd; float: right; background: #fff; margin-left: 20px; margin-bottom: 20px; - max-width: 300px; - -webkit-box-shadow: -2px 2px 6px #bbb; - -moz-box-shadow: -2px 2px 6px #bbb; - z-index: 5000; - position: relative; -} -#toc.nofloat { float: none; max-width: none; border: none; padding: 0; margin: 20px 0; -webkit-box-shadow: none; -moz-box-shadow: none; } -#toc.nofloat.hidden { padding: 0; background: 0; margin-bottom: 5px; } -#toc .title { margin: 0; } -#toc ol { padding-left: 1.8em; } -#toc li { font-size: 1.1em; line-height: 1.7em; } -#toc > ol > li { font-size: 1.1em; font-weight: bold; } -#toc ol > ol { font-size: 0.9em; } -#toc ol ol > ol { padding-left: 2.3em; } -#toc ol + li { margin-top: 0.3em; } -#toc.hidden { padding: 10px; background: #f6f6f6; -webkit-box-shadow: none; -moz-box-shadow: none; } -#filecontents h1 + #toc.nofloat { margin-top: 0; } - -/* syntax highlighting */ -.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; } -#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; } -#filecontents pre.code, .docstring pre.code { display: block; } -.source_code .lines { padding-right: 12px; color: #555; text-align: right; } -#filecontents pre.code, .docstring pre.code, -.tags .example { padding: 5px 12px; margin-top: 4px; border: 1px solid #eef; background: #f5f5ff; } -pre.code { color: #000; } -pre.code .info.file { color: #555; } -pre.code .val { color: #036A07; } -pre.code .tstring_content, -pre.code .heredoc_beg, pre.code .heredoc_end, -pre.code .qwords_beg, pre.code .qwords_end, -pre.code .tstring, pre.code .dstring { color: #036A07; } -pre.code .fid, pre.code .id.new, pre.code .id.to_s, -pre.code .id.to_sym, pre.code .id.to_f, -pre.code .dot + pre.code .id, -pre.code .id.to_i pre.code .id.each { color: #0085FF; } -pre.code .comment { color: #0066FF; } -pre.code .const, pre.code .constant { color: #585CF6; } -pre.code .symbol { color: #C5060B; } -pre.code .kw, -pre.code .label, -pre.code .id.require, -pre.code .id.extend, -pre.code .id.include { color: #0000FF; } -pre.code .ivar { color: #318495; } -pre.code .gvar, -pre.code .id.backref, -pre.code .id.nth_ref { color: #6D79DE; } -pre.code .regexp, .dregexp { color: #036A07; } -pre.code a { border-bottom: 1px dotted #bbf; } - diff --git a/doc/file.README.html b/doc/file.README.html deleted file mode 100644 index c89132cda6..0000000000 --- a/doc/file.README.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - -Documentation by YARD 0.6.1 - - - - - - - - - - - - - - - -

Grape

- -

Grape is a REST-like API micro-framework for Ruby. It is built to complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily provide APIs. It has built-in support for common conventions such as multiple formats, subdomain/prefix restriction, and versioning.

- -

Installation

- -

Grape is available as a gem, to install it just install the gem:

- -
gem install grape
-
- -

Basic Usage

- -

Grape APIs are Rack applications that are created by subclassing Grape::API. Below is a simple example showing some of the more common features of Grape in the context of recreating parts of the Twitter API.

- -
class ::API < Grape::Base
-  version '1'
-  
-  helpers do
-    def current_user
-      @current_user ||= User.authorize!(env)
-    end
-    
-    def authenticate!
-      error!('401 Unauthorized', 401) unless current_user
-    end
-  end
-  
-  resource :statuses do
-    get :public_timeline do
-      Tweet.limit(20)
-    end
-  
-    get :home_timeline do
-      authenticate!
-      current_user.home_timeline
-    end
-    
-    get '/show/:id' do
-      Tweet.find(params[:id])
-    end
-    
-    post :update do
-      authenticate!
-      Tweet.create(
-        :user => current_user,
-        :text => params[:status]
-      )
-    end
-  end
-end
-
- -

This would create a Rack application that could be used like so (in a Rackup file):

- -
use ::API
-
- -

And would respond to the following routes:

- -
GET  /1/statuses/public_timeline(.json)
-GET  /1/statuses/home_timeline(.json)
-GET  /1/statuses/show/:id(.json)
-POST /1/statuses/update(.json)
-
- -

Serialization takes place automatically. For more detailed usage information, please visit the Grape Wiki.

- -

Note on Patches/Pull Requests

- -
    -
  • Fork the project.
  • - -
  • Make your feature addition or bug fix.
  • - -
  • Add tests for it. This is important so I don’t break it in a future version unintentionally.
  • - -
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • - -
  • Send me a pull request. Bonus points for topic branches.
  • -
- - - -

Copyright (c) 2010 Michael Bleigh and Intridea, Inc. See LICENSE for details.

- - - - - \ No newline at end of file diff --git a/doc/file_list.html b/doc/file_list.html deleted file mode 100644 index 7115ba13e7..0000000000 --- a/doc/file_list.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - -
-

File List

- - - - -
- - - diff --git a/doc/frames.html b/doc/frames.html deleted file mode 100644 index 01feb1292b..0000000000 --- a/doc/frames.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Documentation by YARD 0.6.1 - - - - - - diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index c89132cda6..0000000000 --- a/doc/index.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - -Documentation by YARD 0.6.1 - - - - - - - - - - - - - - - -

Grape

- -

Grape is a REST-like API micro-framework for Ruby. It is built to complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily provide APIs. It has built-in support for common conventions such as multiple formats, subdomain/prefix restriction, and versioning.

- -

Installation

- -

Grape is available as a gem, to install it just install the gem:

- -
gem install grape
-
- -

Basic Usage

- -

Grape APIs are Rack applications that are created by subclassing Grape::API. Below is a simple example showing some of the more common features of Grape in the context of recreating parts of the Twitter API.

- -
class ::API < Grape::Base
-  version '1'
-  
-  helpers do
-    def current_user
-      @current_user ||= User.authorize!(env)
-    end
-    
-    def authenticate!
-      error!('401 Unauthorized', 401) unless current_user
-    end
-  end
-  
-  resource :statuses do
-    get :public_timeline do
-      Tweet.limit(20)
-    end
-  
-    get :home_timeline do
-      authenticate!
-      current_user.home_timeline
-    end
-    
-    get '/show/:id' do
-      Tweet.find(params[:id])
-    end
-    
-    post :update do
-      authenticate!
-      Tweet.create(
-        :user => current_user,
-        :text => params[:status]
-      )
-    end
-  end
-end
-
- -

This would create a Rack application that could be used like so (in a Rackup file):

- -
use ::API
-
- -

And would respond to the following routes:

- -
GET  /1/statuses/public_timeline(.json)
-GET  /1/statuses/home_timeline(.json)
-GET  /1/statuses/show/:id(.json)
-POST /1/statuses/update(.json)
-
- -

Serialization takes place automatically. For more detailed usage information, please visit the Grape Wiki.

- -

Note on Patches/Pull Requests

- -
    -
  • Fork the project.
  • - -
  • Make your feature addition or bug fix.
  • - -
  • Add tests for it. This is important so I don’t break it in a future version unintentionally.
  • - -
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • - -
  • Send me a pull request. Bonus points for topic branches.
  • -
- - - -

Copyright (c) 2010 Michael Bleigh and Intridea, Inc. See LICENSE for details.

- - - - - \ No newline at end of file diff --git a/doc/js/app.js b/doc/js/app.js deleted file mode 100644 index 262ba9603b..0000000000 --- a/doc/js/app.js +++ /dev/null @@ -1,202 +0,0 @@ -function createSourceLinks() { - $('.method_details_list .source_code'). - before("[View source]"); - $('.toggleSource').toggle(function() { - $(this).parent().next().slideDown(100); - $(this).text("Hide source"); - }, - function() { - $(this).parent().next().slideUp(100); - $(this).text("View source"); - }); -} - -function createDefineLinks() { - var tHeight = 0; - $('.defines').after(" more..."); - $('.toggleDefines').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).prev().show(); - $(this).parent().prev().height($(this).parent().height()); - $(this).text("(less)"); - }, - function() { - $(this).prev().hide(); - $(this).parent().prev().height(tHeight); - $(this).text("more...") - }); -} - -function createFullTreeLinks() { - var tHeight = 0; - $('.inheritanceTree').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).parent().toggleClass('showAll'); - $(this).text("(hide)"); - $(this).parent().prev().height($(this).parent().height()); - }, - function() { - $(this).parent().toggleClass('showAll'); - $(this).parent().prev().height(tHeight); - $(this).text("show all") - }); -} - -function fixBoxInfoHeights() { - $('dl.box dd.r1, dl.box dd.r2').each(function() { - $(this).prev().height($(this).height()); - }); -} - -function searchFrameLinks() { - $('#method_list_link').click(function() { - toggleSearchFrame(this, relpath + 'method_list.html'); - }); - - $('#class_list_link').click(function() { - toggleSearchFrame(this, relpath + 'class_list.html'); - }); - - $('#file_list_link').click(function() { - toggleSearchFrame(this, relpath + 'file_list.html'); - }); -} - -function toggleSearchFrame(id, link) { - var frame = $('#search_frame'); - $('#search a').removeClass('active').addClass('inactive'); - if (frame.attr('src') == link && frame.css('display') != "none") { - frame.slideUp(100); - $('#search a').removeClass('active inactive'); - } - else { - $(id).addClass('active').removeClass('inactive'); - frame.attr('src', link).slideDown(100); - } -} - -function linkSummaries() { - $('.summary_signature').click(function() { - document.location = $(this).find('a').attr('href'); - }); -} - -function framesInit() { - if (window.top.frames.main) { - document.body.className = 'frames'; - $('#menu .noframes a').attr('href', document.location); - $('html head title', window.parent.document).text($('html head title').text()); - } -} - -function keyboardShortcuts() { - if (window.top.frames.main) return; - $(document).keypress(function(evt) { - if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return; - if (evt.originalTarget.nodeName == "INPUT" || - evt.originalTarget.nodeName == "TEXTAREA") return; - switch (evt.charCode) { - case 67: case 99: $('#class_list_link').click(); break; // 'c' - case 77: case 109: $('#method_list_link').click(); break; // 'm' - case 70: case 102: $('#file_list_link').click(); break; // 'f' - } - }); -} - -function summaryToggle() { - $('.summary_toggle').click(function() { - localStorage.summaryCollapsed = $(this).text(); - $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); - var next = $(this).parent().parent().next(); - if (next.hasClass('compact')) { - next.toggle(); - next.next().toggle(); - } - else if (next.hasClass('summary')) { - var list = $('