psych 3.0.2 → 3.0.3.pre1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15f0e452b66e7f48f1a879686e22126cdacd1a78367ccb4f8b478f8b5137ff06
4
- data.tar.gz: 520db0e8d7f25630c313484cb17cb69df3c68178de00100ec266fd11646d0d31
3
+ metadata.gz: e6289548b1232473ce5f8a09a247bd5852009fe67926591c26d34d55f3783199
4
+ data.tar.gz: 69d6c0797c153e9b0e8b0641c9ed391e0dafcfd032fb29bbf1a7a4f2b2612ac6
5
5
  SHA512:
6
- metadata.gz: 4335f8ce7d2cbb4ad12d65e0649185e384c64aebf8a78924fd87929979922ba44a95af0dc545c07b9074dc5320d47ff82d47464100bb8cff3ac89a48cd0f34e0
7
- data.tar.gz: 3fc3d9273d4e441299936fd021bce4ac94a69a2762daf7fc57b9f51af726f289cf360526544a531d550872a660df728503af17e2590897adaf243cda57b67a57
6
+ metadata.gz: 33d7b0b70c581f06800ededac04be8932548987a35455287a539431b2886c65022d62ddaedc6dd43109c4cb080a10d0ad9dbdfefc8106fc1d3e59b2aa04486cb
7
+ data.tar.gz: c6006d90bdf64acb584150b5249f4dd706789ff9aa6ff43aeb79f717ae76bc3f722dd187fe8373fc159d0b5adab64f43328e9e1e9d2289c0bfa65dae9dec9fc3
data/README.md CHANGED
@@ -14,11 +14,13 @@ serialize and de-serialize most Ruby objects to and from the YAML format.
14
14
 
15
15
  ## Examples
16
16
 
17
- # Load YAML in to a Ruby object
18
- Psych.load('--- foo') # => 'foo'
17
+ ```ruby
18
+ # Load YAML in to a Ruby object
19
+ Psych.load('--- foo') # => 'foo'
19
20
 
20
- # Emit YAML from a Ruby object
21
- Psych.dump("foo") # => "--- foo\n...\n"
21
+ # Emit YAML from a Ruby object
22
+ Psych.dump("foo") # => "--- foo\n...\n"
23
+ ```
22
24
 
23
25
  ## Dependencies
24
26
 
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ if RUBY_PLATFORM =~ /java/
18
18
  # and tell maven via system properties the snakeyaml version
19
19
  # this is basically the same as running from the commandline:
20
20
  # rmvn dependency:build-classpath -Dsnakeyaml.version='use version from Psych::DEFAULT_SNAKEYAML_VERSION here'
21
- Maven::Ruby::Maven.new.exec('dependency:build-classpath', "-Dsnakeyaml.version=1.18", '-Dverbose=true')
21
+ Maven::Ruby::Maven.new.exec('dependency:build-classpath', "-Dsnakeyaml.version=1.21", '-Dverbose=true')
22
22
  ext.source_version = '1.7'
23
23
  ext.target_version = '1.7'
24
24
  ext.classpath = File.read('pkg/classpath')
@@ -521,6 +521,7 @@ static VALUE set_line_width(VALUE self, VALUE width)
521
521
 
522
522
  void Init_psych_emitter(void)
