qed 2.9.1 → 2.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.index +11 -26
- data/HISTORY.md +13 -0
- data/lib/qed.yml +11 -26
- data/lib/qed/applique.rb +10 -4
- data/lib/qed/core_ext.rb +36 -2
- data/lib/qed/demo.rb +3 -1
- data/lib/qed/evaluator.rb +1 -1
- data/lib/qed/reporter/abstract.rb +2 -1
- data/lib/qed/utils.rb +2 -2
- metadata +20 -79
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9e530292395f42320e28980726cf658819f4686d
|
4
|
+
data.tar.gz: 9e5c260cc8e20d143b0acd43c1869a0a15b0cbdd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fdab04bf50e170ba6e3b85f102e83e43764d342406004756760f8a378545dc940e6db7c05c8a80340fb50f4e3e63db02772c661bc60a7e928d17fd8f29df6ba1
|
7
|
+
data.tar.gz: 7821741e5709f7aa68f8cd60c75c2e1264fab196912e36a51731bd70bb3b7de536865741cccfc7c9b9d7309ee2d8667528cb3cb4bb2cf7db65324b8f0086e168
|
data/.index
CHANGED
@@ -2,21 +2,14 @@
|
|
2
2
|
revision: 2013
|
3
3
|
type: ruby
|
4
4
|
sources:
|
5
|
-
-
|
5
|
+
- Indexfile
|
6
6
|
authors:
|
7
|
-
- name:
|
7
|
+
- name: trans
|
8
8
|
email: transfire@gmail.com
|
9
9
|
organizations: []
|
10
10
|
requirements:
|
11
11
|
- name: ansi
|
12
12
|
- name: brass
|
13
|
-
- version: 2.8+
|
14
|
-
name: facets
|
15
|
-
- groups:
|
16
|
-
- optional
|
17
|
-
- test
|
18
|
-
development: true
|
19
|
-
name: blankslate
|
20
13
|
- groups:
|
21
14
|
- test
|
22
15
|
development: true
|
@@ -24,11 +17,7 @@ requirements:
|
|
24
17
|
- groups:
|
25
18
|
- build
|
26
19
|
development: true
|
27
|
-
name:
|
28
|
-
- groups:
|
29
|
-
- build
|
30
|
-
development: true
|
31
|
-
name: ergo
|
20
|
+
name: rulebow
|
32
21
|
conflicts: []
|
33
22
|
alternatives: []
|
34
23
|
resources:
|
@@ -38,9 +27,6 @@ resources:
|
|
38
27
|
- type: code
|
39
28
|
uri: http://github.com/rubyworks/qed
|
40
29
|
label: Source Code
|
41
|
-
- type: mail
|
42
|
-
uri: http://groups.google.com/groups/rubyworks-mailinglist
|
43
|
-
label: Mailing List
|
44
30
|
- type: bugs
|
45
31
|
uri: http://github.com/rubyworks/qed/issues
|
46
32
|
label: Issue Tracker
|
@@ -50,20 +36,19 @@ repositories:
|
|
50
36
|
uri: git://github.com/rubyworks/qed.git
|
51
37
|
categories: []
|
52
38
|
copyrights:
|
53
|
-
- holder:
|
39
|
+
- holder: Rubyworks
|
54
40
|
year: '2006'
|
55
41
|
license: BSD-2-Clause
|
56
42
|
customs: []
|
57
43
|
paths:
|
58
44
|
lib:
|
59
45
|
- lib
|
60
|
-
created: '2009-06-16'
|
61
|
-
summary: Quod Erat Demonstrandum
|
62
|
-
title: QED
|
63
|
-
version: 2.9.1
|
64
46
|
name: qed
|
47
|
+
title: QED
|
48
|
+
version: 2.9.2
|
49
|
+
summary: Quod Erat Demonstrandum
|
50
|
+
description: QED (Quality Ensured Demonstrations) is a TDD/BDD framework utilizing
|
51
|
+
Literate Programming techniques.
|
52
|
+
created: '2009-06-16'
|
65
53
|
webcvs: http://github.com/rubyworks/qed/blob/master/
|
66
|
-
|
67
|
-
|
68
|
-
utilizing Literate Programming techniques.'
|
69
|
-
date: '2013-02-18'
|
54
|
+
date: '2015-03-01'
|
data/HISTORY.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# RELEASE HISTORY
|
2
2
|
|
3
|
+
## 2.9.2 | 2014-02-24
|
4
|
+
|
5
|
+
This release removes the dependency on Facets. There were only two important
|
6
|
+
facets being used, String#tabto and String#indent. These have been copied over
|
7
|
+
so the dependency is no longer required. Minimaizing dependencies is especailly
|
8
|
+
important for a testing tool as it helps maximize robustness.
|
9
|
+
|
10
|
+
Changes:
|
11
|
+
|
12
|
+
* Remove dependency on Facets.
|
13
|
+
* After and Before types are :demo/:all or :test/:each.
|
14
|
+
|
15
|
+
|
3
16
|
## 2.9.1 | 2013-02-20
|
4
17
|
|
5
18
|
The RC gem is optional now and old school `etc/qed.rb`, `config/qed.rb` and
|
data/lib/qed.yml
CHANGED
@@ -2,21 +2,14 @@
|
|
2
2
|
revision: 2013
|
3
3
|
type: ruby
|
4
4
|
sources:
|
5
|
-
-
|
5
|
+
- Indexfile
|
6
6
|
authors:
|
7
|
-
- name:
|
7
|
+
- name: trans
|
8
8
|
email: transfire@gmail.com
|
9
9
|
organizations: []
|
10
10
|
requirements:
|
11
11
|
- name: ansi
|
12
12
|
- name: brass
|
13
|
-
- version: 2.8+
|
14
|
-
name: facets
|
15
|
-
- groups:
|
16
|
-
- optional
|
17
|
-
- test
|
18
|
-
development: true
|
19
|
-
name: blankslate
|
20
13
|
- groups:
|
21
14
|
- test
|
22
15
|
development: true
|
@@ -24,11 +17,7 @@ requirements:
|
|
24
17
|
- groups:
|
25
18
|
- build
|
26
19
|
development: true
|
27
|
-
name:
|
28
|
-
- groups:
|
29
|
-
- build
|
30
|
-
development: true
|
31
|
-
name: ergo
|
20
|
+
name: rulebow
|
32
21
|
conflicts: []
|
33
22
|
alternatives: []
|
34
23
|
resources:
|
@@ -38,9 +27,6 @@ resources:
|
|
38
27
|
- type: code
|
39
28
|
uri: http://github.com/rubyworks/qed
|
40
29
|
label: Source Code
|
41
|
-
- type: mail
|
42
|
-
uri: http://groups.google.com/groups/rubyworks-mailinglist
|
43
|
-
label: Mailing List
|
44
30
|
- type: bugs
|
45
31
|
uri: http://github.com/rubyworks/qed/issues
|
46
32
|
label: Issue Tracker
|
@@ -50,20 +36,19 @@ repositories:
|
|
50
36
|
uri: git://github.com/rubyworks/qed.git
|
51
37
|
categories: []
|
52
38
|
copyrights:
|
53
|
-
- holder:
|
39
|
+
- holder: Rubyworks
|
54
40
|
year: '2006'
|
55
41
|
license: BSD-2-Clause
|
56
42
|
customs: []
|
57
43
|
paths:
|
58
44
|
lib:
|
59
45
|
- lib
|
60
|
-
created: '2009-06-16'
|
61
|
-
summary: Quod Erat Demonstrandum
|
62
|
-
title: QED
|
63
|
-
version: 2.9.1
|
64
46
|
name: qed
|
47
|
+
title: QED
|
48
|
+
version: 2.9.2
|
49
|
+
summary: Quod Erat Demonstrandum
|
50
|
+
description: QED (Quality Ensured Demonstrations) is a TDD/BDD framework utilizing
|
51
|
+
Literate Programming techniques.
|
52
|
+
created: '2009-06-16'
|
65
53
|
webcvs: http://github.com/rubyworks/qed/blob/master/
|
66
|
-
|
67
|
-
|
68
|
-
utilizing Literate Programming techniques.'
|
69
|
-
date: '2013-02-18'
|
54
|
+
date: '2015-03-01'
|
data/lib/qed/applique.rb
CHANGED
@@ -98,10 +98,13 @@ module QED
|
|
98
98
|
# Before advice.
|
99
99
|
#
|
100
100
|
# @param [Symbol] type
|
101
|
-
# Event signal (`:
|
101
|
+
# Event signal (`:demo`).
|
102
102
|
#
|
103
103
|
# @yield Procedure to run on event.
|
104
|
-
def Before(type=:
|
104
|
+
def Before(type=:demo, &procedure)
|
105
|
+
type = type.to_sym
|
106
|
+
type = :demo if type == :all
|
107
|
+
type = :test if type == :each
|
105
108
|
type = "before_#{type}".to_sym
|
106
109
|
@__signals__[type] = procedure
|
107
110
|
#define_method(type, &procedure)
|
@@ -110,10 +113,13 @@ module QED
|
|
110
113
|
# After advice.
|
111
114
|
#
|
112
115
|
# @param [Symbol] type
|
113
|
-
# Event signal (`:
|
116
|
+
# Event signal (`:demo`).
|
114
117
|
#
|
115
118
|
# @yield Procedure to run on event.
|
116
|
-
def After(type=:
|
119
|
+
def After(type=:demo, &procedure)
|
120
|
+
type = type.to_sym
|
121
|
+
type = :demo if type == :all
|
122
|
+
type = :test if type == :each
|
117
123
|
type = "after_#{type}".to_sym
|
118
124
|
@__signals__[type] = procedure
|
119
125
|
#define_method(type, &procedure)
|
data/lib/qed/core_ext.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
require 'brass'
|
2
2
|
|
3
|
-
require 'facets/dir/ascend'
|
4
|
-
|
5
3
|
class Object
|
6
4
|
|
7
5
|
unless method_defined?(:instance_exec) # 1.9
|
@@ -45,3 +43,39 @@ class Object
|
|
45
43
|
|
46
44
|
end
|
47
45
|
|
46
|
+
class String
|
47
|
+
|
48
|
+
# from facets
|
49
|
+
def tabto(num=nil, opts={})
|
50
|
+
raise ArgumentError, "String#margin has been renamed to #trim." unless num
|
51
|
+
|
52
|
+
tab = opts[:tab] || 2
|
53
|
+
str = gsub("\t", " " * tab) # TODO: only leading tabs ?
|
54
|
+
|
55
|
+
if opts[:lead]
|
56
|
+
if self =~ /^( *)\S/
|
57
|
+
indent(num - $1.length)
|
58
|
+
else
|
59
|
+
self
|
60
|
+
end
|
61
|
+
else
|
62
|
+
min = []
|
63
|
+
str.each_line do |line|
|
64
|
+
next if line.strip.empty?
|
65
|
+
min << line.index(/\S/)
|
66
|
+
end
|
67
|
+
min = min.min
|
68
|
+
str.indent(num - min)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# from facets
|
73
|
+
def indent(n, c=' ')
|
74
|
+
if n >= 0
|
75
|
+
gsub(/^/, c * n)
|
76
|
+
else
|
77
|
+
gsub(/^#{Regexp.escape(c)}{0,#{-n}}/, "")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
data/lib/qed/demo.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module QED
|
2
2
|
|
3
3
|
require 'yaml'
|
4
|
+
require 'pathname'
|
4
5
|
|
5
6
|
require 'qed/core_ext'
|
6
7
|
require 'qed/parser'
|
@@ -78,7 +79,8 @@ module QED
|
|
78
79
|
def applique_locations
|
79
80
|
@applique_locations ||= (
|
80
81
|
locations = []
|
81
|
-
|
82
|
+
dirpath = Pathname.new(File.dirname(file))
|
83
|
+
dirpath.ascend do |path|
|
82
84
|
break if path == Dir.pwd
|
83
85
|
dir = File.join(path, 'applique')
|
84
86
|
if File.directory?(dir)
|
data/lib/qed/evaluator.rb
CHANGED
@@ -159,7 +159,7 @@ module QED
|
|
159
159
|
# Exceptions to always raise regardless.
|
160
160
|
FORCED_EXCEPTIONS = [NoMemoryError, SignalException, Interrupt] #, SystemExit]
|
161
161
|
|
162
|
-
# Evaluate the step's
|
162
|
+
# Evaluate the step's matchers and code sample, wrapped in a begin-rescue
|
163
163
|
# clause.
|
164
164
|
#
|
165
165
|
# @macro step
|
data/lib/qed/utils.rb
CHANGED
@@ -4,7 +4,7 @@ module QED
|
|
4
4
|
ROOT_PATTERN = '{.ruby*,.git/,.hg/,_darcs/}'
|
5
5
|
|
6
6
|
# Glob pattern for standard config file.
|
7
|
-
CONFIG_PATTERN = '{etc/qed.rb,config/qed.rb,Qedfile
|
7
|
+
CONFIG_PATTERN = '{.qed,etc/qed.rb,config/qed.rb,Qedfile}'
|
8
8
|
|
9
9
|
# Home directory.
|
10
10
|
HOME = File.expand_path('~')
|
@@ -21,7 +21,7 @@ module QED
|
|
21
21
|
|
22
22
|
#
|
23
23
|
def load_rc
|
24
|
-
rc_file= File.join(root, '.rubyrc')
|
24
|
+
rc_file = File.join(root, '.rubyrc')
|
25
25
|
if File.exist?(rc_file)
|
26
26
|
begin
|
27
27
|
require 'rc/api'
|
metadata
CHANGED
@@ -1,131 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
5
|
-
prerelease:
|
4
|
+
version: 2.9.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
7
|
+
- trans
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-03-01 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: ansi
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: brass
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: facets
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '2.8'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.8'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: blankslate
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
38
|
+
- - '>='
|
76
39
|
- !ruby/object:Gem::Version
|
77
40
|
version: '0'
|
78
41
|
- !ruby/object:Gem::Dependency
|
79
42
|
name: ae
|
80
43
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
|
-
type: :development
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: detroit
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
44
|
requirements:
|
99
|
-
- -
|
45
|
+
- - '>='
|
100
46
|
- !ruby/object:Gem::Version
|
101
47
|
version: '0'
|
102
48
|
type: :development
|
103
49
|
prerelease: false
|
104
50
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
51
|
requirements:
|
107
|
-
- -
|
52
|
+
- - '>='
|
108
53
|
- !ruby/object:Gem::Version
|
109
54
|
version: '0'
|
110
55
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
56
|
+
name: rulebow
|
112
57
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
58
|
requirements:
|
115
|
-
- -
|
59
|
+
- - '>='
|
116
60
|
- !ruby/object:Gem::Version
|
117
61
|
version: '0'
|
118
62
|
type: :development
|
119
63
|
prerelease: false
|
120
64
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
65
|
requirements:
|
123
|
-
- -
|
66
|
+
- - '>='
|
124
67
|
- !ruby/object:Gem::Version
|
125
68
|
version: '0'
|
126
|
-
description:
|
127
|
-
|
128
|
-
utilizing Literate Programming techniques.'
|
69
|
+
description: QED (Quality Ensured Demonstrations) is a TDD/BDD framework utilizing
|
70
|
+
Literate Programming techniques.
|
129
71
|
email:
|
130
72
|
- transfire@gmail.com
|
131
73
|
executables:
|
@@ -134,8 +76,8 @@ executables:
|
|
134
76
|
extensions: []
|
135
77
|
extra_rdoc_files:
|
136
78
|
- LICENSE.txt
|
137
|
-
- HISTORY.md
|
138
79
|
- README.md
|
80
|
+
- HISTORY.md
|
139
81
|
files:
|
140
82
|
- .index
|
141
83
|
- .yardopts
|
@@ -198,27 +140,26 @@ files:
|
|
198
140
|
homepage: http://rubyworks.github.com/qed
|
199
141
|
licenses:
|
200
142
|
- BSD-2-Clause
|
143
|
+
metadata: {}
|
201
144
|
post_install_message:
|
202
145
|
rdoc_options: []
|
203
146
|
require_paths:
|
204
147
|
- lib
|
205
148
|
required_ruby_version: !ruby/object:Gem::Requirement
|
206
|
-
none: false
|
207
149
|
requirements:
|
208
|
-
- -
|
150
|
+
- - '>='
|
209
151
|
- !ruby/object:Gem::Version
|
210
152
|
version: '0'
|
211
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
|
-
none: false
|
213
154
|
requirements:
|
214
|
-
- -
|
155
|
+
- - '>='
|
215
156
|
- !ruby/object:Gem::Version
|
216
157
|
version: '0'
|
217
158
|
requirements: []
|
218
159
|
rubyforge_project:
|
219
|
-
rubygems_version:
|
160
|
+
rubygems_version: 2.0.3
|
220
161
|
signing_key:
|
221
|
-
specification_version:
|
162
|
+
specification_version: 4
|
222
163
|
summary: Quod Erat Demonstrandum
|
223
164
|
test_files: []
|
224
165
|
has_rdoc:
|