Class: Hub::Context::Remote
- Inherits:
-
Struct
- Object
- Struct
- Hub::Context::Remote
- Defined in:
- lib/hub/context.rb
Instance Method Summary collapse
Instance Method Details
#==(other) ⇒ Object
231 232 233 |
# File 'lib/hub/context.rb', line 231 def ==(other) other.respond_to?(:to_str) ? name == other.to_str : super end |
#project ⇒ Object
235 236 237 238 239 |
# File 'lib/hub/context.rb', line 235 def project if urls.find { |u| u =~ %r{\bgithub\.com[:/](.+)/(.+).git$} } GithubProject.new local_repo, $1, $2 end end |
#urls ⇒ Object
241 242 243 |
# File 'lib/hub/context.rb', line 241 def urls @urls ||= local_repo.git_config("remote.#{name}.url", :all).to_s.split("\n") end |