mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
improvement: split vulcano core library from verification
This commit is contained in:
parent
aebed6cb55
commit
e689afb4b8
6 changed files with 11 additions and 6 deletions
|
@ -4,8 +4,7 @@
|
|||
require 'thor'
|
||||
require 'json'
|
||||
require_relative '../lib/vulcano'
|
||||
require 'vulcano/profiles'
|
||||
require 'vulcano/metadata'
|
||||
require_relative '../lib/verify'
|
||||
|
||||
class VulcanoCLI < Thor
|
||||
|
||||
|
|
6
lib/verify.rb
Normal file
6
lib/verify.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
# encoding: utf-8
|
||||
# copyright: 2015, Dominik Richter
|
||||
# license: All rights reserved
|
||||
|
||||
require 'verify/profiles'
|
||||
require 'verify/metadata'
|
|
@ -58,7 +58,7 @@ module Vulcano
|
|||
return nil
|
||||
end
|
||||
res = Metadata.new(log)
|
||||
res.instance_eval(File::read(dpath))
|
||||
res.instance_eval(File::read(dpath), dpath, 1)
|
||||
return res
|
||||
end
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
# copyright: 2015, Dominik Richter
|
||||
# license: All rights reserved
|
||||
require 'vulcano/specfile'
|
||||
require 'verify/specfile'
|
||||
require 'vulcano/log'
|
||||
|
||||
module Vulcano
|
|
@ -3,7 +3,7 @@
|
|||
# license: All rights reserved
|
||||
require 'vulcano/base_rule'
|
||||
require 'vulcano/log'
|
||||
require 'vulcano/dummy'
|
||||
require 'verify/dummy'
|
||||
# the user may use dynamic evaluations via pry
|
||||
begin
|
||||
require 'pry'
|
||||
|
@ -28,7 +28,7 @@ module Vulcano
|
|||
@rules = []
|
||||
@raw = File::read(path)
|
||||
@invalid_calls = []
|
||||
self.instance_eval(@raw)
|
||||
self.instance_eval(@raw, path, 1)
|
||||
end
|
||||
|
||||
def vulcano_meta
|
Loading…
Reference in a new issue