Class: Repomen::Repo::Service::GitHub
- Inherits:
-
Base
- Object
- Base
- Repomen::Repo::Service::GitHub
show all
- Defined in:
- lib/repomen/repo/service/git_hub.rb
Constant Summary
collapse
- SERVICE_REGEXP =
/(https:\/\/|git\@)github.com[\:\/]([^\/]+)\/([^\.]+)\.git$/
Instance Attribute Summary
Attributes inherited from Base
#url
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#applicable? ⇒ Boolean
8
9
10
|
# File 'lib/repomen/repo/service/git_hub.rb', line 8
def applicable?
url =~ SERVICE_REGEXP
end
|
#handler_class ⇒ Object
12
13
14
|
# File 'lib/repomen/repo/service/git_hub.rb', line 12
def handler_class
Handler::Git
end
|
#name ⇒ Object
overriding ‘git_hub’ here to make directories look prettier
17
18
19
|
# File 'lib/repomen/repo/service/git_hub.rb', line 17
def name
:github
end
|
#repo_name ⇒ Object
21
22
23
|
# File 'lib/repomen/repo/service/git_hub.rb', line 21
def repo_name
url =~ SERVICE_REGEXP && $3
end
|
#user_name ⇒ Object
25
26
27
|
# File 'lib/repomen/repo/service/git_hub.rb', line 25
def user_name
url =~ SERVICE_REGEXP && $2
end
|