qed 2.9.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0641d46bfe700cfdd8b44f9e6e50242fa08dd47950ead38b785b1c8bd2d99008
4
+ data.tar.gz: 658fbcd892cbed202703946fb8745fcbd7b3a06b938bdaf62c525961418e7cc3
5
+ SHA512:
6
+ metadata.gz: 9a65c7101c15ed6d98ccd4353a388497f6dacb45bb96f71bf8ed03002ce6e8f1c9acc9b5b4cbe7a5bce9b182507ac2715332ae67ce0b270271c8ddbc0bec7885
7
+ data.tar.gz: 6a37486a0384159148eef66931d25fba51e57ce7352d8f88b73d506f0fd7fe363da709cb247b6d3b56ad2654693d5e8b0a6d70a15384cdf08dad8a356ce176c4
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/HISTORY.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # RELEASE HISTORY
2
2
 
3
+ ## 3.0.0 | 2026-03-31
4
+
5
+ Major modernization release after a long hiatus.
6
+
7
+ Breaking Changes:
8
+
9
+ * Requires Ruby 3.1 or later (dropped Ruby 1.8/1.9/2.x support).
10
+ * Removed Indexer gemspec system; uses standard gemspec.
11
+ * Removed Detroit Assembly; uses standard Rakefile.
12
+
13
+ New Features:
14
+
15
+ * Fenced code block support in parser (#23).
16
+ Bare and ```ruby blocks are executed; other languages are skipped.
17
+ * Restored and modernized HTML reporter with --html flag (#13).
18
+ * GitHub Actions CI replacing Travis CI.
19
+ * Website moved from gh-pages branch to docs/ directory.
20
+
21
+ Bug Fixes:
22
+
23
+ * Fix --version crash due to VERSION not being loaded (#26).
24
+ * Fix --help crash from undefined `settings` in cli_parse (#22, #26).
25
+ * Fix --copyright showing wrong license (Apache 2.0 -> BSD-2-Clause) (#26).
26
+ * Fix --rooted flag not actually running from project root (#21).
27
+ * Fix TapY reporter crash referencing `assertion` instead of `exception` (#24).
28
+
29
+ Dependencies:
30
+
31
+ * Switch markdown processing from rdiscount to kramdown (#20).
32
+ * Remove instance_exec polyfill for Ruby 1.8.
33
+ * Remove old RubyGems compatibility checks from gemspec.
34
+ * Drop rulebow, RC, and Facets dependencies.
35
+ * Require ansi ~> 1.6, brass ~> 1.3, ae ~> 1.9 (dev).
36
+
37
+
38
+ ## 2.9.2 | 2014-02-24
39
+
40
+ This release removes the dependency on Facets. There were only two important
41
+ facets being used, String#tabto and String#indent. These have been copied over
42
+ so the dependency is no longer required. Minimaizing dependencies is especailly
43
+ important for a testing tool as it helps maximize robustness.
44
+
45
+ Changes:
46
+
47
+ * Remove dependency on Facets.
48
+ * After and Before types are :demo/:all or :test/:each.
49
+
50
+
3
51
  ## 2.9.1 | 2013-02-20
4
52
 
5
53
  The RC gem is optional now and old school `etc/qed.rb`, `config/qed.rb` and
data/README.md CHANGED
@@ -1,12 +1,9 @@
1
1
  # Ruby Q.E.D.
2
2
 
3
- [Homepage](http://rubyworks.github.com/qed) /
4
- [Documentation](http://rubydoc.info/gems/qed/frames) /
5
- [Report Issue](http://github.com/rubyworks/qed/issues) /
6
- [Development](http://github.com/rubyworks/qed) /
7
- [Mailing list](http://groups.google.com/group/rubyworks-mailinglist)    
8
- [![Build Status](https://secure.travis-ci.org/rubyworks/qed.png)](http://travis-ci.org/rubyworks/qed)
9
- [![Gem Version](https://badge.fury.io/rb/qed.png)](http://badge.fury.io/rb/qed)
3
+ [Homepage](https://rubyworks.github.io/qed) /
4
+ [Documentation](https://rubydoc.info/gems/qed/frames) /
5
+ [Report Issue](https://github.com/rubyworks/qed/issues) /
6
+ [Development](https://github.com/rubyworks/qed)
10
7
 
11
8
 
12
9
  ## Introduction
@@ -15,12 +12,12 @@ Q.E.D. is an abbreviation for the well known Latin phrase "Quod Erat Demonstrand
15
12
  literally "which was to be demonstrated", which is oft written in its abbreviated
16
13
  form at the end of a mathematical proof or philosophical argument to signify
17
14
  a successful conclusion. And so it is too for Ruby Q.E.D., though it might as easily
18
- be taken to stand for "Quality Ensured Documentation".
15
+ be taken to stand for "Quality Ensured Documentation".
19
16
 
20
17
  QED is in fact both a test framework and a documentation system for Ruby
21
18
  developers. QED sits somewhere between lower-level testing tools like Test::Unit
22
19
  and grandiose requirement specifications systems like Cucumber. In practice it
23
- works exceptionally well for <i>API-Driven Design</i>, which is especially
20
+ works exceptionally well for *API-Driven Design*, which is especially
24
21
  useful when designing reusable libraries, but it can be used to test code at
25
22
  any level of abstraction, from unit test to systems tests.
26
23
 
@@ -28,10 +25,12 @@ any level of abstraction, from unit test to systems tests.
28
25
  ## Features
29
26
 
30
27
  * Write tests and documentation in the same breath!
31
- * Demos can be RDoc, Markdown or any other conforming text format.
32
- * Can use any BRASS compliant assertion framework, such as the the excellent AE (Assertive Expressive) library.
33
- * Data and Table macros allows large sets of data to be tested by the same code.
34
- * Documentation tool provides nice output with jQuery-based TOC.
28
+ * Demos can be Markdown or RDoc format.
29
+ * Supports fenced code blocks non-Ruby blocks (e.g. ` ```elixir `) are automatically skipped.
30
+ * Can use any BRASS compliant assertion framework, such as the excellent AE (Assertive Expressive) library.
31
+ * Data and Table macros allow large sets of data to be tested by the same code.
32
+ * HTML report generation via `--html` flag.
33
+ * Documentation tool (`qedoc`) generates browsable HTML from demos.
35
34
 
