forked from ruby-grape/grape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrape.rb
84 lines (73 loc) · 3.05 KB
/
grape.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
require 'logger'
require 'rack'
require 'rack/mount'
require 'rack/builder'
require 'rack/accept'
require 'rack/auth/basic'
require 'rack/auth/digest/md5'
require 'hashie'
require 'active_support/all'
require 'grape/util/deep_merge'
require 'grape/util/content_types'
require 'multi_json'
require 'multi_xml'
require 'virtus'
require 'i18n'
I18n.load_path << File.expand_path('../grape/locale/en.yml', __FILE__)
module Grape
autoload :API, 'grape/api'
autoload :Endpoint, 'grape/endpoint'
autoload :Route, 'grape/route'
autoload :Cookies, 'grape/cookies'
autoload :Validations, 'grape/validations'
module Exceptions
autoload :Base, 'grape/exceptions/base'
autoload :Validation, 'grape/exceptions/validation'
autoload :MissingVendorOption, 'grape/exceptions/missing_vendor_option'
autoload :MissingMimeType, 'grape/exceptions/missing_mime_type'
autoload :MissingOption, 'grape/exceptions/missing_option'
autoload :InvalidFormatter, 'grape/exceptions/invalid_formatter'
autoload :InvalidVersionerOption, 'grape/exceptions/invalid_versioner_option'
autoload :UnknownValidator, 'grape/exceptions/unknown_validator'
autoload :UnknownOptions, 'grape/exceptions/unknown_options'
autoload :InvalidWithOptionForRepresent, 'grape/exceptions/invalid_with_option_for_represent'
end
module ErrorFormatter
autoload :Base, 'grape/error_formatter/base'
autoload :Json, 'grape/error_formatter/json'
autoload :Txt, 'grape/error_formatter/txt'
autoload :Xml, 'grape/error_formatter/xml'
end
module Formatter
autoload :Base, 'grape/formatter/base'
autoload :Json, 'grape/formatter/json'
autoload :SerializableHash, 'grape/formatter/serializable_hash'
autoload :Txt, 'grape/formatter/txt'
autoload :Xml, 'grape/formatter/xml'
end
module Parser
autoload :Base, 'grape/parser/base'
autoload :Json, 'grape/parser/json'
autoload :Xml, 'grape/parser/xml'
end
module Middleware
autoload :Base, 'grape/middleware/base'
autoload :Versioner, 'grape/middleware/versioner'
autoload :Formatter, 'grape/middleware/formatter'
autoload :Error, 'grape/middleware/error'
module Auth
autoload :OAuth2, 'grape/middleware/auth/oauth2'
autoload :Basic, 'grape/middleware/auth/basic'
autoload :Digest, 'grape/middleware/auth/digest'
end
module Versioner
autoload :Path, 'grape/middleware/versioner/path'
autoload :Header, 'grape/middleware/versioner/header'
autoload :Param, 'grape/middleware/versioner/param'
end
end
module Util
autoload :HashStack, 'grape/util/hash_stack'
end
end
require 'grape/version'