rutema 1.1.0 → 1.1.1
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 +3 -1
- data/lib/rutema/configuration.rb +14 -3
- data/lib/rutema/rake.rb +13 -3
- data/lib/rutema/system.rb +3 -5
- metadata +4 -4
data/History.txt
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
== 1.1.
|
1
|
+
== 1.1.1 /2010-12-22
|
2
|
+
* Bugfix: RakeTask constructor parameter config renamed to config_file to match the accessor methods
|
3
|
+
== 1.1.0 /2010-12-20
|
2
4
|
* Added Rutema::RakeTask class to allow integration of the test runner with rake
|
3
5
|
* Email reporting now suppresses _setup and _teardown entries unless it's configured as verbose. To do this add a :verbose=>true entry in the reporter configuration
|
4
6
|
* Fixed a bug, where on a setup spec failure the state of the actual spec was nil
|
data/lib/rutema/configuration.rb
CHANGED
@@ -3,19 +3,28 @@ $:.unshift File.join(File.dirname(__FILE__),"..")
|
|
3
3
|
|
4
4
|
module Rutema
|
5
5
|
#This module defines the "configuration directives" used in the configuration of RutemaX
|
6
|
+
#
|
7
|
+
#Example
|
8
|
+
#A configuration file needs as a minimum to define which parser to use and which tests to run.
|
9
|
+
#
|
10
|
+
#Since rutema configuration files are valid Ruby code, you can use the full power of the Ruby language including require directives
|
11
|
+
#
|
12
|
+
# require 'rubygems'
|
13
|
+
# require 'rake'
|
14
|
+
# configuration.parser={:class=>Rutema::MinimalXMLParser}
|
15
|
+
# configuration.tests=FileList['all/of/the/tests/**/*.*']
|
6
16
|
module RutemaXConfiguration
|
7
17
|
#Adds a hash of values to the tools hash of the configuration
|
8
18
|
#
|
9
|
-
#
|
10
19
|
#This hash is then accessible in the parser and reporters as a property of the configuration instance
|
11
20
|
#
|
12
21
|
#Required keys:
|
13
22
|
# :name - the name to use for accessing the path in code
|
14
23
|
#Example:
|
15
|
-
# configuration.tool={:name=>"
|
24
|
+
# configuration.tool={:name=>"nunit",:path=>"/bin/nunit",:configuration=>{:important=>"info"}}
|
16
25
|
#
|
17
26
|
#The path to make can be accessed in the parser as
|
18
|
-
# @configuration.
|
27
|
+
# @configuration.tools.nunit[:path]
|
19
28
|
#
|
20
29
|
#This way you can pass configuration information for the tools you use
|
21
30
|
def tool= definition
|
@@ -116,6 +125,8 @@ module Rutema
|
|
116
125
|
end
|
117
126
|
|
118
127
|
#This class reads a RutemaX configuration file
|
128
|
+
#
|
129
|
+
#See Rutema::RutemaXConfiguration for configuration examples and directives
|
119
130
|
class RutemaXConfigurator<Patir::Configurator
|
120
131
|
include RutemaXConfiguration
|
121
132
|
def initialize config_file,logger=nil
|
data/lib/rutema/rake.rb
CHANGED
@@ -2,16 +2,26 @@ require 'rutema/system'
|
|
2
2
|
require 'optparse'
|
3
3
|
|
4
4
|
module Rutema
|
5
|
+
#Integrates rutema with rake
|
5
6
|
class RakeTask
|
6
|
-
attr_accessor :config_file, :log_file, :
|
7
|
+
attr_accessor :config_file, :log_file, :name
|
8
|
+
#Params is a parameter hash.
|
9
|
+
#
|
10
|
+
#Valid parameters are:
|
11
|
+
#
|
12
|
+
#:config_file => path to the configuration file
|
13
|
+
#
|
14
|
+
#:log_file => path to the file where the log is saved. If missing then the logger prints in stdout
|
15
|
+
#
|
16
|
+
#:name => the name for the rutema task. If missing then the task is named rutema, otherwise it will be rutema:name
|
7
17
|
def initialize params=nil
|
8
18
|
params||={}
|
9
|
-
@config_file=params[:
|
19
|
+
@config_file=params[:config_file]
|
10
20
|
@log_file=params[:log]
|
11
21
|
@name=params[:name]
|
12
22
|
yield self if block_given?
|
13
23
|
|
14
|
-
raise "No rutema configuration given" unless @config_file
|
24
|
+
raise "No rutema configuration given, :config_file is nil" unless @config_file
|
15
25
|
args=['-c',@config_file]
|
16
26
|
args+=['-l',@log_file] if @log_file
|
17
27
|
args<<"all"
|
data/lib/rutema/system.rb
CHANGED
@@ -13,7 +13,7 @@ module Rutema
|
|
13
13
|
module Version
|
14
14
|
MAJOR=1
|
15
15
|
MINOR=1
|
16
|
-
TINY=
|
16
|
+
TINY=1
|
17
17
|
STRING=[ MAJOR, MINOR, TINY ].join( "." )
|
18
18
|
end
|
19
19
|
#The Elements module provides the namespace for the various modules adding parser functionality
|
@@ -229,7 +229,7 @@ module Rutema
|
|
229
229
|
end
|
230
230
|
#The ExtensibleXMLParser allows you to easily add methods to handle specification elements.
|
231
231
|
#
|
232
|
-
#A method element_foo(step) allows you to add behaviour for
|
232
|
+
#A method element_foo(step) allows you to add behaviour for foo scenario elements.
|
233
233
|
#
|
234
234
|
#The method will receive a Rutema::TestStep instance.
|
235
235
|
class ExtensibleXMLParser<BaseXMLParser
|
@@ -252,9 +252,7 @@ module Rutema
|
|
252
252
|
return spec
|
253
253
|
end
|
254
254
|
end
|
255
|
-
#MinimalXMLParser offers three runnable steps in the scenarios
|
256
|
-
#
|
257
|
-
#
|
255
|
+
#MinimalXMLParser offers three runnable steps in the scenarios as defined in Rutema::Elements::Minimal
|
258
256
|
class MinimalXMLParser<ExtensibleXMLParser
|
259
257
|
include Rutema::Elements::Minimal
|
260
258
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rutema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Vassilis Rizopoulos
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-22 00:00:00 +02:00
|
19
19
|
default_executable: rutemax
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|