Age | Commit message (Collapse) | Author | Files | Lines |
|
LoadedFile is now WatchedFile (since it has nothing to do with loading
files, only with telling when they change), and some of its internal
variables have been renamed for clarity. Also added a FileWatcher class
whose entire purpose is to track a set of LoadedFiles in aggregate. This
is now used by TypeCollection in place of its own hash.
Puppet::FileServing::Configuration::Parser and
Puppet::Util::NetworkDevice::Config were inheriting LoadedFile, simply
for its changed? method, even though neither of them really has file
properties. Now they wrap a WatchedFile instance instead.
|
|
|
|
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,'
|
|
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.
|
|
The regex was a little bit too strict and disallowed certnames
containing a dash.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
Absolute paths on Unix, e.g. /foo/bar, are not absolute on Windows,
which breaks many test cases. This commit adds a method to
PuppetSpec::Files.make_absolute that makes the path absolute in
test cases.
On Unix (Puppet.features.posix?) it is a no-op. On Windows,
(Puppet.features.microsoft_windows?) the drive from the current
working directory is prepended.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
(cherry picked from commit 462a95e3d077b1915a919399b846068816c84583)
Conflicts:
spec/unit/parser/functions/extlookup_spec.rb
|
|
We got rid of the '../../spec_helper' style requires, but a few of them snuck
back in in recent changes. This purges them out, replaced with the header:
#!/usr/bin/env rspec
require 'spec_helper'
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
|
|
Reviewed-By: Mike Stahnke
|