Made changes
This commit is contained in:
parent
fc56af0621
commit
d663ee765a
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
*
|
||||
!.gitignore
|
||||
!lib
|
||||
!lib/*
|
||||
!tests
|
||||
!rubyqa.gemspec
|
||||
!templates
|
||||
!templates/*
|
||||
!design.adoc
|
||||
!README.md
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -3,5 +3,6 @@
|
||||
$LOAD_PATH << __dir__
|
||||
require 'manager'
|
||||
require 'resource'
|
||||
require 'runner'
|
||||
require 'host'
|
||||
require 'test'
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user