syck 1.0.5 → 1.1.0

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
  SHA1:
3
- metadata.gz: d6ade68496aeaad0cfc3e81a8f5ee484bd2c85ef
4
- data.tar.gz: 3c1d9ffa558d959ba40c51e3000425b442e4094e
3
+ metadata.gz: 3e922f62fe315789047819b6b25dda0542c690fc
4
+ data.tar.gz: d9eb20fa42c71cd5d5c96610a94ff37bad820e8d
5
5
  SHA512:
6
- metadata.gz: e02b240676e81552e1ace57d9e5140fa8c3df1b916c16499bec12a909f5b6bb5a3ed253a29e4a7e4945c82cbd95f46ee022ecc394c275ac9c00bf9b85f4c052a
7
- data.tar.gz: 58c31b7efe7ad11bd78a621cdfd31b33813921e5775c495147d2bae050256e83ca7458357b37532d8642add8b835049a8e4ade1d05634d1fbbfd6715a7935faf
6
+ metadata.gz: 9a590e27b396eee40956ae7f0942686e43bae503908e1b610df1dcf724d8f220ee75ce41f28d3651890350f6fc513cbac254d7382b3915301ec5b0ac16cc265d
7
+ data.tar.gz: c51278861f02b6f19e7b3eb06b912c4d11c3d882e6830e9518206aca0d2e54853efd51d96044425abe3edb2fa3bd6a5b7d80fe269af6f1fe03497cd36dd60fe7
@@ -1,6 +1,19 @@
1
+ === 1.1.0 / 2016-03-22
2
+
3
+ Bug fixes:
4
+
5
+ * Fix broken tests with Ruby 2.0.0 or later.
6
+
7
+ Enhancements:
8
+
9
+ * Skipped Syck specific methods on Psych engine.
10
+
11
+ Known issues:
12
+
13
+ * Can't switch back to Psych.
14
+
1
15
  === 1.0.0 / 2012-09-24
2
16
 
3
17
  * 1 major enhancement
4
18
 
5
19
  * Birthday!
6
-
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ syck (1.0.5)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ json (1.8.3)
10
+ power_assert (0.2.7)
11
+ rake (11.1.1)
12
+ rake-compiler (0.9.7)
13
+ rake
14
+ rdoc (4.2.2)
15
+ json (~> 1.4)
16
+ test-unit (3.1.7)
17
+ power_assert
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ bundler (~> 1.11)
24
+ rake-compiler (>= 0.4.1)
25
+ rdoc (~> 4.0)
26
+ syck!
27
+ test-unit (~> 3.1)
28
+
29
+ BUNDLED WITH
30
+ 1.11.2
data/Rakefile CHANGED
@@ -1,31 +1,14 @@
1
- # -*- ruby -*-
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/extensiontask'
3
+ require 'rake/testtask'
2
4
 
3
- require 'rubygems'
4
- require 'hoe'
5
+ CLEAN = Rake::FileList["lib/syck.bundle", "tmp"]
5
6
 
6
- Hoe.plugins.delete :rubyforge
7
- Hoe.plugin :gemspec # `gem install hoe-gemspec`
8
- Hoe.plugin :git # `gem install hoe-git`
9
-
10
- gem 'rake-compiler', '>= 0.4.1'
11
- require "rake/extensiontask"
12
-
13
- Hoe.spec 'syck' do
14
- developer('Aaron Patterson', 'aaron@tenderlovemaking.com')
15
- self.readme_file = 'README.rdoc'
16
- self.history_file = 'CHANGELOG.rdoc'
17
- self.extra_rdoc_files = FileList['*.rdoc']
18
-
19
- extra_dev_deps << ['rake-compiler', '>= 0.4.1']
20
-
21
- self.spec_extras = {
22
- :extensions => ["ext/syck/extconf.rb"],
23
- :required_ruby_version => '>= 2.0.0'
24
- }
25
-
26
- Rake::ExtensionTask.new "syck", spec do |ext|
27
- ext.lib_dir = File.join(*['lib', ENV['FAT_DIR']].compact)
28
- end
7
+ Rake::TestTask.new(:test) do |t|
8
+ t.libs << "test"
9
+ t.libs << "lib"
10
+ t.test_files = FileList['test/**/test_*.rb']
29
11
  end
