lib/openwfe/storage/yamlfilestorage.rb in openwferu-0.9.11 vs lib/openwfe/storage/yamlfilestorage.rb in openwferu-0.9.12
- old
+ new
@@ -48,19 +48,21 @@
require 'openwfe/utils'
require 'openwfe/service'
require 'openwfe/expressions/flowexpression'
require 'openwfe/expressions/raw_xml'
+
#
# making sure classes in those files are loaded
# before their yaml persistence is tuned
# (else the reopening of the class is interpreted as
# a definition of the class...)
-
module OpenWFE
-
+
+
+
#
# Stores OpenWFEru related objects into yaml encoded files.
# This storage is meant to look and feel like a Hash.
#
class YamlFileStorage
@@ -142,10 +144,11 @@
fei_path = compute_file_path(fei)
if not File.exist?(fei_path)
ldebug { "[] didn't find file at #{fei_path}" }
+ #puts "[] didn't find file at #{fei_path}"
return nil
end
load_object(fei_path)
end
@@ -163,11 +166,11 @@
protected
def load_object (path)
object = YAML.load_file(path)
-
+
object.application_context = @application_context \
if object.respond_to? :application_context=
object
end
@@ -211,9 +214,10 @@
#
# Passes each object to the given block
#
def each_object (&block)
+
each_object_path do |path|
block.call load_object(path)
end
end