RbYAML 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/LICENSE +19 -0
  2. data/README +31 -0
  3. data/lib/rbyaml.rb +378 -0
  4. data/lib/rbyaml/composer.rb +189 -0
  5. data/lib/rbyaml/constructor.rb +374 -0
  6. data/lib/rbyaml/detector.rb +44 -0
  7. data/lib/rbyaml/dumper.rb +40 -0
  8. data/lib/rbyaml/emitter.rb +1116 -0
  9. data/lib/rbyaml/error.rb +81 -0
  10. data/lib/rbyaml/events.rb +92 -0
  11. data/lib/rbyaml/loader.rb +49 -0
  12. data/lib/rbyaml/nodes.rb +69 -0
  13. data/lib/rbyaml/parser.rb +488 -0
  14. data/lib/rbyaml/reader.rb +127 -0
  15. data/lib/rbyaml/representer.rb +183 -0
  16. data/lib/rbyaml/scanner.rb +1258 -0
  17. data/lib/rbyaml/serializer.rb +120 -0
  18. data/lib/rbyaml/test.rb +56 -0
  19. data/lib/rbyaml/tokens.rb +163 -0
  20. data/lib/rbyaml/yaml.rb +143 -0
  21. data/test/test_rbyaml.rb +18 -0
  22. data/test/yaml/gems.yml +130951 -0
  23. data/test/yaml/gems2.yml +113 -0
  24. data/test/yaml/test1.yml +3 -0
  25. data/test/yaml/test10.yml +8 -0
  26. data/test/yaml/test12.yml +8 -0
  27. data/test/yaml/test13.yml +4 -0
  28. data/test/yaml/test14.yml +4 -0
  29. data/test/yaml/test15.yml +8 -0
  30. data/test/yaml/test16.yml +7 -0
  31. data/test/yaml/test18.yml +6 -0
  32. data/test/yaml/test19.yml +5 -0
  33. data/test/yaml/test2.yml +3 -0
  34. data/test/yaml/test20.yml +6 -0
  35. data/test/yaml/test21.yml +4 -0
  36. data/test/yaml/test22.yml +4 -0
  37. data/test/yaml/test23.yml +13 -0
  38. data/test/yaml/test24.yml +14 -0
  39. data/test/yaml/test25.yml +7 -0
  40. data/test/yaml/test26.yml +7 -0
  41. data/test/yaml/test27.yml +29 -0
  42. data/test/yaml/test28.yml +26 -0
  43. data/test/yaml/test29.yml +13 -0
  44. data/test/yaml/test3.yml +8 -0
  45. data/test/yaml/test30.yml +7 -0
  46. data/test/yaml/test31.yml +2 -0
  47. data/test/yaml/test32.yml +13 -0
  48. data/test/yaml/test33.yml +2 -0
  49. data/test/yaml/test34.yml +8 -0
  50. data/test/yaml/test35.yml +4 -0
  51. data/test/yaml/test36.yml +8 -0
  52. data/test/yaml/test37.yml +2 -0
  53. data/test/yaml/test38.yml +8 -0
  54. data/test/yaml/test39.yml +2 -0
  55. data/test/yaml/test4.yml +8 -0
  56. data/test/yaml/test40.yml +3 -0
  57. data/test/yaml/test41.yml +5 -0
  58. data/test/yaml/test42.yml +12 -0
  59. data/test/yaml/test43.yml +15 -0
  60. data/test/yaml/test44.yml +23 -0
  61. data/test/yaml/test5.yml +3 -0
  62. data/test/yaml/test6.yml +5 -0
  63. data/test/yaml/test7.yml +10 -0
  64. data/test/yaml/test8.yml +10 -0
  65. data/test/yaml/test9.yml +8 -0
  66. metadata +111 -0
