| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
This provides the other half of #2440 - you can
compile catalogs into json with puppetmasterd,
and now you can take those json catalogs and apply
them.
This allows you to use whatever mechanism you want
to ship the catalogs around.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
The problems were that I wasn't propagating return
values sufficiently, such that false values didn't
travel enough, and the 'name' attribute was necessary
in the private method but wasn't actually passed in.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
|
|
|
|
|
|
|
| |
I thought I'd found a bug, but I couldn't reproduce
it. This test was supposed to demonstrate the bug,
but is at least good enough to leave in.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
Unsetting scope vars was broken, but it was
only ever used in testing (and apparently rarely
at that), so it wasn't caught.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
These tests tried to load something, verified
the loads didn't work, and then created
the thing to load. This is a bit silly,
so I just removed those sections of the tests.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
This was to fix a failing test/unit test.
Test coverage is now a bit better, more maintainable,
and I refactored the code just slightly to make it a bit
cleaner.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
7 was added as a valid weekday in #2293, and this
test just corrects that.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
This is just an additional info log in the transaction,
and is only done if the version is non-nil.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
The log instances have file, line, and config version
information, although it's not currently printed.
It's available in the reports, and you can strip it
out with your own processors.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This allows you to specify a command used to determine
the catalog version. Also added an integration test
to verify the version cascades.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
|
|
|
|
|
|
| |
This patch enhance AST::HostName to support regexes, and modifies
the parser to allow regex to be used as node name.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>]
|
|
|
|
|
|
|
|
|
| |
This patch uses the unused AST::HostName as the only way to reference
a node in the AST nodes array.
The AST::HostName respect the hash properties of the underlying
string, to keep the O(1) hash properties.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The case and selector statements define ephemeral vars, like 'if'.
Usage:
case statement:
$var = "foobar"
case $var {
"foo": {
notify { "got a foo": }
}
/(.*)bar$/: {
notify{ "hey we got a $1": }
}
}
and for selector:
$val = $test ? {
/^match.*$/ => "matched",
default => "default"
}
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset introduces regexp in if expression with the use of the
=~ (match) and !~ (not match) operator.
Usage:
if $uname =~ /Linux|Debian/ {
...
}
Moreover this patch creates ephemeral variables ($0 to $9) in the current
scope which contains the regex captures:
if $uname =~ /(Linux|Debian)/ {
notice("this is a $1 system")
}
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
| |
Add a regex rule (unused for the moment) to the parser.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
| |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
| |
The lexer recognizes regex delimited by / as in:
/^$/
The match operator is defined by =~
The not match operator is defined by !~
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
| |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
| |
Those variables have been created to be short lived and used mainly
to define temporary special variables.
They do not persist after a call to unset_ephemeral_var.
Also Scope#set_ephemeral_from can be used to promote a regexp
MatchData to ephemeral values.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
| |
Apologies if this violates the no-trivial-patches rule. I am getting
used to git and this seemed like a harmless place to start.
Documentation fix for help text, configuration reference URL is 404 now.
Updated to equivalent page on wiki, fixes #2466
Signed-off-by: Eric Sorenson <ahpook@gmail.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
with deprecation warning
|
| |
|
|
|
|
|
|
|
|
|
| |
This uses the locally cached yaml facts and prints the
catalog in json. It's meant to be used one-time, but
you have to use puppetmasterd since we assume it's the
executable correctly configured for compilation.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
This protects the user from seeing stack traces in normal situations.
It makes sense here because this is explicitly for user interactions.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch rectifies the specified problem by resetting the
permissions to 1777 after the offending tests have run. I
am providing it for testing but suspect there may be a deeper
bug hiding behind this one--specifically, it isn't clear to
me that an analogous problem could not occur in production use
(which this patch to the spec would not fix).
This patch also fixes the specific test isolation failure which was
causing ticket #2290; if spec/unit/util/storage.rb was run by
"rake spec" before spec/integration/network/server/webrick.rb
without any intervening tests which did a Puppet.settings.clear,
the the webrick test would change the permissions on /tmp.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
|
|
|
|
| |
If you happen to already have puppet code somewhere in your ruby path, you
might get unexpected behaviour when trying to run puppetmaster with passenger.
Suggesting that the path to puppet/lib gets prepended instead of appended to
RUBYLIB could save time to some.
Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
|
|
|
|
| |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Puppetdoc while parsing a class name creates intermediate RDoc classes
to form a hierarchy. Due to a coding error, those intermediate classes
were created as RDoc modules.
Later, when puppetdoc was parsing the definition of one of this class,
it wasn't finding it in RDoc list of classes (since it was recorded
as a module).
Puppetdoc was then creating documentation for two objects of the same
name.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
| |
Thanks to Charles Duffy for noticing this and providing this patch.
Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
|
|
|
|
|
|
|
| |
The runit provider was broken when the daemontools provider
was enhanced.This patch aims to fix this.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
RDoc#find_local_symbol can return a module. So if you have a defition
of the same name as the module in which it is defined we weren't
producing documentation for it.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
| |
The issue is that RDoc (the engine producing the documentation) is
buggy:
With a class named: A::C
and a class named: D::A::E
Then RDoc was attaching E under the root ::A and not D::A.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
| |
AST nodes don't have a valid to_s that is producing a correct
representation of said node.
This patch adds some of the AST node to_s to produce correct
values that can be used verbatim by puppetdoc to render
the documentation.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the behaviour when you have file recursions
that overlap - we again correctly use the most
specific information.
It's still a bit expensive when you do this, but
at least it behaves correctly, and it should be
a rare circumstance.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|