12
+ Rake::ExtensionTask.new('syck')
30
13
 
31
- # vim: syntax=ruby
14
+ task :default => [:compile, :test]
@@ -37,6 +37,7 @@ class Hash
37
37
  end
38
38
  end
39
39
  def to_yaml( opts = {} )
40
+ return super unless YAML == Syck
40
41
  Syck::quick_emit( self, opts ) do |out|
41
42
  out.map( taguri, to_yaml_style ) do |map|
42
43
  each do |k, v|
@@ -85,6 +86,7 @@ class Struct
85
86
  end
86
87
  end
87
88
  def to_yaml( opts = {} )
89
+ return super unless YAML == Syck
88
90
  Syck::quick_emit( self, opts ) do |out|
89
91
  #
90
92
  # Basic struct is passed as a YAML map
@@ -106,6 +108,7 @@ class Array
106
108
  yaml_as "tag:yaml.org,2002:seq"
107
109
  def yaml_initialize( tag, val ); concat( val.to_a ); end
108
110
  def to_yaml( opts = {} )
111
+ return super unless YAML == Syck
109
112
  Syck::quick_emit( self, opts ) do |out|
110
113
  out.seq( taguri, to_yaml_style ) do |seq|
111
114
  each do |x|
@@ -127,6 +130,7 @@ class Exception
127
130
  o
128
131
  end
129
132
  def to_yaml( opts = {} )
133
+ return super unless YAML == Syck
130
134
  Syck::quick_emit( self, opts ) do |out|
131
135
  out.map( taguri, to_yaml_style ) do |map|
132
136
  map.add( 'message', message )
@@ -164,6 +168,7 @@ class String
164
168
  end
165
169
  end
166
170
  def to_yaml( opts = {} )
171
+ return super unless YAML == Syck
167
172
  Syck::quick_emit( is_complex_yaml? ? self : nil, opts ) do |out|
168
173
  if is_binary_data?
169
174
  out.scalar( "tag:yaml.org,2002:binary", [self].pack("m"), :literal )
@@ -193,6 +198,7 @@ class Symbol
193
198
  end
194
199
  end
195
200
  def to_yaml( opts = {} )
201
+ return super unless YAML == Syck
196
202
  Syck::quick_emit( nil, opts ) do |out|
197
203
  out.scalar( "tag:yaml.org,2002:str", self.inspect, :plain )
198
204
  end
@@ -230,6 +236,7 @@ class Range
230
236
  end
231
237
  end
232
238
  def to_yaml( opts = {} )
239
+ return super unless YAML == Syck
233
240
  Syck::quick_emit( self, opts ) do |out|
234
241
  # if self.begin.is_complex_yaml? or self.begin.respond_to? :to_str or
235
242
  # self.end.is_complex_yaml? or self.end.respond_to? :to_str or
@@ -280,6 +287,7 @@ class Regexp
280
287
  end
281
288
  end
282
289
  def to_yaml( opts = {} )
290
+ return super unless YAML == Syck
283
291
  Syck::quick_emit( nil, opts ) do |out|
284
292
  if to_yaml_properties.empty?
285
293
  out.scalar( taguri, self.inspect, :plain )
@@ -314,6 +322,7 @@ class Time
314
322
  end
315
323
  end
316
324
  def to_yaml( opts = {} )
325
+ return super unless YAML == Syck
317
326
  Syck::quick_emit( self, opts ) do |out|
318
327
  tz = "Z"
319
328
  # from the tidy Tobias Peters <t-peters@gmx.de> Thanks!
@@ -351,6 +360,7 @@ end
351
360
  class Date