36
35
 
37
36
  ## Synopsis
@@ -40,7 +39,7 @@ any level of abstraction, from unit test to systems tests.
40
39
 
41
40
  QED can use any BRASS compliant assertions framework. Simply require the library in
42
41
  ones applique (see below). Traditionally this has been the AE (Assertive Expressive) library,
43
- which provides an elegant means to make assertions. To give a quick overview, assertion
42
+ which provides an elegant means to make assertions. To give a quick overview, assertions
44
43
  can be written as:
45
44
 
46
45
  4.assert == 5
@@ -49,16 +48,16 @@ In this example, because 4 != 5, this expression will raise an Assertion
49
48
  exception. QED's Runner class is thus just a means of running and capturing
50
49
  code blocks containing such assertions.
51
50
 
52
- You can learn more about BRASS and AE at http://rubyworks.github.com/brass and
53
- http://rubyworks.github.com/ae, repectively.
51
+ You can learn more about BRASS and AE at https://github.com/rubyworks/brass and
52
+ https://github.com/rubyworks/ae, respectively.
54
53
 
55
54
  ### Document Structure
56
55
 
57
56
  QED documents are simply text files called *demonstrandum* (demos for short).
58
57
  Because they largely consist of free-form descriptive text, they are a practice
59
- pure Literate Programming. For example:
58
+ of pure Literate Programming. For example:
60
59
 
61
- = Example
60
+ # Example
62
61
 
63
62
  Shows that the number 5 does not equal 4.
64
63
 
@@ -68,18 +67,24 @@ pure Literate Programming. For example:
68
67
 
69
68
  5.assert == 5
70
69
 
71
- In this example RDoc was chosen for the document format. However, almost any
72
- text format can be used. The only necessary distinction is that description text
73
- align to the left margin and all code be indented, although QED does recognize
74
- RDoc and Markdown single-line style headers, so any format that supports
75
- those (which covers many markup formats in use today) will have mildly
76
- improved console output. In any case, the essential take away here is that
77
- QED *demonstrandum* are simply descriptive documents with interspersed
78
- blocks of example code.
70
+ Description text aligns to the left margin and all code is indented. QED also
71
+ supports fenced code blocks:
79
72
 
