Class: SCEP::JSCEPCli
- Inherits:
-
Object
- Object
- SCEP::JSCEPCli
- Includes:
- Loggable
- Defined in:
- lib/scep/jscep_cli.rb
Constant Summary collapse
- BUNDLED_JSCEP_CLI_JAR_PATH =
File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jscepcli-1.0.jar')
Instance Attribute Summary collapse
-
#jarfile ⇒ Object
Returns the value of attribute jarfile.
-
#java_executable ⇒ Object
Returns the value of attribute java_executable.
Instance Method Summary collapse
- #forward(request) ⇒ Object
-
#initialize(java_executable = 'java', jarfile = BUNDLED_JSCEP_CLI_JAR_PATH) ⇒ JSCEPCli
constructor
A new instance of JSCEPCli.
Methods included from Loggable
Constructor Details
#initialize(java_executable = 'java', jarfile = BUNDLED_JSCEP_CLI_JAR_PATH) ⇒ JSCEPCli
Returns a new instance of JSCEPCli.
12 13 14 15 |
# File 'lib/scep/jscep_cli.rb', line 12 def initialize(java_executable = 'java', jarfile = BUNDLED_JSCEP_CLI_JAR_PATH) @jarfile = jarfile @java_executable = java_executable end |
Instance Attribute Details
#jarfile ⇒ Object
Returns the value of attribute jarfile.
8 9 10 |
# File 'lib/scep/jscep_cli.rb', line 8 def jarfile @jarfile end |
#java_executable ⇒ Object
Returns the value of attribute java_executable.
10 11 12 |
# File 'lib/scep/jscep_cli.rb', line 10 def java_executable @java_executable end |
Instance Method Details
#forward(request) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/scep/jscep_cli.rb', line 18 def forward(request) logger.info "Making JSCEP CLI request to #{request.url}" cmd = "#{java_executable} -jar #{jarfile} #{request.to_cli_arguments}" logger.debug "Executing command: #{cmd}" system cmd end |