riotjs-xpcc 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,6 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
6
+ *.gem
@@ -0,0 +1,3 @@
1
+ [submodule "xpcomcore/lib/riot"]
2
+ path = xpcomcore/lib/riot
3
+ url = git://github.com/conflagrationjs/riotjs.git
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 ggironda
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,18 @@
1
+ = riot-js
2
+
3
+ Description goes here.
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but
13
+ bump version in a commit by itself I can ignore when I pull)
14
+ * Send me a pull request. Bonus points for topic branches.
15
+
16
+ == Copyright
17
+
18
+ Copyright (c) 2009 ggironda. See LICENSE for details.
@@ -0,0 +1,34 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'pathname'
4
+
5
+ begin
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ gem.name = "riotjs-xpcc"
9
+ gem.summary = %Q{JS version of the Riot testing framework}
10
+ gem.description = %Q{JS version of the Riot testing framework}
11
+ gem.email = "info@conflagrationjs.org"
12
+ gem.homepage = "http://www.conflagrationjs.org/"
13
+ gem.authors = ["alexyoung", "gabrielg"]
14
+
15
+ gem.add_dependency "xpcomcore-rubygem"
16
+ gem.add_development_dependency "jsdoc-toolkit"
17
+ end
18
+ Jeweler::GemcutterTasks.new
19
+ rescue LoadError
20
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
21
+ end
22
+
23
+
24
+
25
+ gem 'jsdoc-toolkit'
26
+ require 'jsdoc-toolkit/doc_task'
27
+ desc "Builds the docs."
28
+ JsDocToolkit::DocTask.new(:doc) do |doc|
29
+ doc.jsdoc_dir = 'xpcomcore/doc'
30
+ doc.jsdoc_files << 'xpcomcore/lib'
31
+ end
32
+
33
+ task :test => :check_dependencies
34
+ task :default => :test
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1 @@
1
+ warn("There isn't much here, buddy. Just us lonely old Ruby files.")
@@ -0,0 +1,57 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{riotjs-xpcc}
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["alexyoung", "gabrielg"]
12
+ s.date = %q{2009-10-24}
13
+ s.description = %q{JS version of the Riot testing framework}
14
+ s.email = %q{info@conflagrationjs.org}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ ".gitmodules",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "lib/riotjs.rb",
28
+ "riotjs-xpcc.gemspec",
29
+ "xpcomcore/doc/files.html",
30
+ "xpcomcore/doc/index.html",
31
+ "xpcomcore/doc/symbols/_global_.html",
32
+ "xpcomcore/doc/symbols/src/xpcomcore_lib_riot.js.html",
33
+ "xpcomcore/lib/riot.js"
34
+ ]
35
+ s.homepage = %q{http://www.conflagrationjs.org/}
36
+ s.rdoc_options = ["--charset=UTF-8"]
37
+ s.require_paths = ["lib"]
38
+ s.rubygems_version = %q{1.3.5}
39
+ s.summary = %q{JS version of the Riot testing framework}
40
+
41
+ if s.respond_to? :specification_version then
42
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
46
+ s.add_runtime_dependency(%q<xpcomcore-rubygem>, [">= 0"])
47
+ s.add_development_dependency(%q<jsdoc-toolkit>, [">= 0"])
48
+ else
49
+ s.add_dependency(%q<xpcomcore-rubygem>, [">= 0"])
50
+ s.add_dependency(%q<jsdoc-toolkit>, [">= 0"])
51
+ end
52
+ else
53
+ s.add_dependency(%q<xpcomcore-rubygem>, [">= 0"])
54
+ s.add_dependency(%q<jsdoc-toolkit>, [">= 0"])
55
+ end
56
+ end
57
+
@@ -0,0 +1,216 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+
7
+ <title>JsDoc Reference - File Index</title>
8
+ <meta name="generator" content="JsDoc Toolkit" />
9
+
10
+ <style type="text/css">
11
+ /* default.css */
12
+ body
13
+ {
14
+ font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
15
+ width: 800px;
16
+ }
17
+
18
+ .header
19
+ {
20
+ clear: both;
21
+ background-color: #ccc;
22
+ padding: 8px;
23
+ }
24
+
25
+ h1
26
+ {
27
+ font-size: 150%;
28
+ font-weight: bold;
29
+ padding: 0;
30
+ margin: 1em 0 0 .3em;
31
+ }
32
+
33
+ hr
34
+ {
35
+ border: none 0;
36
+ border-top: 1px solid #7F8FB1;
37
+ height: 1px;
38
+ }
39
+
40
+ pre.code
41
+ {
42
+ display: block;
43
+ padding: 8px;
44
+ border: 1px dashed #ccc;
45
+ }
46
+
47
+ #index
48
+ {
49
+ margin-top: 24px;
50
+ float: left;
51
+ width: 160px;
52
+ position: absolute;
53
+ left: 8px;
54
+ background-color: #F3F3F3;
55
+ padding: 8px;
56
+ }
57
+
58
+ #content
59
+ {
60
+ margin-left: 190px;
61
+ width: 600px;
62
+ }
63
+
64
+ .classList
65
+ {
66
+ list-style-type: none;
67
+ padding: 0;
68
+ margin: 0 0 0 8px;
69
+ font-family: arial, sans-serif;
70
+ font-size: 1em;
71
+ overflow: auto;
72
+ }
73
+
74
+ .classList li
75
+ {
76
+ padding: 0;
77
+ margin: 0 0 8px 0;
78
+ }
79
+
80
+ .summaryTable { width: 100%; }
81
+
82
+ h1.classTitle
83
+ {
84
+ font-size:170%;
85
+ line-height:130%;
86
+ }
87
+
88
+ h2 { font-size: 110%; }
89
+ caption, div.sectionTitle
90
+ {
91
+ background-color: #7F8FB1;
92
+ color: #fff;
93
+ font-size:130%;
94
+ text-align: left;
95
+ padding: 2px 6px 2px 6px;
96
+ border: 1px #7F8FB1 solid;
97
+ }
98
+
99
+ div.sectionTitle { margin-bottom: 8px; }
100
+ .summaryTable thead { display: none; }
101
+
102
+ .summaryTable td
103
+ {
104
+ vertical-align: top;
105
+ padding: 4px;
106
+ border-bottom: 1px #7F8FB1 solid;
107
+ border-right: 1px #7F8FB1 solid;
108
+ }
109
+
110
+ /*col#summaryAttributes {}*/
111
+ .summaryTable td.attributes
112
+ {
113
+ border-left: 1px #7F8FB1 solid;
114
+ width: 140px;
115
+ text-align: right;
116
+ }
117
+
118
+ td.attributes, .fixedFont
119
+ {
120
+ line-height: 15px;
121
+ color: #002EBE;
122
+ font-family: "Courier New",Courier,monospace;
123
+ font-size: 13px;
124
+ }
125
+
126
+ .summaryTable td.nameDescription
127
+ {
128
+ text-align: left;
129
+ font-size: 13px;
130
+ line-height: 15px;
131
+ }
132
+
133
+ .summaryTable td.nameDescription, .description
134
+ {
135
+ line-height: 15px;
136
+ padding: 4px;
137
+ padding-left: 4px;
138
+ }
139
+
140
+ .summaryTable { margin-bottom: 8px; }
141
+
142
+ ul.inheritsList
143
+ {
144
+ list-style: square;
145
+ margin-left: 20px;
146
+ padding-left: 0;
147
+ }
148
+
149
+ .detailList {
150
+ margin-left: 20px;
151
+ line-height: 15px;
152
+ }
153
+ .detailList dt { margin-left: 20px; }
154
+
155
+ .detailList .heading
156
+ {
157
+ font-weight: bold;
158
+ padding-bottom: 6px;
159
+ margin-left: 0;
160
+ }
161
+
162
+ .light, td.attributes, .light a:link, .light a:visited
163
+ {
164
+ color: #777;
165
+ font-style: italic;
166
+ }
167
+
168
+ .fineprint
169
+ {
170
+ text-align: right;
171
+ font-size: 10px;
172
+ }
173
+ </style>
174
+ </head>
175
+
176
+ <body>
177
+ <div id="header">
178
+ </div>
179
+
180
+ <div id="index">
181
+ <div align="center"><a href="index.html">Class Index</a>
182
+ | <a href="files.html">File Index</a></div>
183
+ <hr />
184
+ <h2>Classes</h2>
185
+ <ul class="classList">
186
+
187
+ <li><i><a href="symbols/_global_.html">_global_</a></i></li>
188
+
189
+ </ul>
190
+ <hr />
191
+ </div>
192
+
193
+ <div id="content">
194
+ <h1 class="classTitle">File Index</h1>
195
+
196
+
197
+ <div>
198
+ <h2><a href="symbols/src/xpcomcore_lib_riot.js.html">xpcomcore/lib/riot.js</a></h2>
199
+
200
+ <dl>
201
+
202
+
203
+
204
+
205
+ </dl>
206
+ </div>
207
+ <hr />
208
+
209
+
210
+ </div>
211
+ <div class="fineprint" style="clear:both">
212
+
213
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.3.2 on Fri Oct 16 2009 18:12:16 GMT-0500 (CDT)
214
+ </div>
215
+ </body>
216
+ </html>
@@ -0,0 +1,210 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+
7
+ <title>JsDoc Reference - Index</title>
8
+ <meta name="generator" content="JsDoc Toolkit" />
9
+
10
+ <style type="text/css">
11
+ /* default.css */
12
+ body
13
+ {
14
+ font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
15
+ width: 800px;
16
+ }
17
+
18
+ .header
19
+ {
20
+ clear: both;
21
+ background-color: #ccc;
22
+ padding: 8px;
23
+ }
24
+
25
+ h1
26
+ {
27
+ font-size: 150%;
28
+ font-weight: bold;
29
+ padding: 0;
30
+ margin: 1em 0 0 .3em;
31
+ }
32
+
33
+ hr
34
+ {
35
+ border: none 0;
36
+ border-top: 1px solid #7F8FB1;
37
+ height: 1px;
38
+ }
39
+
40
+ pre.code
41
+ {
42
+ display: block;
43
+ padding: 8px;
44
+ border: 1px dashed #ccc;
45
+ }
46
+
47
+ #index
48
+ {
49
+ margin-top: 24px;
50
+ float: left;
51
+ width: 160px;
52
+ position: absolute;
53
+ left: 8px;
54
+ background-color: #F3F3F3;
55
+ padding: 8px;
56
+ }
57
+
58
+ #content
59
+ {
60
+ margin-left: 190px;
61
+ width: 600px;
62
+ }
63
+
64
+ .classList
65
+ {
66
+ list-style-type: none;
67
+ padding: 0;
68
+ margin: 0 0 0 8px;
69
+ font-family: arial, sans-serif;
70
+ font-size: 1em;
71
+ overflow: auto;
72
+ }
73
+
74
+ .classList li
75
+ {
76
+ padding: 0;
77
+ margin: 0 0 8px 0;
78
+ }
79
+
80
+ .summaryTable { width: 100%; }
81
+
82
+ h1.classTitle
83
+ {
84
+ font-size:170%;
85
+ line-height:130%;
86
+ }
87
+
88
+ h2 { font-size: 110%; }
89
+ caption, div.sectionTitle
90
+ {
91
+ background-color: #7F8FB1;
92
+ color: #fff;
93
+ font-size:130%;
94
+ text-align: left;
95
+ padding: 2px 6px 2px 6px;
96
+ border: 1px #7F8FB1 solid;
97
+ }
98
+
99
+ div.sectionTitle { margin-bottom: 8px; }
100
+ .summaryTable thead { display: none; }
101
+
102
+ .summaryTable td
103
+ {
104
+ vertical-align: top;
105
+ padding: 4px;
106
+ border-bottom: 1px #7F8FB1 solid;
107
+ border-right: 1px #7F8FB1 solid;
108
+ }
109
+
110
+ /*col#summaryAttributes {}*/
111
+ .summaryTable td.attributes
112
+ {
113
+ border-left: 1px #7F8FB1 solid;
114
+ width: 140px;
115
+ text-align: right;
116
+ }
117
+
118
+ td.attributes, .fixedFont
119
+ {
120
+ line-height: 15px;
121
+ color: #002EBE;
122
+ font-family: "Courier New",Courier,monospace;
123
+ font-size: 13px;
124
+ }
125
+
126
+ .summaryTable td.nameDescription
127
+ {
128
+ text-align: left;
129
+ font-size: 13px;
130
+ line-height: 15px;
131
+ }
132
+
133
+ .summaryTable td.nameDescription, .description
134
+ {
135
+ line-height: 15px;
136
+ padding: 4px;
137
+ padding-left: 4px;
138
+ }
139
+
140
+ .summaryTable { margin-bottom: 8px; }
141
+
142
+ ul.inheritsList
143
+ {
144
+ list-style: square;
145
+ margin-left: 20px;
146
+ padding-left: 0;
147
+ }
148
+
149
+ .detailList {
150
+ margin-left: 20px;
151
+ line-height: 15px;
152
+ }
153
+ .detailList dt { margin-left: 20px; }
154
+
155
+ .detailList .heading
156
+ {
157
+ font-weight: bold;
158
+ padding-bottom: 6px;
159
+ margin-left: 0;
160
+ }
161
+
162
+ .light, td.attributes, .light a:link, .light a:visited
163
+ {
164
+ color: #777;
165
+ font-style: italic;
166
+ }
167
+
168
+ .fineprint
169
+ {
170
+ text-align: right;
171
+ font-size: 10px;
172
+ }
173
+ </style>
174
+ </head>
175
+
176
+ <body>
177
+ <div id="header">
178
+ </div>
179
+
180
+ <div id="index">
181
+ <div align="center"><a href="index.html">Class Index</a>
182
+ | <a href="files.html">File Index</a></div>
183
+ <hr />
184
+ <h2>Classes</h2>
185
+ <ul class="classList">
186
+
187
+ <li><i><a href="symbols/_global_.html">_global_</a></i></li>
188
+
189
+ </ul>
190
+ <hr />
191
+ </div>
192
+
193
+ <div id="content">
194
+ <h1 class="classTitle">Class Index</h1>
195
+
196
+
197
+ <div>
198
+ <h2><a href="symbols/_global_.html">_global_</a></h2>
199
+
200
+ </div>
201
+ <hr />
202
+
203
+
204
+ </div>
205
+ <div class="fineprint" style="clear:both">
206
+
207
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.3.2 on Fri Oct 16 2009 18:12:16 GMT-0500 (CDT)
208
+ </div>
209
+ </body>
210
+ </html>
@@ -0,0 +1,249 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+ <meta name="generator" content="JsDoc Toolkit" />
7
+
8
+ <title>JsDoc Reference - _global_</title>
9
+
10
+ <style type="text/css">
11
+ /* default.css */
12
+ body
13
+ {
14
+ font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
15
+ width: 800px;
16
+ }
17
+
18
+ .header
19
+ {
20
+ clear: both;
21
+ background-color: #ccc;
22
+ padding: 8px;
23
+ }
24
+
25
+ h1
26
+ {
27
+ font-size: 150%;
28
+ font-weight: bold;
29
+ padding: 0;
30
+ margin: 1em 0 0 .3em;
31
+ }
32
+
33
+ hr
34
+ {
35
+ border: none 0;
36
+ border-top: 1px solid #7F8FB1;
37
+ height: 1px;
38
+ }
39
+
40
+ pre.code
41
+ {
42
+ display: block;
43
+ padding: 8px;
44
+ border: 1px dashed #ccc;
45
+ }
46
+
47
+ #index
48
+ {
49
+ margin-top: 24px;
50
+ float: left;
51
+ width: 160px;
52
+ position: absolute;
53
+ left: 8px;
54
+ background-color: #F3F3F3;
55
+ padding: 8px;
56
+ }
57
+
58
+ #content
59
+ {
60
+ margin-left: 190px;
61
+ width: 600px;
62
+ }
63
+
64
+ .classList
65
+ {
66
+ list-style-type: none;
67
+ padding: 0;
68
+ margin: 0 0 0 8px;
69
+ font-family: arial, sans-serif;
70
+ font-size: 1em;
71
+ overflow: auto;
72
+ }
73
+
74
+ .classList li
75
+ {
76
+ padding: 0;
77
+ margin: 0 0 8px 0;
78
+ }
79
+
80
+ .summaryTable { width: 100%; }
81
+
82
+ h1.classTitle
83
+ {
84
+ font-size:170%;
85
+ line-height:130%;
86
+ }
87
+
88
+ h2 { font-size: 110%; }
89
+ caption, div.sectionTitle
90
+ {
91
+ background-color: #7F8FB1;
92
+ color: #fff;
93
+ font-size:130%;
94
+ text-align: left;
95
+ padding: 2px 6px 2px 6px;
96
+ border: 1px #7F8FB1 solid;
97
+ }
98
+
99
+ div.sectionTitle { margin-bottom: 8px; }
100
+ .summaryTable thead { display: none; }
101
+
102
+ .summaryTable td
103
+ {
104
+ vertical-align: top;
105
+ padding: 4px;
106
+ border-bottom: 1px #7F8FB1 solid;
107
+ border-right: 1px #7F8FB1 solid;
108
+ }
109
+
110
+ /*col#summaryAttributes {}*/
111
+ .summaryTable td.attributes
112
+ {
113
+ border-left: 1px #7F8FB1 solid;
114
+ width: 140px;
115
+ text-align: right;
116
+ }
117
+
118
+ td.attributes, .fixedFont
119
+ {
120
+ line-height: 15px;
121
+ color: #002EBE;
122
+ font-family: "Courier New",Courier,monospace;
123
+ font-size: 13px;
124
+ }
125
+
126
+ .summaryTable td.nameDescription
127
+ {
128
+ text-align: left;
129
+ font-size: 13px;
130
+ line-height: 15px;
131
+ }
132
+
133
+ .summaryTable td.nameDescription, .description
134
+ {
135
+ line-height: 15px;
136
+ padding: 4px;
137
+ padding-left: 4px;
138
+ }
139
+
140
+ .summaryTable { margin-bottom: 8px; }
141
+
142
+ ul.inheritsList
143
+ {
144
+ list-style: square;
145
+ margin-left: 20px;
146
+ padding-left: 0;
147
+ }
148
+
149
+ .detailList {
150
+ margin-left: 20px;
151
+ line-height: 15px;
152
+ }
153
+ .detailList dt { margin-left: 20px; }
154
+
155
+ .detailList .heading
156
+ {
157
+ font-weight: bold;
158
+ padding-bottom: 6px;
159
+ margin-left: 0;
160
+ }
161
+
162
+ .light, td.attributes, .light a:link, .light a:visited
163
+ {
164
+ color: #777;
165
+ font-style: italic;
166
+ }
167
+
168
+ .fineprint
169
+ {
170
+ text-align: right;
171
+ font-size: 10px;
172
+ }
173
+ </style>
174
+ </head>
175
+
176
+ <body>
177
+ <!-- ============================== header ================================= -->
178
+ <!-- begin static/header.html -->
179
+ <div id="header">
180
+ </div>
181
+ <!-- end static/header.html -->
182
+
183
+ <!-- ============================== classes index ============================ -->
184
+ <div id="index">
185
+ <!-- begin publish.classesIndex -->
186
+ <div align="center"><a href="../index.html">Class Index</a>
187
+ | <a href="../files.html">File Index</a></div>
188
+ <hr />
189
+ <h2>Classes</h2>
190
+ <ul class="classList">
191
+
192
+ <li><i><a href="../symbols/_global_.html">_global_</a></i></li>
193
+
194
+ </ul>
195
+ <hr />
196
+ <!-- end publish.classesIndex -->
197
+ </div>
198
+
199
+ <div id="content">
200
+ <!-- ============================== class title ============================ -->
201
+ <h1 class="classTitle">
202
+
203
+ Built-In Namespace _global_
204
+ </h1>
205
+
206
+ <!-- ============================== class summary ========================== -->
207
+ <p class="description">
208
+
209
+
210
+
211
+
212
+
213
+
214
+ </p>
215
+
216
+ <!-- ============================== constructor summary ==================== -->
217
+
218
+
219
+ <!-- ============================== properties summary ===================== -->
220
+
221
+
222
+ <!-- ============================== methods summary ======================== -->
223
+
224
+ <!-- ============================== events summary ======================== -->
225
+
226
+
227
+ <!-- ============================== constructor details ==================== -->
228
+
229
+
230
+ <!-- ============================== field details ========================== -->
231
+
232
+
233
+ <!-- ============================== method details ========================= -->
234
+
235
+
236
+ <!-- ============================== event details ========================= -->
237
+
238
+
239
+ <hr />
240
+ </div>
241
+
242
+
243
+ <!-- ============================== footer ================================= -->
244
+ <div class="fineprint" style="clear:both">
245
+
246
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Fri Oct 16 2009 18:12:16 GMT-0500 (CDT)
247
+ </div>
248
+ </body>
249
+ </html>
@@ -0,0 +1,8 @@
1
+ <html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
2
+ .KEYW {color: #933;}
3
+ .COMM {color: #bbb; font-style: italic;}
4
+ .NUMB {color: #393;}
5
+ .STRN {color: #393;}
6
+ .REGX {color: #339;}
7
+ .line {border-right: 1px dotted #666; color: #666; font-style: normal;}
8
+ </style></head><body><pre><span class='line'> 1</span> <span class="NAME">puts</span><span class="PUNC">(</span><span class="STRN">"Hi from riot-js."</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>
@@ -0,0 +1,381 @@
1
+ /*jslint white: false plusplus: false onevar: false browser: true evil: true*/
2
+ /*global window: true*/
3
+ var Riot = {
4
+ results: [],
5
+ contexts: [],
6
+
7
+ run: function(tests) {
8
+ if (typeof XPCOMCore !== 'undefined') {
9
+ Riot.formatter = new Riot.Formatters.XPComCore();
10
+ Riot.runAndReport(tests);
11
+ Sys.exit(Riot.exitCode);
12
+ } else if (typeof window === 'undefined') {
13
+ Riot.formatter = new Riot.Formatters.Text();
14
+ Riot.runAndReport(tests);
15
+ java.lang.System.exit(Riot.exitCode);
16
+ } else {
17
+ Riot.formatter = new Riot.Formatters.HTML();
18
+ var onload = window.onload;
19
+ window.onload = function() {
20
+ if (onload) { window.onload(); }
21
+ Riot.runAndReport(tests);
22
+ };
23
+ }
24
+ },
25
+
26
+ runAndReport: function(tests) {
27
+ this.running = true;
28
+ var benchmark = Riot.Benchmark.run(1, function() { Riot.runAllContexts(tests); });
29
+ Riot.formatter.separator();
30
+ Riot.summariseAllResults();
31
+ Riot.formatter.line(benchmark);
32
+ this.running = false;
33
+ },
34
+
35
+ runAllContexts: function(tests) {
36
+ if (typeof tests !== 'undefined') {
37
+ this.withDSL(tests)();
38
+ }
39
+
40
+ for (var i = 0; i < this.contexts.length; i++) {
41
+ this.contexts[i].run();
42
+ }
43
+ },
44
+
45
+ functionBody: function(fn) {
46
+ return '(' + fn.toString().replace(/\s+$/, '') + ')()';
47
+ },
48
+
49
+ withDSL: function(fn, context) {
50
+ var body = this.functionBody(fn),
51
+ f = new Function('context', 'given', 'asserts', 'should', 'setup', 'teardown', body),
52
+ args = [
53
+ Riot.context,
54
+ Riot.given,
55
+ function() { return context.asserts.apply(context, arguments); },
56
+ function() { return context.should.apply(context, arguments); },
57
+ function() { return context.setup.apply(context, arguments); },
58
+ function() { return context.teardown.apply(context, arguments); }
59
+ ];
60
+
61
+ return function() { f.apply(Riot, args); };
62
+ },
63
+
64
+ context: function(title, callback) {
65
+ var context = new Riot.Context(title, callback);
66
+
67
+ if (this.running) {
68
+ context.run();
69
+ } else {
70
+ Riot.contexts.push(context);
71
+ }
72
+
73
+ return context;
74
+ },
75
+
76
+ given: function(title, callback) {
77
+ title = 'Given ' + title;
78
+ return Riot.context(title, callback);
79
+ },
80
+
81
+ summariseAllResults: function() { return this.summarise(this.results); },
82
+
83
+ summarise: function(results) {
84
+ var failures = 0;
85
+ for (var i = 0; i < results.length; i++) {
86
+ if (!results[i].pass) { failures++; }
87
+ }
88
+ this.formatter.line(results.length + ' assertions: ' + failures + ' failures');
89
+ this.exitCode = failures > 0 ? 1 : 0;
90
+ },
91
+
92
+ addResult: function(context, assertion, pass) {
93
+ var result = {
94
+ assertion: assertion,
95
+ pass: pass,
96
+ context: context
97
+ };
98
+ this.results.push(result);
99
+ }
100
+ };
101
+
102
+ Riot.Benchmark = {
103
+ results: [],
104
+
105
+ addResult: function(start, end) {
106
+ this.results.push(end - start);
107
+ },
108
+
109
+ displayResults: function() {
110
+ var total = 0,
111
+ seconds = 0,
112
+ i = 0;
113
+ for (i = 0; i < this.results.length; i++) {
114
+ total += this.results[i];
115
+ }
116
+ seconds = total / 1000;
117
+ return 'Elapsed time: ' + total + 'ms (' + seconds + ' seconds)';
118
+ },
119
+
120
+ run: function(times, callback) {
121
+ this.results = [];
122
+ for (var i = 0; i < times; i++) {
123
+ var start = new Date(),
124
+ end = null;
125
+ callback();
126
+ end = new Date();
127
+ this.addResult(start, end);
128
+ }
129
+ return this.displayResults();
130
+ }
131
+ };
132
+
133
+ Riot.Formatters = {
134
+ HTML: function() {
135
+ function display(html) {
136
+ var results = document.getElementById('test-results');
137
+ results.innerHTML += html;
138
+ }
139
+
140
+ this.line = function(text) {
141
+ display('<p>' + text + '</p>');
142
+ };
143
+
144
+ this.pass = function(message) {
145
+ display('<p class="pass">' + message + '</p>');
146
+ };
147
+
148
+ this.fail = function(message) {
149
+ display('<p class="fail">' + message + '</p>');
150
+ };
151
+
152
+ this.error = function(message, exception) {
153
+ this.fail(message);
154
+ display('<p class="exception">Exception: ' + exception + '</p>');
155
+ };
156
+
157
+ this.context = function(name) {
158
+ display('<h3>' + name + '</h3>');
159
+ };
160
+
161
+ this.separator = function() {
162
+ display('<hr />');
163
+ };
164
+ },
165
+
166
+ Text: function() {
167
+ function display(text) {
168
+ print(text);
169
+ }
170
+
171
+ this.line = function(text) {
172
+ display(text);
173
+ };
174
+
175
+ this.pass = function(message) {
176
+ this.line(' + ' + message + '');
177
+ };
178
+
179
+ this.fail = function(message) {
180
+ this.line(' - ' + message + '');
181
+ };
182
+
183
+ this.error = function(message, exception) {
184
+ this.fail(message);
185
+ this.line(' Exception: ' + exception);
186
+ };
187
+
188
+ this.context = function(name) {
189
+ this.line(name);
190
+ };
191
+
192
+ this.separator = function() {
193
+ this.line('');
194
+ };
195
+ },
196
+
197
+ XPComCore: function() {
198
+ var formatter = new Riot.Formatters.Text();
199
+ formatter.line = function(text) {
200
+ puts(text);
201
+ };
202
+ return formatter;
203
+ }
204
+ };
205
+
206
+ Riot.Context = function(name, callback) {
207
+ this.name = name;
208
+ this.callback = callback;
209
+ this.assertions = [];
210
+ this.should = this.asserts;
211
+ };
212
+
213
+ Riot.Context.prototype = {
214
+ asserts: function(name, result) {
215
+ var assertion = new Riot.Assertion(this.name, name, result);
216
+ this.assertions.push(assertion);
217
+ return assertion;
218
+ },
219
+
220
+ setup: function(setupFunction) {
221
+ this.setupFunction = setupFunction;
222
+ },
223
+
224
+ teardown: function(teardownFunction) {
225
+ this.teardownFunction = teardownFunction;
226
+ },
227
+
228
+ runSetup: function() {
229
+ if (typeof this.setupFunction !== 'undefined') {
230
+ return this.setupFunction();
231
+ }
232
+ },
233
+
234
+ runTeardown: function() {
235
+ if (typeof this.teardownFunction !== 'undefined') {
236
+ return this.teardownFunction();
237
+ }
238
+ },
239
+
240
+ run: function() {
241
+ Riot.formatter.context(this.name);
242
+ Riot.withDSL(this.callback, this)();
243
+ this.runSetup();
244
+ for (var i = 0; i < this.assertions.length; i++) {
245
+ var pass = false,
246
+ assertion = this.assertions[i];
247
+ try {
248
+ assertion.run();
249
+ pass = true;
250
+ Riot.formatter.pass(assertion.name);
251
+ } catch (e) {
252
+ if (typeof e.name !== 'undefined' && e.name === 'Riot.AssertionFailure') {
253
+ Riot.formatter.fail(e.message);
254
+ } else {
255
+ Riot.formatter.error(assertion.name, e);
256
+ }
257
+ }
258
+
259
+ Riot.addResult(this.name, assertion.name, pass);
260
+ }
261
+ this.runTeardown();
262
+ }
263
+ };
264
+
265
+ Riot.AssertionFailure = function(message) {
266
+ var error = new Error(message);
267
+ error.name = 'Riot.AssertionFailure';
268
+ return error;
269
+ };
270
+
271
+ Riot.Assertion = function(contextName, name, expected) {
272
+ this.name = name;
273
+ this.expectedValue = expected;
274
+ this.contextName = contextName;
275
+ this.kindOf = this.typeOf;
276
+ this.isTypeOf = this.typeOf;
277
+
278
+ this.setAssertion(function(actual) {
279
+ if ((actual() === null) || (actual() === undefined)) {
280
+ throw(new Riot.AssertionFailure("Expected a value but got '" + actual() + "'"));
281
+ }
282
+ });
283
+ };
284
+
285
+ Riot.Assertion.prototype = {
286
+ setAssertion: function(assertion) {
287
+ this.assertion = assertion;
288
+ },
289
+
290
+ run: function() {
291
+ var that = this;
292
+ this.assertion(function() { return that.expected(); });
293
+ },
294
+
295
+ fail: function(message) {
296
+ throw(new Riot.AssertionFailure(message));
297
+ },
298
+
299
+ expected: function() {
300
+ if (typeof this.expectedMemo === 'undefined') {
301
+ if (typeof this.expectedValue === 'function') {
302
+ try {
303
+ this.expectedMemo = this.expectedValue();
304
+ } catch (exception) {
305
+ this.expectedValue = exception;
306
+ }
307
+ } else {
308
+ this.expectedMemo = this.expectedValue;
309
+ }
310
+ }
311
+ return this.expectedMemo;
312
+ },
313
+
314
+ /* Assertions */
315
+ equals: function(expected) {
316
+ this.setAssertion(function(actual) {
317
+ if (actual() !== expected) {
318
+ this.fail(expected + ' does not equal: ' + actual());
319
+ }
320
+ });
321
+ },
322
+
323
+ matches: function(expected) {
324
+ this.setAssertion(function(actual) {
325
+ if (!expected.test(actual())) {
326
+ this.fail("Expected '" + actual() + "' to match '" + expected + "'");
327
+ }
328
+ });
329
+ },
330
+
331
+ raises: function(expected) {
332
+ this.setAssertion(function(actual) {
333
+ try {
334
+ actual();
335
+ return;
336
+ } catch (exception) {
337
+ if (expected !== exception) {
338
+ this.fail('raised ' + exception + ' instead of ' + expected);
339
+ }
340
+ }
341
+ this.fail('did not raise ' + expected);
342
+ });
343
+ },
344
+
345
+ typeOf: function(expected) {
346
+ this.setAssertion(function(actual) {
347
+ var t = typeof actual();
348
+ if (t === 'object') {
349
+ if (actual()) {
350
+ if (typeof actual().length === 'number' &&
351
+ !(actual.propertyIsEnumerable('length')) &&
352
+ typeof actual().splice === 'function') {
353
+ t = 'array';
354
+ }
355
+ } else {
356
+ t = 'null';
357
+ }
358
+ }
359
+
360
+ if (t !== expected.toLowerCase()) {
361
+ this.fail(expected + ' is not a type of ' + actual());
362
+ }
363
+ });
364
+ },
365
+
366
+ isTrue: function() {
367
+ this.setAssertion(function(actual) {
368
+ if (actual() !== true) {
369
+ this.fail(actual() + ' was not true');
370
+ }
371
+ });
372
+ },
373
+
374
+ isNull: function() {
375
+ this.setAssertion(function(actual) {
376
+ if (actual() !== null) {
377
+ this.fail(actual() + ' was not null');
378
+ }
379
+ });
380
+ }
381
+ };
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: riotjs-xpcc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - alexyoung
8
+ - gabrielg
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2009-10-24 00:00:00 -05:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: xpcomcore-rubygem
18
+ type: :runtime
19
+ version_requirement:
20
+ version_requirements: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ version:
26
+ - !ruby/object:Gem::Dependency
27
+ name: jsdoc-toolkit
28
+ type: :development
29
+ version_requirement:
30
+ version_requirements: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ version:
36
+ description: JS version of the Riot testing framework
37
+ email: info@conflagrationjs.org
38
+ executables: []
39
+
40
+ extensions: []
41
+
42
+ extra_rdoc_files:
43
+ - LICENSE
44
+ - README.rdoc
45
+ files:
46
+ - .document
47
+ - .gitignore
48
+ - .gitmodules
49
+ - LICENSE
50
+ - README.rdoc
51
+ - Rakefile
52
+ - VERSION
53
+ - lib/riotjs.rb
54
+ - riotjs-xpcc.gemspec
55
+ - xpcomcore/doc/files.html
56
+ - xpcomcore/doc/index.html
57
+ - xpcomcore/doc/symbols/_global_.html
58
+ - xpcomcore/doc/symbols/src/xpcomcore_lib_riot.js.html
59
+ - xpcomcore/lib/riot.js
60
+ has_rdoc: true
61
+ homepage: http://www.conflagrationjs.org/
62
+ licenses: []
63
+
64
+ post_install_message:
65
+ rdoc_options:
66
+ - --charset=UTF-8
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ version:
81
+ requirements: []
82
+
83
+ rubyforge_project:
84
+ rubygems_version: 1.3.5
85
+ signing_key:
86
+ specification_version: 3
87
+ summary: JS version of the Riot testing framework
88
+ test_files: []
89
+