concordia-publishing-house-syck 1.0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.rdoc +6 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +25 -0
  5. data/Manifest.txt +52 -0
  6. data/README.rdoc +51 -0
  7. data/Rakefile +32 -0
  8. data/ext/syck/bytecode.c +1165 -0
  9. data/ext/syck/emitter.c +1247 -0
  10. data/ext/syck/extconf.h +3 -0
  11. data/ext/syck/extconf.rb +5 -0
  12. data/ext/syck/gram.c +1894 -0
  13. data/ext/syck/gram.h +79 -0
  14. data/ext/syck/handler.c +173 -0
  15. data/ext/syck/implicit.c +2990 -0
  16. data/ext/syck/node.c +407 -0
  17. data/ext/syck/rubyext.c +2328 -0
  18. data/ext/syck/syck.c +524 -0
  19. data/ext/syck/syck.h +453 -0
  20. data/ext/syck/token.c +2724 -0
  21. data/ext/syck/yaml2byte.c +259 -0
  22. data/ext/syck/yamlbyte.h +171 -0
  23. data/lib/syck.rb +448 -0
  24. data/lib/syck/baseemitter.rb +242 -0
  25. data/lib/syck/basenode.rb +222 -0
  26. data/lib/syck/constants.rb +45 -0
  27. data/lib/syck/encoding.rb +35 -0
  28. data/lib/syck/error.rb +34 -0
  29. data/lib/syck/loader.rb +14 -0
  30. data/lib/syck/rubytypes.rb +450 -0
  31. data/lib/syck/stream.rb +41 -0
  32. data/lib/syck/stringio.rb +85 -0
  33. data/lib/syck/syck.rb +16 -0
  34. data/lib/syck/tag.rb +95 -0
  35. data/lib/syck/types.rb +192 -0
  36. data/lib/syck/yamlnode.rb +54 -0
  37. data/lib/syck/ypath.rb +54 -0
  38. data/lib/yaml/engine_manager.rb +71 -0
  39. data/lib/yaml/syck.rb +14 -0
  40. data/test/helper.rb +2 -0
  41. data/test/test_array.rb +13 -0
  42. data/test/test_boolean.rb +36 -0
  43. data/test/test_class.rb +11 -0
  44. data/test/test_exception.rb +45 -0
  45. data/test/test_hash.rb +24 -0
  46. data/test/test_null.rb +19 -0
  47. data/test/test_omap.rb +55 -0
  48. data/test/test_set.rb +30 -0
  49. data/test/test_string.rb +44 -0
  50. data/test/test_struct.rb +32 -0
  51. data/test/test_symbol.rb +21 -0
  52. data/test/test_time.rb +23 -0
  53. data/test/test_yaml.rb +1403 -0
  54. data/test/test_yaml_properties.rb +63 -0
  55. metadata +163 -0
