Class: Circlemator::GithubRepo
- Inherits:
-
Object
- Object
- Circlemator::GithubRepo
show all
- Includes:
- HTTParty
- Defined in:
- lib/circlemator/github_repo.rb
Defined Under Namespace
Classes: InvalidPath, WrongRepo
Instance Method Summary
collapse
Constructor Details
#initialize(user:, repo:, github_auth_token:, **_opts) ⇒ GithubRepo
Returns a new instance of GithubRepo.
22
23
24
25
26
|
# File 'lib/circlemator/github_repo.rb', line 22
def initialize(user:, repo:, github_auth_token:, **_opts)
@user = user
@repo = repo
@auth_token = github_auth_token
end
|
Instance Method Details
#get(path, opts = {}) ⇒ Object
28
29
30
|
# File 'lib/circlemator/github_repo.rb', line 28
def get(path, opts = {})
self.class.get(fix_path(path), opts.merge(basic_auth: auth))
end
|
#post(path, opts = {}) ⇒ Object
36
37
38
|
# File 'lib/circlemator/github_repo.rb', line 36
def post(path, opts = {})
self.class.post(fix_path(path), opts.merge(basic_auth: auth))
end
|
#put(path, opts = {}) ⇒ Object
32
33
34
|
# File 'lib/circlemator/github_repo.rb', line 32
def put(path, opts = {})
self.class.put(fix_path(path), opts.merge(basic_auth: auth))
end
|