syck 1.0.0 → 1.0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/syck.rb +1 -0
- data/lib/yaml/engine_manager.rb +71 -0
- metadata +72 -91
- data/.autotest.erb +0 -8
- data/.gemtest +0 -0
- data/lib/syck.bundle +0 -0
- data/test/helper.rb +0 -2
data/lib/syck.rb
CHANGED
@@ -0,0 +1,71 @@
|
|
1
|
+
##
|
2
|
+
# The YAML module allows you to use one of the two YAML engines that ship with
|
3
|
+
# ruby. By default Psych is used but the old and unmaintained Syck may be
|
4
|
+
# chosen.
|
5
|
+
#
|
6
|
+
# See Psych or Syck for usage and documentation.
|
7
|
+
#
|
8
|
+
# To set the YAML engine to syck:
|
9
|
+
#
|
10
|
+
# YAML::ENGINE.yamler = 'syck'
|
11
|
+
#
|
12
|
+
# To set the YAML engine back to psych:
|
13
|
+
#
|
14
|
+
# YAML::ENGINE.yamler = 'psych'
|
15
|
+
|
16
|
+
module YAML
|
17
|
+
class EngineManager # :nodoc:
|
18
|
+
attr_reader :yamler
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@yamler = nil
|
22
|
+
end
|
23
|
+
|
24
|
+
def syck?
|
25
|
+
'syck' == @yamler
|
26
|
+
end
|
27
|
+
|
28
|
+
def yamler= engine
|
29
|
+
raise(ArgumentError, "bad engine") unless %w{syck psych}.include?(engine)
|
30
|
+
|
31
|
+
require engine unless (engine == 'syck' ? Syck : Psych).const_defined?(:VERSION)
|
32
|
+
|
33
|
+
Object.class_eval <<-eorb, __FILE__, __LINE__ + 1
|
34
|
+
remove_const 'YAML'
|
35
|
+
YAML = #{engine.capitalize}
|
36
|
+
remove_method :to_yaml
|
37
|
+
alias :to_yaml :#{engine}_to_yaml
|
38
|
+
eorb
|
39
|
+
|
40
|
+
@yamler = engine
|
41
|
+
engine
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Allows changing the current YAML engine. See YAML for details.
|
47
|
+
|
48
|
+
remove_const :ENGINE
|
49
|
+
ENGINE = YAML::EngineManager.new
|
50
|
+
end
|
51
|
+
|
52
|
+
if defined?(Psych)
|
53
|
+
engine = 'psych'
|
54
|
+
elsif defined?(Syck)
|
55
|
+
engine = 'syck'
|
56
|
+
else
|
57
|
+
begin
|
58
|
+
require 'psych'
|
59
|
+
engine = 'psych'
|
60
|
+
rescue LoadError
|
61
|
+
warn "#{caller[0]}:"
|
62
|
+
warn "It seems your ruby installation is missing psych (for YAML output)."
|
63
|
+
warn "To eliminate this warning, please install libyaml and reinstall your ruby."
|
64
|
+
require 'syck'
|
65
|
+
engine = 'syck'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
module Syck
|
70
|
+
ENGINE = YAML::ENGINE
|
71
|
+
end
|
metadata
CHANGED
@@ -1,101 +1,74 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: syck
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 87
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
- 4
|
11
|
+
version: 1.0.0.4
|
6
12
|
platform: ruby
|
7
|
-
authors:
|
13
|
+
authors:
|
8
14
|
- Aaron Patterson
|
15
|
+
- Mat Brown
|
9
16
|
autorequire:
|
10
17
|
bindir: bin
|
11
18
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '3.5'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '3.5'
|
30
|
-
- !ruby/object:Gem::Dependency
|
19
|
+
|
20
|
+
date: 2013-10-15 00:00:00 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
31
23
|
name: rdoc
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '3.10'
|
38
|
-
type: :development
|
39
24
|
prerelease: false
|
40
|
-
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
41
26
|
none: false
|
42
|
-
requirements:
|
27
|
+
requirements:
|
43
28
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 0.4.1
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 27
|
31
|
+
segments:
|
32
|
+
- 4
|
33
|
+
- 0
|
34
|
+
version: "4.0"
|
54
35
|
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rake-compiler
|
55
39
|
prerelease: false
|
56
|
-
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
57
41
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 13
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 4
|
49
|
+
- 1
|
61
50
|
version: 0.4.1
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: hoe
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '3.0'
|
70
51
|
type: :development
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
version: '3.0'
|
78
|
-
description: ! 'A gemified version of Syck from Ruby''s stdlib. Syck has been removed
|
79
|
-
from
|
80
|
-
|
81
|
-
Ruby''s stdlib, and this gem is meant to bridge the gap for people that haven''t
|
82
|
-
|
83
|
-
updated their YAML yet.'
|
84
|
-
email:
|
52
|
+
version_requirements: *id002
|
53
|
+
description: |-
|
54
|
+
A gemified version of Syck from Ruby's stdlib. Syck has been removed from
|
55
|
+
Ruby's stdlib, and this gem is meant to bridge the gap for people that haven't
|
56
|
+
updated their YAML yet.
|
57
|
+
email:
|
85
58
|
- aaron@tenderlovemaking.com
|
86
59
|
executables: []
|
87
|
-
|
60
|
+
|
61
|
+
extensions:
|
88
62
|
- ext/syck/extconf.rb
|
89
|
-
extra_rdoc_files:
|
63
|
+
extra_rdoc_files:
|
90
64
|
- CHANGELOG.rdoc
|
91
65
|
- Manifest.txt
|
92
66
|
- README.rdoc
|
93
|
-
files:
|
94
|
-
- .autotest.erb
|
67
|
+
files:
|
95
68
|
- CHANGELOG.rdoc
|
96
69
|
- Manifest.txt
|
97
|
-
- README.rdoc
|
98
70
|
- Rakefile
|
71
|
+
- README.rdoc
|
99
72
|
- ext/syck/bytecode.c
|
100
73
|
- ext/syck/emitter.c
|
101
74
|
- ext/syck/extconf.h
|
@@ -111,8 +84,6 @@ files:
|
|
111
84
|
- ext/syck/token.c
|
112
85
|
- ext/syck/yaml2byte.c
|
113
86
|
- ext/syck/yamlbyte.h
|
114
|
-
- lib/syck.bundle
|
115
|
-
- lib/syck.rb
|
116
87
|
- lib/syck/baseemitter.rb
|
117
88
|
- lib/syck/basenode.rb
|
118
89
|
- lib/syck/constants.rb
|
@@ -127,8 +98,9 @@ files:
|
|
127
98
|
- lib/syck/types.rb
|
128
99
|
- lib/syck/yamlnode.rb
|
129
100
|
- lib/syck/ypath.rb
|
101
|
+
- lib/syck.rb
|
102
|
+
- lib/yaml/engine_manager.rb
|
130
103
|
- lib/yaml/syck.rb
|
131
|
-
- test/helper.rb
|
132
104
|
- test/test_array.rb
|
133
105
|
- test/test_boolean.rb
|
134
106
|
- test/test_class.rb
|
@@ -143,34 +115,43 @@ files:
|
|
143
115
|
- test/test_time.rb
|
144
116
|
- test/test_yaml.rb
|
145
117
|
- test/test_yaml_properties.rb
|
146
|
-
- .gemtest
|
147
118
|
homepage: http://github.com/tenderlove/syck
|
148
119
|
licenses: []
|
120
|
+
|
149
121
|
post_install_message:
|
150
|
-
rdoc_options:
|
122
|
+
rdoc_options:
|
151
123
|
- --main
|
152
124
|
- README.rdoc
|
153
|
-
require_paths:
|
125
|
+
require_paths:
|
154
126
|
- lib
|
155
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
156
128
|
none: false
|
157
|
-
requirements:
|
158
|
-
- -
|
159
|
-
- !ruby/object:Gem::Version
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 15
|
133
|
+
segments:
|
134
|
+
- 2
|
135
|
+
- 0
|
136
|
+
- 0
|
160
137
|
version: 2.0.0
|
161
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
139
|
none: false
|
163
|
-
requirements:
|
164
|
-
- -
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
hash: 3
|
144
|
+
segments:
|
145
|
+
- 0
|
146
|
+
version: "0"
|
167
147
|
requirements: []
|
148
|
+
|
168
149
|
rubyforge_project: syck
|
169
|
-
rubygems_version: 1.8.
|
150
|
+
rubygems_version: 1.8.25
|
170
151
|
signing_key:
|
171
|
-
specification_version:
|
152
|
+
specification_version: 4
|
172
153
|
summary: A gemified version of Syck from Ruby's stdlib
|
173
|
-
test_files:
|
154
|
+
test_files:
|
174
155
|
- test/test_array.rb
|
175
156
|
- test/test_boolean.rb
|
176
157
|
- test/test_class.rb
|
data/.autotest.erb
DELETED
data/.gemtest
DELETED
File without changes
|
data/lib/syck.bundle
DELETED
Binary file
|
data/test/helper.rb
DELETED