puppet 2.7.21 → 2.7.22
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/CHANGELOG +14 -0
- data/Gemfile.lock +2 -2
- data/ext/build_defaults.yaml +2 -3
- data/ext/debian/control +1 -1
- data/ext/packaging/README.md +496 -8
- data/ext/packaging/spec/tasks/00_utils_spec.rb +7 -7
- data/ext/packaging/spec/tasks/build_object_spec.rb +3 -0
- data/ext/packaging/tasks/00_utils.rake +2 -2
- data/ext/packaging/tasks/10_setupvars.rake +8 -1
- data/ext/packaging/tasks/build.rake +2 -0
- data/ext/packaging/tasks/deb_repos.rake +48 -15
- data/ext/packaging/tasks/jenkins.rake +30 -2
- data/ext/packaging/tasks/mock.rake +3 -2
- data/ext/packaging/tasks/pe_remote.rake +1 -1
- data/ext/packaging/tasks/pe_ship.rake +4 -5
- data/ext/packaging/tasks/pe_sign.rake +8 -0
- data/ext/packaging/tasks/pe_sles.rake +8 -7
- data/ext/packaging/tasks/pre_tasks.rake +0 -0
- data/ext/packaging/tasks/retrieve.rake +11 -1
- data/ext/packaging/tasks/rpm_repos.rake +71 -49
- data/ext/packaging/tasks/ship.rake +14 -2
- data/ext/packaging/tasks/sign.rake +9 -3
- data/ext/packaging/tasks/tar.rake +5 -0
- data/ext/packaging/tasks/vendor_gems.rake +110 -0
- data/install.rb +1 -1
- data/lib/puppet.rb +11 -0
- data/lib/puppet/indirector/report/processor.rb +1 -1
- data/lib/puppet/indirector/report/rest.rb +7 -0
- data/lib/puppet/indirector/resource/rest.rb +9 -0
- data/lib/puppet/indirector/rest.rb +81 -47
- data/lib/puppet/indirector/run/rest.rb +6 -0
- data/lib/puppet/network/formats.rb +20 -10
- data/lib/puppet/network/http/handler.rb +1 -1
- data/lib/puppet/node.rb +25 -0
- data/lib/puppet/node/facts.rb +23 -4
- data/lib/puppet/resource.rb +2 -4
- data/lib/puppet/resource/status.rb +28 -0
- data/lib/puppet/run.rb +24 -2
- data/lib/puppet/status.rb +6 -2
- data/lib/puppet/transaction/event.rb +19 -0
- data/lib/puppet/transaction/report.rb +39 -0
- data/lib/puppet/util/log.rb +19 -0
- data/lib/puppet/util/metric.rb +6 -0
- data/lib/puppet/util/monkey_patches.rb +0 -16
- data/lib/puppet/vendor.rb +55 -0
- data/lib/puppet/vendor/load_safe_yaml.rb +1 -0
- data/lib/puppet/vendor/require_vendored.rb +4 -0
- data/lib/puppet/vendor/safe_yaml/CHANGES.md +104 -0
- data/lib/puppet/vendor/safe_yaml/Gemfile +11 -0
- data/lib/puppet/vendor/safe_yaml/LICENSE.txt +22 -0
- data/lib/puppet/vendor/safe_yaml/README.md +179 -0
- data/lib/puppet/vendor/safe_yaml/Rakefile +6 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb +253 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/deep.rb +34 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/parse/date.rb +27 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/parse/hexadecimal.rb +12 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/parse/sexagesimal.rb +26 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/psych_handler.rb +92 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/psych_resolver.rb +52 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/resolver.rb +94 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/safe_to_ruby_visitor.rb +17 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_hack.rb +36 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb +43 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_resolver.rb +38 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform.rb +41 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_boolean.rb +21 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb +11 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_float.rb +33 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_integer.rb +25 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb +18 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb +13 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/transformation_map.rb +47 -0
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/version.rb +3 -0
- data/lib/puppet/vendor/safe_yaml/run_specs_all_ruby_versions.sh +21 -0
- data/lib/puppet/vendor/safe_yaml/safe_yaml.gemspec +18 -0
- data/lib/puppet/vendor/safe_yaml/spec/exploit.1.9.2.yaml +2 -0
- data/lib/puppet/vendor/safe_yaml/spec/exploit.1.9.3.yaml +2 -0
- data/lib/puppet/vendor/safe_yaml/spec/psych_resolver_spec.rb +10 -0
- data/lib/puppet/vendor/safe_yaml/spec/resolver_specs.rb +250 -0
- data/lib/puppet/vendor/safe_yaml/spec/safe_yaml_spec.rb +702 -0
- data/lib/puppet/vendor/safe_yaml/spec/spec_helper.rb +18 -0
- data/lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb +29 -0
- data/lib/puppet/vendor/safe_yaml/spec/syck_resolver_spec.rb +10 -0
- data/lib/puppet/vendor/safe_yaml/spec/transform/base64_spec.rb +11 -0
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_date_spec.rb +34 -0
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_float_spec.rb +42 -0
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_integer_spec.rb +59 -0
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_symbol_spec.rb +49 -0
- data/lib/puppet/version.rb +1 -1
- data/spec/lib/puppet_spec/matchers.rb +8 -0
- data/spec/unit/file_serving/metadata_spec.rb +20 -28
- data/spec/unit/indirector/report/rest_spec.rb +41 -0
- data/spec/unit/indirector/rest_spec.rb +314 -339
- data/spec/unit/network/formats_spec.rb +36 -27
- data/spec/unit/network/http/handler_spec.rb +3 -12
- data/spec/unit/node_spec.rb +81 -0
- data/spec/unit/resource_spec.rb +5 -35
- data/spec/unit/run_spec.rb +22 -8
- data/spec/unit/status_spec.rb +6 -0
- data/test/network/handler/report.rb +0 -36
- metadata +148 -102
@@ -239,7 +239,7 @@ module Puppet::Network::HTTP::Handler
|
|
239
239
|
next result if param == :ip
|
240
240
|
value = CGI.unescape(value)
|
241
241
|
if value =~ /^---/
|
242
|
-
value = YAML.
|
242
|
+
value = YAML.load(value, :safe => true, :deserialize_symbols => true)
|
243
243
|
else
|
244
244
|
value = true if value == "true"
|
245
245
|
value = false if value == "false"
|
data/lib/puppet/node.rb
CHANGED
@@ -20,6 +20,31 @@ class Puppet::Node
|
|
20
20
|
attr_accessor :name, :classes, :source, :ipaddress, :parameters
|
21
21
|
attr_reader :time
|
22
22
|
|
23
|
+
::PSON.register_document_type('Node',self)
|
24
|
+
|
25
|
+
def self.from_pson(pson)
|
26
|
+
raise ArgumentError, "No name provided in serialized data" unless name = pson['name']
|
27
|
+
|
28
|
+
node = new(name)
|
29
|
+
node.classes = pson['classes']
|
30
|
+
node.parameters = pson['parameters']
|
31
|
+
node.environment = pson['environment']
|
32
|
+
node
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_pson(*args)
|
36
|
+
result = {
|
37
|
+
'document_type' => "Node",
|
38
|
+
'data' => {}
|
39
|
+
}
|
40
|
+
result['data']['name'] = name
|
41
|
+
result['data']['classes'] = classes unless classes.empty?
|
42
|
+
result['data']['parameters'] = parameters unless parameters.empty?
|
43
|
+
result['data']['environment'] = environment.name
|
44
|
+
|
45
|
+
result.to_pson(*args)
|
46
|
+
end
|
47
|
+
|
23
48
|
def environment
|
24
49
|
return super if @environment
|
25
50
|
|
data/lib/puppet/node/facts.rb
CHANGED
@@ -47,6 +47,26 @@ class Puppet::Node::Facts
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
def initialize_from_hash(data)
|
51
|
+
@name = data['name']
|
52
|
+
@values = data['values']
|
53
|
+
# Timestamp will be here in YAML
|
54
|
+
timestamp = data['values']['_timestamp']
|
55
|
+
@values.delete_if do |key, val|
|
56
|
+
key =~ /^_/
|
57
|
+
end
|
58
|
+
|
59
|
+
#Timestamp will be here in pson
|
60
|
+
timestamp ||= data['timestamp']
|
61
|
+
timestamp = Time.parse(timestamp) if timestamp.is_a? String
|
62
|
+
self.timestamp = timestamp
|
63
|
+
|
64
|
+
self.expiration = data['expiration']
|
65
|
+
if expiration.is_a? String
|
66
|
+
self.expiration = Time.parse(expiration)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
50
70
|
# Convert all fact values into strings.
|
51
71
|
def stringify
|
52
72
|
values.each do |fact, value|
|
@@ -60,10 +80,9 @@ class Puppet::Node::Facts
|
|
60
80
|
end
|
61
81
|
|
62
82
|
def self.from_pson(data)
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
result
|
83
|
+
new_facts = allocate
|
84
|
+
new_facts.initialize_from_hash(data)
|
85
|
+
new_facts
|
67
86
|
end
|
68
87
|
|
69
88
|
def to_pson(*args)
|
data/lib/puppet/resource.rb
CHANGED
@@ -28,8 +28,8 @@ class Puppet::Resource
|
|
28
28
|
ATTRIBUTES = [:file, :line, :exported]
|
29
29
|
|
30
30
|
def self.from_pson(pson)
|
31
|
-
raise ArgumentError, "No resource type provided in
|
32
|
-
raise ArgumentError, "No resource title provided in
|
31
|
+
raise ArgumentError, "No resource type provided in serialized data" unless type = pson['type']
|
32
|
+
raise ArgumentError, "No resource title provided in serialized data" unless title = pson['title']
|
33
33
|
|
34
34
|
resource = new(type, title)
|
35
35
|
|
@@ -47,8 +47,6 @@ class Puppet::Resource
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
resource.exported ||= false
|
51
|
-
|
52
50
|
resource
|
53
51
|
end
|
54
52
|
|
@@ -14,6 +14,13 @@ module Puppet
|
|
14
14
|
|
15
15
|
YAML_ATTRIBUTES = %w{@resource @file @line @evaluation_time @change_count @out_of_sync_count @tags @time @events @out_of_sync @changed @resource_type @title @skipped @failed}
|
16
16
|
|
17
|
+
|
18
|
+
def self.from_pson(data)
|
19
|
+
obj = self.allocate
|
20
|
+
obj.initialize_from_hash(data)
|
21
|
+
obj
|
22
|
+
end
|
23
|
+
|
17
24
|
# Provide a boolean method for each of the states.
|
18
25
|
STATES.each do |attr|
|
19
26
|
define_method("#{attr}?") do
|
@@ -65,6 +72,27 @@ module Puppet
|
|
65
72
|
@title = resource.title
|
66
73
|
end
|
67
74
|
|
75
|
+
def initialize_from_hash(data)
|
76
|
+
@resource_type = data['resource_type']
|
77
|
+
@title = data['title']
|
78
|
+
@resource = data['resource']
|
79
|
+
@file = data['file']
|
80
|
+
@line = data['line']
|
81
|
+
@evaluation_time = data['evaluation_time']
|
82
|
+
@change_count = data['change_count']
|
83
|
+
@out_of_sync_count = data['out_of_sync_count']
|
84
|
+
@tags = data['tags']
|
85
|
+
@time = data['time']
|
86
|
+
@out_of_sync = data['out_of_sync']
|
87
|
+
@changed = data['changed']
|
88
|
+
@skipped = data['skipped']
|
89
|
+
@failed = data['failed']
|
90
|
+
|
91
|
+
@events = data['events'].map do |event|
|
92
|
+
Puppet::Transaction::Event.from_pson(event)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
68
96
|
def to_yaml_properties
|
69
97
|
YAML_ATTRIBUTES & instance_variables
|
70
98
|
end
|
data/lib/puppet/run.rb
CHANGED
@@ -32,6 +32,17 @@ class Puppet::Run
|
|
32
32
|
@options = options
|
33
33
|
end
|
34
34
|
|
35
|
+
def initialize_from_hash(hash)
|
36
|
+
@options = {}
|
37
|
+
|
38
|
+
hash['options'].each do |key, value|
|
39
|
+
@options[key.to_sym] = value
|
40
|
+
end
|
41
|
+
|
42
|
+
@background = hash['background']
|
43
|
+
@status = hash['status']
|
44
|
+
end
|
45
|
+
|
35
46
|
def log_run
|
36
47
|
msg = ""
|
37
48
|
msg += "triggered run" % if options[:tags]
|
@@ -62,9 +73,20 @@ class Puppet::Run
|
|
62
73
|
self
|
63
74
|
end
|
64
75
|
|
65
|
-
def self.
|
76
|
+
def self.from_hash(hash)
|
77
|
+
obj = allocate
|
78
|
+
obj.initialize_from_hash(hash)
|
79
|
+
obj
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.from_pson(hash)
|
83
|
+
if hash['options']
|
84
|
+
return from_hash(hash)
|
85
|
+
end
|
86
|
+
|
66
87
|
options = {}
|
67
|
-
|
88
|
+
|
89
|
+
hash.each do |key, value|
|
68
90
|
options[key.to_sym] = value
|
69
91
|
end
|
70
92
|
|
data/lib/puppet/status.rb
CHANGED
@@ -16,6 +16,12 @@ class Puppet::Transaction::Event
|
|
16
16
|
|
17
17
|
EVENT_STATUSES = %w{noop success failure audit}
|
18
18
|
|
19
|
+
def self.from_pson(data)
|
20
|
+
obj = self.allocate
|
21
|
+
obj.initialize_from_hash(data)
|
22
|
+
obj
|
23
|
+
end
|
24
|
+
|
19
25
|
def initialize(options = {})
|
20
26
|
@audited = false
|
21
27
|
options.each { |attr, value| send(attr.to_s + "=", value) }
|
@@ -23,6 +29,19 @@ class Puppet::Transaction::Event
|
|
23
29
|
@time = Time.now
|
24
30
|
end
|
25
31
|
|
32
|
+
def initialize_from_hash(data)
|
33
|
+
@audited = data['audited']
|
34
|
+
@property = data['property']
|
35
|
+
@previous_value = data['previous_value']
|
36
|
+
@desired_value = data['desired_value']
|
37
|
+
@historical_value = data['historical_value']
|
38
|
+
@message = data['message']
|
39
|
+
@name = data['name'].intern
|
40
|
+
@status = data['status']
|
41
|
+
@time = data['time']
|
42
|
+
@time = Time.parse(@time) if @time.is_a? String
|
43
|
+
end
|
44
|
+
|
26
45
|
def property=(prop)
|
27
46
|
@property = prop.to_s
|
28
47
|
end
|
@@ -19,6 +19,12 @@ class Puppet::Transaction::Report
|
|
19
19
|
:yaml
|
20
20
|
end
|
21
21
|
|
22
|
+
def self.from_pson(data)
|
23
|
+
obj = self.allocate
|
24
|
+
obj.initialize_from_hash(data)
|
25
|
+
obj
|
26
|
+
end
|
27
|
+
|
22
28
|
def <<(msg)
|
23
29
|
@logs << msg
|
24
30
|
self
|
@@ -83,6 +89,39 @@ class Puppet::Transaction::Report
|
|
83
89
|
@status = 'failed' # assume failed until the report is finalized
|
84
90
|
end
|
85
91
|
|
92
|
+
def initialize_from_hash(data)
|
93
|
+
@puppet_version = data['puppet_version']
|
94
|
+
@report_format = data['report_format']
|
95
|
+
@configuration_version = data['configuration_version']
|
96
|
+
@environment = data['environment']
|
97
|
+
@status = data['status']
|
98
|
+
@host = data['host']
|
99
|
+
@time = data['time']
|
100
|
+
if @time.is_a? String
|
101
|
+
@time = Time.parse(@time)
|
102
|
+
end
|
103
|
+
@kind = data['kind']
|
104
|
+
|
105
|
+
@metrics = {}
|
106
|
+
data['metrics'].each do |name, hash|
|
107
|
+
@metrics[name] = Puppet::Util::Metric.from_pson(hash)
|
108
|
+
end
|
109
|
+
|
110
|
+
@logs = data['logs'].map do |record|
|
111
|
+
Puppet::Util::Log.from_pson(record)
|
112
|
+
end
|
113
|
+
|
114
|
+
@resource_statuses = {}
|
115
|
+
data['resource_statuses'].map do |record|
|
116
|
+
if record[1] == {}
|
117
|
+
status = nil
|
118
|
+
else
|
119
|
+
status = Puppet::Resource::Status.from_pson(record[1])
|
120
|
+
end
|
121
|
+
@resource_statuses[record[0]] = status
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
86
125
|
def name
|
87
126
|
host
|
88
127
|
end
|
data/lib/puppet/util/log.rb
CHANGED
@@ -206,6 +206,12 @@ class Puppet::Util::Log
|
|
206
206
|
@levels.include?(level)
|
207
207
|
end
|
208
208
|
|
209
|
+
def self.from_pson(data)
|
210
|
+
obj = allocate
|
211
|
+
obj.initialize_from_hash(data)
|
212
|
+
obj
|
213
|
+
end
|
214
|
+
|
209
215
|
attr_accessor :time, :remote, :file, :line, :source
|
210
216
|
attr_reader :level, :message
|
211
217
|
|
@@ -228,6 +234,19 @@ class Puppet::Util::Log
|
|
228
234
|
Log.newmessage(self)
|
229
235
|
end
|
230
236
|
|
237
|
+
def initialize_from_hash(data)
|
238
|
+
@level = data['level'].intern
|
239
|
+
@message = data['message']
|
240
|
+
@source = data['source']
|
241
|
+
@tags = data['tags']
|
242
|
+
@time = data['time']
|
243
|
+
if @time.is_a? String
|
244
|
+
@time = Time.parse(@time)
|
245
|
+
end
|
246
|
+
@file = data['file'] if data['file']
|
247
|
+
@line = data['line'] if data['line']
|
248
|
+
end
|
249
|
+
|
231
250
|
def message=(msg)
|
232
251
|
raise ArgumentError, "Puppet::Util::Log requires a message" unless msg
|
233
252
|
@message = msg.to_s
|
data/lib/puppet/util/metric.rb
CHANGED
@@ -9,6 +9,12 @@ class Puppet::Util::Metric
|
|
9
9
|
|
10
10
|
attr_writer :basedir
|
11
11
|
|
12
|
+
def self.from_pson(data)
|
13
|
+
metric = new(data['name'], data['label'])
|
14
|
+
metric.values = data['values']
|
15
|
+
metric
|
16
|
+
end
|
17
|
+
|
12
18
|
# Return a specific value
|
13
19
|
def [](name)
|
14
20
|
if value = @values.find { |v| v[0] == name }
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
unless defined? JRUBY_VERSION
|
3
2
|
Process.maxgroups = 1024
|
4
3
|
end
|
@@ -34,21 +33,6 @@ end
|
|
34
33
|
end
|
35
34
|
}
|
36
35
|
|
37
|
-
if defined?(YAML::ENGINE) and YAML::ENGINE.yamler == 'psych'
|
38
|
-
def Psych.safely_load(str)
|
39
|
-
result = Psych.parse(str)
|
40
|
-
if invalid_node = result.find { |node| node.tag =~ /!map:(.*)/ || node.tag =~ /!ruby\/hash:(.*)/ }
|
41
|
-
raise ArgumentError, "Illegal YAML mapping found with tag #{invalid_node.tag}; please use !ruby/object:#{$1} instead"
|
42
|
-
else
|
43
|
-
result.to_ruby
|
44
|
-
end
|
45
|
-
end
|
46
|
-
else
|
47
|
-
def YAML.safely_load(str)
|
48
|
-
self.load(str)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
36
|
def YAML.dump(*args)
|
53
37
|
ZAML.dump(*args)
|
54
38
|
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Puppet
|
2
|
+
# Simple module to manage vendored code.
|
3
|
+
#
|
4
|
+
# To vendor a library:
|
5
|
+
#
|
6
|
+
# * Download its whole git repo or untar into `lib/puppet/vendor/<libname>`
|
7
|
+
# * Create a lib/puppetload_libraryname.rb file to add its libdir into the $:.
|
8
|
+
# (Look at existing load_xxx files, they should all follow the same pattern).
|
9
|
+
# * To load the vendored lib upfront, add a `require '<vendorlib>'`line to
|
10
|
+
# `vendor/require_vendored.rb`.
|
11
|
+
# * To load the vendored lib on demand, add a comment to `vendor/require_vendored.rb`
|
12
|
+
# to make it clear it should not be loaded upfront.
|
13
|
+
#
|
14
|
+
# At runtime, the #load_vendored method should be called. It will ensure
|
15
|
+
# all vendored libraries are added to the global `$:` path, and
|
16
|
+
# will then call execute the up-front loading specified in `vendor/require_vendored.rb`.
|
17
|
+
#
|
18
|
+
# The intention is to not change vendored libraries and to eventually
|
19
|
+
# make adding them in optional so that distros can simply adjust their
|
20
|
+
# packaging to exclude this directory and the various load_xxx.rb scripts
|
21
|
+
# if they wish to install these gems as native packages.
|
22
|
+
#
|
23
|
+
class Vendor
|
24
|
+
class << self
|
25
|
+
# @api private
|
26
|
+
def vendor_dir
|
27
|
+
File.join([File.dirname(File.expand_path(__FILE__)), "vendor"])
|
28
|
+
end
|
29
|
+
|
30
|
+
# @api private
|
31
|
+
def load_entry(entry)
|
32
|
+
Puppet.debug("Loading vendored #{$1}")
|
33
|
+
load "#{vendor_dir}/#{entry}"
|
34
|
+
end
|
35
|
+
|
36
|
+
# @api private
|
37
|
+
def require_libs
|
38
|
+
require 'puppet/vendor/require_vendored'
|
39
|
+
end
|
40
|
+
|
41
|
+
# Configures the path for all vendored libraries and loads required libraries.
|
42
|
+
# (This is the entry point for loading vendored libraries).
|
43
|
+
#
|
44
|
+
def load_vendored
|
45
|
+
Dir.entries(vendor_dir).each do |entry|
|
46
|
+
if entry.match(/load_(\w+?)\.rb$/)
|
47
|
+
load_entry entry
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
require_libs
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
$: << File.join([File.dirname(__FILE__), "safe_yaml/lib"])
|
@@ -0,0 +1,104 @@
|
|
1
|
+
0.9.2
|
2
|
+
-----
|
3
|
+
|
4
|
+
- fixed error w/ parsing "!" when whitelisting tags
|
5
|
+
- fixed parsing of the number 0 (d'oh!)
|
6
|
+
|
7
|
+
0.9.1
|
8
|
+
-----
|
9
|
+
|
10
|
+
- added Yecht support (JRuby)
|
11
|
+
- more bug fixes
|
12
|
+
|
13
|
+
0.9.0
|
14
|
+
-----
|
15
|
+
|
16
|
+
- added `whitelist!` method for easily whitelisting tags
|
17
|
+
- added support for call-specific options
|
18
|
+
- removed deprecated methods
|
19
|
+
|
20
|
+
0.8.6
|
21
|
+
-----
|
22
|
+
|
23
|
+
- fixed bug in float matcher
|
24
|
+
|
25
|
+
0.8.5
|
26
|
+
-----
|
27
|
+
|
28
|
+
- performance improvements
|
29
|
+
- made less verbose by default
|
30
|
+
- bug fixes
|
31
|
+
|
32
|
+
0.8.4
|
33
|
+
-----
|
34
|
+
|
35
|
+
- enhancements to parsing of integers, floats, and dates
|
36
|
+
- updated built-in whitelist
|
37
|
+
- more bug fixes
|
38
|
+
|
39
|
+
0.8.3
|
40
|
+
-----
|
41
|
+
|
42
|
+
- fixed exception on parsing empty document
|
43
|
+
- fixed handling of octal & hexadecimal numbers
|
44
|
+
|
45
|
+
0.8.2
|
46
|
+
-----
|
47
|
+
|
48
|
+
- bug fixes
|
49
|
+
|
50
|
+
0.8.1
|
51
|
+
-----
|
52
|
+
|
53
|
+
- added `:raise_on_unknown_tag` option
|
54
|
+
- renamed `reset_defaults!` to `restore_defaults!`
|
55
|
+
|
56
|
+
0.8
|
57
|
+
---
|
58
|
+
|
59
|
+
- added tag whitelisting
|
60
|
+
- more API changes
|
61
|
+
|
62
|
+
0.7
|
63
|
+
---
|
64
|
+
|
65
|
+
- separated YAML engine support from Ruby version
|
66
|
+
- added support for binary scalars
|
67
|
+
- numerous bug fixes and enhancements
|
68
|
+
|
69
|
+
0.6
|
70
|
+
---
|
71
|
+
|
72
|
+
- several API changes
|
73
|
+
- added `SafeYAML::OPTIONS` for specifying default behavior
|
74
|
+
|
75
|
+
0.5
|
76
|
+
---
|
77
|
+
|
78
|
+
Added support for dates
|
79
|
+
|
80
|
+
0.4
|
81
|
+
---
|
82
|
+
|
83
|
+
- efficiency improvements
|
84
|
+
- made `YAML.load` use `YAML.safe_load` by default
|
85
|
+
- made symbol deserialization optional
|
86
|
+
|
87
|
+
0.3
|
88
|
+
---
|
89
|
+
|
90
|
+
Added Syck support
|
91
|
+
|
92
|
+
0.2
|
93
|
+
---
|
94
|
+
|
95
|
+
Added support for:
|
96
|
+
|
97
|
+
- anchors & aliases
|
98
|
+
- booleans
|
99
|
+
- nils
|
100
|
+
|
101
|
+
0.1
|
102
|
+
---
|
103
|
+
|
104
|
+
Initial release
|