352
361
  yaml_as "tag:yaml.org,2002:timestamp#ymd"
353
362
  def to_yaml( opts = {} )
363
+ return super unless YAML == Syck
354
364
  Syck::quick_emit( self, opts ) do |out|
355
365
  out.scalar( "tag:yaml.org,2002:timestamp", self.to_s, :plain )
356
366
  end
@@ -360,6 +370,7 @@ end
360
370
  class Integer
361
371
  yaml_as "tag:yaml.org,2002:int"
362
372
  def to_yaml( opts = {} )
373
+ return super unless YAML == Syck
363
374
  Syck::quick_emit( nil, opts ) do |out|
364
375
  out.scalar( "tag:yaml.org,2002:int", self.to_s, :plain )
365
376
  end
@@ -369,6 +380,7 @@ end
369
380
  class Float
370
381
  yaml_as "tag:yaml.org,2002:float"
371
382
  def to_yaml( opts = {} )
383
+ return super unless YAML == Syck
372
384
  Syck::quick_emit( nil, opts ) do |out|
373
385
  str = self.to_s
374
386
  if str == "Infinity"
@@ -393,6 +405,7 @@ class Rational
393
405
  end
394
406
  end
395
407
  def to_yaml( opts = {} )
408
+ return super unless YAML == Syck
396
409
  Syck::quick_emit( self, opts ) do |out|
397
410
  out.map( taguri, nil ) do |map|
398
411
  map.add( 'denominator', denominator )
@@ -412,6 +425,7 @@ class Complex
412
425
  end
413
426
  end
414
427
  def to_yaml( opts = {} )
428
+ return super unless YAML == Syck
415
429
  Syck::quick_emit( self, opts ) do |out|
416
430
  out.map( taguri, nil ) do |map|
417
431
  map.add( 'image', imaginary )
@@ -424,6 +438,7 @@ end
424
438
  class TrueClass
425
439
  yaml_as "tag:yaml.org,2002:bool#yes"
426
440
  def to_yaml( opts = {} )
441
+ return super unless YAML == Syck
427
442
  Syck::quick_emit( nil, opts ) do |out|
428
443
  out.scalar( taguri, "true", :plain )
429
444
  end
@@ -433,6 +448,7 @@ end
433
448
  class FalseClass
434
449
  yaml_as "tag:yaml.org,2002:bool#no"
435
450
  def to_yaml( opts = {} )
451
+ return super unless YAML == Syck
436
452
  Syck::quick_emit( nil, opts ) do |out|
437
453
  out.scalar( taguri, "false", :plain )
438
454
  end
@@ -442,9 +458,9 @@ end
442
458
  class NilClass
443
459
  yaml_as "tag:yaml.org,2002:null"
444
460
  def to_yaml( opts = {} )
461
+ return super unless YAML == Syck
445
462
  Syck::quick_emit( nil, opts ) do |out|
446
463
  out.scalar( taguri, "", :plain )
447
464
  end
448
465
  end
449
466
  end
450
-
@@ -45,7 +45,7 @@ module YAML
45
45
  ##
46
46
  # Allows changing the current YAML engine. See YAML for details.
47
47
 
48
- remove_const :ENGINE
48
+ remove_const :ENGINE if defined? ENGINE
49
49
  ENGINE = YAML::EngineManager.new
50
50
  end
