Module: GitHubBub
- Defined in:
- lib/git_hub_bub.rb,
lib/git_hub_bub/request.rb,
lib/git_hub_bub/version.rb,
lib/git_hub_bub/response.rb
Defined Under Namespace
Classes: Request, RequestError, Response
Constant Summary
collapse
- VERSION =
"0.0.5"
Class Method Summary
collapse
Class Method Details
.delete(*args) ⇒ Object
42
43
44
|
# File 'lib/git_hub_bub.rb', line 42
def delete(*args)
Request.delete(*args)
end
|
.get(*args) ⇒ Object
26
27
28
|
# File 'lib/git_hub_bub.rb', line 26
def get(*args)
Request.get(*args)
end
|
.head(*args) ⇒ Object
22
23
24
|
# File 'lib/git_hub_bub.rb', line 22
def head(*args)
Request.head(*args)
end
|
.patch(*args) ⇒ Object
38
39
40
|
# File 'lib/git_hub_bub.rb', line 38
def patch(*args)
Request.patch(*args)
end
|
.post(*args) ⇒ Object
30
31
32
|
# File 'lib/git_hub_bub.rb', line 30
def post(*args)
Request.post(*args)
end
|
.put(*args) ⇒ Object
34
35
36
|
# File 'lib/git_hub_bub.rb', line 34
def put(*args)
Request.put(*args)
end
|
.valid_token?(token) ⇒ Boolean
15
16
17
18
19
20
|
# File 'lib/git_hub_bub.rb', line 15
def valid_token?(token)
Request.get("https://#{ENV['GITHUB_APP_ID']}:#{ENV['GITHUB_APP_SECRET']}@api.github.com/applications/#{ENV['GITHUB_APP_ID']}/tokens/#{token}", {token: nil})
true
rescue GitHubBub::RequestError
false
end
|