80
- Give this design some thought. It should become clear that this approach is
81
- especially fruitful in that it allows *documentation* and *specification*
82
- to seamlessly merge into a unified *demonstration*.
73
+ ```ruby
74
+ 5.assert == 5
75
+ ```
76
+
77
+ Blocks tagged with a non-Ruby language are skipped during execution, which is
78
+ useful for multi-language documentation:
79
+
80
+ ```javascript
81
+ // This is not executed
82
+ console.log("hello");
83
+ ```
84
+
85
+ QED recognizes Markdown and RDoc headers for improved console output. The
86
+ essential take away is that QED *demonstrandum* are simply descriptive
87
+ documents with interspersed blocks of example code.
83
88
 
84
89
  ### Running Demonstrations
85
90
 
@@ -87,22 +92,22 @@ If we were to run the above document through QED in verbatim mode the output
87
92
  would be identical (assuming we did not make a typo and the assertions passed).
88
93
  If there were errors or failures, we would see information detailing each.
89
94
 
90
- To run a document through QED, simply use the +qed+ command.
95
+ To run a document through QED, simply use the `qed` command.
91
96
 
92
- $ qed -v demo/01_example.rdoc
97
+ $ qed -v demo/01_example.md
93
98
 
94
- The `-v` option specifies verbatim mode, which outputs the entire
95
- document.
99
+ The `-v` option specifies verbatim mode, which outputs the entire document.
96
100
 
97
101
  Notice we placed the QED document in a `demo/` directory. This is the
98
- canonical location, but there is no place that demonstrations have to go. They
99
- can be placed anywhere that is preferred. However, the `qed` command
100
- will look for `qed/`, `demo/`, `demos/` and `spec/`, in that order, if no
101
- path is given.
102
+ canonical location, but demonstrations can be placed anywhere. The `qed`
103
+ command will look for `qed/`, `demo/`, `demos/` and `spec/`, in that order,
104
+ if no path is given.
105
+
106
+ The `01_` prefix helps order documents when generating QED documentation.
107
+
108
+ To generate an HTML test report:
102
109
 
103
- Also notice the use of ``01_`` prefix in front of the file name.
104
- While this is not strictly necessary, QED sorts the documents, so it helps order
105
- the documents nicely, in particular when generating QED documentation ("QEDocs").
110
+ $ qed --html > report.html
106
111
 
107
112
  ### Utilizing Applique
108
113
 
@@ -110,9 +115,9 @@ QED demonstrandum descriptive text is not strictly passive explanation. Using
110
115
  pattern matching techniques, document phrases can trigger underlying actions.
111
116
  These actions provide a support structure for running tests called the *applique*.
112
117
 
113
- Creating an applique is easy. Along with your QED scripts, to which the
118
+ Creating an applique is easy. Along with your QED scripts, to which the
114
119
  applique will apply, create an `applique/` directory. In this
115
- directory add Ruby scripts. When you run your demos every Ruby script in
120
+ directory add Ruby scripts. When you run your demos every Ruby script in
116
121
  the directory will be automatically loaded.
117
122
 
118
123
  Within these applique scripts *advice* can be defined. Advice can be
@@ -126,11 +131,11 @@ phrases in the QED demos. An example would be:
126
131
  end
127
132
 
128
133
  So that whenever the phrase "a new round is started" appears in a demo,
129
- the @round instance variable with be reset to an empty array.
134
+ the @round instance variable will be reset to an empty array.
130
135
 
131
- It is rather amazing what can be accomplished with such a system,
132
- be sure to look at QED's own demonstrandum to get a better notion of
133
- how you can put the the system to use.
136
+ It is rather amazing what can be accomplished with such a system.
137
+ Be sure to look at QED's own demonstrandum to get a better notion of
138
+ how you can put the system to use.
134
139
 
135
140
  ### Configuration
136
141
 
@@ -154,63 +159,53 @@ Or by setting the `profile` environment variable.
154
159
 
