rutema 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/Manifest.txt +1 -0
- data/bin/rutemaweb +2 -2
- data/lib/rutema/system.rb +11 -5
- data/lib/rutemaweb/main.rb +52 -0
- data/lib/rutemaweb/ramaze_controller.rb +1 -5
- data/test/test_system.rb +1 -0
- metadata +4 -3
data/History.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
== 0.6.2 / 2008-03-12
|
2
|
+
* Parsers derived from Rutema::SpecificationParser now receive the system configuration so that conventions like tools, paths and context can be used in element_ methods (this functionality fell through the cracks with the change in parser implementation)
|
3
|
+
* rutemaweb now has proper commandline help and connects properly to the database
|
1
4
|
== 0.6.1 / 2008-02-28
|
2
5
|
* ExtensibleXMLParser made more tolerant (no exceptions when an element cannot be handled)
|
3
6
|
* Bug: Typo in the class name used in the exceptions fixed
|
data/Manifest.txt
CHANGED
data/bin/rutemaweb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (c) 2007 Vassilis Rizopoulos. All rights reserved.
|
2
2
|
begin
|
3
|
-
require 'rutemaweb/
|
3
|
+
require 'rutemaweb/main'
|
4
4
|
rescue LoadError
|
5
5
|
require 'rubygems'
|
6
|
-
require 'rutemaweb/
|
6
|
+
require 'rutemaweb/main'
|
7
7
|
end
|
8
8
|
|
9
9
|
start_ramaze
|
data/lib/rutema/system.rb
CHANGED
@@ -16,7 +16,7 @@ module Rutema
|
|
16
16
|
module Version
|
17
17
|
MAJOR=0
|
18
18
|
MINOR=6
|
19
|
-
TINY=
|
19
|
+
TINY=2
|
20
20
|
STRING=[ MAJOR, MINOR, TINY ].join( "." )
|
21
21
|
end
|
22
22
|
#Is raised when an error is found in a specification
|
@@ -25,6 +25,14 @@ module Rutema
|
|
25
25
|
|
26
26
|
#Base class that bombs out when used....
|
27
27
|
class SpecificationParser
|
28
|
+
attr_reader :configuration
|
29
|
+
def initialize params
|
30
|
+
@logger=params[:logger]
|
31
|
+
@logger||=Patir.setup_logger
|
32
|
+
@configuration=params[:configuration]
|
33
|
+
@logger.warn("No system configuration provided to the parser") unless @configuration
|
34
|
+
end
|
35
|
+
|
28
36
|
def parse_specification param
|
29
37
|
raise ParserError,"not implemented. You should derive a parser implementation from SpecificationParser!"
|
30
38
|
end
|
@@ -36,10 +44,6 @@ module Rutema
|
|
36
44
|
ELEM_TITLE="specification/title"
|
37
45
|
ELEM_SCENARIO="specification/scenario"
|
38
46
|
ELEM_REQ="requirement"
|
39
|
-
def initialize params
|
40
|
-
@logger=params[:logger]
|
41
|
-
@logger||=Patir.setup_logger
|
42
|
-
end
|
43
47
|
#Parses __param__ and returns the Rutema::TestSpecification instance
|
44
48
|
#
|
45
49
|
#param can be the filename of the specification or the contents of that file.
|
@@ -297,6 +301,8 @@ module Rutema
|
|
297
301
|
if definition[:class]
|
298
302
|
#add the logger to the definition
|
299
303
|
definition[:logger]=@logger
|
304
|
+
#add the configuration to the definition
|
305
|
+
definition[:configuration]=@configuration
|
300
306
|
klass=definition[:class]
|
301
307
|
return klass.new(definition)
|
302
308
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),"..")
|
2
|
+
require 'rutema/system'
|
3
|
+
require 'rubygems'
|
4
|
+
require 'patir/base'
|
5
|
+
|
6
|
+
def start_ramaze
|
7
|
+
logger=Patir.setup_logger
|
8
|
+
db_file=parse_command_line(ARGV)
|
9
|
+
db_file=File.expand_path(db_file)
|
10
|
+
connect(db_file,logger)
|
11
|
+
require 'rutemaweb/ramaze_controller'
|
12
|
+
Dir.chdir(File.dirname(__FILE__)) do
|
13
|
+
Ramaze.start :force=>true#,:adapter=>:thin
|
14
|
+
end
|
15
|
+
end
|
16
|
+
def connect db_file,logger
|
17
|
+
if db_file
|
18
|
+
if ActiveRecord::Base.connected?
|
19
|
+
logger.info("Using cached database connection")
|
20
|
+
else
|
21
|
+
if File.exist?(db_file)
|
22
|
+
logger.info("Connecting with database '#{db_file}'")
|
23
|
+
ActiveRecord::Base.establish_connection(:adapter=>"sqlite3", :database=>db_file )
|
24
|
+
else
|
25
|
+
logger.fatal("Could not find #{db_file}")
|
26
|
+
exit 1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
else
|
30
|
+
logger.fatal("No database source defined in the configuration")
|
31
|
+
exit 1
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def parse_command_line args
|
36
|
+
args.options do |opt|
|
37
|
+
opt.on("Usage:")
|
38
|
+
opt.on("rutemaweb [options] database_file")
|
39
|
+
opt.on("Options:")
|
40
|
+
opt.on("--debug", "-d","Turns on debug messages") { $DEBUG=true }
|
41
|
+
opt.on("-v", "--version","Displays the version") { $stdout.puts("v#{Version::STRING}");exit 0 }
|
42
|
+
opt.on("--help", "-h", "-?", "This text") { $stdout.puts opt; exit 0 }
|
43
|
+
opt.parse!
|
44
|
+
#and now the rest
|
45
|
+
if args.empty?
|
46
|
+
$stdout.puts opt
|
47
|
+
exit 0
|
48
|
+
else
|
49
|
+
return args.shift
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -4,6 +4,7 @@ require 'rutema/system'
|
|
4
4
|
require 'rubygems'
|
5
5
|
require 'ramaze'
|
6
6
|
|
7
|
+
|
7
8
|
module Rutema
|
8
9
|
module UI
|
9
10
|
class MainController < Ramaze::Controller
|
@@ -147,8 +148,3 @@ module Rutema
|
|
147
148
|
end
|
148
149
|
end
|
149
150
|
end
|
150
|
-
def start_ramaze
|
151
|
-
Dir.chdir(File.dirname(__FILE__)) do
|
152
|
-
Ramaze.start :force=>true#,:adapter=>:thin
|
153
|
-
end
|
154
|
-
end
|
data/test/test_system.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rutema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vassilis Rizopoulos
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-03-12 00:00:00 +01:00
|
13
13
|
default_executable: rutemax
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -91,7 +91,7 @@ dependencies:
|
|
91
91
|
requirements:
|
92
92
|
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: 1.5.
|
94
|
+
version: 1.5.1
|
95
95
|
version:
|
96
96
|
description: "== DESCRIPTION: rutema is a test execution too with a twist. It allows you to combine test tools while it takes care of logging, reporting, archiving of results and formalizes execution of automated and manual tests. It's purpose is to provide a set of classes and a framework that will allow testers to specify and execute tests in heterogeneous testing environments. For more information look at http://patir.rubyforge.org/rutema == FEATURES/PROBLEMS: * Unified test execution environment for automated and manual tests * Extensible reports and notifications in various formats (email, rss, pdf, html etc.) * Web frontend and command line report generation tools for browsing the test results database * Comprehensive history of test execution * A well defined way to create a project specific test specification format == SYNOPSIS: See http://patir.rubyforge.org/rutema/distro_test.html for an introductory example. == REQUIREMENTS: * patir (http://patir.rubyforge.org) * mailfactory (http://rubyforge.org/projects/mailfactory/) * activerecord (http://ar.rubyonrails.com/) * sqlite3 (http://rubyforge.org/projects/sqlite-ruby/) * ramaze (http://www.ramaze.net/) * ruport (http://rubyreports.org/) * acts_as_reportable == INSTALL: * gem install rutema"
|
97
97
|
email: riva@braveworld.net
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/rutema/reporter_ar.rb
|
123
123
|
- lib/rutema/historian.rb
|
124
124
|
- lib/rutema/model.rb
|
125
|
+
- lib/rutemaweb/main.rb
|
125
126
|
- lib/rutemaweb/ramaze_controller.rb
|
126
127
|
- lib/rutemaweb/public/bg_menu.gif
|
127
128
|
- lib/rutemaweb/public/bg_submenu.gif
|