@@ -0,0 +1,63 @@
1
+ require 'helper'
2
+
3
+ module Syck
4
+ class TestYamlProperties < Test::Unit::TestCase
5
+ class Foo
6
+ attr_reader :a, :b, :c
7
+ def initialize
8
+ @a = 1
9
+ @b = 2
10
+ @c = 3
11
+ end
12
+
13
+ def to_yaml_properties
14
+ [:@a, :@b]
15
+ end
16
+ end
17
+
18
+ def test_object_dump_yaml_properties
19
+ foo = Syck.load(Syck.dump(Foo.new))
20
+ assert_equal 1, foo.a
21
+ assert_equal 2, foo.b
22
+ assert_nil foo.c
23
+ end
24
+
25
+ class Bar < Struct.new(:foo, :bar)
26
+ attr_reader :baz
27
+ def initialize *args
28
+ super
29
+ @baz = 'hello'
30
+ end
31
+
32
+ def to_yaml_properties
33
+ []
34
+ end
35
+ end
36
+
37
+ def test_struct_dump_yaml_properties
38
+ bar = Syck.load(Syck.dump(Bar.new('a', 'b')))
39
+ assert_equal 'a', bar.foo
40
+ assert_equal 'b', bar.bar
41
+ assert_nil bar.baz
42
+ end
43
+
44
+ def test_string_dump
45
+ string = "okonomiyaki"
46
+ class << string
47
+ def to_yaml_properties
48
+ [:@tastes]
49
+ end
50
+ end
51
+
52
+ string.instance_variable_set(:@tastes, 'delicious')
53
+ v = Syck.load Syck.dump string
54
+ assert_equal 'delicious', v.instance_variable_get(:@tastes)
55
+ end
56
+
57
+ def test_string_load
58
+ str = Syck.load("--- !str \nstr: okonomiyaki\n:@tastes: delicious\n")
59
+ assert_equal 'okonomiyaki', str
60
+ assert_equal 'delicious', str.instance_variable_get(:@tastes)
61
+ end
62
+ end
63
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: concordia-publishing-house-syck
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Aaron Patterson
8
+ - Mat Brown
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-06-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: hoe
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rdoc
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '4.0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: '4.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake-compiler
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: 0.4.1
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 0.4.1
56
+ description: |-
57
+ A gemified version of Syck from Ruby's stdlib. Syck has been removed from
58
+ Ruby's stdlib, and this gem is meant to bridge the gap for people that haven't
59
+ updated their YAML yet.
60
+ email:
61
+ - aaron@tenderlovemaking.com
62
+ executables: []
63
+ extensions:
64
+ - ext/syck/extconf.rb
65
+ extra_rdoc_files:
66
+ - CHANGELOG.rdoc
67
+ - Manifest.txt
68
+ - README.rdoc
69
+ files:
70
+ - CHANGELOG.rdoc
71
+ - Gemfile
72
+ - Gemfile.lock
73
+ - Manifest.txt
74
+ - Rakefile
75
+ - README.rdoc
76
+ - ext/syck/bytecode.c
77
+ - ext/syck/emitter.c
78
+ - ext/syck/extconf.h
79
+ - ext/syck/extconf.rb
80
+ - ext/syck/gram.c
81
+ - ext/syck/gram.h
82
+ - ext/syck/handler.c
83
+ - ext/syck/implicit.c
84
+ - ext/syck/node.c
85
+ - ext/syck/rubyext.c
86
+ - ext/syck/syck.c
87
+ - ext/syck/syck.h
88
+ - ext/syck/token.c
89
+ - ext/syck/yaml2byte.c
90
+ - ext/syck/yamlbyte.h
91
+ - lib/syck/baseemitter.rb
92
+ - lib/syck/basenode.rb
93
+ - lib/syck/constants.rb
94
+ - lib/syck/encoding.rb
95
+ - lib/syck/error.rb
96
+ - lib/syck/loader.rb
97
+ - lib/syck/rubytypes.rb
98
+ - lib/syck/stream.rb
99
+ - lib/syck/stringio.rb
100
+ - lib/syck/syck.rb
101
+ - lib/syck/tag.rb
102
+ - lib/syck/types.rb
103
+ - lib/syck/yamlnode.rb
104
+ - lib/syck/ypath.rb
105
+ - lib/syck.rb
106
+ - lib/yaml/engine_manager.rb
107
+ - lib/yaml/syck.rb
108
+ - test/helper.rb
109
+ - test/test_array.rb
110
+ - test/test_boolean.rb
111
+ - test/test_class.rb
112
+ - test/test_exception.rb
113
+ - test/test_hash.rb
114
+ - test/test_null.rb
115
+ - test/test_omap.rb
116
+ - test/test_set.rb
117
+ - test/test_string.rb
118
+ - test/test_struct.rb
119
+ - test/test_symbol.rb
120
+ - test/test_time.rb
121
+ - test/test_yaml.rb
122
+ - test/test_yaml_properties.rb
123
+ homepage: http://github.com/tenderlove/syck
124
+ licenses: []
125
+ metadata: {}
126
+ post_install_message:
127
+ rdoc_options:
128
+ - --main
129
+ - README.rdoc
130
+ require_paths:
131
+ - lib
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - '>='
135
+ - !ruby/object:Gem::Version
136
+ version: 2.0.0
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ requirements: []
143
+ rubyforge_project: syck
144
+ rubygems_version: 2.0.2
145
+ signing_key:
146
+ specification_version: 4
147
+ summary: A gemified version of Syck from Ruby's stdlib
148
+ test_files:
149
+ - test/helper.rb
150
+ - test/test_array.rb
151
+ - test/test_boolean.rb
152
+ - test/test_class.rb
153
+ - test/test_exception.rb
154
+ - test/test_hash.rb
155
+ - test/test_null.rb
156
+ - test/test_omap.rb
157
+ - test/test_set.rb
158
+ - test/test_string.rb
159
+ - test/test_struct.rb
160
+ - test/test_symbol.rb
161
+ - test/test_time.rb
162
+ - test/test_yaml.rb
163
+ - test/test_yaml_properties.rb