rutema 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.2.3 /2011-05-03
2
+ * parser interface expanded for configuration validation
3
+ * parser interface expanded to allow separate parsing of setup and teardown scripts
4
+ == 1.2.2 /2011-04-05
5
+ * Actually fixed all the places where path expansion takes place.
1
6
  == 1.2.1 /2011-04-04
2
7
  * The configuration code no longer assumes that you are passing files. configuration.tests= now assumes you're passing an array of strings and it is the responsibility of the parser to make heads or tails from that. The configuraiton is clever enough to detect paths relative to the configuration file and expand them.
3
8
  * some minor cosmetic changes in the documentation
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ Hoe.spec('rutema') do |p|
15
15
  p.url = "http://patir.rubyforge.org/rutema"
16
16
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
17
17
  p.extra_deps<<['patir',">=0.6.4"]
18
- p.extra_deps<<['highline','1.5.2']
18
+ p.extra_deps<<['highline','1.6.1']
19
19
  p.extra_deps<<['mailfactory','1.4.0']
20
20
  p.extra_deps<<['activerecord','3.0.5']
21
21
  p.extra_deps<<['ruport','1.6.3']
@@ -10,6 +10,8 @@ module Rutema
10
10
  #Initialze expects a hash and as a base implementation assigns :logger as the internal logger.
11
11
  #
12
12
  #By default the internal logger will log to the console if no logger is provided.
13
+ #
14
+ #At the end validate_configuration is called
13
15
  class SpecificationParser
14
16
  attr_reader :configuration
15
17
  def initialize params
@@ -20,10 +22,24 @@ module Rutema
20
22
  @logger=Patir.setup_logger
21
23
  @configuration[:logger]=@logger
22
24
  end
25
+ validate_configuration
23
26
  end
24
-
27
+ #parses a specification
25
28
  def parse_specification param
26
29
  raise ParserError,"not implemented. You should derive a parser implementation from SpecificationParser!"
27
30
  end
31
+ #parses the setup script. By default calls parse_specification
32
+ def parse_setup param
33
+ parse_specification(param)
34
+ end
35
+ #parses the teardown script. By default calls parse_specification
36
+ def parse_teardown param
37
+ parse_specification(param)
38
+ end
39
+ #The parser stores it's configuration in @configuration
40
+ #
41
+ #To avoid validating the configuration in element_ methods repeatedly, do all configuration validation here
42
+ def validate_configuration
43
+ end
28
44
  end
29
45
  end
data/lib/rutema/system.rb CHANGED
@@ -22,7 +22,7 @@ module Rutema
22
22
  module Version
23
23
  MAJOR=1
24
24
  MINOR=2
25
- TINY=2
25
+ TINY=3
26
26
  STRING=[ MAJOR, MINOR, TINY ].join( "." )
27
27
  end
28
28
  #This class coordinates parsing, execution and reporting of test specifications
@@ -146,11 +146,11 @@ module Rutema
146
146
  teardown=nil
147
147
  if @configuration.setup
148
148
  @logger.info("Parsing setup specification from '#{@configuration.setup}'")
149
- setup=@parser.parse_specification(@configuration.setup).scenario
149
+ setup=@parser.parse_setup(@configuration.setup).scenario
150
150
  end
151
151
  if @configuration.teardown
152
152
  @logger.info("Parsing teardown specification from '#{@configuration.teardown}'")
153
- teardown=@parser.parse_specification(@configuration.teardown).scenario
153
+ teardown=@parser.parse_teardown(@configuration.teardown).scenario
154
154
  end
155
155
  if @configuration.use_step_by_step
156
156
  @logger.info("Using StepRunner")
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 2
10
- version: 1.2.2
9
+ - 3
10
+ version: 1.2.3
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: 2011-04-05 00:00:00 +03:00
18
+ date: 2011-05-05 00:00:00 +02:00
19
19
  default_executable: rutema
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -42,12 +42,12 @@ dependencies:
42
42
  requirements:
43
43
  - - "="
44
44
  - !ruby/object:Gem::Version
45
- hash: 7
45
+ hash: 13
46
46
  segments:
47
47
  - 1
48
- - 5
49
- - 2
50
- version: 1.5.2
48
+ - 6
49
+ - 1
50
+ version: 1.6.1
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
@@ -122,12 +122,12 @@ dependencies:
122
122
  requirements:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
- hash: 35
125
+ hash: 47
126
126
  segments:
127
127
  - 2
128
- - 9
129
- - 4
130
- version: 2.9.4
128
+ - 8
129
+ - 0
130
+ version: 2.8.0
131
131
  type: :development
132
132
  version_requirements: *id007
133
133
  description: |-
@@ -220,7 +220,6 @@ files:
220
220
  - test/test_runners.rb
221
221
  - test/test_system.rb
222
222
  - test/test_couchdb.rb
223
- - .gemtest
224
223
  has_rdoc: true
225
224
  homepage: http://patir.rubyforge.org/rutema
226
225
  licenses: []
data/.gemtest DELETED
File without changes