diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e42ba2b --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +* +!.gitignore +!lib +!lib/* +!tests +!rubyqa.gemspec +!templates +!templates/* +!design.adoc +!README.md diff --git a/lib/host.rb b/lib/host.rb index f98aecd..0c7c335 100644 --- a/lib/host.rb +++ b/lib/host.rb @@ -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 diff --git a/lib/manager.rb b/lib/manager.rb index 15aec35..7e4d213 100644 --- a/lib/manager.rb +++ b/lib/manager.rb @@ -29,7 +29,11 @@ module RubyQA end def self.new_test(name, options={}, &test_proc) - @@tests << Test.new(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 diff --git a/lib/rubyqa.rb b/lib/rubyqa.rb index a2189d5..857f207 100644 --- a/lib/rubyqa.rb +++ b/lib/rubyqa.rb @@ -3,5 +3,6 @@ $LOAD_PATH << __dir__ require 'manager' require 'resource' +require 'runner' require 'host' require 'test' diff --git a/rubyqa.gemspec b/rubyqa.gemspec index 12adab9..2b48e76 100644 --- a/rubyqa.gemspec +++ b/rubyqa.gemspec @@ -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'