summaryrefslogtreecommitdiff
path: root/spec/shared_behaviours/file_server_terminus.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06(PUP-716) Change Puppet::FileSystem::File to module methodsHenrik Lindberg1-2/+2
This changes the API in a new implementation in a file called file_.rb The intent is that it should replace the implemntation in File, or perhaps directly in a Puppet::FileSystem class.
2013-11-08(#19447) Puppet::FileSystem::File.exist?Ethan J. Brown1-2/+2
- All previous File and FileTest calls to exist? or exists? go through the new FileSystem::File abstraction so that the implementation can later be swapped for a Windows specific one to support symlinks
2012-09-26(Maint) Remove rspec from shebang lineJeff McCune1-1/+1
Without this patch Ruby 1.9 is still complaining loudly about trying to parse the spec files. The previous attempt to clean up this problem in edc3ddf works for Ruby 1.8 but not 1.9. I'd prefer to remove the shebang lines entirely, but doing so will cause encoding errors in Ruby 1.9. This patch strives for a happy middle ground of convincing Ruby it is actually working with Ruby while not confusing it to think it should exec() to rspec. This patch is the result of the following command run against the source tree: find spec -type f -print0 | \ xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
2012-07-02(maint) Standardize on /usr/bin/env ruby -S rspecJeff McCune1-1/+1
Without this patch some spec files are using `ruby -S rspec` and others are using `rspec`. We should standardize on a single form of the interpreter used for spec files. `ruby -S rspec` is the best choice because it correctly informs editors such as Vim with Syntastic that the file is a Ruby file rather than an Rspec file.
2012-04-23Make positional arguments distinct in Request#initializePatrick Carlisle1-1/+1
Puppet::Indirector::Request#initialize had a weird implementation giving variable semantics to positional arguments. This makes it normal again.
2011-08-19Remove use of Util::Cacher in FileServing::ConfigurationNick Lewis1-1/+1
This class was using Util::Cacher for its singleton instance, when that was unnecessary. The FileServing::Configuration instance already manages whether or not to reparse its config file, based on whether it has changed. Thus, there is no need for it to be manually expired via the cacher. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 4bad729f56c26d8154cd0f20614fa4e478de9d40)
2011-08-18maint: remove inaccurate copyright and license statements.Daniel Pittman1-4/+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>
2011-04-13maint: clean up the spec test headers in bulk.Daniel Pittman1-1/+1
We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
2011-01-04(#5771) Upgrade rspec to version 2Matt Robinson1-1/+1
The biggest change is that we no longer need to monkey patch rspec to get confine behavior. Describe blocks can now be conditional like confine used to be. "describe" blocks with "shared => true" are now "shared_examples_for". Paired-With: Nick Lewis
2010-07-09Code smell: Two space indentationMarkus Roberts1-28/+28
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
2009-02-19Adding pluginsyncing support to the IndirectorLuke Kanies1-1/+1
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>
2008-12-20Fix #1834 part1 - Fix tempfile failing testsBrice Figureau1-1/+2
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-11-11Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies1-1/+1
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-08-26Adding automatic attribute collection to the new fileserving code.Luke Kanies1-9/+11
Basically, this just includes a consistent method for collecting info (either content or metadata) and then calls that method when returning instances via the indirector. It's such a large commit mostly because of small changes in the normal code and large changes in the testing to accomodate those small changes. Signed-off-by: Luke Kanies <luke@madstop.com>
2008-08-26Removing the last vestiges of the 'puppetmounts' protocol marker.Luke Kanies1-1/+1
I created this when I first designed the fileserving Indirection hooks, and it's unnecessary. Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-29Merge branch '0.24.x' into mergingLuke Kanies1-1/+3
Conflicts: test/ral/type/filesources.rb
2008-07-18Fixed all of the fileserving termini so they use indirection requests.Luke Kanies1-1/+3
This looks like a much larger commit than it is -- it doesn't change any behaviour at all, it just adds some integration tests (which expose the problem) and then switches from an ad-hoc api to a request-based api. Signed-off-by: Luke Kanies <luke@madstop.com>
2008-05-13Using the new Cacher class for handling cached data.Luke Kanies1-1/+1
This provides a single, global bit for determining whether a given piece of cached data is still valid.
2008-02-12Copying over Rick's work from the master branch supporting autotest andLuke Kanies1-0/+40
cleaning up the rspec support.
2007-12-05Moving $PUPPET/spec/lib/autotest up to $PUPPET/autotest as something has ↵Rick Bradley1-0/+40
changed and it can't be found otherwise. Adding $PUPPET/vendor/gems, with unpacked rspec gem there, introducing to spec_helper.rb LOAD_PATH incantation. Eliminating ad hoc unpacked rspec from spec/lib. Moving monkey_patches and shared_behaviors up under spec/. Adjusting spec_helper.rb accordingly. Nuking spec/lib. Fixing up autotest/puppet_rspec.rb to be able to hunt down our vendor/gems/rspec/bin/spec binary. We can now run rspec without having to have the rspec gem installed.