psych 2.0.13 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +9 -4
- data/Manifest.txt +2 -0
- data/Rakefile +55 -6
- data/ext/psych/extconf.rb +1 -0
- data/ext/psych/psych_emitter.c +25 -11
- data/ext/psych/psych_parser.c +2 -2
- data/ext/psych/yaml/loader.c +2 -2
- data/ext/psych/yaml/scanner.c +18 -18
- data/lib/psych/class_loader.rb +1 -0
- data/lib/psych/coder.rb +1 -0
- data/lib/psych/core_ext.rb +1 -0
- data/lib/psych/deprecated.rb +1 -0
- data/lib/psych/exception.rb +1 -0
- data/lib/psych/handler.rb +1 -0
- data/lib/psych/handlers/document_stream.rb +1 -0
- data/lib/psych/handlers/recorder.rb +1 -0
- data/lib/psych/json/ruby_events.rb +1 -0
- data/lib/psych/json/stream.rb +1 -0
- data/lib/psych/json/tree_builder.rb +1 -0
- data/lib/psych/json/yaml_events.rb +1 -0
- data/lib/psych/nodes/alias.rb +1 -0
- data/lib/psych/nodes/document.rb +1 -0
- data/lib/psych/nodes/mapping.rb +1 -0
- data/lib/psych/nodes/node.rb +1 -0
- data/lib/psych/nodes/scalar.rb +1 -0
- data/lib/psych/nodes/sequence.rb +1 -0
- data/lib/psych/nodes/stream.rb +1 -0
- data/lib/psych/nodes.rb +1 -0
- data/lib/psych/omap.rb +1 -0
- data/lib/psych/parser.rb +1 -0
- data/lib/psych/scalar_scanner.rb +1 -0
- data/lib/psych/set.rb +1 -0
- data/lib/psych/stream.rb +1 -0
- data/lib/psych/streaming.rb +1 -0
- data/lib/psych/syntax_error.rb +1 -0
- data/lib/psych/tree_builder.rb +1 -0
- data/lib/psych/versions.rb +4 -0
- data/lib/psych/visitors/depth_first.rb +1 -0
- data/lib/psych/visitors/emitter.rb +1 -0
- data/lib/psych/visitors/json_tree.rb +1 -0
- data/lib/psych/visitors/to_ruby.rb +5 -3
- data/lib/psych/visitors/visitor.rb +1 -0
- data/lib/psych/visitors/yaml_tree.rb +17 -24
- data/lib/psych/visitors.rb +1 -0
- data/lib/psych/y.rb +1 -0
- data/lib/psych.rb +21 -9
- data/lib/psych_jars.rb +6 -0
- data/test/psych/handlers/test_recorder.rb +1 -0
- data/test/psych/helper.rb +3 -1
- data/test/psych/json/test_stream.rb +1 -0
- data/test/psych/nodes/test_enumerable.rb +1 -0
- data/test/psych/test_alias_and_anchor.rb +1 -0
- data/test/psych/test_array.rb +1 -0
- data/test/psych/test_boolean.rb +1 -0
- data/test/psych/test_class.rb +1 -0
- data/test/psych/test_coder.rb +1 -0
- data/test/psych/test_date_time.rb +1 -0
- data/test/psych/test_deprecated.rb +1 -0
- data/test/psych/test_document.rb +1 -0
- data/test/psych/test_emitter.rb +18 -0
- data/test/psych/test_encoding.rb +10 -0
- data/test/psych/test_exception.rb +1 -0
- data/test/psych/test_hash.rb +1 -0
- data/test/psych/test_json_tree.rb +1 -0
- data/test/psych/test_merge_keys.rb +1 -0
- data/test/psych/test_nil.rb +1 -0
- data/test/psych/test_null.rb +1 -0
- data/test/psych/test_numeric.rb +1 -0
- data/test/psych/test_object.rb +1 -0
- data/test/psych/test_object_references.rb +1 -0
- data/test/psych/test_omap.rb +1 -0
- data/test/psych/test_parser.rb +1 -0
- data/test/psych/test_psych.rb +17 -1
- data/test/psych/test_safe_load.rb +1 -0
- data/test/psych/test_scalar.rb +1 -0
- data/test/psych/test_scalar_scanner.rb +1 -0
- data/test/psych/test_serialize_subclasses.rb +1 -0
- data/test/psych/test_set.rb +1 -0
- data/test/psych/test_stream.rb +1 -0
- data/test/psych/test_string.rb +1 -0
- data/test/psych/test_struct.rb +1 -0
- data/test/psych/test_symbol.rb +1 -0
- data/test/psych/test_tainted.rb +1 -0
- data/test/psych/test_to_yaml_properties.rb +1 -0
- data/test/psych/test_tree_builder.rb +1 -0
- data/test/psych/test_yaml.rb +1 -0
- data/test/psych/test_yamldbm.rb +1 -1
- data/test/psych/test_yamlstore.rb +1 -0
- data/test/psych/visitors/test_depth_first.rb +1 -0
- data/test/psych/visitors/test_emitter.rb +1 -0
- data/test/psych/visitors/test_to_ruby.rb +15 -9
- data/test/psych/visitors/test_yaml_tree.rb +7 -0
- metadata +10 -55
- data/.gemtest +0 -0
- data/test/psych/test_marshalable.rb +0 -54
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: psych
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Patterson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rdoc
|
|
@@ -44,28 +44,28 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
47
|
+
version: '5.0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
54
|
+
version: '5.0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: hoe
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '3.
|
|
61
|
+
version: '3.15'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '3.
|
|
68
|
+
version: '3.15'
|
|
69
69
|
description: |-
|
|
70
70
|
Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]
|
|
71
71
|
for its YAML parsing and emitting capabilities. In addition to wrapping
|
|
@@ -82,7 +82,6 @@ extra_rdoc_files:
|
|
|
82
82
|
- README.rdoc
|
|
83
83
|
files:
|
|
84
84
|
- ".autotest"
|
|
85
|
-
- ".gemtest"
|
|
86
85
|
- ".travis.yml"
|
|
87
86
|
- CHANGELOG.rdoc
|
|
88
87
|
- Manifest.txt
|
|
@@ -141,6 +140,7 @@ files:
|
|
|
141
140
|
- lib/psych/streaming.rb
|
|
142
141
|
- lib/psych/syntax_error.rb
|
|
143
142
|
- lib/psych/tree_builder.rb
|
|
143
|
+
- lib/psych/versions.rb
|
|
144
144
|
- lib/psych/visitors.rb
|
|
145
145
|
- lib/psych/visitors/depth_first.rb
|
|
146
146
|
- lib/psych/visitors/emitter.rb
|
|
@@ -149,6 +149,7 @@ files:
|
|
|
149
149
|
- lib/psych/visitors/visitor.rb
|
|
150
150
|
- lib/psych/visitors/yaml_tree.rb
|
|
151
151
|
- lib/psych/y.rb
|
|
152
|
+
- lib/psych_jars.rb
|
|
152
153
|
- test/psych/handlers/test_recorder.rb
|
|
153
154
|
- test/psych/helper.rb
|
|
154
155
|
- test/psych/json/test_stream.rb
|
|
@@ -166,7 +167,6 @@ files:
|
|
|
166
167
|
- test/psych/test_exception.rb
|
|
167
168
|
- test/psych/test_hash.rb
|
|
168
169
|
- test/psych/test_json_tree.rb
|
|
169
|
-
- test/psych/test_marshalable.rb
|
|
170
170
|
- test/psych/test_merge_keys.rb
|
|
171
171
|
- test/psych/test_nil.rb
|
|
172
172
|
- test/psych/test_null.rb
|
|
@@ -217,53 +217,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
217
217
|
version: '0'
|
|
218
218
|
requirements: []
|
|
219
219
|
rubyforge_project:
|
|
220
|
-
rubygems_version: 2.
|
|
220
|
+
rubygems_version: 2.5.1
|
|
221
221
|
signing_key:
|
|
222
222
|
specification_version: 4
|
|
223
223
|
summary: Psych is a YAML parser and emitter
|
|
224
|
-
test_files:
|
|
225
|
-
- test/psych/handlers/test_recorder.rb
|
|
226
|
-
- test/psych/json/test_stream.rb
|
|
227
|
-
- test/psych/nodes/test_enumerable.rb
|
|
228
|
-
- test/psych/test_alias_and_anchor.rb
|
|
229
|
-
- test/psych/test_array.rb
|
|
230
|
-
- test/psych/test_boolean.rb
|
|
231
|
-
- test/psych/test_class.rb
|
|
232
|
-
- test/psych/test_coder.rb
|
|
233
|
-
- test/psych/test_date_time.rb
|
|
234
|
-
- test/psych/test_deprecated.rb
|
|
235
|
-
- test/psych/test_document.rb
|
|
236
|
-
- test/psych/test_emitter.rb
|
|
237
|
-
- test/psych/test_encoding.rb
|
|
238
|
-
- test/psych/test_exception.rb
|
|
239
|
-
- test/psych/test_hash.rb
|
|
240
|
-
- test/psych/test_json_tree.rb
|
|
241
|
-
- test/psych/test_marshalable.rb
|
|
242
|
-
- test/psych/test_merge_keys.rb
|
|
243
|
-
- test/psych/test_nil.rb
|
|
244
|
-
- test/psych/test_null.rb
|
|
245
|
-
- test/psych/test_numeric.rb
|
|
246
|
-
- test/psych/test_object.rb
|
|
247
|
-
- test/psych/test_object_references.rb
|
|
248
|
-
- test/psych/test_omap.rb
|
|
249
|
-
- test/psych/test_parser.rb
|
|
250
|
-
- test/psych/test_psych.rb
|
|
251
|
-
- test/psych/test_safe_load.rb
|
|
252
|
-
- test/psych/test_scalar.rb
|
|
253
|
-
- test/psych/test_scalar_scanner.rb
|
|
254
|
-
- test/psych/test_serialize_subclasses.rb
|
|
255
|
-
- test/psych/test_set.rb
|
|
256
|
-
- test/psych/test_stream.rb
|
|
257
|
-
- test/psych/test_string.rb
|
|
258
|
-
- test/psych/test_struct.rb
|
|
259
|
-
- test/psych/test_symbol.rb
|
|
260
|
-
- test/psych/test_tainted.rb
|
|
261
|
-
- test/psych/test_to_yaml_properties.rb
|
|
262
|
-
- test/psych/test_tree_builder.rb
|
|
263
|
-
- test/psych/test_yaml.rb
|
|
264
|
-
- test/psych/test_yamldbm.rb
|
|
265
|
-
- test/psych/test_yamlstore.rb
|
|
266
|
-
- test/psych/visitors/test_depth_first.rb
|
|
267
|
-
- test/psych/visitors/test_emitter.rb
|
|
268
|
-
- test/psych/visitors/test_to_ruby.rb
|
|
269
|
-
- test/psych/visitors/test_yaml_tree.rb
|
|
224
|
+
test_files: []
|
data/.gemtest
DELETED
|
File without changes
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
require_relative 'helper'
|
|
2
|
-
require 'delegate'
|
|
3
|
-
|
|
4
|
-
module Psych
|
|
5
|
-
class TestMarshalable < TestCase
|
|
6
|
-
def test_objects_defining_marshal_dump_and_marshal_load_can_be_dumped
|
|
7
|
-
sd = SimpleDelegator.new(1)
|
|
8
|
-
loaded = Psych.load(Psych.dump(sd))
|
|
9
|
-
|
|
10
|
-
assert_instance_of(SimpleDelegator, loaded)
|
|
11
|
-
assert_equal(sd, loaded)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
class PsychCustomMarshalable < BasicObject
|
|
15
|
-
attr_reader :foo
|
|
16
|
-
|
|
17
|
-
def initialize(foo)
|
|
18
|
-
@foo = foo
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def marshal_dump
|
|
22
|
-
[foo]
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def mashal_load(data)
|
|
26
|
-
@foo = data[0]
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def init_with(coder)
|
|
30
|
-
@foo = coder['foo']
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def encode_with(coder)
|
|
34
|
-
coder['foo'] = 2
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def respond_to?(method)
|
|
38
|
-
[:marshal_dump, :marshal_load, :init_with, :encode_with].include?(method)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def class
|
|
42
|
-
PsychCustomMarshalable
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def test_init_with_takes_priority_over_marshal_methods
|
|
47
|
-
obj = PsychCustomMarshalable.new(1)
|
|
48
|
-
loaded = Psych.load(Psych.dump(obj))
|
|
49
|
-
|
|
50
|
-
assert(PsychCustomMarshalable === loaded)
|
|
51
|
-
assert_equal(2, loaded.foo)
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|