Made changes

This commit is contained in:
Tristan Ancelet 2024-07-17 13:14:28 -04:00
parent fc56af0621
commit d663ee765a
5 changed files with 24 additions and 3 deletions

10
.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
*
!.gitignore
!lib
!lib/*
!tests
!rubyqa.gemspec
!templates
!templates/*
!design.adoc
!README.md

View File

@ -13,7 +13,6 @@ module RubyQA
:runner => SSH_Runner
}
attr_accessor *DEFAULT_HOSTDATA.keys
attr_reader :client, :data, :resources
def initialize( data = {} )
@ -21,19 +20,26 @@ module RubyQA
@data = DEFAULT_HOSTDATA.merge data
if not @data[:hostname].empty? and @data[:site].empty?
data[:site]=@data[:hostname][0,3]
end
## initialize client for usage tests
@client = @data[:runner].new(@data)
end
def exec (command)
## Send a command from the host
@client.exec(command)
end
def exec_sudo (command)
## Send a sudo command from the host
@client.exec_sudo(command)
end
def [](key)
## Provide Access to data (:ip, etc)
@data[key]
end

View File

@ -29,7 +29,11 @@ module RubyQA
end
def self.new_test(name, options={}, &test_proc)
if not options.has_key? :disabled
@@tests << Test.new(name, **options, &test_proc)
elsif options[:disabled] != true
@@tests << Test.new(name, **options, &test_proc)
end
end
def self.run_tests

View File

@ -3,5 +3,6 @@
$LOAD_PATH << __dir__
require 'manager'
require 'resource'
require 'runner'
require 'host'
require 'test'

View File

@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = "RubyQA"
s.version = '0.1.0'
s.summary = 'A Ruby framework for QA *NIX system builds'
s.summary = 'A Ruby framework for QA-ing *NIX system builds'
s.description = 'A Ruby based framework defining & orchestrating tests against a host or hosts'
s.authors = ['Tristan Ancelet']
s.email = 'tristanancelet@yahoo.com'