| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
| |
Previously, any failed call to Puppet::Application.find would result
in an error being raised by const_get, resulting in a messy crash with
a stack trace. Now that error is handled, and the application will
print a message and exit.
|
|
|
|
|
|
| |
Notify was returning a nil current value, rather than :absent,
which caused puppet to think the message had been changed from
blank to its new value, rather than defined as that value.
|
|
|
|
|
| |
The describe and resource (ralsh) applications required puppet, creating a
loop & thus crashing them.
|
|
|
|
|
|
|
| |
RunMode is only created once instead of every time it's called
Got lots of unpredictable test failures, presumably because a new
RunMode was being created every time we accessed the RunMode.
|
| |
|
|
|
|
|
| |
Along the way this fixes an issue with 2.6 alpha that sections of the
puppet config file were getting ignored.
|
|
|
|
|
|
|
|
| |
Mode is a terribly overused word. Files use it, puppetdoc uses it, and
certs use it, and those are just the places that I happened to
stumble upon. It makes reading code very confusing and finding things
in code difficult. I know namespacing allows us to reuse words for
method and variable names, but that doesn't mean we should.
|
|
|
|
|
|
| |
Per Luke's replacement of :check with :audit, and deprecation of :check,
I've replaced all of our internal uses of :check with :audit. Importantly,
this silence the deprecation warnings during regular usage from eg. ralsh.
|
| |
|
| |
|
|
|
|
| |
I'm also going to update the wiki to mention sqlite is a test dependency
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
| |
We were looking only to the class hierarchies when trying to find an
ancestor to the current type. Thus we were never trying to climb up
the hierarchy of nodes when evaluating nodes.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
| |
During the refactoring of AST hostclass/node to non AST objects, we lost
the fact that the main class already comes with a scope (ie the top one),
so when we evaluate its code we shouldn't create a subscope for it.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
| |
There was a subtle 1.8.7 dependence in the composite key / namevar patch;
Nick discovered that our assumtion that hashes could be used as hash keys
does not hold in earlier bersions of ruby. This patch replaces the hash
valued uniqueness_key with an array of the values of the (ordered) key
attributes.
|
|
|
|
|
|
| |
Merging some of the branches creates a require-loop; this commit breaks it by
removing the most recently added link (which I believe to have been unneeded /
unrelated to the patch in which it snuck in).
|
|
|
|
| |
There was a comma missing from a raise, which caused a warning message on each run.
|
| |
|
| |
|
| |
|
|
|
|
| |
and update the specs that were testing it.
|
|
|
|
|
| |
The value method was failing to return any value in the case where
the value was false.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Puts reportdir and reporturl back in the "main" block because this makes
tests break for reasons I don't understand.
|
|
|
|
|
|
| |
Tests that weren't managing the environment but were still expecting to have
functions defined in it were appalled when the functions/environments binding
actually started working. This patch fixes those tests.
|
|
|
|
|
|
| |
This change allows the --onetime command line option to be set by the
Puppet[:onetime] global option or read from the config file, rather than
forcing it to be read from the config file.
|
|
|
|
|
| |
audit's munge was not idempotent because newattr was not idempotent.
This patch simplifies newattr such that it becomes idempotent.
|
|
|
|
|
|
|
| |
This adds the --charset option to puppetdoc for RDoc mode.
This allows to set the charset for the generated html.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
| |
The following manifest was failing:
$data = {}
This patch makes sure we initalize our ast hash with an empty ruby
hash when it is created without any values.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This operator allows to find if the left operand is in the right one.
The left operand must be resort to a string, but the right operand can be:
* a string
* an array
* a hash (the search is done on the keys)
This syntax can be used in any place where an expression is supported.
Syntax:
$eatme = 'eat'
if $eatme in ['ate', 'eat'] {
...
}
$value = 'beat generation'
if 'eat' in $value {
notice("on the road")
}
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
| |
This patch allows the puppet single-executable to invoke external,
hyphenated subcommands, much like how git does.
|
|
|
|
|
|
| |
OpenSuSE replaced rug with zypper so our code should too
Signed-off-by: Matt Robinson <matt@puppetlabs.com>
|
|
|
|
|
| |
Remove workarounds that were only needed because ruby's builtin YAML
lib is broken.
|
|
|
|
|
|
|
|
|
| |
execution and fix minor bug with logoutput and returns as an array..
* Add 'tries' and 'try_sleep' parameters
* Fix bug where returns is specified as an array and logoutput on
* failure.
* unit tests for both cases above.
|
| |
|
|
|
|
|
|
|
|
|
| |
Change Autoloader's load to re-raise exceptions that happen when
trying to load files, rather than just warning.
This version still does not raise an error if the file is not found, as
doing so would change the behavior of 'load' pretty significantly, but I
am ambivalent this.
|
|
|
|
|
|
|
| |
Change Autoloader's loadall to re-raise exceptions that happen when
trying to load files, rather than just warning.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
| |
Class namespace is different than namespace of nodes and definition as
it contains the whole qualified name.
This bit was left out in the type are not AST anymore refactoring.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
| |
Puppetdoc got confused because it wasn't popping the comment context for
collections and resource defaults. This commit adds the popping.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to create builtin nested resource types
that generate other resources that generate other resources
ad naseum.
The primary point of this feature is that you can make
builtin resource types that have a lot of the same
encapsulation abilities of defined resource types.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
| |
specify
it in the config file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The user method on the provider always returned what the resource should
be, not what it actually was, so it always seemed to be insync to
puppet.
Also cleaned up some cruft on the perms that did different things
depending on whether a user was specified on the resource. This isn't
necessary since a user is required on the resource.
Paired with: Jesse Wolfe
Signed-off-by: Matt Robinson <matt@puppetlabs.com>
|
|
|
|
|
|
|
|
| |
This disables adding any code to 'main' except
in site.pp, so if you have code outside of a node,
class, or define it will throw an exception.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will produce the name of the module that a given
resource is defined in, rather than the module that
the resource type itself is defined in. For instance:
# in one/manifests/onedef.pp
define one::onedef {
notice "Called $name from $caller_module_name"
}
# in two/manifests/init.pp
class two {
one::onedef { yay: }
}
produces:
Called yay from two
This could obviously be extended to actually build a caller
stack, as frightening as that seems.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is only true for resource types (e.g., classes and defines)
of course.
The actual variable is 'module_name':
class mymod {
notify { "in mymod '$module_name'": }
}
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|