| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
A lot of our tests require sudo
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
- extract to its own mixin so it can be included without
method_missing and the rest of the resources DSL
- add ability to inject different run_context
- add ability to create_if_missing into the resource_collection
|
|\ \
| | |
| | | |
fix rspecs-ctrl-c
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
we can't fork off tinyserver without a lot of work in the test
codebase, so instead save a copy of the old rspec signal handler and then
after tinyserver has started (and we're sure that rack has scribbled
over the signal handler), restore the rspec signal handler.
there's an obvious race if someone hits ctrl-c after tinyserver has
scribbled over the sigint handler but before we restore it, but this is
99.9% better of a solution than nothing.
|
|/
|
|
| |
Following a517fa8a we can't call `child` on cookbook subdirs.
|
|\
| |
| | |
Prevent inspect on PsCredential from printing out plain text password
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- :update and :install are now treated the same way and throw the
same exceptions
- :remove and :purge don't require the source at all, so don't do
any checking on that
- fix some convoluted side-effecty logic in load_current_resource
- load_current_resource now correctly gets the dpkg state on
:remove and :purge when the file does not exist (pretty sure
the old logic did not)
- fixed the FIXME about using en_US.UTF-8 (the default for shell_out!)
- just use shell_out! to throw exceptions
- clean up all the specs and remove all the instance vars from the code
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* removes the mutation of the new_resource.version
* adds package_class_supports_arrays for multipackage providers
* cleans up the package resource initializer and sets the package_name
correctly through the accessor method.
By mutating new_resource.version we were destroying the original intent
of what the user was requesting. This is a bug that must be fixed.
Generally, subclasses will be able to get the correct information they
need through either the version argument they were passed in
install_package(name, version) instead, or through their
`#target_version_array` method. If this breaks anything then those
providers need bugfixes as well (since this is a change to an internal
API accessible only to subclassing, and there are backwards compatible
and correct ways to get the information, this is *not* a SemVer
violating change). See the fix I made to the OpenBSD provider to
preserve the same semantics, avoid using new_resource.version where it
was inappropriate, and make the code more symmetrical where before
substantially different looking code in install_package and
remove_package had exactly the same ultimate effect.
The package_class_supports_arrays 'DSL' for writing multipackage
providers coerces the arguments to the virtual methods (e.g.
install_package) into arrays, even if the user is only requesting a
single package install. This removes most of the `is_a?(Array)`
checks from the implementation subclasses.
The cleanup of the initializer is similarly necessary so that we can
use Chef 12.5 coercions to make the package_name and version arguments
accept string, but always be Arrays. This should eliminate the rest
of the need to write `is_a?(Array)` code all over the package provider
implementations.
|
|
|
|
| |
to be the cookbooks (see http://rspec.info/blog/2015/11/rspec-3-4-has-been-released/, Better Failure Source Detection, for more info)
|
|\
| |
| | |
Implement live streaming for execute resources
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the logic is now:
if the resource is not sensitive, and if it's explicitly requested to be
streamed or if the log level is info or debug, then we'll consider
streaming it.
If we're configured to send the output to the events stream, we'll do
so.
Otherwise, if we're not daemonized and have a TTY, we'll go to STDOUT
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This brings live streaming of execute resource output to the
output formatters. It also adds a mechanism for checking to
see if an output formatter is in use through the event dispatch
system.
It adds a new configuration option, "always_stream_execute", which
does what it says on the tin.
|
|\ \
| | |
| | | |
Modify remote_file cache_control_data to use sha256 for its name
|
| | | |
|
|\ \ \
| | | |
| | | | |
Adding ksh resource for #3923
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Use the proper python interpretor for yum-dump.py on Fedora 21+
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fedora 21+ use dnf as the primary package manager. Lamont added code in
12.5 to allow for a yum compat mode. This doesn't entirely work though
as we need yum-dump.py to correctly run. We were parsing the shabang in
the yum binary to find the path to python. On a dnf system the yum
binary is a bash script though so we were trying to run yum-dump.py
using bash which obviously fails. I added a fallback method to use
python if the shebang parsing returns bash. With this in place AND the
yum package installed you can use the package resource on Fedora.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use the initializer to avoid NoMethodError on nil.include?
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This should avoid node tags not being initialized properly to an empty
Array.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This should be done in one place (Chef::Node#tags).
|
| | | | | | |
|
| |_|_|_|/
|/| | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
don't squash Chef::Config[:verbosity] on subsequent instances of Chef::Knife::Bootstrap
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We create an instance of Chef::Knife::Bootstrap in knife-ec2, but we've
already processed ARGV so we substitute and process an empty argv.
config[:verbosity] comes from Chef::Application::Knife. Normally we
merge those options with the ones from the knife subcommand in
Chef::Knife.run. Since we don't in this case, we don't set it to the
default of 0 that is specified there, leaving it nil.
We set Chef::Config[:verbosity] to config[:verbosity] in Chef::Knife#initialize
which now becomes nil.
This change makes it so we do not update Chef::Config[:verbosity] if
config[:verbosity] is nil, so that later when we rescue we don't call
humanize_exception if Chef::Config[:verbosity] is 2.
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is failing on both my and btm's machine. No idea how it passes
in other places.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
simplify service helpers
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
location from config if none is given on commandline
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
ChefFS-based commands have a superclass (Chef::ChefFS::Knife) which
defines its own inherited method that calls super. This breaks our
detection of where the subcommand is defined since the file with
the definition is no longer at the top of the call stack.
This commit special-cases subclasses with a superclass of
Chef::ChefFS::Knife to account for this.
Fixes #4089
|
| | | | | |
|
| | | | | |
|