| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When puppetdoc rdoc dies with an unhandled exception, the error
message produced didn't mention the file and line where the parser
choked.
This patch fixes this by trying to locate on which AST structure
the rdoc system failed.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
class klass {
include a, b, c
}
wasn't producing any rdoc documentation.
We were thinking code was always embedded in an array which is not
the case for mono-instruction code.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This doesn't cover all the code, only the part that interacts with
Puppet internals which is what matters when Puppet changes.
This patch also contains an integration test.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While we were keeping track of superclass/nodes during RDoc generation
we weren't doing the reverse.
This patch enhance Puppetdoc RDoc mode by tracking inheritance and
for each base/super class/nodes displays the list of inherited classes
/nodes.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| | |
Puppetdoc wasn't parsing 'require'. This patch adds a 'require' section
to list all required class from nodes and classes.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These parameters allow loading a file anywhere on the filesystem; using
them also greatly speeds up processing the resource.
* lib/puppet/type/augeas.rb: add 'incl' and 'lens' parameters; change
default for 'context' when 'incl' is given.
* lib/puppet/provider/augeas/augeas.rb: when 'lens' and 'incl' are given,
only load that file
* spec/unit/type/augeas.rb: check that constraints on new parameters are
enforced
This fixes ticket #2694
|
|/
|
|
|
|
| |
Adapter requires specifying database, username and password.
Signed-off-by: Avi Miller <avi.miller@gmail.com>
|
|
|
|
|
|
|
|
| |
Minor packaging fixes included since 0.25.0:
- Include the pi program and man page (R.I.Pienaar)
- Move puppetca to puppet package, it has uses on client systems
- Drop redundant %doc from manpage %file listings
|
|
|
|
|
|
|
|
|
|
|
| |
In post processing a Symbol was being passed to StringScanner.
StringScanner was not happy with this. The error message lost
backtrace information and the test coverage was both inadequate
and broken (see #2745).
To be fully effective, this patch needs/assumes the patch for
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
|
| |
The old fakedata test facility was not playing nicely with the
spec tests; although it looped through all the files failures
in any example file after the first were being ignored because
of the way fakedataparse was interacting with the before blocks.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
| |
There were a number of problems here (duplicated code, meaningless
tests, etc.) but the core was that the last definition of target
ignored the provided value if there was also a user specified.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
| |
Now it does, there are tests to prove it, and the related tests
for tags and version have been strengthend.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When code comes in via STDIN or --code ,
Puppet::Util::Settings interpolates $values in the code,
which is probably never the intended behavior.
This is the least destructive fix I could think of:
have Puppet::Parser::Interpreter ask for the uninterpolated value.
More general fixes could be to:
a) Add an escape character to Settings's interpolator, and escape STDIN
b) Add a mechanism to Settings to mark some values as uninterpolated
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This commit adds any external node classes to the classlist
at compiler initialization, so that at least those classes
will be isolated from any ordering issues encountered when
testing the contents of the class list during compilation.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bundeling and renaming the pure ruby json library to addresses a
number of cross version serliaization bugs (#2615, et al).
This patch adds a subset of the files from the json_pure gem to
lib/puppet/external/pson (renamed to avoid conflicts with rails) so
that we will always have a known-good erialization format available.
The pure ruby json gem as distibuted defers to the compiled version
if it is installed. This is problematic in some circumstances so the
files that have been brought over have been modified to always and
only use the bundled version.
It's a large patch, so here's a breakdown of the change categories:
The majority of the lines are only marginally interesting:
* The json lib itself (in lib/puppet/external/pson) make up the bulk
of the lines.
* Renaming of json to pson make up the second largest group.
Somewhat more interesting are the following, which can be located by
searching the diffs for the indicated strings:
* Adjusting tests to reflect the changes
* Changing the encoding/decoding behavior so that nested structures
(e.g. resources) don't serialize as escaped strings. This should
make it much easier to process the results with external tools, if
needed. Search for "to_pson" and "to_pson_data_hash"
* Cleaning up the envelope/metadata
* Now provides a document_type (as opposed to a ruby class name) by
using a symple registration scheme instead of constant lookup
(search for "document_type")
* Added an api_version (search for "api_version")
* Added a hash for document metadata (search for "metadata")
* Removing the yaml monkeypatch and instead disabling yaml serialization
on ruby 1.8.1 in favor of pson (search for "yaml")
* Cleaning up the json/rails feature interaction (they're now totally
independent) (search for "feature")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is my proposed attack on the lexing problem, with a few minor
cleanups to simplify its integration. The strategy:
* Anotate tokens with a method "acceptable?" that determines if
they can be generated in a given context. Have this default
to true.
* Give the lexer the notion of a context; initialize it and
update it as needed. The present context records the name of
the last significant token generated and a start_of_line flag.
* When a token is found to match, check if it is acceptable in
the present context before generating it.
These changes don't result any any change in behaviour but they
enable:
* Give the REGEX token an acceptable? rule that only permits a
regular expression in specific contexts.
The other changes were a fix to the scan bug Brice reported,
adjusting a test and clearing up some cluttered conditions in the
context collection path.
Added tests and subsumed change restricting REGEX to one line.
|
|
|
|
|
|
|
| |
Refactor to not generate explicit resources and to not bail out if
one of a set can not be ensured absend.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
| |
Use Puppet::Util.execute to run the config_version command and reraise
its potential Puppet::ExecutionFailure exception as a more useful
Pupppet::ParseError
|
|
|
|
| |
are looking for a binary
|
| |
|
|
|
|
| |
Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
|
|
|
|
| |
Thanks to Allan Marcus for the fix.
|
|
|
|
|
|
|
|
|
|
| |
The sysconfig file shipped on Red Hat systems includes a PUPPET_PORT
variable. When set, this should specify the port used by puppet to
connect to the puppetmaster. The init script was incorrectly passing
this argument via the --port option, which sets the port on which
puppetd listens.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
|
|
|
|
|
|
| |
* update-eix is deprecated and will be removed from stable soon
* update format string form eix-0.18
* fix format string for >=eix-0.18
|
|
|
|
| |
correctly.
|
|
|
|
|
|
| |
Signed-off-by: Markus Roberts <Markus@reality.com>
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
| |
The #2627 fix was modifying nodename in case of string nodename, but
was removing '_'. Since underscores is a valid character in a class
name, we now allow it.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
|
| |
|
|
|
|
| |
Yumrepo type will now chmod on all files when a change happens. If the content is not changed then no chmod will occur.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not the real fix. It is just an hot-fix to limit
the issue.
The issue is that the lexer regexes have precedences over simple
'/' (divide).
In the following expression:
$var = 4096 / 4
$var2 = "/tmp/file"
The / 4... part is mis-lexed as a regex instead of a mathematical
expression.
The current fix limits regex to one-line.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since required_features can (and frequently does) return a single
item instead of an Array, the error message needed to be more robust.
The tests were not specific enough to catch the fact that an error
was being raised in the generation of the error, so a more specific
test was added and the required_features accessor test was beefed up
a little.
Signed-off-by: Markus Roberts <Markus@reality.com>
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The runit provider was left broken after some work on daemontools
on which runit is based, and #2640 didn't override the
restart command, so daemontools once was called.
This patch aims to fix this provider and bring it on par with
daemontools.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
| |
Internally the service user & group should only be referenced by the
place-holder string 'service' which is replaced with the actual user
or group as needed at the puppet/OS border. This patch corrects to
places in reports where Puppet[:user] and Puupet[:group] were being
used instead.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
| |
I couldn't find a way to make it compatible with
earlier clients, so the docs specify that
it doesn't work with them, and it helpfully fails.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
We broke some cases of metaparam compatibility in 0.25.
Most of it was pretty esoteric, but one thing that wasn't working
was relationship metaparams specified on defined resources.
This adds a compatibility method for older clients.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
We need to be able to do compatibility testing, and this
allows us to do so.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
Reworks the error message to 1) make it clearer that it's an internal
error, not something the user did, 2) rearrange the sentence to make
it clearer that "setting" is being used as a noun 3) combined several
fields to increase the chance that the identifying information would
suffice to lead someone to the actual source of the error.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
|
|
| |
This allows us to search for a cert, and we use the searched-for
term as the cert name (for the wrapper, not the actual cert object),
rather than the real cert name.
This allows us to use symbolic names like 'ca', as we're currently doing.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
It was hanging reading stdin because no code had
been supplied.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When we are checking if a node exists before creating a new one
we were also trying to match with regex node names, finding matches
where in fact there is no equality.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
|
|
|
|
|
|
|
| |
Removed the array wrapping of values for JSON serialization, and
the associated test.
Signed-off-by: Markus Roberts <Markus@reality.com>
|