Module: BpmManager

Defined in:
lib/bpm_manager.rb,
lib/bpm_manager/oracle.rb,
lib/bpm_manager/red_hat.rb,
lib/bpm_manager/version.rb,
lib/generators/bpm_manager/install_generator.rb

Defined Under Namespace

Modules: Oracle, RedHat Classes: Configuration, InstallGenerator

Constant Summary collapse

VERSION =
"1.0.35"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



8
9
10
# File 'lib/bpm_manager.rb', line 8

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Generates a new configuration

Yields:



25
26
27
28
# File 'lib/bpm_manager.rb', line 25

def self.configure
  self.configuration ||= Configuration.new
  yield(configuration)
end

.serverObject

Returns the Rest Client private resource



36
37
38
# File 'lib/bpm_manager.rb', line 36

def self.server
  RestClient::Resource.new(URI.encode('http' + (configuration.bpm_use_ssl ? 's' : '') + '://' + configuration.bpm_url + configuration.bpm_url_suffix), :user => configuration.bpm_username, :password => configuration.bpm_password, :headers => {:content_type => :json, :accept => :json})
end

.uri(rest_service = '') ⇒ Object

Returns the URI for the server plus a suffix



31
32
33
# File 'lib/bpm_manager.rb', line 31

def self.uri(rest_service = '')
  URI.encode('http' + (configuration.bpm_use_ssl ? 's' : '') + '://' + configuration.bpm_username + ':' + configuration.bpm_password + '@' + configuration.bpm_url + configuration.bpm_url_suffix + (rest_service.nil? ? '' : rest_service))
end