155
160
  $ profile=coverage qed
156
161
 
157
- QED can also use the [RC](http://rubyworks.github.com/rc) gem to handle
158
- configuration. Be sure to `gem install rc` and then add this to `.rubyrc`
159
- or `Config.rb` file of the same effect as given above.
160
-
161
- config :qed, :profile=>:coverage do
162
- require 'simplecov'
163
- SimpleCov.start do
164
- coverage_dir 'log/coverage'
165
- end
166
- end
167
-
168
162
  ### Generating Documentation
169
163
 
170
- To generate documentation from QED documents, use the +qedoc+ command.
164
+ To generate documentation from QED documents, use the `qedoc` command.
171
165
 
172
- $ qedoc --output doc/qedoc --title "Example" demo/*.rdoc
166
+ $ qedoc --output doc/demo.html --title "Example" demo/
173
167
 
174
- When documenting, QED recognizes the format by the file extension and
175
- treats it accordingly. An extension of `.qed` is treated the same
176
- as `.rdoc`.
168
+ When documenting, QED recognizes the format by the file extension and
169
+ treats it accordingly.
177
170
 
178
- Use the `--help` options on each command to get more information
171
+ Use the `--help` option on each command to get more information
179
172
  on the use of these commands.
180
173
 
181
174
 
182
175
  ## Requirements
183
176
 
184
- QED depends on the following external libraries:
177
+ QED depends on the following libraries:
178
+
179
+ * [BRASS](https://github.com/rubyworks/brass) - Assertions System
180
+ * [ANSI](https://github.com/rubyworks/ansi) - ANSI Color Codes
181
+ * [kramdown](https://kramdown.gettalong.org/) - Markdown Processing
185
182
 
186
- * [BRASS](http://rubyworks.github.com/brass) - Assertions System
187
- * [ANSI](http://rubyworks.github.com/ansi) - ANSI Color Codes
188
- * [RC](http://rubyworks.github.com/rc) - Runtime Configuration
189
- * [Facets](http://rubyworks.github.com/facets) - Core Extensions
183
+ These will be automatically installed when installing QED via RubyGems.
190
184
 
191
- These will be automatically installed when installing QED via RubyGems,
192
- if they are not already installed.
185
+ Optional libraries that are generally useful with QED:
193
186
 
194
- Optional libraries that are generally useful with QED.
187
+ * [AE](https://github.com/rubyworks/ae) - Assertions Framework
195
188
 
196
- * [AE](http://rubyworks.github.com/ae) - Assertions Framework
189
+ Install AE and require it in your applique to use.
197
190
 
198
- Install these individually and require them in your applique to use.
191
+ Requires Ruby 3.1 or later.
199
192
 
200
193
 
201
194
  ## Development
202
195
 
203
196
  ### Testing
204
197
 
205
- QED uses itself for testing, which can be a bit tricky. But works fine for
206
- the most part. In the future we may add some addition tests via another
207
- test framework to ensure full coverage. But for now QED is proving sufficient.
198
+ QED uses itself for testing. To run the tests:
208
199
 
209
- To run the tests, use `qed` command line tool --ideally use `$ ruby -Ilib bin/qed`
210
- to ensure the current version of QED is being used.
200
+ $ rake demo
211
201
 
212
- For convenience, use `$ fire spec` to run the test specifications. To also
213
- generate a test coverage report use `$ fire spec:cov`.
202
+ Or directly:
203
+
204
+ $ ruby -Ilib bin/qed
205
+
206
+ To generate a test coverage report:
207
+
208
+ $ rake demo:cov
214
209
 
215
210
 
216
211
  ## Copyrights
@@ -220,4 +215,3 @@ generate a test coverage report use `$ fire spec:cov`.
220
215
  Copyright (c) 2009 Rubyworks. All rights reserved.
221
216
 
222
217
  See LICENSE.txt for details.
223
-
@@ -0,0 +1,60 @@
1
+ # Fenced Code Blocks
2
+
3
+ QED supports fenced code blocks using triple backticks in addition
4
+ to the traditional indented code blocks.
5
+
6
+ ## Bare fenced blocks
7
+
8
+ A bare fenced block (no language tag) is treated as Ruby.
9
+
10
+ ```
11
+ x = 1 + 1
12
+ x.assert == 2
13
+ ```
14
+
15
+ ## Ruby-tagged fenced blocks
16
+
17
+ A block explicitly tagged as `ruby` is also executed.
18
+
19
+ ```ruby
20
+ y = "hello"
21
+ y.assert == "hello"
22
+ ```
23
+
24
+ ## Foreign language blocks are skipped
25
+
26
+ Code blocks tagged with any language other than Ruby are ignored.
27
+ This is useful for documentation that includes examples in other
28
+ languages.
29
+
30
+ ```elixir
31
+ # This Elixir code is NOT executed.
32
+ # If it were, QED would raise an error.
33
+ IO.puts "hello from elixir"
34
+ ```
35
+
36
+ ```javascript
37
+ // This JavaScript is also skipped.
38
+ console.log("hello from js");
39
+ ```
40
+
41
+ We can verify that Ruby execution continues normally after
42
+ skipping foreign blocks.
43
+
44
+ z = 42
45
+ z.assert == 42
46
+
47
+ ## Mixed usage
48
+
49
+ Traditional indented blocks and fenced blocks can be used
50
+ together in the same document.
51
+
52
+ a = 10
53
+
54
+ ```ruby
55
+ b = 20
56
+ ```
57
+
58
+ And the results carry across.
59
+
60
+ (a + b).assert == 30
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 (`:eval`).
101
+ # Event signal (`:demo`).
102
102
  #
103
103
  # @yield Procedure to run on event.
104
- def Before(type=:eval, &procedure)
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 (`:eval`).
116
+ # Event signal (`:demo`).
114
117
  #
115
118
  # @yield Procedure to run on event.
116
- def After(type=:eval, &procedure)
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/cli/qed.rb CHANGED
@@ -10,9 +10,9 @@ module QED
10
10
  #
11
11
  # Session settings are passed to `Session.new`.
12
12
  #
13
- #def self.settings
14
- # @settings ||= Settings.new
15
- #end
13
+ def self.settings
14
+ @settings ||= Settings.new
15
+ end
16
16
 
17
17
  #
18
18
  # Command line interface for running demos.
@@ -56,8 +56,8 @@ module QED
56
56
 
57
57
  options = cli_parse(argv)
58
58
 
59
- settings = Settings.new(options)
60
- session = Session.new(settings)
59
+ @settings = Settings.new(options)
60
+ session = Session.new(@settings)
61
61
  success = session.run
62
62
 
63
63
  exit -1 unless success
@@ -86,9 +86,9 @@ module QED
86
86
  #opt.on('--bullet', '-b', "use bullet-point reporter") do
87
87
  # options[:format] = :bullet
88
88
  #end
89
- #opt.on('--html', '-h', "use underlying HTML reporter") do
90
- # options[:format] = :html
91
- #end
89
+ opt.on('--html', "generate HTML report") do
90
+ options[:format] = :html
91
+ end
92
92
  #opt.on('--script', "psuedo-reporter") do
93
93
  # options[:format] = :script # psuedo-reporter
94
94
  #end
@@ -134,7 +134,7 @@ module QED
134
134
  exit
135
135
  end
136
136
  opt.on_tail('--copyright', "display copyrights") do
137
- puts "Copyright (c) 2008 Thomas Sawyer, Apache 2.0 License"
137
+ puts "Copyright (c) 2008 Thomas Sawyer, BSD-2-Clause License"
138
138
  exit
139
139
  end
140
140
  opt.on_tail('--help', '-h', "display this help message") do
@@ -142,8 +142,7 @@ module QED
142
142
 
143
143
  unless settings.profiles.empty?
144
144
  puts "Available Profiles:"
145
- #require 'confection'
146
- QED.profiles.each do |name|
145
+ settings.profiles.each do |name|
147
146
  next if name.strip == ''
148
147
  puts " -p #{name}"
149
148
  end
data/lib/qed/cli.rb CHANGED
@@ -1,10 +1,5 @@
1
- if RUBY_VERSION < '1.9'
2
- require 'qed/configure'
3
- require 'qed/cli/qed'
4
- require 'qed/cli/qedoc'
5
- else
6
- require_relative 'configure'
7
- require_relative 'cli/qed'
8
- require_relative 'cli/qedoc'
9
- end
1
+ require_relative 'version'
2
+ require_relative 'configure'
3
+ require_relative 'cli/qed'
4
+ require_relative 'cli/qedoc'
10
5
 
data/lib/qed/core_ext.rb CHANGED
@@ -1,47 +1,49 @@
1
1
  require 'brass'
2
2
 
3
- require 'facets/dir/ascend'
4
-
5
3
  class Object
6
4
 
7
- unless method_defined?(:instance_exec) # 1.9
8
- require 'thread'
5
+ #
6
+ # This is used by the `#=>` notation.
7
+ #
8
+ def must_return(value)
9
+ assert(self == value, "#{self.inspect} #=> #{value.inspect}")
10
+ end
9
11
 
10
- module InstanceExecMethods #:nodoc:
11
- end
12
+ end
12
13
 
13
- include InstanceExecMethods
14
-
15
- # Evaluate the block with the given arguments within the context of
16
- # this object, so self is set to the method receiver.
17
- #
18
- # From Mauricio's http://eigenclass.org/hiki/bounded+space+instance_exec
19
- #
20
- # This version has been borrowed from Rails for compatibility sake.
21
- def instance_exec(*args, &block)
22
- begin
23
- old_critical, Thread.critical = Thread.critical, true
24
- n = 0
25
- n += 1 while respond_to?(method_name = "__instance_exec#{n}")
26
- InstanceExecMethods.module_eval { define_method(method_name, &block) }
27
- ensure
28
- Thread.critical = old_critical
29
- end
14
+ class String
30
15
 
31
- begin
32
- send(method_name, *args)
33
- ensure
34
- InstanceExecMethods.module_eval { remove_method(method_name) } rescue nil
16
+ # from facets
17
+ def tabto(num=nil, opts={})
18
+ raise ArgumentError, "String#margin has been renamed to #trim." unless num
19
+
20
+ tab = opts[:tab] || 2
21
+ str = gsub("\t", " " * tab) # TODO: only leading tabs ?
22
+
23
+ if opts[:lead]
24
+ if self =~ /^( *)\S/
25
+ indent(num - $1.length)
26
+ else
27
+ self
28
+ end
29
+ else
30
+ min = []
31
+ str.each_line do |line|
32
+ next if line.strip.empty?
33
+ min << line.index(/\S/)
35
34
  end
35
+ min = min.min
36
+ str.indent(num - min)
36
37
  end
37
38
  end
38
39
 
39
- #
40
- # This is used by the `#=>` notation.
41
- #
42
- def must_return(value)
43
- assert(self == value, "#{self.inspect} #=> #{value.inspect}")
40
+ # from facets
41
+ def indent(n, c=' ')
42
+ if n >= 0
43
+ gsub(/^/, c * n)
44
+ else
45
+ gsub(/^#{Regexp.escape(c)}{0,#{-n}}/, "")
46
+ end
44
47
  end
45
48
 
46
49
  end
47
-
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
- Dir.ascend(File.dirname(file)) do |path|
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/document.rb CHANGED
@@ -147,10 +147,9 @@ module QED
147
147
  text << txt
148
148
  end
149
149
  when '.md', '.markdown'
150
- require_rdiscount
150
+ require_kramdown
151
151
  if html?
152
- markdown = RDiscount.new(txt)
153
- text << markdown.to_html
152
+ text << Kramdown::Document.new(txt).to_html
154
153
  else
155
154
  text << txt
156
155
  end
@@ -251,9 +250,9 @@ module QED
251
250
  end
252
251
 
253
252
  #
254
- def require_rdiscount
255
- @require_rdiscount ||= (
256
- require 'rdiscount'
253
+ def require_kramdown
254
+ @require_kramdown ||= (
255
+ require 'kramdown'
257
256
  true
258
257
  )
259
258
  end
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 matchaters and code sample, wrapped in a begin-rescue
162
+ # Evaluate the step's matchers and code sample, wrapped in a begin-rescue
163
163
  # clause.
164
164
  #
165
165
  # @macro step