Class: Gojira::Deck::File

Inherits:
Base
  • Object
show all
Defined in:
lib/gojira/deck/file.rb

Instance Attribute Summary

Attributes inherited from Base

#binary_path, #error, #output, #params

Instance Method Summary collapse

Methods inherited from Base

#execute

Constructor Details

#initialize(binary_path, kong_addr = nil, config_file = nil, timeout = nil, tls_params = {}) ⇒ File

Returns a new instance of File.



6
7
8
# File 'lib/gojira/deck/file.rb', line 6

def initialize(binary_path, kong_addr = nil, config_file = nil, timeout = nil, tls_params = {})
  super
end

Instance Method Details

#lint(state_file, ruleset_file) ⇒ Object



10
11
12
13
# File 'lib/gojira/deck/file.rb', line 10

def lint(state_file, ruleset_file)
  command = "file lint -s #{state_file} #{ruleset_file}"
  execute(command)
end

#merge(state_file_list, output_file) ⇒ Object



20
21
22
23
# File 'lib/gojira/deck/file.rb', line 20

def merge(state_file_list, output_file)
  command = "file merge -o #{output_file} #{state_file_list.join(' ')}"
  execute(command)
end

#render(state_file_list, output_file) ⇒ Object



15
16
17
18
# File 'lib/gojira/deck/file.rb', line 15

def render(state_file_list, output_file)
  command = "file render #{state_file_list.join(' ')} -o #{output_file}"
  execute(command)
end

#validate(state_file) ⇒ Object



25
26
27
28
# File 'lib/gojira/deck/file.rb', line 25

def validate(state_file)
  command = "file validate -o #{state_file}"
  execute(command)
end