psych 2.0.12 → 5.2.3
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 +5 -5
- data/CONTRIBUTING.md +24 -0
- data/{ext/psych/yaml/LICENSE → LICENSE} +9 -7
- data/README.md +80 -0
- data/ext/psych/depend +14 -0
- data/ext/psych/extconf.rb +43 -28
- data/ext/psych/psych.c +6 -4
- data/ext/psych/psych.h +0 -3
- data/ext/psych/psych_emitter.c +165 -132
- data/ext/psych/psych_parser.c +298 -331
- data/ext/psych/psych_to_ruby.c +0 -5
- data/ext/psych/psych_yaml_tree.c +0 -13
- data/lib/psych/class_loader.rb +11 -8
- data/lib/psych/coder.rb +1 -0
- data/lib/psych/core_ext.rb +3 -19
- data/lib/psych/exception.rb +17 -2
- data/lib/psych/handler.rb +8 -2
- data/lib/psych/handlers/document_stream.rb +2 -1
- data/lib/psych/handlers/recorder.rb +2 -1
- data/lib/psych/json/ruby_events.rb +1 -0
- data/lib/psych/json/stream.rb +3 -2
- data/lib/psych/json/tree_builder.rb +2 -1
- data/lib/psych/json/yaml_events.rb +1 -0
- data/lib/psych/nodes/alias.rb +3 -0
- data/lib/psych/nodes/document.rb +3 -0
- data/lib/psych/nodes/mapping.rb +3 -0
- data/lib/psych/nodes/node.rb +25 -5
- data/lib/psych/nodes/scalar.rb +4 -1
- data/lib/psych/nodes/sequence.rb +3 -0
- data/lib/psych/nodes/stream.rb +3 -0
- data/lib/psych/nodes.rb +8 -7
- data/lib/psych/omap.rb +1 -0
- data/lib/psych/parser.rb +14 -0
- data/lib/psych/scalar_scanner.rb +41 -49
- 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 +2 -1
- data/lib/psych/tree_builder.rb +48 -7
- data/lib/psych/versions.rb +10 -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 +2 -1
- data/lib/psych/visitors/to_ruby.rb +64 -33
- data/lib/psych/visitors/visitor.rb +18 -3
- data/lib/psych/visitors/yaml_tree.rb +128 -149
- data/lib/psych/visitors.rb +7 -6
- data/lib/psych/y.rb +1 -0
- data/lib/psych.rb +360 -95
- metadata +36 -169
- data/.autotest +0 -18
- data/.gemtest +0 -0
- data/.travis.yml +0 -11
- data/CHANGELOG.rdoc +0 -562
- data/Manifest.txt +0 -112
- data/README.rdoc +0 -71
- data/Rakefile +0 -74
- data/ext/psych/yaml/api.c +0 -1415
- data/ext/psych/yaml/config.h +0 -10
- data/ext/psych/yaml/dumper.c +0 -394
- data/ext/psych/yaml/emitter.c +0 -2329
- data/ext/psych/yaml/loader.c +0 -459
- data/ext/psych/yaml/parser.c +0 -1370
- data/ext/psych/yaml/reader.c +0 -469
- data/ext/psych/yaml/scanner.c +0 -3583
- data/ext/psych/yaml/writer.c +0 -141
- data/ext/psych/yaml/yaml.h +0 -1971
- data/ext/psych/yaml/yaml_private.h +0 -664
- data/lib/psych/deprecated.rb +0 -85
- data/test/psych/handlers/test_recorder.rb +0 -25
- data/test/psych/helper.rb +0 -114
- data/test/psych/json/test_stream.rb +0 -109
- data/test/psych/nodes/test_enumerable.rb +0 -43
- data/test/psych/test_alias_and_anchor.rb +0 -96
- data/test/psych/test_array.rb +0 -57
- data/test/psych/test_boolean.rb +0 -36
- data/test/psych/test_class.rb +0 -36
- data/test/psych/test_coder.rb +0 -184
- data/test/psych/test_date_time.rb +0 -38
- data/test/psych/test_deprecated.rb +0 -214
- data/test/psych/test_document.rb +0 -46
- data/test/psych/test_emitter.rb +0 -93
- data/test/psych/test_encoding.rb +0 -259
- data/test/psych/test_exception.rb +0 -157
- data/test/psych/test_hash.rb +0 -94
- data/test/psych/test_json_tree.rb +0 -65
- data/test/psych/test_marshalable.rb +0 -54
- data/test/psych/test_merge_keys.rb +0 -180
- data/test/psych/test_nil.rb +0 -18
- data/test/psych/test_null.rb +0 -19
- data/test/psych/test_numeric.rb +0 -45
- data/test/psych/test_object.rb +0 -44
- data/test/psych/test_object_references.rb +0 -71
- data/test/psych/test_omap.rb +0 -75
- data/test/psych/test_parser.rb +0 -339
- data/test/psych/test_psych.rb +0 -168
- data/test/psych/test_safe_load.rb +0 -97
- data/test/psych/test_scalar.rb +0 -11
- data/test/psych/test_scalar_scanner.rb +0 -106
- data/test/psych/test_serialize_subclasses.rb +0 -38
- data/test/psych/test_set.rb +0 -49
- data/test/psych/test_stream.rb +0 -93
- data/test/psych/test_string.rb +0 -226
- data/test/psych/test_struct.rb +0 -49
- data/test/psych/test_symbol.rb +0 -25
- data/test/psych/test_tainted.rb +0 -130
- data/test/psych/test_to_yaml_properties.rb +0 -63
- data/test/psych/test_tree_builder.rb +0 -79
- data/test/psych/test_yaml.rb +0 -1288
- data/test/psych/test_yamldbm.rb +0 -193
- data/test/psych/test_yamlstore.rb +0 -85
- data/test/psych/visitors/test_depth_first.rb +0 -49
- data/test/psych/visitors/test_emitter.rb +0 -144
- data/test/psych/visitors/test_to_ruby.rb +0 -326
- data/test/psych/visitors/test_yaml_tree.rb +0 -173
data/README.rdoc
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
= Psych
|
2
|
-
|
3
|
-
* http://github.com/tenderlove/psych
|
4
|
-
|
5
|
-
== Description
|
6
|
-
|
7
|
-
Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]
|
8
|
-
for its YAML parsing and emitting capabilities. In addition to wrapping
|
9
|
-
libyaml, Psych also knows how to serialize and de-serialize most Ruby objects
|
10
|
-
to and from the YAML format.
|
11
|
-
|
12
|
-
== Examples
|
13
|
-
|
14
|
-
# Load YAML in to a Ruby object
|
15
|
-
Psych.load('--- foo') # => 'foo'
|
16
|
-
|
17
|
-
# Emit YAML from a Ruby object
|
18
|
-
Psych.dump("foo") # => "--- foo\n...\n"
|
19
|
-
|
20
|
-
== Dependencies
|
21
|
-
|
22
|
-
* libyaml
|
23
|
-
|
24
|
-
== Installation
|
25
|
-
|
26
|
-
Psych has been included with MRI since 1.9.2,
|
27
|
-
and is the default YAML parser in 1.9.3.
|
28
|
-
|
29
|
-
If you want a newer gem release of Psych, you can use rubygems:
|
30
|
-
|
31
|
-
gem install psych
|
32
|
-
|
33
|
-
In order to use the gem release in your app,
|
34
|
-
and not the stdlib version, you'll need the following:
|
35
|
-
|
36
|
-
gem 'psych'
|
37
|
-
require 'psych'
|
38
|
-
|
39
|
-
Or if you use Bundler add this to your +Gemfile+:
|
40
|
-
|
41
|
-
gem 'psych'
|
42
|
-
|
43
|
-
JRuby ships with a pure Java implementation of Psych.
|
44
|
-
|
45
|
-
If you're on Rubinius, Psych is available in 1.9 mode, please refer to the
|
46
|
-
Language Modes section of the {Rubinius
|
47
|
-
README}[https://github.com/rubinius/rubinius#readme] for more information on
|
48
|
-
building and 1.9 mode.
|
49
|
-
|
50
|
-
== License
|
51
|
-
|
52
|
-
Copyright 2009 Aaron Patterson, et al.
|
53
|
-
|
54
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
55
|
-
a copy of this software and associated documentation files (the
|
56
|
-
'Software'), to deal in the Software without restriction, including
|
57
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
58
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
59
|
-
permit persons to whom the Software is furnished to do so, subject to
|
60
|
-
the following conditions:
|
61
|
-
|
62
|
-
The above copyright notice and this permission notice shall be
|
63
|
-
included in all copies or substantial portions of the Software.
|
64
|
-
|
65
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
66
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
67
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
68
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
69
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
70
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
71
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'hoe'
|
5
|
-
|
6
|
-
class Hoe
|
7
|
-
remove_const :RUBY_FLAGS
|
8
|
-
RUBY_FLAGS = "-I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}"
|
9
|
-
end
|
10
|
-
|
11
|
-
gem 'rake-compiler', '>= 0.4.1'
|
12
|
-
gem 'minitest', '~> 4.0'
|
13
|
-
require "rake/extensiontask"
|
14
|
-
|
15
|
-
Hoe.plugin :doofus, :git, :gemspec
|
16
|
-
|
17
|
-
$hoe = Hoe.spec 'psych' do
|
18
|
-
license 'MIT'
|
19
|
-
developer 'Aaron Patterson', 'aaron@tenderlovemaking.com'
|
20
|
-
|
21
|
-
self.extra_rdoc_files = Dir['*.rdoc']
|
22
|
-
self.history_file = 'CHANGELOG.rdoc'
|
23
|
-
self.readme_file = 'README.rdoc'
|
24
|
-
self.testlib = :minitest
|
25
|
-
|
26
|
-
extra_dev_deps << ['rake-compiler', '>= 0.4.1']
|
27
|
-
extra_dev_deps << ['minitest', '~> 4.0']
|
28
|
-
|
29
|
-
self.spec_extras = {
|
30
|
-
:extensions => ["ext/psych/extconf.rb"],
|
31
|
-
:required_ruby_version => '>= 1.9.2'
|
32
|
-
}
|
33
|
-
|
34
|
-
Rake::ExtensionTask.new "psych", spec do |ext|
|
35
|
-
ext.lib_dir = File.join(*['lib', ENV['FAT_DIR']].compact)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
Hoe.add_include_dirs('.:lib/psych')
|
40
|
-
|
41
|
-
task :test => :compile
|
42
|
-
|
43
|
-
task :hack_spec do
|
44
|
-
$hoe.spec.extra_rdoc_files.clear
|
45
|
-
end
|
46
|
-
task 'core:spec' => [:hack_spec, 'gem:spec']
|
47
|
-
|
48
|
-
desc "merge psych in to ruby trunk"
|
49
|
-
namespace :merge do
|
50
|
-
basedir = File.expand_path File.dirname __FILE__
|
51
|
-
rubydir = File.join ENV['HOME'], 'git', 'ruby'
|
52
|
-
mergedirs = {
|
53
|
-
# From # To
|
54
|
-
[basedir, 'ext', 'psych/'] => [rubydir, 'ext', 'psych/'],
|
55
|
-
[basedir, 'lib/'] => [rubydir, 'ext', 'psych', 'lib/'],
|
56
|
-
[basedir, 'test', 'psych/'] => [rubydir, 'test', 'psych/'],
|
57
|
-
}
|
58
|
-
|
59
|
-
rsync = 'rsync -av --exclude lib --exclude ".*" --exclude "*.o" --exclude Makefile --exclude mkmf.log --delete'
|
60
|
-
|
61
|
-
task :to_ruby do
|
62
|
-
mergedirs.each do |from, to|
|
63
|
-
sh "#{rsync} #{File.join(*from)} #{File.join(*to)}"
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
task :from_ruby do
|
68
|
-
mergedirs.each do |from, to|
|
69
|
-
sh "#{rsync} #{File.join(*to)} #{File.join(*from)}"
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
# vim: syntax=ruby
|