51
51
 
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "syck"
5
+ s.version = "1.1.0"
6
+
7
+ s.summary = "A gemified version of Syck from Ruby's stdlib"
8
+ s.description = "A gemified version of Syck from Ruby's stdlib. Syck has been removed from\nRuby's stdlib, and this gem is meant to bridge the gap for people that haven't\nupdated their YAML yet."
9
+ s.authors = ["Hiroshi SHIBATA", "Aaron Patterson", "Mat Brown"]
10
+ s.email = ["hsbt@ruby-lang.org", "aaron@tenderlovemaking.com"]
11
+ s.homepage = "https://github.com/tenderlove/syck"
12
+ s.require_paths = ["lib"]
13
+ s.extensions = ["ext/syck/extconf.rb"]
14
+ s.files = Dir["[A-Z]*", "ext/**/*", "lib/**/*.rb", "test/**/*.rb"]
15
+ s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc", "CHANGELOG.rdoc", "README.rdoc"]
16
+ s.test_files = Dir["test/**/*.rb"]
17
+ s.rdoc_options = ["--main", "README.rdoc"]
18
+ s.required_ruby_version = Gem::Requirement.new(">= 2.0.0")
19
+ s.required_rubygems_version = Gem::Requirement.new(">= 0.9.5")
20
+ s.rubygems_version = "2.0.3"
21
+
22
+ s.add_development_dependency(%q<bundler>, ["~> 1.11"])
23
+ s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
24
+ s.add_development_dependency(%q<test-unit>, ["~> 3.1"])
25
+ s.add_development_dependency(%q<rake-compiler>, [">= 0.4.1"])
26
+ end
@@ -0,0 +1,2 @@
1
+ require 'test/unit'
2
+ require 'syck'
@@ -1,3 +1,4 @@
1
+ # encoding: ASCII-8BIT
1
2
  # -*- mode: ruby; ruby-indent-level: 4; tab-width: 4; indent-tabs-mode: t -*-
2
3
  # vim:sw=4:ts=4
3
4
  # $Id$
metadata CHANGED
@@ -1,15 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syck
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Hiroshi SHIBATA
7
8
  - Aaron Patterson
9
+ - Mat Brown
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2015-01-07 00:00:00.000000000 Z
13
+ date: 2016-03-22 00:00:00.000000000 Z
12
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.11'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.11'
13
29
  - !ruby/object:Gem::Dependency
14
30
  name: rdoc
15
31
  requirement: !ruby/object:Gem::Requirement
@@ -25,51 +41,50 @@ dependencies:
25
41
  - !ruby/object:Gem::Version
26
42
  version: '4.0'
27
43
  - !ruby/object:Gem::Dependency
28
- name: rake-compiler
44
+ name: test-unit
29
45
  requirement: !ruby/object:Gem::Requirement
30
46
  requirements:
31
- - - ">="
47
+ - - "~>"
32
48
  - !ruby/object:Gem::Version
33
- version: 0.4.1
49
+ version: '3.1'
34
50
  type: :development
35
51
  prerelease: false
36
52
  version_requirements: !ruby/object:Gem::Requirement
37
53
  requirements:
38
- - - ">="
54
+ - - "~>"
39
55
  - !ruby/object:Gem::Version
40
- version: 0.4.1
56
+ version: '3.1'
41
57
  - !ruby/object:Gem::Dependency
42
- name: hoe
58
+ name: rake-compiler
43
59
  requirement: !ruby/object:Gem::Requirement
44
60
  requirements:
45
- - - "~>"
61
+ - - ">="
46
62
  - !ruby/object:Gem::Version
47
- version: '3.13'
63
+ version: 0.4.1
48
64
  type: :development
49
65
  prerelease: false
50
66
  version_requirements: !ruby/object:Gem::Requirement
51
67
  requirements:
52
- - - "~>"
68
+ - - ">="
53
69
  - !ruby/object:Gem::Version
54
- version: '3.13'
70
+ version: 0.4.1
55
71
  description: |-
56
72
  A gemified version of Syck from Ruby's stdlib. Syck has been removed from
57
73
  Ruby's stdlib, and this gem is meant to bridge the gap for people that haven't
58
74
  updated their YAML yet.
59
75
  email:
76
+ - hsbt@ruby-lang.org
60
77
  - aaron@tenderlovemaking.com
61
78
  executables: []
62
79
  extensions:
63
80
  - ext/syck/extconf.rb
64
81
  extra_rdoc_files:
65
82
  - CHANGELOG.rdoc
66
- - Manifest.txt
67
83
  - README.rdoc
68
84
  files:
