forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub.rb
More file actions
54 lines (44 loc) · 1.2 KB
/
Copy pathgithub.rb
File metadata and controls
54 lines (44 loc) · 1.2 KB
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
# encoding: utf-8
require 'github/configuration'
require 'github/connection'
module Github
extend Configuration
class << self
# Alias for Github::Client.new
#
# @return [Github::Client]
def new(options = {})
Github::Client.new(options)
end
# Delegate to Github::Client
#
def method_missing(method, *args, &block)
return super unless new.respond_to?(method)
new.send(method, *args, &block)
end
def respond_to?(method, include_private = false)
new.respond_to?(method, include_private) || super(method, include_private)
end
end
module AutoloadHelper
def autoload_all(prefix, options)
options.each do |const_name, path|
autoload const_name, File.join(prefix, path)
end
end
end
extend AutoloadHelper
autoload_all 'github',
:API => 'api',
:Client => 'client',
:Repos => 'repos',
:Request => 'request',
:Response => 'response',
:Error => 'error',
:Issues => 'issues',
:Gists => 'gists',
:GitData => 'git_data',
:Orgs => 'orgs',
:PullRequests => 'pull_requests',
:Users => 'users'
end # Github