summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_serving
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-08-24 20:53:25 -0500
committerLuke Kanies <luke@madstop.com>2008-08-26 22:40:41 -0700
commit40e76fb83ef466425fec736abbf1913a6426bf01 (patch)
tree59b4239f340260d58e026470b6c060334632a0d5 /lib/puppet/file_serving
parent8ea25efd90b4d2281db12076cbaab3f766cac8b4 (diff)
downloadpuppet-40e76fb83ef466425fec736abbf1913a6426bf01.tar.gz
puppet-40e76fb83ef466425fec736abbf1913a6426bf01.tar.xz
puppet-40e76fb83ef466425fec736abbf1913a6426bf01.zip
Fixing the rest backends for webrick and mongrel so the get the whole request key.
Also adding the Content work necessary to demonstrate that this is actually required. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/file_serving')
-rw-r--r--lib/puppet/file_serving/content.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/puppet/file_serving/content.rb b/lib/puppet/file_serving/content.rb
index f13fcaa72..b30070dd6 100644
--- a/lib/puppet/file_serving/content.rb
+++ b/lib/puppet/file_serving/content.rb
@@ -14,9 +14,19 @@ class Puppet::FileServing::Content < Puppet::FileServing::Base
extend Puppet::Indirector
indirects :file_content, :extend => Puppet::FileServing::IndirectionHooks
- attr_reader :path
+ def self.supported_formats
+ [:raw]
+ end
+
+ def self.from_raw(content)
+ instance = new("eh")
+ instance.content = content
+ instance
+ end
+ # Collect our data.
def collect
+ content
end
# Read the content of our file in.
@@ -29,4 +39,8 @@ class Puppet::FileServing::Content < Puppet::FileServing::Base
end
@content
end
+
+ def to_raw
+ content
+ end
end