| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
to :file.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
tests accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
the TerminusSelector module to the File Metadata indirection.
|
|
|
|
| |
the standards I set in the TerminusSelector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|