Class: Serverspec::Type::JenkinsBase

Inherits:
ApiBase
  • Object
show all
Defined in:
lib/serverspec_extra_types/types/jenkins_base.rb

Direct Known Subclasses

JenkinsCredential, JenkinsJob, JenkinsPlugin

Instance Method Summary collapse

Methods inherited from ApiBase

#[], #inspection, #url

Constructor Details

#initialize(name = nil, options = {}) ⇒ JenkinsBase

Returns a new instance of JenkinsBase.



11
12
13
14
15
16
# File 'lib/serverspec_extra_types/types/jenkins_base.rb', line 11

def initialize(name = nil, options = {})
  super(name, options)
  @user = ENV['JENKINS_USER'] || nil
  @password = ENV['JENKINS_PASSWORD'] || nil
  @url_base = property[:variables][:jenkins_url] || 'http://localhost:8080'
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/serverspec_extra_types/types/jenkins_base.rb', line 18

def exist?
  get_inspection.success?
end