diff options
| author | Luke Kanies <luke@madstop.com> | 2007-10-22 23:18:58 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-10-22 23:18:58 -0500 |
| commit | b874751cbb04c9250163e8cb5600418e12414dfa (patch) | |
| tree | 95766526deb1949dedcfe067f28b17b4644e7501 | |
| parent | de5d91e2036de2934a4eec79d35a714f3ed24b10 (diff) | |
| download | puppet-b874751cbb04c9250163e8cb5600418e12414dfa.tar.gz puppet-b874751cbb04c9250163e8cb5600418e12414dfa.tar.xz puppet-b874751cbb04c9250163e8cb5600418e12414dfa.zip | |
Renaming the FileServing TerminusSelector module to IndirectionHooks,
because I'm going to add some hooks for transforming returned objects.
| -rw-r--r-- | lib/puppet/file_serving/content.rb | 4 | ||||
| -rw-r--r-- | lib/puppet/file_serving/indirection_hooks.rb (renamed from lib/puppet/file_serving/terminus_selector.rb) | 2 | ||||
| -rw-r--r-- | lib/puppet/file_serving/metadata.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/file_serving/content.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/file_serving/indirection_hooks.rb (renamed from spec/unit/file_serving/terminus_selector.rb) | 10 | ||||
| -rwxr-xr-x | spec/unit/file_serving/metadata.rb | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/lib/puppet/file_serving/content.rb b/lib/puppet/file_serving/content.rb index 3cb428e63..063192d15 100644 --- a/lib/puppet/file_serving/content.rb +++ b/lib/puppet/file_serving/content.rb @@ -5,14 +5,14 @@ require 'puppet/indirector' require 'puppet/file_serving' require 'puppet/file_serving/file_base' -require 'puppet/file_serving/terminus_selector' +require 'puppet/file_serving/indirection_hooks' # A class that handles retrieving file contents. # It only reads the file when its content is specifically # asked for. class Puppet::FileServing::Content < Puppet::FileServing::FileBase extend Puppet::Indirector - indirects :file_content, :extend => Puppet::FileServing::TerminusSelector + indirects :file_content, :extend => Puppet::FileServing::IndirectionHooks attr_reader :path diff --git a/lib/puppet/file_serving/terminus_selector.rb b/lib/puppet/file_serving/indirection_hooks.rb index 06b53ddb1..141642efe 100644 --- a/lib/puppet/file_serving/terminus_selector.rb +++ b/lib/puppet/file_serving/indirection_hooks.rb @@ -8,7 +8,7 @@ require 'puppet/file_serving' # This module is used to pick the appropriate terminus # in file-serving indirections. This is necessary because # the terminus varies based on the URI asked for. -module Puppet::FileServing::TerminusSelector +module Puppet::FileServing::IndirectionHooks PROTOCOL_MAP = {"puppet" => :rest, "file" => :file, "puppetmounts" => :file_server} # Pick an appropriate terminus based on the protocol. diff --git a/lib/puppet/file_serving/metadata.rb b/lib/puppet/file_serving/metadata.rb index 62ebccca9..410655731 100644 --- a/lib/puppet/file_serving/metadata.rb +++ b/lib/puppet/file_serving/metadata.rb @@ -7,14 +7,14 @@ require 'puppet/indirector' require 'puppet/file_serving' require 'puppet/file_serving/file_base' require 'puppet/util/checksums' -require 'puppet/file_serving/terminus_selector' +require 'puppet/file_serving/indirection_hooks' # A class that handles retrieving file metadata. class Puppet::FileServing::Metadata < Puppet::FileServing::FileBase include Puppet::Util::Checksums extend Puppet::Indirector - indirects :file_metadata, :extend => Puppet::FileServing::TerminusSelector + indirects :file_metadata, :extend => Puppet::FileServing::IndirectionHooks attr_reader :path, :owner, :group, :mode, :checksum_type, :checksum, :ftype, :destination diff --git a/spec/unit/file_serving/content.rb b/spec/unit/file_serving/content.rb index e15aa8be6..d6b5fdbe7 100755 --- a/spec/unit/file_serving/content.rb +++ b/spec/unit/file_serving/content.rb @@ -13,8 +13,8 @@ describe Puppet::FileServing::Content do Puppet::FileServing::Content.indirection.name.should == :file_content end - it "should should include the TerminusSelector module in its indirection" do - Puppet::FileServing::Content.indirection.metaclass.included_modules.should include(Puppet::FileServing::TerminusSelector) + it "should should include the IndirectionHooks module in its indirection" do + Puppet::FileServing::Content.indirection.metaclass.included_modules.should include(Puppet::FileServing::IndirectionHooks) end end diff --git a/spec/unit/file_serving/terminus_selector.rb b/spec/unit/file_serving/indirection_hooks.rb index 9c2c01bfd..34614b7b8 100755 --- a/spec/unit/file_serving/terminus_selector.rb +++ b/spec/unit/file_serving/indirection_hooks.rb @@ -5,12 +5,12 @@ require File.dirname(__FILE__) + '/../../spec_helper' -require 'puppet/file_serving/terminus_selector' +require 'puppet/file_serving/indirection_hooks' -describe Puppet::FileServing::TerminusSelector, " when being used to select termini" do +describe Puppet::FileServing::IndirectionHooks, " when being used to select termini" do before do @object = Object.new - @object.extend(Puppet::FileServing::TerminusSelector) + @object.extend(Puppet::FileServing::IndirectionHooks) end it "should escape the key before parsing" do @@ -83,10 +83,10 @@ describe Puppet::FileServing::TerminusSelector, " when being used to select term end end -describe Puppet::FileServing::TerminusSelector, " when looking for a module whose name matches the mount name" do +describe Puppet::FileServing::IndirectionHooks, " when looking for a module whose name matches the mount name" do before do @object = Object.new - @object.extend(Puppet::FileServing::TerminusSelector) + @object.extend(Puppet::FileServing::IndirectionHooks) @modules = mock 'modules' @object.stubs(:terminus).with(:modules).returns(@modules) diff --git a/spec/unit/file_serving/metadata.rb b/spec/unit/file_serving/metadata.rb index 27ebe2471..bdddd255b 100755 --- a/spec/unit/file_serving/metadata.rb +++ b/spec/unit/file_serving/metadata.rb @@ -9,8 +9,8 @@ describe Puppet::FileServing::Metadata do Puppet::FileServing::Metadata.indirection.name.should == :file_metadata end - it "should should include the TerminusSelector module in its indirection" do - Puppet::FileServing::Metadata.indirection.metaclass.included_modules.should include(Puppet::FileServing::TerminusSelector) + it "should should include the IndirectionHooks module in its indirection" do + Puppet::FileServing::Metadata.indirection.metaclass.included_modules.should include(Puppet::FileServing::IndirectionHooks) end end |
