forked from bitbucket-rest-api/bitbucket
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbitbucket_rest_api.rb
66 lines (54 loc) · 1.94 KB
/
bitbucket_rest_api.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
# encoding: utf-8
require 'bitbucket_rest_api/version'
require 'bitbucket_rest_api/configuration'
require 'bitbucket_rest_api/constants'
require 'bitbucket_rest_api/utils/url'
require 'bitbucket_rest_api/connection'
require 'bitbucket_rest_api/deprecation'
require 'bitbucket_rest_api/helpers/repository_helper'
module BitBucket
extend Configuration
module AutoloadHelper
def autoload_all(prefix, options)
options.each do |const_name, path|
autoload const_name, File.join(prefix, path)
end
end
def register_constant(options)
options.each do |const_name, value|
const_set const_name.upcase.to_s, value
end
end
def lookup_constant(const_name)
const_get const_name.upcase.to_s
end
end
extend AutoloadHelper
autoload_all 'bitbucket_rest_api',
:API => 'api',
:ApiFactory => 'api_factory',
:Authorization => 'authorization',
:Authorizations => 'authorizations',
:Validations => 'validations',
:ParameterFilter => 'parameter_filter',
:Normalizer => 'normalizer',
:Client => 'client',
:CoreExt => 'core_ext',
:Request => 'request',
:Response => 'response',
:Result => 'result',
:Repos => 'repos',
#:Error => 'error',
:Issues => 'issues',
:User => 'user',
:Users => 'users',
:Invitations => 'invitations'
#:Teams => 'teams',
#:PullRequests => 'pull_requests',
#:Users => 'users',
#:Events => 'events',
#:Search => 'search',
#:PageLinks => 'page_links',
#:PageIterator => 'page_iterator',
#:PagedRequest => 'paged_request'
end # BitBucket