jbarnette-johnson 1.0.0.200807291507 → 1.0.0.200808062051

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -16,6 +16,10 @@ Johnson wraps JavaScript in a loving Ruby embrace.
16
16
 
17
17
  == Installing
18
18
 
19
+ We haven't rolled an official 1.0 for Johnson, though we plan to Real Soon Now.
20
+ For the moment, follow the instructions in "Installing Development Versions".
21
+ Once we push a 1.0 to RubyForge, it'll be as easy as:
22
+
19
23
  [sudo] gem install johnson
20
24
 
21
25
  == Installing Development Versions
@@ -24,7 +28,8 @@ We periodically update Johnson's gemspec on Github. Rather than installing the
24
28
  official releases (hosted on RubyForge), you can track the development version.
25
29
  Development versions will have a timestamped version number, like 1.0.0.200806232349.
26
30
 
27
- [sudo] gem sources -a http://gems.github.com # if you haven't already
31
+ # requires RubyGems 1.2!
32
+ [sudo] gem sources -a http://gems.github.com
28
33
  [sudo] gem install jbarnette-johnson
29
34
 
30
35
  == License
data/johnson.gemspec CHANGED
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{johnson}
3
- s.version = "1.0.0.200807291507"
3
+ s.version = "1.0.0.200808062051"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["John Barnette", "Aaron Patterson", "Yehuda Katz", "Matthew Draper"]
7
- s.date = %q{2008-07-29}
7
+ s.date = %q{2008-08-06}
8
8
  s.default_executable = %q{johnson}
9
9
  s.description = %q{Johnson wraps JavaScript in a loving Ruby embrace.}
