patir 0.3 → 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.4.0 / 2007-05-30
2
+ * Configurator#load_from_file method added to alow for configuration file inclusions
3
+
1
4
  == 0.3.0 / 2007-05-20
2
5
  * Bugfix for the nesting of CommandSequenceStatus
3
6
  * PatirLoggerFormatter added and used in setup_logger
data/lib/patir/base.rb CHANGED
@@ -5,7 +5,7 @@ module Patir
5
5
  require 'logger'
6
6
  #Version information
7
7
  VERSION_MAJOR="0"
8
- VERSION_MINOR="3"
8
+ VERSION_MINOR="4"
9
9
  VERSION="#{VERSION_MAJOR}.#{VERSION_MINOR}"
10
10
  #Error thrown usually in initialize methods when missing required parameters
11
11
  #from the initialization hash.
data/lib/patir/command.rb CHANGED
@@ -350,7 +350,7 @@ module Patir
350
350
  #
351
351
  #a step has warnings and the :fail_on_warning strategy is used
352
352
  #
353
- #in all other cases if any steps have :not_executed or :running status
353
+ #in all other cases if none of the steps has a :not_executed or :running status
354
354
  def completed?
355
355
  #this saves us iterating once+1 when no execution took place
356
356
  return false if !self.executed?
@@ -49,8 +49,18 @@ module Patir
49
49
  def configuration
50
50
  return self
51
51
  end
52
- private
53
- #loads the configuration from a file
52
+ #Loads the configuration from a file
53
+ #
54
+ #Use this to chain configuration files together
55
+ #==Example
56
+ #Say you have on configuration file "first.cfg" that contains all the generic directives and several others that change only one or two things.
57
+ #
58
+ #You can 'include' the first.cfg file in the other configurations with
59
+ # configuration.load_from_file("first.cfg")
60
+ def load_from_file filename
61
+ load_configuration(filename)
62
+ end
63
+ private
54
64
  def load_configuration filename
55
65
  begin
56
66
  #change into the directory of the configuration file to make requiring easy
@@ -1,26 +1,26 @@
1
- $:.unshift File.join(File.dirname(__FILE__),"..","lib")
2
- require 'test/unit'
3
- require 'patir/base.rb'
4
-
5
- class TestBase<Test::Unit::TestCase
6
- def teardown
7
- #clean up
8
- File.delete("temp.log") if File.exists?("temp.log")
9
- end
10
- #simple match test
11
- def test_drb_service
12
- assert_equal("druby://service.host:7000",Patir.drb_service("service.host",7000))
13
- end
14
- #This is not actually testing anything meaningfull but can be expanded when we learn more about
15
- #the logger
16
- def test_setup_logger
17
- logger=Patir.setup_logger
18
- assert_not_nil(logger)
19
- logger=Patir.setup_logger(nil,:silent)
20
- assert_not_nil(logger)
21
- logger=Patir.setup_logger("temp.log",:silent)
22
- assert_not_nil(logger)
23
- logger.close
24
- end
25
-
1
+ $:.unshift File.join(File.dirname(__FILE__),"..","lib")
2
+ require 'test/unit'
3
+ require 'patir/base.rb'
4
+
5
+ class TestBase<Test::Unit::TestCase
6
+ def teardown
7
+ #clean up
8
+ File.delete("temp.log") if File.exists?("temp.log")
9
+ end
10
+ #simple match test
11
+ def test_drb_service
12
+ assert_equal("druby://service.host:7000",Patir.drb_service("service.host",7000))
13
+ end
14
+ #This is not actually testing anything meaningfull but can be expanded when we learn more about
15
+ #the logger
16
+ def test_setup_logger
17
+ logger=Patir.setup_logger
18
+ assert_not_nil(logger)
19
+ logger=Patir.setup_logger(nil,:silent)
20
+ assert_not_nil(logger)
21
+ logger=Patir.setup_logger("temp.log",:silent)
22
+ assert_not_nil(logger)
23
+ logger.close
24
+ end
25
+
26
26
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.1
3
3
  specification_version: 1
4
4
  name: patir
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.3"
7
- date: 2007-05-21 00:00:00 +02:00
6
+ version: "0.4"
7
+ date: 2007-05-30 00:00:00 +02:00
8
8
  summary: patir (Project Automation Tools in Ruby) provides libraries for use in automation tools
9
9
  require_paths:
10
10
  - lib
@@ -45,10 +45,14 @@ test_files:
45
45
  - test/test_patir_base.rb
46
46
  - test/test_patir_command.rb
47
47
  - test/test_patir_configuration.rb
48
- rdoc_options: []
49
-
50
- extra_rdoc_files: []
51
-
48
+ rdoc_options:
49
+ - --main
50
+ - README.txt
51
+ extra_rdoc_files:
52
+ - History.txt
53
+ - Manifest.txt
54
+ - README.txt
55
+ - COPYING.txt
52
56
  executables: []
53
57
 
54
58
  extensions: []
@@ -72,5 +76,5 @@ dependencies:
72
76
  requirements:
73
77
  - - ">="
74
78
  - !ruby/object:Gem::Version
75
- version: 1.2.0
79
+ version: 1.2.1
76
80
  version: