improvement: split vulcano core library from verification

This commit is contained in:
Dominik Richter 2015-06-19 16:45:36 +02:00
parent aebed6cb55
commit e689afb4b8
6 changed files with 11 additions and 6 deletions

View file

@ -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
View file

@ -0,0 +1,6 @@
# encoding: utf-8
# copyright: 2015, Dominik Richter
# license: All rights reserved
require 'verify/profiles'
require 'verify/metadata'

View file

@ -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

View file

@ -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

View file

@ -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