10
10
  s.email = %q{johnson-talk@googlegroups.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbarnette-johnson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.200807291507
4
+ version: 1.0.0.200808062051
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Barnette
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2008-07-29 00:00:00 -07:00
15
+ date: 2008-08-06 00:00:00 -07:00
16
16
  default_executable: johnson
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -1,349 +0,0 @@
1
- /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
- *
3
- * ***** BEGIN LICENSE BLOCK *****
4
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5
- *
6
- * The contents of this file are subject to the Mozilla Public License Version
7
- * 1.1 (the "License"); you may not use this file except in compliance with
8
- * the License. You may obtain a copy of the License at
9
- * http://www.mozilla.org/MPL/
10
- *
11
- * Software distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13
- * for the specific language governing rights and limitations under the
14
- * License.
15
- *
16
- * The Original Code is SpiderMonkey E4X code, released August, 2004.
17
- *
18
- * The Initial Developer of the Original Code is
19
- * Netscape Communications Corporation.
20
- * Portions created by the Initial Developer are Copyright (C) 1998
21
- * the Initial Developer. All Rights Reserved.
22
- *
23
- * Contributor(s):
24
- *
25
- * Alternatively, the contents of this file may be used under the terms of
26
- * either of the GNU General Public License Version 2 or later (the "GPL"),
27
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
- * in which case the provisions of the GPL or the LGPL are applicable instead
29
- * of those above. If you wish to allow use of your version of this file only
30
- * under the terms of either the GPL or the LGPL, and not to allow others to
31
- * use your version of this file under the terms of the MPL, indicate your
32
- * decision by deleting the provisions above and replace them with the notice
33
- * and other provisions required by the GPL or the LGPL. If you do not delete
34
- * the provisions above, a recipient may use your version of this file under
35
- * the terms of any one of the MPL, the GPL or the LGPL.
36
- *
37
- * ***** END LICENSE BLOCK ***** */
38
-
39
- #ifndef jsxml_h___
40
- #define jsxml_h___
41
-
42
- #include "jsstddef.h"
43
- #include "jspubtd.h"
44
-
45
- JS_BEGIN_EXTERN_C
46
-
47
- extern const char js_AnyName_str[];
48
- extern const char js_AttributeName_str[];
49
- extern const char js_isXMLName_str[];
50
- extern const char js_XMLList_str[];
51
-
52
- extern const char js_amp_entity_str[];
53
- extern const char js_gt_entity_str[];
54
- extern const char js_lt_entity_str[];
55
- extern const char js_quot_entity_str[];
56
-
57
- struct JSXMLNamespace {
58
- JSObject *object;
59
- JSString *prefix;
60
- JSString *uri;
61
- JSBool declared; /* true if declared in its XML tag */
62
- };
63
-
64
- extern JSXMLNamespace *
65
- js_NewXMLNamespace(JSContext *cx, JSString *prefix, JSString *uri,
66
- JSBool declared);
67
-
68
- extern void
69
- js_TraceXMLNamespace(JSTracer *trc, JSXMLNamespace *ns);
70
-
71
- extern void
72
- js_FinalizeXMLNamespace(JSContext *cx, JSXMLNamespace *ns);
73
-
74
- extern JSObject *
75
- js_NewXMLNamespaceObject(JSContext *cx, JSString *prefix, JSString *uri,
76
- JSBool declared);
77
-
78
- extern JSObject *
79
- js_GetXMLNamespaceObject(JSContext *cx, JSXMLNamespace *ns);
80
-
81
- struct JSXMLQName {
82
- JSObject *object;
83
- JSString *uri;
84
- JSString *prefix;
85
- JSString *localName;
86
- };
87
-
88
- extern JSXMLQName *
89
- js_NewXMLQName(JSContext *cx, JSString *uri, JSString *prefix,
90
- JSString *localName);
91
-
92
- extern void
93
- js_TraceXMLQName(JSTracer *trc, JSXMLQName *qn);
94
-
95
- extern void
96
- js_FinalizeXMLQName(JSContext *cx, JSXMLQName *qn);
97
-
98
- extern JSObject *
99
- js_NewXMLQNameObject(JSContext *cx, JSString *uri, JSString *prefix,
100
- JSString *localName);
101
-
102
- extern JSObject *
103
- js_GetXMLQNameObject(JSContext *cx, JSXMLQName *qn);
104
-
105
- extern JSObject *
106
- js_GetAttributeNameObject(JSContext *cx, JSXMLQName *qn);
107
-
108
- extern JSObject *
109
- js_ConstructXMLQNameObject(JSContext *cx, jsval nsval, jsval lnval);
110
-
111
- typedef JSBool
112
- (* JS_DLL_CALLBACK JSIdentityOp)(const void *a, const void *b);
113
-
114
- struct JSXMLArray {
115
- uint32 length;
116
- uint32 capacity;
117
- void **vector;
118
- JSXMLArrayCursor *cursors;
119
- };
120
-
121
- #define JSXML_PRESET_CAPACITY JS_BIT(31)
122
- #define JSXML_CAPACITY_MASK JS_BITMASK(31)
123
- #define JSXML_CAPACITY(array) ((array)->capacity & JSXML_CAPACITY_MASK)
124
-
125
- struct JSXMLArrayCursor {
126
- JSXMLArray *array;
127
- uint32 index;
128
- JSXMLArrayCursor *next;
129
- JSXMLArrayCursor **prevp;
130
- void *root;
131
- };
132
-
133
- /*
134
- * NB: don't reorder this enum without changing all array initializers that
135
- * depend on it in jsxml.c.
136
- */
137
- typedef enum JSXMLClass {
138
- JSXML_CLASS_LIST,
139
- JSXML_CLASS_ELEMENT,
140
- JSXML_CLASS_ATTRIBUTE,
141
- JSXML_CLASS_PROCESSING_INSTRUCTION,
142
- JSXML_CLASS_TEXT,
143
- JSXML_CLASS_COMMENT,
144
- JSXML_CLASS_LIMIT
145
- } JSXMLClass;
146
-
147
- #define JSXML_CLASS_HAS_KIDS(class_) ((class_) < JSXML_CLASS_ATTRIBUTE)
148
- #define JSXML_CLASS_HAS_VALUE(class_) ((class_) >= JSXML_CLASS_ATTRIBUTE)
149
- #define JSXML_CLASS_HAS_NAME(class_) \
150
- ((uintN)((class_) - JSXML_CLASS_ELEMENT) <= \
151
- (uintN)(JSXML_CLASS_PROCESSING_INSTRUCTION - JSXML_CLASS_ELEMENT))
152
-
153
- #ifdef DEBUG_notme
154
- #include "jsclist.h"
155
- #endif
156
-
157
- typedef struct JSXMLListVar {
158
- JSXMLArray kids; /* NB: must come first */
159
- JSXML *target;
160
- JSXMLQName *targetprop;
161
- } JSXMLListVar;
162
-
163
- typedef struct JSXMLElemVar {
164
- JSXMLArray kids; /* NB: must come first */
165
- JSXMLArray namespaces;
166
- JSXMLArray attrs;
167
- } JSXMLElemVar;
168
-
169
- struct JSXML {
170
- #ifdef DEBUG_notme
171
- JSCList links;
172
- uint32 serial;
173
- #endif
174
- JSObject *object;
175
- void *domnode; /* DOM node if mapped info item */
176
- JSXML *parent;
177
- JSXMLQName *name;
178
- uint16 xml_class; /* discriminates u, below */
179
- uint16 xml_flags; /* flags, see below */
180
- union {
181
- JSXMLListVar list;
182
- JSXMLElemVar elem;
183
- JSString *value;
184
- } u;
185
-
186
- /* Don't add anything after u -- see js_NewXML for why. */
187
- };
188
-
189
- /* union member shorthands */
190
- #define xml_kids u.list.kids
191
- #define xml_target u.list.target
192
- #define xml_targetprop u.list.targetprop
193
- #define xml_namespaces u.elem.namespaces
194
- #define xml_attrs u.elem.attrs
195
- #define xml_value u.value
196
-
197
- /* xml_flags values */
198
- #define XMLF_WHITESPACE_TEXT 0x1
199
-
200
- /* xml_class-testing macros */
201
- #define JSXML_HAS_KIDS(xml) JSXML_CLASS_HAS_KIDS((xml)->xml_class)
202
- #define JSXML_HAS_VALUE(xml) JSXML_CLASS_HAS_VALUE((xml)->xml_class)
203
- #define JSXML_HAS_NAME(xml) JSXML_CLASS_HAS_NAME((xml)->xml_class)
204
- #define JSXML_LENGTH(xml) (JSXML_CLASS_HAS_KIDS((xml)->xml_class) \
205
- ? (xml)->xml_kids.length \
206
- : 0)
207
-
208
- extern JSXML *
209
- js_NewXML(JSContext *cx, JSXMLClass xml_class);
210
-
211
- extern void
212
- js_TraceXML(JSTracer *trc, JSXML *xml);
213
-
214
- extern void
215
- js_FinalizeXML(JSContext *cx, JSXML *xml);
216
-
217
- extern JSObject *
218
- js_ParseNodeToXMLObject(JSContext *cx, JSParseContext *pc, JSParseNode *pn);
219
-
220
- extern JSObject *
221
- js_NewXMLObject(JSContext *cx, JSXMLClass xml_class);
222
-
223
- extern JSObject *
224
- js_GetXMLObject(JSContext *cx, JSXML *xml);
225
-
226
- extern JS_FRIEND_DATA(JSXMLObjectOps) js_XMLObjectOps;
227
- extern JS_FRIEND_DATA(JSClass) js_XMLClass;
228
- extern JS_FRIEND_DATA(JSExtendedClass) js_NamespaceClass;
229
- extern JS_FRIEND_DATA(JSExtendedClass) js_QNameClass;
230
- extern JS_FRIEND_DATA(JSClass) js_AttributeNameClass;
231
- extern JS_FRIEND_DATA(JSClass) js_AnyNameClass;
232
- extern JSClass js_XMLFilterClass;
233
-
234
- /*
235
- * Macros to test whether an object or a value is of type "xml" (per typeof).
236
- * NB: jsobj.h must be included before any call to OBJECT_IS_XML, and jsapi.h
237
- * and jsobj.h must be included before any call to VALUE_IS_XML.
238
- */
239
- #define OBJECT_IS_XML(cx,obj) ((obj)->map->ops == &js_XMLObjectOps.base)
240
- #define VALUE_IS_XML(cx,v) (!JSVAL_IS_PRIMITIVE(v) && \
241
- OBJECT_IS_XML(cx, JSVAL_TO_OBJECT(v)))
242
-
243
- extern JSObject *
244
- js_InitNamespaceClass(JSContext *cx, JSObject *obj);
245
-
246
- extern JSObject *
247
- js_InitQNameClass(JSContext *cx, JSObject *obj);
248
-
249
- extern JSObject *
250
- js_InitAttributeNameClass(JSContext *cx, JSObject *obj);
251
-
252
- extern JSObject *
253
- js_InitAnyNameClass(JSContext *cx, JSObject *obj);
254
-
255
- extern JSObject *
256
- js_InitXMLClass(JSContext *cx, JSObject *obj);
257
-
258
- extern JSObject *
259
- js_InitXMLClasses(JSContext *cx, JSObject *obj);
260
-
261
- extern JSBool
262
- js_GetFunctionNamespace(JSContext *cx, jsval *vp);
263
-
264
- /*
265
- * If obj is QName corresponding to function::name, set *funidp to name's id,
266
- * otherwise set *funidp to 0.
267
- */
268
- JSBool
269
- js_IsFunctionQName(JSContext *cx, JSObject *obj, jsid *funidp);
270
-
271
- extern JSBool
272
- js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp);
273
-
274
- extern JSBool
275
- js_SetDefaultXMLNamespace(JSContext *cx, jsval v);
276
-
277
- /*
278
- * Return true if v is a XML QName object, or if it converts to a string that
279
- * contains a valid XML qualified name (one containing no :), false otherwise.
280
- * NB: This function is an infallible predicate, it hides exceptions.
281
- */
282
- extern JSBool
283
- js_IsXMLName(JSContext *cx, jsval v);
284
-
285
- extern JSBool
286
- js_ToAttributeName(JSContext *cx, jsval *vp);
287
-
288
- extern JSString *
289
- js_EscapeAttributeValue(JSContext *cx, JSString *str, JSBool quote);
290
-
291
- extern JSString *
292
- js_AddAttributePart(JSContext *cx, JSBool isName, JSString *str,
293
- JSString *str2);
294
-
295
- extern JSString *
296
- js_EscapeElementValue(JSContext *cx, JSString *str);
297
-
298
- extern JSString *
299
- js_ValueToXMLString(JSContext *cx, jsval v);
300
-
301
- extern JSBool
302
- js_GetAnyName(JSContext *cx, jsval *vp);
303
-
304
- /*
305
- * Note: nameval must be either QName, AttributeName, or AnyName.
306
- */
307
- extern JSBool
308
- js_FindXMLProperty(JSContext *cx, jsval nameval, JSObject **objp, jsid *idp);
309
-
310
- extern JSBool
311
- js_GetXMLFunction(JSContext *cx, JSObject *obj, jsid id, jsval *vp);
312
-
313
- extern JSBool
314
- js_GetXMLDescendants(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
315
-
316
- extern JSBool
317
- js_DeleteXMLListElements(JSContext *cx, JSObject *listobj);
318
-
319
- extern JSObject *
320
- js_InitXMLFilterClass(JSContext *cx, JSObject* obj);
321
-
322
- extern JSBool
323
- js_StepXMLListFilter(JSContext *cx, JSBool initialized);
324
-
325
- extern JSObject *
326
- js_ValueToXMLObject(JSContext *cx, jsval v);
327
-
328
- extern JSObject *
329
- js_ValueToXMLListObject(JSContext *cx, jsval v);
330
-
331
- extern JSObject *
332
- js_CloneXMLObject(JSContext *cx, JSObject *obj);
333
-
334
- extern JSObject *
335
- js_NewXMLSpecialObject(JSContext *cx, JSXMLClass xml_class, JSString *name,
336
- JSString *value);
337
-
338
- extern JSString *
339
- js_MakeXMLCDATAString(JSContext *cx, JSString *str);
340
-
341
- extern JSString *
342
- js_MakeXMLCommentString(JSContext *cx, JSString *str);
343
-
344
- extern JSString *
345
- js_MakeXMLPIString(JSContext *cx, JSString *name, JSString *str);
346
-
347
- JS_END_EXTERN_C
348
-
349
- #endif /* jsxml_h___ */