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
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
-
.configure {|configuration| ... } ⇒ Object
Generates a new configuration.
-
.server ⇒ Object
Returns the Rest Client private resource.
-
.uri(rest_service = '') ⇒ Object
Returns the URI for the server plus a suffix.
Class Attribute Details
.configuration ⇒ Object
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
25 26 27 28 |
# File 'lib/bpm_manager.rb', line 25 def self.configure self.configuration ||= Configuration.new yield(configuration) end |
.server ⇒ Object
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 |