testdoc 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/README.rdoc +18 -13
- data/Rakefile +9 -14
- data/lib/testdoc.rb +1 -1
- data/lib/testdoc_module.rb +5 -13
- data/test/test_testdoc.rb +1 -0
- metadata +62 -20
data/.gemtest
ADDED
File without changes
|
data/README.rdoc
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
Generate testplans from annotated sourcecode.
|
7
|
+
Generate testplans from annotated sourcecode.
|
8
8
|
|
9
|
-
Author: Thomas Flemming,
|
9
|
+
Author: Thomas Flemming, thomas.flemming (at) gmail.com
|
10
10
|
|
11
11
|
== FEATURES/PROBLEMS:
|
12
12
|
|
@@ -14,7 +14,7 @@ Author: Thomas Flemming, thomasfl(snabela)usit.uio.no
|
|
14
14
|
|
15
15
|
== SYNOPSIS:
|
16
16
|
|
17
|
-
Examples:
|
17
|
+
Examples:
|
18
18
|
|
19
19
|
$testdoc
|
20
20
|
$testdoc rubyfil.rb
|
@@ -24,19 +24,24 @@ Examples:
|
|
24
24
|
|
25
25
|
Sample ruby sourcecode annotations:
|
26
26
|
|
27
|
-
# testplan: Title
|
28
|
-
|
29
|
-
# task: Title
|
30
|
-
# multiline
|
31
|
-
# check: Title
|
27
|
+
# @testplan: Title
|
28
|
+
class MyTests
|
32
29
|
|
30
|
+
# @test: Title
|
31
|
+
should "Login " do
|
32
|
+
# @task: Title
|
33
|
+
# multiline
|
34
|
+
# @check: Title
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
33
38
|
Syntax:
|
34
39
|
|
35
|
-
TESTPLAN => [
|
36
|
-
TEST => '
|
40
|
+
TESTPLAN => [@testplan: .*] TESTS
|
41
|
+
TEST => '@test:' TITLE TASKS*
|
37
42
|
TITLE => .*\n [#.*]*
|
38
|
-
TASKS => '
|
39
|
-
CHECKS => '
|
43
|
+
TASKS => '@task:' CHECKS* *
|
44
|
+
CHECKS => '@checks' TITLE
|
40
45
|
|
41
46
|
== REQUIREMENTS:
|
42
47
|
|
@@ -50,7 +55,7 @@ Syntax:
|
|
50
55
|
|
51
56
|
(The MIT License)
|
52
57
|
|
53
|
-
Copyright (c) 2009
|
58
|
+
Copyright (c) 2009 Thomas Flemming
|
54
59
|
|
55
60
|
Permission is hereby granted, free of charge, to any person obtaining
|
56
61
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -1,28 +1,23 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'hoe'
|
3
|
+
|
1
4
|
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
2
5
|
require File.dirname(__FILE__) + '/lib/testdoc'
|
3
6
|
|
4
|
-
# Generate all the Rake tasks
|
5
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
6
7
|
$hoe = Hoe.new('testdoc', TestDoc::VERSION) do |p|
|
7
8
|
p.developer('Thomas Flemming', 'thomasfl@usit.uio.no')
|
8
9
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
|
-
|
10
|
-
p.
|
11
|
-
# p.extra_deps = [
|
12
|
-
# ['activesupport','>= 2.0.2'],
|
13
|
-
# ]
|
10
|
+
p.rubyforge_name = p.name
|
11
|
+
p.summary = "Documentation generator for tests you want to give manuel testers."
|
14
12
|
p.extra_dev_deps = [
|
15
|
-
['newgem', ">= #{::Newgem::VERSION}"]
|
13
|
+
['newgem', ">= #{::Newgem::VERSION}"],
|
14
|
+
['hoe', '>= 2.9.1']
|
16
15
|
]
|
17
|
-
|
16
|
+
|
18
17
|
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
19
|
-
|
20
|
-
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
21
|
-
p.rsync_args = '-av --delete --ignore-errors'
|
18
|
+
|
22
19
|
end
|
23
20
|
|
24
21
|
require 'newgem/tasks' # load /tasks/*.rake
|
25
22
|
Dir['tasks/**/*.rake'].each { |t| load t }
|
26
23
|
|
27
|
-
# TODO - want other tests/tasks run by default? Add them to the list
|
28
|
-
# task :default => [:spec, :features]
|
data/lib/testdoc.rb
CHANGED
data/lib/testdoc_module.rb
CHANGED
@@ -5,11 +5,6 @@ module TestDoc
|
|
5
5
|
require File.dirname(__FILE__) + '/testdoc/testdocoptions'
|
6
6
|
require File.dirname(__FILE__) + '/testdoc/testdocparser'
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
# module TestDoc
|
11
|
-
|
12
|
-
|
13
8
|
class TestDoc
|
14
9
|
|
15
10
|
GENERATORS = {} # Not in use
|
@@ -56,15 +51,13 @@ module TestDoc
|
|
56
51
|
@num_files += 1
|
57
52
|
end
|
58
53
|
|
59
|
-
# basename = File.basename(fn).split("\.")[0]
|
60
|
-
# puts "DEBUG" + basename + ".html"
|
61
54
|
end
|
62
55
|
|
63
56
|
if(not options.quiet) then
|
64
57
|
puts ''
|
65
58
|
puts ''
|
66
59
|
puts 'Generating TestDoc HTML: testplan.html...'
|
67
|
-
|
60
|
+
|
68
61
|
puts "Parsed files: #@num_files"
|
69
62
|
end
|
70
63
|
|
@@ -106,19 +99,19 @@ module TestDoc
|
|
106
99
|
content.split(/\n/).map do |line|
|
107
100
|
line_number = line_number + 1
|
108
101
|
|
109
|
-
if line =~
|
102
|
+
if line =~ /.*#.*@test (.*)/i then
|
110
103
|
symbol = :test
|
111
104
|
testdoc_array[counter] = [:test,$1.gsub(/^\s+/, ""),line_number]
|
112
105
|
counter = counter + 1
|
113
|
-
elsif line =~
|
106
|
+
elsif line =~ /.*#.*@task (.*)/i then
|
114
107
|
testdoc_array[counter] = [:task,$1.gsub(/^\s+/, ""),line_number]
|
115
108
|
counter = counter + 1
|
116
109
|
symbol = :task
|
117
|
-
elsif line =~
|
110
|
+
elsif line =~ /.*#.*@check (.*)/i then
|
118
111
|
testdoc_array[counter] = [:check,$1.gsub(/^\s+/, ""),line_number]
|
119
112
|
counter = counter + 1
|
120
113
|
symbol = :check
|
121
|
-
elsif line =~
|
114
|
+
elsif line =~ /.*#.*@testplan (.*)/i then
|
122
115
|
testdoc_array[counter] = [:testplan,$1.gsub(/^\s+/, "") + "#",line_number]
|
123
116
|
counter = counter + 1
|
124
117
|
symbol = :testplan
|
@@ -136,7 +129,6 @@ module TestDoc
|
|
136
129
|
|
137
130
|
# Given a list of files and directories, create a list
|
138
131
|
# of all the Ruby files they contain.
|
139
|
-
|
140
132
|
def normalized_file_list(options, relative_files, force_doc = false, exclude_pattern=nil)
|
141
133
|
file_list = []
|
142
134
|
|
data/test/test_testdoc.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Thomas Flemming
|
@@ -9,30 +15,58 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-03-07 00:00:00 +01:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: newgem
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
29
|
+
hash: 5
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 5
|
33
|
+
- 3
|
34
|
+
version: 1.5.3
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
25
37
|
- !ruby/object:Gem::Dependency
|
26
38
|
name: hoe
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 41
|
46
|
+
segments:
|
47
|
+
- 2
|
48
|
+
- 9
|
49
|
+
- 1
|
50
|
+
version: 2.9.1
|
27
51
|
type: :development
|
28
|
-
|
29
|
-
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: hoe
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
30
58
|
requirements:
|
31
59
|
- - ">="
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
35
|
-
|
61
|
+
hash: 41
|
62
|
+
segments:
|
63
|
+
- 2
|
64
|
+
- 9
|
65
|
+
- 1
|
66
|
+
version: 2.9.1
|
67
|
+
type: :development
|
68
|
+
version_requirements: *id003
|
69
|
+
description: ""
|
36
70
|
email:
|
37
71
|
- thomasfl@usit.uio.no
|
38
72
|
executables:
|
@@ -42,7 +76,6 @@ extensions: []
|
|
42
76
|
extra_rdoc_files:
|
43
77
|
- History.txt
|
44
78
|
- Manifest.txt
|
45
|
-
- README.rdoc
|
46
79
|
files:
|
47
80
|
- History.txt
|
48
81
|
- Manifest.txt
|
@@ -59,33 +92,42 @@ files:
|
|
59
92
|
- test/test_helper.rb
|
60
93
|
- test/test_testdoc.rb
|
61
94
|
- bin/testdoc
|
95
|
+
- .gemtest
|
62
96
|
has_rdoc: true
|
63
|
-
homepage:
|
97
|
+
homepage:
|
98
|
+
licenses: []
|
99
|
+
|
64
100
|
post_install_message:
|
65
101
|
rdoc_options:
|
66
102
|
- --main
|
67
|
-
- README.
|
103
|
+
- README.txt
|
68
104
|
require_paths:
|
69
105
|
- lib
|
70
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
71
108
|
requirements:
|
72
109
|
- - ">="
|
73
110
|
- !ruby/object:Gem::Version
|
111
|
+
hash: 3
|
112
|
+
segments:
|
113
|
+
- 0
|
74
114
|
version: "0"
|
75
|
-
version:
|
76
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
77
117
|
requirements:
|
78
118
|
- - ">="
|
79
119
|
- !ruby/object:Gem::Version
|
120
|
+
hash: 3
|
121
|
+
segments:
|
122
|
+
- 0
|
80
123
|
version: "0"
|
81
|
-
version:
|
82
124
|
requirements: []
|
83
125
|
|
84
126
|
rubyforge_project: testdoc
|
85
|
-
rubygems_version: 1.
|
127
|
+
rubygems_version: 1.5.0
|
86
128
|
signing_key:
|
87
|
-
specification_version:
|
88
|
-
summary:
|
129
|
+
specification_version: 3
|
130
|
+
summary: Documentation generator for tests you want to give manuel testers.
|
89
131
|
test_files:
|
90
132
|
- test/test_helper.rb
|
91
133
|
- test/test_testdoc.rb
|