| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
| |
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
|
|
|
|
|
|
| |
don’t really matter.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
|
|
|
|
|
|
|
|
|
|
|
| |
The `--config-option` CLI option allows setting any `Chef::Config`
setting on the command line, which allows applications to be used
without a configuration file even if a desired config option does not
have a corresponding CLI option. This CLI option was present in the help
output for knife but was not actually implemented. Moving the behavior
into chef-config allows us to use it for both `chef-client` and `knife`.
Signed-off-by: Daniel DeLeo <dan@chef.io>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
997 Style/SpaceAfterComma
860 Style/SpaceAroundEqualsInParameterDefault
310 Style/EmptyLines
294 Style/IndentationConsistency
267 Style/TrailingWhitespace
238 Style/ExtraSpacing
212 Style/SpaceBeforeBlockBraces
166 Style/MultilineOperationIndentation
144 Style/TrailingBlankLines
120 Style/EmptyLineBetweenDefs
101 Style/IndentationWidth
82 Style/SpaceAroundBlockParameters
40 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
|
|
|
| |
Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
|
|
|
| |
Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
|
|
|
| |
Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
|
|
|
|
|
|
| |
See chef/chefstyle#11 for analysis and discussion. We select '{}' since
audit of our source code shows that is the most common, and that used to
be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
|
|
|
|
|
|
|
| |
This is an entirely mechanically generated (chefstyle -a) change, to go
along with chef/chefstyle#5 . We should pick something and use it
consistently, and my opinion is that double quotes are the appropriate
thing.
|
|
|
|
| |
chefstyle -a fixed 1044 occurrances
|
|
|
|
|
|
|
| |
In the process, stop auto-expanding JSON in the HTTP client, and let
individual classes control that themselves.
Fixes #2737, Fixes #3518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Also added Chef::User.create V1 API support. Chef::User.create will attempt to use V1 of the server API, and if it fails, it will fall back to V0.
|
| |
|
|
|
|
|
|
|
|
|
| |
send logging to STDERR and drop default log_level to :warn
so that we can see warnings again. logging needs to go to
STDERR so that we don't break someone's 'API' where they're piping
stdin to some filter. we believe the log_level was not warn
in order to suppress warns off of 404s which no longer warn by
default now.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This takes advantage of Chef::HTTP::Authenticator.handle_request. After the authentication_headers have been merged, it adds:
{'X-Ops-Server-API-Version' => Chef::HTTP::Authenticator::SERVER_API_VERSION}
Chef::HTTP::Authenticator::SERVER_API_VERSION should corrospond to the max version of the server the client is compatible with. We are starting at "0".
I also removed outer level lets :base_header and :req_with_body_headers from rest_spec.rb as they were never used anywhere. Another :base_header was defined in a tighter part of the spec and was only used in that scope, and :req_with_body_headers was never used anywhere.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Knife now gives an error message like this when an SSL error occurs:
```
ERROR: Could not establish a secure connection to the server.
Use `knife ssl check` to troubleshoot your SSL configuration.
If your Chef Server uses a self-signed certificate, you can use
`knife ssl fetch` to make knife trust the server's certificates.
Original Exception: OpenSSL::SSL::SSLError: SSL_connect returned=1
errno=0 state=SSLv3 read server certificate B: certificate verify failed
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unreleased Chef 12.0.0 bug caught in testing where only the searching
upwards from PWD to find .chef in order to get the plugin path for knife
was busted. The chef_config_dir was being used before load_config was
being called, so it was nil, which broke finding knife plugins. This
was fixed by adding some lazy initialization of the config_loader object
itself and the chef_config_dir.
The reset_config_loader! is added entirely to reset the global state for unit
testing. This whole class is a bit horrible and needs to have all its
global state removed from it, class methods removed, class ivars and the
class-variable-in-a-class-method-for-inheritance-lolwut needs to be removed.
Unfortunately, that requires some delicate surgery because Chef::Knife
gets used as a public API, and is beyond the scope of gettting Chef 12
shipped.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
CCR and
knife that will be sent to erchef
- Each knife request has a different X-Remote-Request-Id, where as it
remains the same for all requests originating from the same chef-client
run.
- Adding and fixing tests
|
|
|
|
| |
fix deprecation warnings
|
|
|
|
| |
Also the associated test is removed as I am not sure how it should be fixed.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Takes advantage of new mixlib-cli option to keep default values from the
mixlib-cli DSL separate from user-supplied values. Config settings are
merged:
1. Defaults from mixlib-cli DSL
2. Settings from Chef::Config[:knife]
3. Values from CLI options
|
|
|
|
|
|
| |
Prefer ENV["PWD"] for current working dir, but fall back to Dir.pwd if
not set. Fixes config path searching when part of the path hierarchy is
a symlinked directory.
|
|
The opscode/chef repository now only contains the core Chef library code
used by chef-client, knife and chef-solo!
|