rutema_elements 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -1
- data/README.txt +6 -3
- data/lib/rutema/elements/general.rb +1 -1
- data/lib/rutema/elements/win32.rb +10 -4
- metadata +3 -3
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -4,18 +4,21 @@ rutema_elements http://patir.rubyforge.org/rutema
|
|
4
4
|
Rutema Elements modules are the easiest way to add functionality to rutema parsers.
|
5
5
|
Just derive your parser from the basic rutema parser and include the module of your choice
|
6
6
|
|
7
|
-
class MyParser < Rutema::MinimalXMLParser
|
7
|
+
class MyParser < Rutema::MinimalXMLParser
|
8
8
|
include Rutema::Elements::IIS
|
9
9
|
include Rutema::Elements::Standard
|
10
|
-
end
|
10
|
+
end
|
11
11
|
|
12
12
|
and voila! your parser now understands how to reset IIS, wait and fail!
|
13
13
|
|
14
14
|
== FEATURES/PROBLEMS:
|
15
15
|
Easy addition of extra functionality for rutema
|
16
16
|
|
17
|
+
IIS, MSTest and SQLServer modules are windows specific as they use the MS commandline tools
|
18
|
+
|
17
19
|
== SYNOPSIS:
|
18
|
-
See http://patir.rubyforge.org/rutema/parser.html for information on how these modules fit into a parser
|
20
|
+
See http://patir.rubyforge.org/rutema/parser.html for information on how these modules fit into a parser.
|
21
|
+
|
19
22
|
Check the RDocs for information on how to configure plus examples of usage for each element.
|
20
23
|
|
21
24
|
== REQUIREMENTS:
|
@@ -33,14 +33,17 @@ module Rutema
|
|
33
33
|
#===Example Elements
|
34
34
|
# <sqlcmd script="some.sql"/>
|
35
35
|
# <sqlcmd script="some.sql" host="localhost"/> - overriding host
|
36
|
-
# <sqlcmd script="some.sql" database="MyDB" level="
|
36
|
+
# <sqlcmd script="some.sql" database="MyDB" level="11"/> - hypersensitive error checking and explicitly executed on MyDB
|
37
37
|
def element_sqlcmd step
|
38
38
|
raise Rutema::ParserError,"Missing required script attribute in sqlcmd step" unless step.has_script?
|
39
39
|
cfg=@configuration.tools.sqlcmd[:configuration].dup if @configuration.tools.sqlcmd && @configuration.tools.sqlcmd[:configuration]
|
40
40
|
cfg||=Hash.new
|
41
|
+
if step.has_script_root?
|
42
|
+
cfg[:script_root]=step.script_root
|
43
|
+
end
|
41
44
|
#see if there is a script root directory
|
42
45
|
if cfg[:script_root]
|
43
|
-
raise Rutema::ParserError,"Script root
|
46
|
+
raise Rutema::ParserError,"Script root directory '#{cfg[:script_root]}' does not exist. Error in the configuration for sqlcmd steps" unless File.exists?(cfg[:script_root])
|
44
47
|
script_path=File.expand_path(File.join(cfg[:script_root],step.script))
|
45
48
|
else
|
46
49
|
script_path=File.expand_path(step.script)
|
@@ -99,9 +102,9 @@ module Rutema
|
|
99
102
|
#An example will illustrate it's usage better:
|
100
103
|
#
|
101
104
|
#{:share=>"//host/tests",:local=>"c:/tests"} will result in :share being substituted with :local on the assembly pathname
|
102
|
-
#so
|
105
|
+
#so \\\\\\host\\\\tests\\\\assembly.dll becomes c:\\\\tests\\\\assembly.dll
|
103
106
|
#
|
104
|
-
#Note that entries should be defined with '/' instead of '
|
107
|
+
#Note that entries should be defined with '/' instead of '\\\\'.
|
105
108
|
#===Examples
|
106
109
|
# <mstest assembly="tests.dll"/>
|
107
110
|
def element_mstest step
|
@@ -109,6 +112,9 @@ module Rutema
|
|
109
112
|
raise Rutema::ParserError,"Missing tool configuration for mstest (no configuration.tool entry)" unless @configuration.tools.mstest && @configuration.tools.mstest[:configuration]
|
110
113
|
cfg=@configuration.tools.mstest[:configuration].dup
|
111
114
|
raise Rutema::ParserError,"Cannot find mstest in '#{@configuration.tools.mstest[:path]}'" unless File.exists?(cfg[:path])
|
115
|
+
if step.has_assembly_root?
|
116
|
+
cfg[:assembly_root]=step.assembly_root
|
117
|
+
end
|
112
118
|
#if there is an assembly root defined than calculate the paths relative to that
|
113
119
|
if cfg[:assembly_root]
|
114
120
|
raise Rutema::ParserError, "assembly_root entry '#{cfg[:assembly_root]}' defined for mstest does not exist. Error in the configuration for mstest steps" unless File.exists?(cfg[:assembly_root])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rutema_elements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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-11-03 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 1.8.1
|
44
44
|
version:
|
45
|
-
description: "== DESCRIPTION: Rutema Elements modules are the easiest way to add functionality to rutema parsers. Just derive your parser from the basic rutema parser and include the module of your choice class MyParser < Rutema::MinimalXMLParser include Rutema::Elements::IIS include Rutema::Elements::Standard end and voila! your parser now understands how to reset IIS, wait and fail! == FEATURES/PROBLEMS: Easy addition of extra functionality for rutema
|
45
|
+
description: "== DESCRIPTION: Rutema Elements modules are the easiest way to add functionality to rutema parsers. Just derive your parser from the basic rutema parser and include the module of your choice class MyParser < Rutema::MinimalXMLParser include Rutema::Elements::IIS include Rutema::Elements::Standard end and voila! your parser now understands how to reset IIS, wait and fail! == FEATURES/PROBLEMS: Easy addition of extra functionality for rutema IIS, MSTest and SQLServer modules are windows specific as they use the MS commandline tools"
|
46
46
|
email: riva@braveworld.net
|
47
47
|
executables: []
|
48
48
|
|