qed 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,6 +1,18 @@
1
1
  = RELEASE HISTORY
2
2
 
3
- == 10.03.04 / 2010-03-04
3
+ == 2.1.0 / 2010-04-07
4
+
5
+ QED documents are now run in the TOPLEVEL context, rather
6
+ than in a subclass of Scope. This ensures code runs as
7
+ one would expect it too in the wild.
8
+
9
+ Changes:
10
+
11
+ * Scope.new redirect to TOPLEVEL.
12
+ * DomainLanguage module is added to include into TOPLEVEL.
13
+
14
+
15
+ == 2.0.0 / 2010-03-04
4
16
 
5
17
  This is a major new release of QED. All demonstration documents
6
18
  are now converted to HTML via Tilt (http://github.com/tilt) before
data/lib/qed.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module QED
2
- VERSION="2.0.0" #:till: VERSION="<%= version %>"
2
+ VERSION="2.1.0" #:till: VERSION="<%= version %>"
3
3
  end
4
4
 
5
5
  require 'qed/session'
data/lib/qed/evaluator.rb CHANGED
@@ -7,7 +7,7 @@ module QED
7
7
  # = Demo Script Evaluator
8
8
  #
9
9
  #--
10
- # TODO: Currently the Evaluator class uses #travserse to work
10
+ # TODO: Currently the Evaluator class uses #traverse to work
11
11
  # thru the HTML document and trigger events accordingly. This
12
12
  # works well enough for simple HTML documents --the kind produced
13
13
  # by typical wiki-markup formats. However, for complex HTML it
data/lib/qed/scope.rb CHANGED
@@ -3,16 +3,12 @@ module QED
3
3
  require 'ae'
4
4
  require 'qed/advice'
5
5
 
6
- #--
7
- # TODO: Replace Scope for TOPLEVEL?
8
- #++
9
- class Scope
6
+ # This module provides the QED syntax (domain specific language)
7
+ # used to build QED documents.
10
8
 
11
- include Advisable
9
+ module DomainLanguage
12
10
 
13
- def __binding__
14
- @__binding__ ||= binding
15
- end
11
+ include Advisable
16
12
 
17
13
  # Table-based steps.
18
14
  #--
@@ -71,7 +67,36 @@ module QED
71
67
  #
72
68
  #end
73
69
 
70
+ def __binding__
71
+ @__binding__ ||= binding
72
+ end
73
+
74
+ end
75
+
76
+ # Scope is the context in which QED documents are run.
77
+ # Note, that Scope is now a facade over the TOPLEVEL.
78
+
79
+ class Scope
80
+
81
+ # Reroutes Scope instance to TOPLEVEL.
82
+ def self.new
83
+ @self ||= (
84
+ TOPLEVEL_BINDING.eval("include QED::DomainLanguage")
85
+ TOPLEVEL_BINDING.eval('self')
86
+ )
87
+ end
88
+
89
+ #include DomainLanguage
90
+
91
+ #def initialize
92
+ # @__binding__ = binding
93
+ #end
94
+
95
+ #def __binding__
96
+ # @__binding__
97
+ #end
74
98
  end
75
99
 
76
100
  end
77
101
 
102
+
data/lib/qed/script.rb CHANGED
@@ -8,7 +8,7 @@ module QED
8
8
  require 'qed/evaluator'
9
9
 
10
10
  #Assertion = AE::Assertion
11
- # Expectation = Assertor
11
+ #Expectation = Assertor
12
12
 
13
13
  # = Script
14
14
  #
data/meta/version CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 2
7
+ - 1
7
8
  - 0
8
- - 0
9
- version: 2.0.0
9
+ version: 2.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Thomas Sawyer <transfire@gmail.com>