summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector/file_content
Commit message (Collapse)AuthorAgeFilesLines
* maint: remove inaccurate copyright and license statements.Daniel Pittman2011-08-183-12/+0
| | | | | | | | | | | For a while Luke, and other authors, injected a created tag, copyright statement, and "All rights reserved" into every new file they added to the Puppet project. This isn't really true, and we have a global license covering the code, so we have now stripped out all those old tags. Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
* Code smell: Two space indentationMarkus Roberts2010-07-093-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced 106806 occurances of ^( +)(.*$) with The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people who learned ruby in the 1900s) uses two-space indentation. 3 Examples: The code: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") becomes: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") The code: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object becomes: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object The code: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end becomes: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end
* Correctly handling URI escaping throughout the REST processLuke Kanies2009-02-191-1/+0
| | | | | | | | | | This means, at the least, that we can now serve files via REST when they have spaces and other weird characters in their names. This involves a small change to many files. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding pluginsyncing support to the IndirectorLuke Kanies2009-02-191-11/+0
| | | | | | | | | This switches away from the use of terminii for each type of fileserving - it goes back to the traditional fileserving method, and is much cleaner and simpler as a result. Signed-off-by: Luke Kanies <luke@madstop.com>
* File serving should work now, both recursive andLuke Kanies2007-10-241-19/+2
| | | | | | | | | | | | | | single files, across modules, local file system, and the traditional file server. This work revolves around making sure that the termini produce functional file instances, meaning that they know how to find their content or metadata, which largely comes down to setting their paths correctly. I also created a new terminus base class for the local filesystem, since there was so much common code between content and metadata.
* Renaming the :local termini for metadata and contentLuke Kanies2007-10-221-1/+1
| | | | to :file.
* Link handling is now in the file serving classes.Luke Kanies2007-10-221-1/+1
| | | | | | | | | | This was done by putting all of the functionality in the Content and Metadata class (actually, in a new base class for them). There are still some issues, and there need to be integration tests between the :local (soon to be renamed :file) termini for these classes.
* Adding searchability to the fileserving termini, using theLuke Kanies2007-10-221-3/+8
| | | | | | | new Fileset class. The tests aren't the cleanest, in that there is still a good bit of duplication in them, but it's what we got.
* Renaming the 'mounts' terminus to 'file_server', and renamingLuke Kanies2007-10-201-1/+1
| | | | tests accordingly.
* File serving now works. I've tested a couple of ways toLuke Kanies2007-10-194-24/+20
| | | | | | | | | | | | | | | | use it, and added integration tests at the most important hook points. This provides the final class structure for all of these classes, but a lot of the class names are pretty bad, so I'm planning on going through all of them (especially the file_server stuff) and renaming. The functionality is all here for finding files, though (finally). Once the classes are renamed, I'll be adding searching ability (which will enable the recursive file copies) and then adding the link management and enabling ignoring files.
* I've now split the file-serving termini into two separate types (inLuke Kanies2007-10-183-1/+48
| | | | | | | | | | | | | | | | addition to Rest): A local terminus that just uses direct file paths, and a mounts terminus that uses the file server to figure out what the path should be. It looks like it also makes sense to split the 'mounts' terminus further, so there is a 'modules' terminus used to look files up in the terminus. I've added some integration tests to verify that everything is hooked together correctly. Lastly, I added a directory for shared behaviours. There's a ton of duplication in this setup, because the Content and Metadata classes behave almost but not quite identically across the board.
* Fixing all of the classes that I just renamed, and addingLuke Kanies2007-10-181-1/+1
| | | | the TerminusSelector module to the File Metadata indirection.
* Renaming the file serving indirection termini to matchLuke Kanies2007-10-181-0/+0
| | | | the standards I set in the TerminusSelector.
* I'm working on making file serving work in the indirector now, so ILuke Kanies2007-10-181-0/+3
| | | | | | | | | | | | | | | added two abilities to the indirections: Models can specify a module to extend the indirection instance with, and indirections will use a :select_terminus method, if it's available, to select the terminus to use for finding. (It's currently only used for finding, not destroying or saving.) The upshot is that a model can have a module that handles terminus selection for it, and then extend its indirection with that module. This will allow me to use the local terminus when the protocol is 'file' and the REST terminus when the protocol is 'puppet'. It should also open the door for other protocols if they become available.
* Renaming the file_serving/{content,metadata} indirectionsLuke Kanies2007-10-181-0/+11
so that they make more sense in the REST API, and creating stub tests for the indirection termini. Now it's on to create the rest of the tests for them.