psych 4.0.6 → 5.1.1.1
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/CONTRIBUTING.md +24 -0
- data/README.md +6 -5
- data/ext/psych/depend +13 -1
- data/ext/psych/extconf.rb +40 -30
- data/ext/psych/psych_parser.c +19 -33
- data/lib/psych/class_loader.rb +1 -1
- data/lib/psych/exception.rb +14 -0
- data/lib/psych/parser.rb +13 -0
- data/lib/psych/tree_builder.rb +2 -2
- data/lib/psych/versions.rb +2 -2
- data/lib/psych/visitors/to_ruby.rb +2 -2
- data/lib/psych/visitors/yaml_tree.rb +2 -2
- data/lib/psych.rb +24 -20
- metadata +7 -24
- data/.gitignore +0 -16
- data/Gemfile +0 -9
- data/Mavenfile +0 -7
- data/Rakefile +0 -41
- data/bin/console +0 -7
- data/bin/setup +0 -6
- data/ext/psych/yaml/LICENSE +0 -19
- data/ext/psych/yaml/api.c +0 -1393
- data/ext/psych/yaml/config.h +0 -80
- data/ext/psych/yaml/dumper.c +0 -394
- data/ext/psych/yaml/emitter.c +0 -2358
- data/ext/psych/yaml/loader.c +0 -544
- data/ext/psych/yaml/parser.c +0 -1375
- data/ext/psych/yaml/reader.c +0 -469
- data/ext/psych/yaml/scanner.c +0 -3598
- data/ext/psych/yaml/writer.c +0 -141
- data/ext/psych/yaml/yaml.h +0 -1985
- data/ext/psych/yaml/yaml_private.h +0 -688
- data/psych.gemspec +0 -69
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32a9f06b7fd5303a77be8b5954d03e5d0c4fc19bff5b22a7e2a68eabe57db15c
|
4
|
+
data.tar.gz: 41c8fd2459cf1ac9c2e3db8fce51e2b05a0fda1f3666ce18207d1afdd491d0e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5e68fc1f4b0698a3eda0e9faa74364058b73364c2adc074d22628d4a98066e04089bda4d81ea5e6aaa41bd7ee69db38dd56c74f7c383a2cdfe3ca1f92acb14b
|
7
|
+
data.tar.gz: 6d7ca78b6fb6d15c4de16c4c706d2520f55777497e5f967a9fe83b8c5bcd0ffdd29a6122bce320ab09b24ccc4c1d7863b50988f299cdbc164e4c9e6614834071
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
## How to contribute to Psych
|
2
|
+
|
3
|
+
Full details [here](https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute)
|
4
|
+
|
5
|
+
#### **Did you find a bug?**
|
6
|
+
|
7
|
+
* **Do not open an issue if the bug is a security vulnerability
|
8
|
+
in Psych**, instead refer to our [security policy](https://www.ruby-lang.org/en/security/) and email [here](security@ruby-lang.org).
|
9
|
+
|
10
|
+
* **Ensure the bug was not already reported** by searching on ruby-core, the ruby github repo and on Psych's github repo. More info [here](https://bugs.ruby-lang.org/projects/ruby/wiki/HowToReport)
|
11
|
+
|
12
|
+
* If you're unable to find an open issue addressing the problem, [open a new one](https://bugs.ruby-lang.org/). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
|
13
|
+
|
14
|
+
#### **Did you write a patch that fixes a bug?**
|
15
|
+
|
16
|
+
* Open a new GitHub pull request with the patch for small fixes. Anything larger look [here](https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute); submit a Feature.
|
17
|
+
|
18
|
+
* Ensure you clearly describe the problem and solution. Include the relevant ticket/issue number if applicable.
|
19
|
+
|
20
|
+
Psych is a volunteer effort. We encourage you to pitch in and [join the team](https://github.com/ruby/psych/contributors)!
|
21
|
+
|
22
|
+
Thanks! :heart: :heart: :heart:
|
23
|
+
|
24
|
+
The Psych Team
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Psych
|
2
2
|
|
3
3
|
* https://github.com/ruby/psych
|
4
|
+
* https://docs.ruby-lang.org/en/master/Psych.html
|
4
5
|
|
5
6
|
## Description
|
6
7
|
|
@@ -32,6 +33,11 @@ If you want a newer gem release of Psych, you can use rubygems:
|
|
32
33
|
|
33
34
|
gem install psych
|
34
35
|
|
36
|
+
|
37
|
+
Psych supported the static build with specific version of libyaml sources. You can build psych with libyaml-0.2.5 like this.
|
38
|
+
|
39
|
+
gem install psych -- --with-libyaml-source-dir=/path/to/libyaml-0.2.5
|
40
|
+
|
35
41
|
In order to use the gem release in your app, and not the stdlib version,
|
36
42
|
you'll need the following:
|
37
43
|
|
@@ -44,11 +50,6 @@ Or if you use Bundler add this to your `Gemfile`:
|
|
44
50
|
|
45
51
|
JRuby ships with a pure Java implementation of Psych.
|
46
52
|
|
47
|
-
If you're on Rubinius, Psych is available in 1.9 mode, please refer to the
|
48
|
-
Language Modes section of the [Rubinius
|
49
|
-
README](https://github.com/rubinius/rubinius#readme) for more information on
|
50
|
-
building and 1.9 mode.
|
51
|
-
|
52
53
|
## License
|
53
54
|
|
54
55
|
Copyright 2009 Aaron Patterson, et al.
|
data/ext/psych/depend
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
$(
|
1
|
+
$(TARGET_SO): $(LIBYAML)
|
2
|
+
|
3
|
+
libyaml $(LIBYAML):
|
4
|
+
cd libyaml && $(MAKE)
|
5
|
+
$(AR) $(ARFLAGS) $(LIBYAML) $(LIBYAML_OBJDIR)/*.$(OBJEXT)
|
6
|
+
$(RANLIB) $(LIBYAML)
|
7
|
+
|
8
|
+
clean-so::
|
9
|
+
-cd libyaml && $(MAKE) clean
|
10
|
+
|
11
|
+
distclean-so::
|
12
|
+
-cd libyaml && $(MAKE) distclean
|
13
|
+
-$(Q)$(RMDIRS) libyaml/* libyaml
|
2
14
|
|
3
15
|
$(OBJS): $(HDRS) $(ruby_headers) \
|
4
16
|
$(hdrdir)/ruby/encoding.h \
|
data/ext/psych/extconf.rb
CHANGED
@@ -1,43 +1,53 @@
|
|
1
1
|
# -*- coding: us-ascii -*-
|
2
2
|
# frozen_string_literal: true
|
3
3
|
require 'mkmf'
|
4
|
-
require 'fileutils'
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_library('yaml', 'yaml_get_version'))
|
11
|
-
# Embed libyaml since we could not find it.
|
12
|
-
|
13
|
-
$VPATH << "$(srcdir)/yaml"
|
14
|
-
$INCFLAGS << " -I$(srcdir)/yaml"
|
15
|
-
|
16
|
-
$srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map {|n| File.basename(n)}.sort
|
5
|
+
if $mswin or $mingw or $cygwin
|
6
|
+
$CPPFLAGS << " -DYAML_DECLARE_STATIC"
|
7
|
+
end
|
17
8
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
yaml_source = with_config("libyaml-source-dir")
|
10
|
+
if yaml_source
|
11
|
+
yaml_source = yaml_source.gsub(/\$\((\w+)\)|\$\{(\w+)\}/) {ENV[$1||$2]}
|
12
|
+
yaml_source = yaml_source.chomp("/")
|
13
|
+
yaml_configure = "#{File.expand_path(yaml_source)}/configure"
|
14
|
+
unless File.exist?(yaml_configure)
|
15
|
+
raise "Configure script not found in #{yaml_source.quote}"
|
22
16
|
end
|
23
17
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
18
|
+
puts("Configuring libyaml source in #{yaml_source.quote}")
|
19
|
+
yaml = "libyaml"
|
20
|
+
Dir.mkdir(yaml) unless File.directory?(yaml)
|
21
|
+
shared = $enable_shared || !$static
|
22
|
+
args = [
|
23
|
+
yaml_configure,
|
24
|
+
"--enable-#{shared ? 'shared' : 'static'}",
|
25
|
+
"--host=#{RbConfig::CONFIG['host'].sub(/-unknown-/, '-').sub(/arm64/, 'arm')}",
|
26
|
+
"CC=#{RbConfig::CONFIG['CC']}",
|
27
|
+
*(["CFLAGS=-w"] if RbConfig::CONFIG["GCC"] == "yes"),
|
28
|
+
]
|
29
|
+
puts(args.quote.join(' '))
|
30
|
+
unless system(*args, chdir: yaml)
|
31
|
+
raise "failed to configure libyaml"
|
32
|
+
end
|
33
|
+
inc = yaml_source.start_with?("#$srcdir/") ? "$(srcdir)#{yaml_source[$srcdir.size..-1]}" : yaml_source
|
34
|
+
$INCFLAGS << " -I#{yaml}/include -I#{inc}/include"
|
35
|
+
puts("INCFLAGS=#$INCFLAGS")
|
36
|
+
libyaml = "libyaml.#$LIBEXT"
|
37
|
+
$cleanfiles << libyaml
|
38
|
+
$LOCAL_LIBS.prepend("$(LIBYAML) ")
|
39
|
+
else # default to pre-installed libyaml
|
40
|
+
pkg_config('yaml-0.1')
|
41
|
+
dir_config('libyaml')
|
42
|
+
find_header('yaml.h') or abort "yaml.h not found"
|
43
|
+
find_library('yaml', 'yaml_get_version') or abort "libyaml not found"
|
37
44
|
end
|
38
45
|
|
39
46
|
create_makefile 'psych' do |mk|
|
40
|
-
mk << "
|
47
|
+
mk << "LIBYAML = #{libyaml}".strip << "\n"
|
48
|
+
mk << "LIBYAML_OBJDIR = libyaml/src#{shared ? '/.libs' : ''}\n"
|
49
|
+
mk << "OBJEXT = #$OBJEXT"
|
50
|
+
mk << "RANLIB = #{config_string('RANLIB') || config_string('NULLCMD')}\n"
|
41
51
|
end
|
42
52
|
|
43
53
|
# :startdoc:
|
data/ext/psych/psych_parser.c
CHANGED
@@ -79,21 +79,25 @@ static VALUE allocate(VALUE klass)
|
|
79
79
|
|
80
80
|
static VALUE make_exception(yaml_parser_t * parser, VALUE path)
|
81
81
|
{
|
82
|
-
|
83
|
-
|
82
|
+
if (parser->error == YAML_MEMORY_ERROR) {
|
83
|
+
return rb_eNoMemError;
|
84
|
+
} else {
|
85
|
+
size_t line, column;
|
86
|
+
VALUE ePsychSyntaxError;
|
84
87
|
|
85
|
-
|
86
|
-
|
88
|
+
line = parser->context_mark.line + 1;
|
89
|
+
column = parser->context_mark.column + 1;
|
87
90
|
|
88
|
-
|
91
|
+
ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
|
89
92
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
return rb_funcall(ePsychSyntaxError, rb_intern("new"), 6,
|
94
|
+
path,
|
95
|
+
SIZET2NUM(line),
|
96
|
+
SIZET2NUM(column),
|
97
|
+
SIZET2NUM(parser->problem_offset),
|
98
|
+
parser->problem ? rb_usascii_str_new2(parser->problem) : Qnil,
|
99
|
+
parser->context ? rb_usascii_str_new2(parser->context) : Qnil);
|
100
|
+
}
|
97
101
|
}
|
98
102
|
|
99
103
|
static VALUE transcode_string(VALUE src, int * parser_encoding)
|
@@ -241,18 +245,8 @@ static VALUE protected_event_location(VALUE pointer)
|
|
241
245
|
return rb_funcall3(args[0], id_event_location, 4, args + 1);
|
242
246
|
}
|
243
247
|
|
244
|
-
|
245
|
-
* call-seq:
|
246
|
-
* parser.parse(yaml)
|
247
|
-
*
|
248
|
-
* Parse the YAML document contained in +yaml+. Events will be called on
|
249
|
-
* the handler set on the parser instance.
|
250
|
-
*
|
251
|
-
* See Psych::Parser and Psych::Parser#handler
|
252
|
-
*/
|
253
|
-
static VALUE parse(int argc, VALUE *argv, VALUE self)
|
248
|
+
static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
|
254
249
|
{
|
255
|
-
VALUE yaml, path;
|
256
250
|
yaml_parser_t * parser;
|
257
251
|
yaml_event_t event;
|
258
252
|
int done = 0;
|
@@ -260,14 +254,6 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
260
254
|
int parser_encoding = YAML_ANY_ENCODING;
|
261
255
|
int encoding = rb_utf8_encindex();
|
262
256
|
rb_encoding * internal_enc = rb_default_internal_encoding();
|
263
|
-
VALUE handler = rb_iv_get(self, "@handler");
|
264
|
-
|
265
|
-
if (rb_scan_args(argc, argv, "11", &yaml, &path) == 1) {
|
266
|
-
if(rb_respond_to(yaml, id_path))
|
267
|
-
path = rb_funcall(yaml, id_path, 0);
|
268
|
-
else
|
269
|
-
path = rb_str_new2("<unknown>");
|
270
|
-
}
|
271
257
|
|
272
258
|
TypedData_Get_Struct(self, yaml_parser_t, &psych_parser_type, parser);
|
273
259
|
|
@@ -293,7 +279,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
293
279
|
VALUE event_args[5];
|
294
280
|
VALUE start_line, start_column, end_line, end_column;
|
295
281
|
|
296
|
-
if(!yaml_parser_parse(parser, &event)) {
|
282
|
+
if(parser->error || !yaml_parser_parse(parser, &event)) {
|
297
283
|
VALUE exception;
|
298
284
|
|
299
285
|
exception = make_exception(parser, path);
|
@@ -558,7 +544,7 @@ void Init_psych_parser(void)
|
|
558
544
|
|
559
545
|
rb_require("psych/syntax_error");
|
560
546
|
|
561
|
-
|
547
|
+
rb_define_private_method(cPsychParser, "_native_parse", parse, 3);
|
562
548
|
rb_define_method(cPsychParser, "mark", mark, 0);
|
563
549
|
|
564
550
|
id_read = rb_intern("read");
|
data/lib/psych/class_loader.rb
CHANGED
data/lib/psych/exception.rb
CHANGED
@@ -6,6 +6,20 @@ module Psych
|
|
6
6
|
class BadAlias < Exception
|
7
7
|
end
|
8
8
|
|
9
|
+
# Subclasses `BadAlias` for backwards compatibility
|
10
|
+
class AliasesNotEnabled < BadAlias
|
11
|
+
def initialize
|
12
|
+
super "Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`."
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
# Subclasses `BadAlias` for backwards compatibility
|
17
|
+
class AnchorNotDefined < BadAlias
|
18
|
+
def initialize anchor_name
|
19
|
+
super "An alias referenced an unknown anchor: #{anchor_name}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
9
23
|
class DisallowedClass < Exception
|
10
24
|
def initialize action, klass_name
|
11
25
|
super "Tried to #{action} unspecified class: #{klass_name}"
|
data/lib/psych/parser.rb
CHANGED
@@ -48,5 +48,18 @@ module Psych
|
|
48
48
|
@handler = handler
|
49
49
|
@external_encoding = ANY
|
50
50
|
end
|
51
|
+
|
52
|
+
###
|
53
|
+
# call-seq:
|
54
|
+
# parser.parse(yaml)
|
55
|
+
#
|
56
|
+
# Parse the YAML document contained in +yaml+. Events will be called on
|
57
|
+
# the handler set on the parser instance.
|
58
|
+
#
|
59
|
+
# See Psych::Parser and Psych::Parser#handler
|
60
|
+
|
61
|
+
def parse yaml, path = yaml.respond_to?(:path) ? yaml.path : "<unknown>"
|
62
|
+
_native_parse @handler, yaml, path
|
63
|
+
end
|
51
64
|
end
|
52
65
|
end
|
data/lib/psych/tree_builder.rb
CHANGED
@@ -41,7 +41,7 @@ module Psych
|
|
41
41
|
Sequence
|
42
42
|
Mapping
|
43
43
|
}.each do |node|
|
44
|
-
class_eval
|
44
|
+
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
45
45
|
def start_#{node.downcase}(anchor, tag, implicit, style)
|
46
46
|
n = Nodes::#{node}.new(anchor, tag, implicit, style)
|
47
47
|
set_start_location(n)
|
@@ -54,7 +54,7 @@ module Psych
|
|
54
54
|
set_end_location(n)
|
55
55
|
n
|
56
56
|
end
|
57
|
-
|
57
|
+
RUBY
|
58
58
|
end
|
59
59
|
|
60
60
|
###
|
data/lib/psych/versions.rb
CHANGED
@@ -325,7 +325,7 @@ module Psych
|
|
325
325
|
end
|
326
326
|
|
327
327
|
def visit_Psych_Nodes_Alias o
|
328
|
-
@st.fetch(o.anchor) { raise
|
328
|
+
@st.fetch(o.anchor) { raise AnchorNotDefined, o.anchor }
|
329
329
|
end
|
330
330
|
|
331
331
|
private
|
@@ -429,7 +429,7 @@ module Psych
|
|
429
429
|
|
430
430
|
class NoAliasRuby < ToRuby
|
431
431
|
def visit_Psych_Nodes_Alias o
|
432
|
-
raise
|
432
|
+
raise AliasesNotEnabled
|
433
433
|
end
|
434
434
|
end
|
435
435
|
end
|
@@ -568,7 +568,7 @@ module Psych
|
|
568
568
|
raise BadAlias, "Tried to dump an aliased object"
|
569
569
|
end
|
570
570
|
|
571
|
-
unless @permitted_classes[target.class]
|
571
|
+
unless Symbol === target || @permitted_classes[target.class]
|
572
572
|
raise DisallowedClass.new('dump', target.class.name || target.class.inspect)
|
573
573
|
end
|
574
574
|
|
@@ -576,7 +576,7 @@ module Psych
|
|
576
576
|
end
|
577
577
|
|
578
578
|
def visit_Symbol sym
|
579
|
-
unless @permitted_symbols[sym]
|
579
|
+
unless @permitted_classes[Symbol] || @permitted_symbols[sym]
|
580
580
|
raise DisallowedClass.new('dump', "Symbol(#{sym.inspect})")
|
581
581
|
end
|
582
582
|
|
data/lib/psych.rb
CHANGED
@@ -307,7 +307,7 @@ module Psych
|
|
307
307
|
# A Psych::DisallowedClass exception will be raised if the yaml contains a
|
308
308
|
# class that isn't in the +permitted_classes+ list.
|
309
309
|
#
|
310
|
-
# A Psych::
|
310
|
+
# A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases
|
311
311
|
# but the +aliases+ keyword argument is set to false.
|
312
312
|
#
|
313
313
|
# +filename+ will be used in the exception message if any exception is raised
|
@@ -694,26 +694,8 @@ module Psych
|
|
694
694
|
dump_tags[klass] = tag
|
695
695
|
end
|
696
696
|
|
697
|
-
# Workaround for emulating `warn '...', uplevel: 1` in Ruby 2.4 or lower.
|
698
|
-
def self.warn_with_uplevel(message, uplevel: 1)
|
699
|
-
at = parse_caller(caller[uplevel]).join(':')
|
700
|
-
warn "#{at}: #{message}"
|
701
|
-
end
|
702
|
-
|
703
|
-
def self.parse_caller(at)
|
704
|
-
if /^(.+?):(\d+)(?::in `.*')?/ =~ at
|
705
|
-
file = $1
|
706
|
-
line = $2.to_i
|
707
|
-
[file, line]
|
708
|
-
end
|
709
|
-
end
|
710
|
-
private_class_method :warn_with_uplevel, :parse_caller
|
711
|
-
|
712
697
|
class << self
|
713
698
|
if defined?(Ractor)
|
714
|
-
require 'forwardable'
|
715
|
-
extend Forwardable
|
716
|
-
|
717
699
|
class Config
|
718
700
|
attr_accessor :load_tags, :dump_tags, :domain_types
|
719
701
|
def initialize
|
@@ -727,7 +709,29 @@ module Psych
|
|
727
709
|
Ractor.current[:PsychConfig] ||= Config.new
|
728
710
|
end
|
729
711
|
|
730
|
-
|
712
|
+
def load_tags
|
713
|
+
config.load_tags
|
714
|
+
end
|
715
|
+
|
716
|
+
def dump_tags
|
717
|
+
config.dump_tags
|
718
|
+
end
|
719
|
+
|
720
|
+
def domain_types
|
721
|
+
config.domain_types
|
722
|
+
end
|
723
|
+
|
724
|
+
def load_tags=(value)
|
725
|
+
config.load_tags = value
|
726
|
+
end
|
727
|
+
|
728
|
+
def dump_tags=(value)
|
729
|
+
config.dump_tags = value
|
730
|
+
end
|
731
|
+
|
732
|
+
def domain_types=(value)
|
733
|
+
config.domain_types = value
|
734
|
+
end
|
731
735
|
else
|
732
736
|
attr_accessor :load_tags
|
733
737
|
attr_accessor :dump_tags
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: psych
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-10-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: stringio
|
@@ -40,14 +40,9 @@ extensions:
|
|
40
40
|
extra_rdoc_files:
|
41
41
|
- README.md
|
42
42
|
files:
|
43
|
-
-
|
44
|
-
- Gemfile
|
43
|
+
- CONTRIBUTING.md
|
45
44
|
- LICENSE
|
46
|
-
- Mavenfile
|
47
45
|
- README.md
|
48
|
-
- Rakefile
|
49
|
-
- bin/console
|
50
|
-
- bin/setup
|
51
46
|
- ext/psych/depend
|
52
47
|
- ext/psych/extconf.rb
|
53
48
|
- ext/psych/psych.c
|
@@ -60,18 +55,6 @@ files:
|
|
60
55
|
- ext/psych/psych_to_ruby.h
|
61
56
|
- ext/psych/psych_yaml_tree.c
|
62
57
|
- ext/psych/psych_yaml_tree.h
|
63
|
-
- ext/psych/yaml/LICENSE
|
64
|
-
- ext/psych/yaml/api.c
|
65
|
-
- ext/psych/yaml/config.h
|
66
|
-
- ext/psych/yaml/dumper.c
|
67
|
-
- ext/psych/yaml/emitter.c
|
68
|
-
- ext/psych/yaml/loader.c
|
69
|
-
- ext/psych/yaml/parser.c
|
70
|
-
- ext/psych/yaml/reader.c
|
71
|
-
- ext/psych/yaml/scanner.c
|
72
|
-
- ext/psych/yaml/writer.c
|
73
|
-
- ext/psych/yaml/yaml.h
|
74
|
-
- ext/psych/yaml/yaml_private.h
|
75
58
|
- lib/psych.rb
|
76
59
|
- lib/psych/class_loader.rb
|
77
60
|
- lib/psych/coder.rb
|
@@ -109,11 +92,11 @@ files:
|
|
109
92
|
- lib/psych/visitors/visitor.rb
|
110
93
|
- lib/psych/visitors/yaml_tree.rb
|
111
94
|
- lib/psych/y.rb
|
112
|
-
- psych.gemspec
|
113
95
|
homepage: https://github.com/ruby/psych
|
114
96
|
licenses:
|
115
97
|
- MIT
|
116
|
-
metadata:
|
98
|
+
metadata:
|
99
|
+
msys2_mingw_dependencies: libyaml
|
117
100
|
post_install_message:
|
118
101
|
rdoc_options:
|
119
102
|
- "--main"
|
@@ -124,14 +107,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
107
|
requirements:
|
125
108
|
- - ">="
|
126
109
|
- !ruby/object:Gem::Version
|
127
|
-
version: 2.
|
110
|
+
version: 2.5.0
|
128
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
112
|
requirements:
|
130
113
|
- - ">="
|
131
114
|
- !ruby/object:Gem::Version
|
132
115
|
version: '0'
|
133
116
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
117
|
+
rubygems_version: 3.5.0.dev
|
135
118
|
signing_key:
|
136
119
|
specification_version: 4
|
137
120
|
summary: Psych is a YAML parser and emitter
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Mavenfile
DELETED
data/Rakefile
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require "bundler"
|
2
|
-
Bundler::GemHelper.install_tasks
|
3
|
-
|
4
|
-
require "rake/testtask"
|
5
|
-
Rake::TestTask.new(:test) do |t|
|
6
|
-
t.libs << "test/lib" << "test"
|
7
|
-
t.ruby_opts << "-rhelper"
|
8
|
-
t.test_files = FileList['test/**/test_*.rb']
|
9
|
-
t.verbose = true
|
10
|
-
t.warning = true
|
11
|
-
end
|
12
|
-
|
13
|
-
if RUBY_PLATFORM =~ /java/
|
14
|
-
require 'rake/javaextensiontask'
|
15
|
-
Rake::JavaExtensionTask.new("psych") do |ext|
|
16
|
-
require 'maven/ruby/maven'
|
17
|
-
# force load of versions to overwrite constants with values from repo.
|
18
|
-
load './lib/psych/versions.rb'
|
19
|
-
# uses Mavenfile to write classpath into pkg/classpath
|
20
|
-
# and tell maven via system properties the snakeyaml version
|
21
|
-
# this is basically the same as running from the commandline:
|
22
|
-
# rmvn dependency:build-classpath -Dsnakeyaml.version='use version from Psych::DEFAULT_SNAKEYAML_VERSION here'
|
23
|
-
Maven::Ruby::Maven.new.exec('dependency:build-classpath', "-Dsnakeyaml.version=#{Psych::DEFAULT_SNAKEYAML_VERSION}", '-Dverbose=true')
|
24
|
-
ext.source_version = '1.7'
|
25
|
-
ext.target_version = '1.7'
|
26
|
-
ext.classpath = File.read('pkg/classpath')
|
27
|
-
ext.ext_dir = 'ext/java'
|
28
|
-
end
|
29
|
-
else
|
30
|
-
require 'rake/extensiontask'
|
31
|
-
Rake::ExtensionTask.new("psych")
|
32
|
-
end
|
33
|
-
|
34
|
-
task :sync_tool do
|
35
|
-
require 'fileutils'
|
36
|
-
FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
|
37
|
-
FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
|
38
|
-
FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
|
39
|
-
end
|
40
|
-
|
41
|
-
task :default => [:compile, :test]
|
data/bin/console
DELETED
data/bin/setup
DELETED
data/ext/psych/yaml/LICENSE
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
Copyright (c) 2006 Kirill Simonov
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4
|
-
this software and associated documentation files (the "Software"), to deal in
|
5
|
-
the Software without restriction, including without limitation the rights to
|
6
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
7
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
8
|
-
so, subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in all
|
11
|
-
copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
-
SOFTWARE.
|