@@ -0,0 +1,15 @@
1
+ %YAML 1.1
2
+ ---
3
+ !!map {
4
+ ? !!str "Not indented"
5
+ : !!map {
6
+ ? !!str "By one space"
7
+ : !!str "By four\n spaces\n",
8
+ ? !!str "Flow style"
9
+ : !!seq [
10
+ !!str "By two",
11
+ !!str "Still by two",
12
+ !!str "Again by two",
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,23 @@
1
+ %YAML 1.1
2
+ ---
3
+ !!map {
4
+ ? !!str "block styles" : !!map {
5
+ ? !!str "scalars" : !!map {
6
+ ? !!str "literal"
7
+ : !!str "#!!/usr/bin/perl\n\
8
+ print \"Hello,
9
+ world!!\\n\";\n",
10
+ ? !!str "folded"
11
+ : !!str "This sentence
12
+ is false.\n"
13
+ },
14
+ ? !!str "collections" : !!map {
15
+ ? !!str "sequence" : !!seq [
16
+ !!str "entry",
17
+ !!map {
18
+ ? !!str "key" : !!str "value"
19
+ }
20
+ ],
21
+ ? !!str "mapping" : !!map {
22
+ ? !!str "key" : !!str "value"
23
+ } } } }
@@ -0,0 +1,3 @@
1
+ - [name , hr, avg ]
2
+ - [Mark McGwire, 65, 0.278]
3
+ - [Sammy Sosa , 63, 0.288]
@@ -0,0 +1,5 @@
1
+ Mark McGwire: {hr: 65, avg: 0.278}
2
+ Sammy Sosa: {
3
+ hr: 63,
4
+ avg: 0.288
5
+ }
@@ -0,0 +1,10 @@
1
+ # Ranking of 1998 home runs
2
+ ---
3
+ - Mark McGwire
4
+ - Sammy Sosa
5
+ - Ken Griffey
6
+
7
+ # Team ranking
8
+ ---
9
+ - Chicago Cubs
10
+ - St Louis Cardinals
@@ -0,0 +1,10 @@
1
+ ---
2
+ time: 20:03:20
3
+ player: Sammy Sosa
4
+ action: strike (miss)
5
+ ...
6
+ ---
7
+ time: 20:03:47
8
+ player: Sammy Sosa
9
+ action: grand slam
10
+ ...
@@ -0,0 +1,8 @@
1
+ ---
2
+ hr: # 1998 hr ranking
3
+ - Mark McGwire
4
+ - Sammy Sosa
5
+ rbi:
6
+ # 1998 rbi ranking
7
+ - Sammy Sosa
8
+ - Ken Griffey
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
+ specification_version: 1
4
+ name: RbYAML
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.0.1
7
+ date: 2006-05-09 00:00:00 +02:00
8
+ summary: A pure Ruby YAML parser and emitter, mostly supporting YAML 1.1.
9
+ require_paths:
10
+ - lib
11
+ email: ola@ologix.com
12
+ homepage: http://rbyaml.rubyforge.org
13
+ rubyforge_project:
14
+ description:
15
+ autorequire: rbyaml
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ authors:
29
+ - Ola Bini
30
+ files:
31
+ - lib/rbyaml
32
+ - lib/rbyaml.rb
33
+ - lib/rbyaml/composer.rb
34
+ - lib/rbyaml/constructor.rb
35
+ - lib/rbyaml/detector.rb
36
+ - lib/rbyaml/dumper.rb
37
+ - lib/rbyaml/emitter.rb
38
+ - lib/rbyaml/error.rb
39
+ - lib/rbyaml/events.rb
40
+ - lib/rbyaml/loader.rb
41
+ - lib/rbyaml/nodes.rb
42
+ - lib/rbyaml/parser.rb
43
+ - lib/rbyaml/reader.rb
44
+ - lib/rbyaml/representer.rb
45
+ - lib/rbyaml/scanner.rb
46
+ - lib/rbyaml/serializer.rb
47
+ - lib/rbyaml/test.rb
48
+ - lib/rbyaml/tokens.rb
49
+ - lib/rbyaml/yaml.rb
50
+ - test/test_rbyaml.rb
51
+ - test/yaml
52
+ - test/yaml/gems.yml
53
+ - test/yaml/gems2.yml
54
+ - test/yaml/test1.yml
55
+ - test/yaml/test10.yml
56
+ - test/yaml/test12.yml
57
+ - test/yaml/test13.yml
58
+ - test/yaml/test14.yml
59
+ - test/yaml/test15.yml
60
+ - test/yaml/test16.yml
61
+ - test/yaml/test18.yml
62
+ - test/yaml/test19.yml
63
+ - test/yaml/test2.yml
64
+ - test/yaml/test20.yml
65
+ - test/yaml/test21.yml
66
+ - test/yaml/test22.yml
67
+ - test/yaml/test23.yml
68
+ - test/yaml/test24.yml
69
+ - test/yaml/test25.yml
70
+ - test/yaml/test26.yml
71
+ - test/yaml/test27.yml
72
+ - test/yaml/test28.yml
73
+ - test/yaml/test29.yml
74
+ - test/yaml/test3.yml
75
+ - test/yaml/test30.yml
76
+ - test/yaml/test31.yml
77
+ - test/yaml/test32.yml
78
+ - test/yaml/test33.yml
79
+ - test/yaml/test34.yml
80
+ - test/yaml/test35.yml
81
+ - test/yaml/test36.yml
82
+ - test/yaml/test37.yml
83
+ - test/yaml/test38.yml
84
+ - test/yaml/test39.yml
85
+ - test/yaml/test4.yml
86
+ - test/yaml/test40.yml
87
+ - test/yaml/test41.yml
88
+ - test/yaml/test42.yml
89
+ - test/yaml/test43.yml
90
+ - test/yaml/test44.yml
91
+ - test/yaml/test5.yml
92
+ - test/yaml/test6.yml
93
+ - test/yaml/test7.yml
94
+ - test/yaml/test8.yml
95
+ - test/yaml/test9.yml
96
+ - LICENSE
97
+ - README
98
+ test_files:
99
+ - test/test_rbyaml.rb
100
+ rdoc_options: []
101
+
102
+ extra_rdoc_files:
103
+ - README
104
+ executables: []
105
+
106
+ extensions: []
107
+
108
+ requirements: []
109
+
110
+ dependencies: []
111
+