69
- - ".autotest.erb"
70
- - ".gemtest"
71
85
  - CHANGELOG.rdoc
72
- - Manifest.txt
86
+ - Gemfile
87
+ - Gemfile.lock
73
88
  - README.rdoc
74
89
  - Rakefile
75
90
  - ext/syck/bytecode.c
@@ -104,6 +119,8 @@ files:
104
119
  - lib/syck/ypath.rb
105
120
  - lib/yaml/engine_manager.rb
106
121
  - lib/yaml/syck.rb
122
+ - syck.gemspec
123
+ - test/helper.rb
107
124
  - test/test_array.rb
108
125
  - test/test_boolean.rb
109
126
  - test/test_class.rb
@@ -118,9 +135,8 @@ files:
118
135
  - test/test_time.rb
119
136
  - test/test_yaml.rb
120
137
  - test/test_yaml_properties.rb
121
- homepage: http://github.com/tenderlove/syck
122
- licenses:
123
- - MIT
138
+ homepage: https://github.com/tenderlove/syck
139
+ licenses: []
124
140
  metadata: {}
125
141
  post_install_message:
126
142
  rdoc_options:
@@ -137,14 +153,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
153
  requirements:
138
154
  - - ">="
139
155
  - !ruby/object:Gem::Version
140
- version: '0'
156
+ version: 0.9.5
141
157
  requirements: []
142
158
  rubyforge_project:
143
- rubygems_version: 2.4.5
159
+ rubygems_version: 2.6.1
144
160
  signing_key:
145
161
  specification_version: 4
146
162
  summary: A gemified version of Syck from Ruby's stdlib
147
163
  test_files:
164
+ - test/helper.rb
148
165
  - test/test_array.rb
149
166
  - test/test_boolean.rb
150
167
  - test/test_class.rb
@@ -1,8 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require 'autotest/restart'
4
-
5
- Autotest.add_hook :initialize do |at|
6
- at.testlib = 'minitest/autorun'
7
- at.find_directories = ARGV unless ARGV.empty?
8
- end
data/.gemtest DELETED
File without changes
@@ -1,51 +0,0 @@
1
- .autotest.erb
2
- CHANGELOG.rdoc
3
- Manifest.txt
4
- README.rdoc
5
- Rakefile
6
- ext/syck/bytecode.c
7
- ext/syck/emitter.c
8
- ext/syck/extconf.h
9
- ext/syck/extconf.rb
10
- ext/syck/gram.c
11
- ext/syck/gram.h
12
- ext/syck/handler.c
13
- ext/syck/implicit.c
14
- ext/syck/node.c
15
- ext/syck/rubyext.c
16
- ext/syck/syck.c
17
- ext/syck/syck.h
18
- ext/syck/token.c
19
- ext/syck/yaml2byte.c
20
- ext/syck/yamlbyte.h
21
- lib/syck.rb
22
- lib/syck/baseemitter.rb
23
- lib/syck/basenode.rb
24
- lib/syck/constants.rb
25
- lib/syck/encoding.rb
26
- lib/syck/error.rb
27
- lib/syck/loader.rb
28
- lib/syck/rubytypes.rb
29
- lib/syck/stream.rb
30
- lib/syck/stringio.rb
31
- lib/syck/syck.rb
32
- lib/syck/tag.rb
33
- lib/syck/types.rb
34
- lib/syck/yamlnode.rb
35
- lib/syck/ypath.rb
36
- lib/yaml/engine_manager.rb
37
- lib/yaml/syck.rb
38
- test/test_array.rb
39
- test/test_boolean.rb
40
- test/test_class.rb
41
- test/test_exception.rb
42
- test/test_hash.rb
43
- test/test_null.rb
44
- test/test_omap.rb
45
- test/test_set.rb
46
- test/test_string.rb
47
- test/test_struct.rb
48
- test/test_symbol.rb
49
- test/test_time.rb
50
- test/test_yaml.rb
51
- test/test_yaml_properties.rb