Class: Autoproj::Jenkins::Credentials::Credential
- Inherits:
-
Struct
- Object
- Struct
- Autoproj::Jenkins::Credentials::Credential
- Defined in:
- lib/autoproj/jenkins/credentials.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
-
#vcs ⇒ Object
Returns the value of attribute vcs.
Instance Method Summary collapse
-
#jenkins_id ⇒ Object
The ID of the jenkins credential.
-
#matches?(vcs) ⇒ Boolean
Whether this credential object matches the given VCS.
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host
5 6 7 |
# File 'lib/autoproj/jenkins/credentials.rb', line 5 def host @host end |
#protocol ⇒ Object
Returns the value of attribute protocol
5 6 7 |
# File 'lib/autoproj/jenkins/credentials.rb', line 5 def protocol @protocol end |
#vcs ⇒ Object
Returns the value of attribute vcs
5 6 7 |
# File 'lib/autoproj/jenkins/credentials.rb', line 5 def vcs @vcs end |
Instance Method Details
#jenkins_id ⇒ Object
The ID of the jenkins credential
17 18 19 |
# File 'lib/autoproj/jenkins/credentials.rb', line 17 def jenkins_id "autoproj-#{vcs}-#{protocol}-#{host}" end |
#matches?(vcs) ⇒ Boolean
Whether this credential object matches the given VCS
9 10 11 12 13 14 |
# File 'lib/autoproj/jenkins/credentials.rb', line 9 def matches?(vcs) return if vcs.type.to_sym != self.vcs vcs_url = URI.parse(vcs.url) vcs_url.scheme == protocol && vcs_url.host == host end |