rogdl 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/array.rb +0 -3
- data/lib/fixnum.rb +0 -3
- data/lib/hash.rb +0 -3
- data/lib/nil.rb +1 -0
- data/lib/parser.rb +1 -2
- data/lib/rogdl.rb +11 -11
- data/lib/string.rb +0 -2
- data/lib/symbol.rb +0 -2
- data/lib/writer.rb +0 -1
- data/test/test_array.rb +3 -2
- data/test/test_fixnum.rb +2 -4
- data/test/test_hash.rb +4 -2
- data/test/test_nil.rb +5 -2
- data/test/test_node.rb +2 -39
- data/test/test_parser.rb +3 -1
- data/test/test_schema.rb +4 -2
- data/test/test_string.rb +2 -1
- data/test/test_symbol.rb +5 -6
- data/test/test_writer.rb +1 -2
- metadata +3 -12
- data/test/test_rogdl.rb +0 -11
data/lib/array.rb
CHANGED
data/lib/fixnum.rb
CHANGED
data/lib/hash.rb
CHANGED
data/lib/nil.rb
CHANGED
data/lib/parser.rb
CHANGED
data/lib/rogdl.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
|
6
|
-
require '
|
7
|
-
require '
|
8
|
-
require '
|
9
|
-
require '
|
10
|
-
require '
|
1
|
+
require 'node'
|
2
|
+
require 'parser'
|
3
|
+
require 'schema'
|
4
|
+
require 'writer'
|
5
|
+
|
6
|
+
require 'nil'
|
7
|
+
require 'string'
|
8
|
+
require 'array'
|
9
|
+
require 'hash'
|
10
|
+
require 'fixnum'
|
11
|
+
require 'symbol'
|
11
12
|
|
12
13
|
module Rogdl
|
13
|
-
VERSION = '0.1.0'
|
14
14
|
end
|
data/lib/string.rb
CHANGED
data/lib/symbol.rb
CHANGED
data/lib/writer.rb
CHANGED
data/test/test_array.rb
CHANGED
data/test/test_fixnum.rb
CHANGED
data/test/test_hash.rb
CHANGED
data/test/test_nil.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
require 'test/unit'
|
2
|
-
require 'lib/
|
2
|
+
require 'lib/nil'
|
3
3
|
|
4
4
|
class TestNil < Test::Unit::TestCase
|
5
|
-
include Rogdl
|
6
5
|
|
7
6
|
def test_gvalue
|
8
7
|
assert_equal nil, nil.gvalue
|
9
8
|
end
|
10
9
|
|
10
|
+
def test_gval
|
11
|
+
assert_equal nil, nil.gval
|
12
|
+
end
|
13
|
+
|
11
14
|
def test_to_b
|
12
15
|
assert_equal false, nil.to_b
|
13
16
|
end
|
data/test/test_node.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'test/unit'
|
2
|
-
require 'lib/
|
2
|
+
require 'lib/node'
|
3
|
+
require 'lib/string'
|
3
4
|
|
4
5
|
class TestNode < Test::Unit::TestCase
|
5
6
|
include Rogdl
|
@@ -234,44 +235,6 @@ class TestNode < Test::Unit::TestCase
|
|
234
235
|
|
235
236
|
end
|
236
237
|
|
237
|
-
def test_add_others
|
238
|
-
a = Node.new('a')
|
239
|
-
|
240
|
-
a.add(['b'])
|
241
|
-
a.add(3)
|
242
|
-
a.add({'d'=>'e'})
|
243
|
-
a.add('f')
|
244
|
-
a.add(:g)
|
245
|
-
|
246
|
-
assert_equal 'b', a.b.gname
|
247
|
-
assert_equal 'b', a[0].gname
|
248
|
-
assert_equal 'a', a[0].gparent.gname
|
249
|
-
|
250
|
-
assert_equal '3', a['3'].gname
|
251
|
-
assert_equal '3', a[1].gname
|
252
|
-
assert_equal 'a', a[1].gparent.gname
|
253
|
-
|
254
|
-
assert_equal 'd', a.d.gname
|
255
|
-
assert_equal 'd', a[2].gname
|
256
|
-
assert_equal 'a', a[2].gparent.gname
|
257
|
-
|
258
|
-
assert_equal 'f', a.f.gname
|
259
|
-
assert_equal 'f', a[3].gname
|
260
|
-
assert_equal 'a', a[3].gparent.gname
|
261
|
-
|
262
|
-
assert_equal ':g', a[':g'].gname
|
263
|
-
assert_equal ':g', a[4].gname
|
264
|
-
assert_equal 'a', a[4].gparent.gname
|
265
|
-
|
266
|
-
end
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
238
|
|
276
239
|
|
277
240
|
|
data/test/test_parser.rb
CHANGED
data/test/test_schema.rb
CHANGED
data/test/test_string.rb
CHANGED
data/test/test_symbol.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
require 'test/unit'
|
2
|
-
require 'lib/
|
2
|
+
require 'lib/symbol'
|
3
|
+
require 'lib/string'
|
4
|
+
require 'lib/node'
|
3
5
|
|
4
6
|
class TestSymbol < Test::Unit::TestCase
|
5
|
-
include Rogdl
|
6
7
|
|
7
|
-
def
|
8
|
+
def test_to_n
|
8
9
|
assert_equal ':a', :a.to_n.gname
|
9
|
-
end
|
10
|
-
|
11
|
-
|
10
|
+
end
|
12
11
|
|
13
12
|
end
|
data/test/test_writer.rb
CHANGED
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rogdl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
6
|
+
version: 0.1.3
|
7
7
|
date: 2007-08-21 00:00:00 -05:00
|
8
8
|
summary: Rogdl is a package for parsing OGDL files.
|
9
9
|
require_paths:
|
@@ -46,7 +46,6 @@ files:
|
|
46
46
|
- test/test_nil.rb
|
47
47
|
- test/test_node.rb
|
48
48
|
- test/test_parser.rb
|
49
|
-
- test/test_rogdl.rb
|
50
49
|
- test/test_schema.rb
|
51
50
|
- test/test_string.rb
|
52
51
|
- test/test_symbol.rb
|
@@ -63,13 +62,5 @@ extensions: []
|
|
63
62
|
|
64
63
|
requirements: []
|
65
64
|
|
66
|
-
dependencies:
|
67
|
-
|
68
|
-
name: erb
|
69
|
-
version_requirement:
|
70
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: 0.0.0
|
75
|
-
version:
|
65
|
+
dependencies: []
|
66
|
+
|