Class: RSpec::OpenHAB::Karaf
- Inherits:
-
Object
- Object
- RSpec::OpenHAB::Karaf
- Defined in:
- lib/rspec/openhab/karaf.rb
Instance Attribute Summary collapse
-
#include_bindings ⇒ Object
Returns the value of attribute include_bindings.
-
#include_jsondb ⇒ Object
Returns the value of attribute include_jsondb.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#private_confdir ⇒ Object
Returns the value of attribute private_confdir.
-
#use_root_instance ⇒ Object
Returns the value of attribute use_root_instance.
Instance Method Summary collapse
-
#initialize(path = nil) ⇒ Karaf
constructor
A new instance of Karaf.
- #launch ⇒ Object
Constructor Details
#initialize(path = nil) ⇒ Karaf
Returns a new instance of Karaf.
29 30 31 32 33 34 35 |
# File 'lib/rspec/openhab/karaf.rb', line 29 def initialize(path = nil) @path = path @include_bindings = true @include_jsondb = true @private_confdir = false @use_root_instance = false end |
Instance Attribute Details
#include_bindings ⇒ Object
Returns the value of attribute include_bindings.
27 28 29 |
# File 'lib/rspec/openhab/karaf.rb', line 27 def include_bindings @include_bindings end |
#include_jsondb ⇒ Object
Returns the value of attribute include_jsondb.
27 28 29 |
# File 'lib/rspec/openhab/karaf.rb', line 27 def include_jsondb @include_jsondb end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
26 27 28 |
# File 'lib/rspec/openhab/karaf.rb', line 26 def path @path end |
#private_confdir ⇒ Object
Returns the value of attribute private_confdir.
27 28 29 |
# File 'lib/rspec/openhab/karaf.rb', line 27 def private_confdir @private_confdir end |
#use_root_instance ⇒ Object
Returns the value of attribute use_root_instance.
27 28 29 |
# File 'lib/rspec/openhab/karaf.rb', line 27 def use_root_instance @use_root_instance end |
Instance Method Details
#launch ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/rspec/openhab/karaf.rb', line 37 def launch raise ArgumentError, "Path must be supplied if use_root_instance is false" unless path || use_root_instance @path = oh_home if use_root_instance load_boot_jars set_env set_java_properties set_java_properties_from_env unless use_root_instance redirect_instances create_instance end start_instance end |