523
523
  {
524
+ #undef rb_intern
524
525
  VALUE psych = rb_define_module("Psych");
525
526
  VALUE handler = rb_define_class_under(psych, "Handler", rb_cObject);
526
527
  cPsychEmitter = rb_define_class_under(psych, "Emitter", handler);
@@ -548,6 +548,7 @@ static VALUE mark(VALUE self)
548
548
 
549
549
  void Init_psych_parser(void)
550
550
  {
551
+ #undef rb_intern
551
552
  #if 0
552
553
  mPsych = rb_define_module("Psych");
553
554
  #endif
@@ -418,6 +418,24 @@ module Psych
418
418
  # to control the output format. If an IO object is passed in, the YAML will
419
419
  # be dumped to that IO object.
420
420
  #
421
+ # Currently supported options are:
422
+ #
423
+ # [<tt>:indentation</tt>] Number of space characters used to indent.
424
+ # Acceptable value should be in <tt>0..9</tt> range,
425
+ # otherwise option is ignored.
426
+ #
427
+ # Default: <tt>2</tt>.
428
+ # [<tt>:line_width</tt>] Max character to wrap line at.
429
+ #
430
+ # Default: <tt>0</tt> (meaning "wrap at 81").
431
+ # [<tt>:canonical</tt>] Write "canonical" YAML form (very verbose, yet
432
+ # strictly formal).
433
+ #
434
+ # Default: <tt>false</tt>.
435
+ # [<tt>:header</tt>] Write <tt>%YAML [version]</tt> at the beginning of document.
436
+ #
437
+ # Default: <tt>false</tt>.
438
+ #
421
439
  # Example:
422
440
  #
423
441
  # # Dump an array, get back a YAML string
@@ -427,10 +445,10 @@ module Psych
427
445
  # Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
428
446
  #
429
447
  # # Dump an array with indentation set
430
- # Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n"
448
+ # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n"
431
449
  #
432
450
  # # Dump an array to an IO with indentation set
433
- # Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
451
+ # Psych.dump(['a', ['b']], StringIO.new, indentation: 3)
434
452
  def self.dump o, io = nil, options = {}
435
453
  if Hash === io
436
454
  options = io
@@ -492,7 +510,7 @@ module Psych
492
510
  ###
493
511
  # Load the document contained in +filename+. Returns the yaml contained in
494
512
  # +filename+ as a Ruby object, or if the file is empty, it returns
495
- # the specified default return value, which defaults to an empty Hash
513
+ # the specified +fallback+ return value, which defaults to +false+.
496
514
  def self.load_file filename, fallback: false
497
515
  File.open(filename, 'r:bom|utf-8') { |f|
498
516
  self.load f, filename, fallback: FALLBACK.new(fallback)
@@ -14,6 +14,8 @@ module Psych
14
14
  def initialize anchor
15
15
  @anchor = anchor
16
16
  end
17
+
18
+ def alias?; true; end
17
19
  end
18
20
  end
19
21
  end
@@ -56,6 +56,8 @@ module Psych
56
56
  def root
57
57
  children.first
58
58
  end
59
+
60
+ def document?; true; end
59
61
  end
60
62
  end
61
63
  end
@@ -52,6 +52,8 @@ module Psych
52
52
  @implicit = implicit
53
53
  @style = style
54
54
  end
55
+
56
+ def mapping?; true; end
55
57
  end
56
58
  end
57
59
  end
@@ -63,6 +63,13 @@ module Psych
63
63
  io
64
64
  end
65
65
  alias :to_yaml :yaml
66
+
67
+ def alias?; false; end
68
+ def document?; false; end
69
+ def mapping?; false; end
70
+ def scalar?; false; end
71
+ def sequence?; false; end
72
+ def stream?; false; end
66
73
  end
67
74
  end
68
75
  end
@@ -63,6 +63,8 @@ module Psych
63
63
  @quoted = quoted
64
64
  @style = style
65
65
  end
66
+
67
+ def scalar?; true; end
66
68
  end
67
69
  end
68
70
  end
@@ -77,6 +77,8 @@ module Psych
77
77
  @implicit = implicit
78
78
  @style = style
79
79
  end
80
+
81
+ def sequence?; true; end
80
82
  end
81
83
  end
82
84
  end
@@ -33,6 +33,8 @@ module Psych
33
33
  super()
34
34
  @encoding = encoding
35
35
  end
36
+
37
+ def stream?; true; end
36
38
  end
37
39
  end
38
40
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
  module Psych
3
3
  # The version is Psych you're using
4
- VERSION = '3.0.2'
4
+ VERSION = '3.0.3.pre1'
5
5
 
6
6
  if RUBY_ENGINE == 'jruby'
7
- DEFAULT_SNAKEYAML_VERSION = '1.18'.freeze
7
+ DEFAULT_SNAKEYAML_VERSION = '1.21'.freeze
8
8
  end
9
9
  end
@@ -3,10 +3,9 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "psych"
6
- s.version = "3.0.2"
6
+ s.version = "3.0.3.pre1"
7
7
  s.authors = ["Aaron Patterson", "SHIBATA Hiroshi", "Charles Oliver Nutter"]
8
8
  s.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org", "headius@headius.com"]
9
- s.date = "2017-12-04"
10
9
  s.summary = "Psych is a YAML parser and emitter"
11
10
  s.description = <<-DESCRIPTION
12
11
  Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]
@@ -20,7 +19,7 @@ DESCRIPTION
20
19
  # for ruby core repository. It was generated by `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
20
  s.files = [
22
21
  ".gitignore", ".travis.yml", "CHANGELOG.rdoc", "Gemfile", "Mavenfile", "README.md", "Rakefile", "bin/console",
23
- "bin/setup", "ext/psych/.gitignore", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h",
22
+ "bin/setup", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h",
24
23
  "ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h",
25
24
  "ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h",
26
25
  "ext/psych/yaml/LICENSE", "ext/psych/yaml/api.c", "ext/psych/yaml/config.h", "ext/psych/yaml/dumper.c",
@@ -54,7 +53,7 @@ DESCRIPTION
54
53
  "ext/java/PsychEmitter.java", "ext/java/PsychLibrary.java", "ext/java/PsychParser.java", "ext/java/PsychToRuby.java",
55
54
  "ext/java/PsychYamlTree.java", "lib/psych_jars.rb", "lib/psych.jar"
56
55
  ]
57
- s.requirements = "jar org.yaml:snakeyaml, 1.18"
56
+ s.requirements = "jar org.yaml:snakeyaml, 1.21"
58
57
  s.add_dependency 'jar-dependencies', '>= 0.1.7'
59
58
  s.add_development_dependency 'ruby-maven'
60
59
  else
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: 3.0.2
4
+ version: 3.0.3.pre1
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: 2017-12-04 00:00:00.000000000 Z
13
+ date: 2018-04-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake-compiler
@@ -78,7 +78,6 @@ files:
78
78
  - Rakefile
79
79
  - bin/console
80
80
  - bin/setup
81
- - ext/psych/.gitignore
82
81
  - ext/psych/depend
83
82
  - ext/psych/extconf.rb
84
83
  - ext/psych/psych.c
@@ -163,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
162
  version: '0'
164
163
  requirements: []
165
164
  rubyforge_project:
166
- rubygems_version: 2.7.3
165
+ rubygems_version: 2.7.6
167
166
  signing_key:
168
167
  specification_version: 4
169
168
  summary: Psych is a YAML parser and emitter
@@ -1,11 +0,0 @@
1
- /api.c
2
- /config.h
3
- /dumper.c
4
- /emitter.c
5
- /loader.c
6
- /parser.c
7
- /reader.c
8
- /scanner.c
9
- /writer.c
10
- /yaml.h
11
- /yaml_private.h