| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
In the case that a standalone cookbook exists that is using bundler, a large amount of gems can be added to the current directory. This commit reads the chefignore file and avoid having to scan through the ruby files that are in the bundler created gems directory.
|
| |
|
|
|
|
|
|
| |
Now that Chef properly supports a package `response_file` using
`Chef::Resource::Template`, the Package resource should implement the
`response_file_variables` method so that variables do not have to exist
as node attributes (eg - for seeding DB passwords for configuration
files generated by packages).
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported in CHEF-4571. The recipes component of cookbook version
metadata (cbv.metadata.recipes) serialized to JSON with duplicate keys
if a metadata.rb was present that provided a recipe line matching the
cookbook name (providing a description for the default recipe).
The root cause is the behavior of the JSON serialized when called on a
hash containing matching string and symbol keys. For example:
chef > {"key1" => "sam", :key1 => "wat"}.to_json
=> "{\"key1\":\"sam\",\"key1\":\"wat\"}"
So the specific fix is to prevent inserting a symbol key for the
recipe name.
|
| |
|
|
|
|
| |
- some of these have deliberate whitespace/line-ending differences
- without going through them one by one its safer to revert the lot of
them
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes CHEF-4406 http://tickets.opscode.com/browse/CHEF-4406
Calls to Chef::Provider::Template#template_location and #template_finder
will now correctly reference the Chef::Provider::TemplateFinder class.
Chef::Provider::Package#preseed_resource uses these methods expecting an
error to be raised only if there is no template with the desired name,
which triggers a fallback to cookbook_file-based preseed files.
This patch restores the template-based preseed functionality, but will
trigger deprecation warnings from within Chef::Provider::Package's
internal code.
|
| |
|
|
| |
Repro/regression test for CHEF-4406 included but is marked pending.
|
| |
|
|
|
|
|
|
| |
This reverts commit 5713a002062c762e40e4378be6d7763eb3dd61a2, reversing
changes made to 4079a344f2001c1927132e7ed6b63453f459609f.
Conflicts:
spec/unit/cookbook_loader_spec.rb
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
In some windows testing environments no line separator conversion is
happening. This may be a function of git settings, or something else in
our test cluster environment. In any case, line separators are
irrelevant to these tests, as they are testing the partial template
feature. We could remove the line endings from the test fixture files,
but editors like vim add hidden newlines at the end of files, so this is
difficult to maintain. Stripping the line endings within the test code
is more sustainable option.
|
| |
|
|
|
|
|
|
|
|
| |
knife integration tests were picking up default config and therefore
pointing at a chef-server other than the chef-zero test instance. This
could potentially lead to data loss or manglement if the test code
successfully runs against a production chef-server/org.
To prevent the above, load a dummy config file with an added failsafe
mechanism to ensure we've not loaded a real one.
|
| |\
| |
| |
| |
| | |
Conflicts:
lib/chef/exceptions.rb
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Annotated tags have their own SHA and also point to a SHA in the git
repo. Using git ls-remote $REPO $TAG* the tagged SHAs can be
identified by the '^{}' suffix appended to the corresponding tag name.
When resolving the remote reference, we now search for $TAG* and use
the SHA of the tagged commit (with ^{}) if it is there and otherwise
use the SHA with an exact match for $TAG (to avoid capturing anything
extra via the glob used to return refs).
If no revision is specified, we force 'HEAD' in the git ls-remote call
to constrain what can come back from the remote. Further, we protect
against a badly chosen annotated tag named 'HEAD'.
The functional test suite includes a git bundle of a small example
repo. We found that locally cloning this bundle provided the closest
simulation of `git ls-remote` behavior. YMMV depending on git version.
The test suite could be extended to improve overall coverage, but does
verify the desired behavior for annotated tags.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Test cookbook loading, shadowing and metadata deprecation warnings assocaited
with the CHEF-3307 changes (use of metadata name as cookbook name in preference
to file system pathname).
Includes new nginx cookbook (with alternate pathname) and a shadowbook with
another pathname.
|
| |\ \
| | |
| | | |
Binmode and Template line endings
|
| | | | |
|
| |/ /
| |
| |
| |
| |
| | |
Generated a new method list for checking interface compatibility,
removing inherited methods. This makes the test more stable across ruby
versions since methods on Object may change from 1.8->1.9->2.0.
|
| | |
| |
| |
| |
| |
| |
| | |
- move the new TemplateContext code into mixin/template and consolidate
with ChefContext
- Copy extension modules from parent template to partial template.
- Functional tests for helpers with partials.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds helper methods to a template via the following syntax:
```
template "name" do
# singular method definition:
helper(:method_name) { method_body }
# inline module definition
helpers do
def method_name
method_body
end
end
# external module inclusion
helpers(MyHelperModule)
end
```
In each of the above cases, variables defined by Chef (e.g., `@node`)
or the user (via `:variables => {}`) can be accessed as normal.
Could use the following improvements:
- Template partials are not supported
- Input validation on Resource::Template should be improved
- Needs Unit tests for Template provider/implementation classes
|
| | | |
|
| |\ \
| |/
| |
| |
| |
| | |
Conflicts:
spec/unit/knife/configure_spec.rb
spec/unit/provider/remote_file_spec.rb
|
| | |
| |
| |
| |
| |
| | |
Module.const_defined?() needs to be given an optional second argument to
disable constant lookups on ancestor classes. Otherwise LWRP creation
may attempt to remove a constant that does not exist.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit adds new CLI options to `knife bootstrap` for specifying
encrypted data bag secret key (actual string or file) at node bootstrap
time. This approach is more explicit than the previous approach of
reading the path to the secret key from the `encrypted_data_bag_secret`
value in the knife.rb file. For backward compatibility we will still
attempt to load a key from Chef::Config[:encrypted_data_bag_secret].
|
| | | |
|
| |/
|
|
|
|
|
|
| |
This reverts commit a82935b4a8e1e8174d02e83259f07ea9926dd007, reversing
changes made to 464087c7a6da4ed51237cbb6ff39e45feeae0ecd.
Conflicts:
lib/chef/provider/remote_file/ftp.rb
|
| | |
|
| |
|
|
|
| |
1001 was causing stack level too deep errors on 1.8.7. This is
still a huge stack depth and 1001 was arbitrary.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.gitattributes
chef-expander/Rakefile
chef-expander/lib/chef/expander/version.rb
chef-server-api/Rakefile
chef-server-api/chef-server-api.gemspec
chef-server-api/lib/chef-server-api/version.rb
chef-server-webui/Rakefile
chef-server-webui/chef-server-webui.gemspec
chef-server-webui/lib/chef-server-webui/version.rb
chef-server/Rakefile
chef-server/lib/chef-server/version.rb
chef-solr/lib/chef/solr/version.rb
chef.gemspec
chef/Rakefile
chef/spec/support/platform_helpers.rb
chef/spec/support/shared/functional/file_resource.rb
chef/spec/unit/api_client_spec.rb
chef/spec/unit/provider/directory_spec.rb
ci/jenkins_run_tests.bat
ci/jenkins_run_tests.sh
distro/common/html/chef-client.8.html
distro/common/html/chef-expander.8.html
distro/common/html/chef-expanderctl.8.html
distro/common/html/chef-server-webui.8.html
distro/common/html/chef-server.8.html
distro/common/html/chef-shell.1.html
distro/common/html/chef-solo.8.html
distro/common/html/chef-solr.8.html
distro/common/html/knife-bootstrap.1.html
distro/common/html/knife-client.1.html
distro/common/html/knife-configure.1.html
distro/common/html/knife-cookbook-site.1.html
distro/common/html/knife-cookbook.1.html
distro/common/html/knife-data-bag.1.html
distro/common/html/knife-environment.1.html
distro/common/html/knife-exec.1.html
distro/common/html/knife-index.1.html
distro/common/html/knife-node.1.html
distro/common/html/knife-role.1.html
distro/common/html/knife-search.1.html
distro/common/html/knife-ssh.1.html
distro/common/html/knife-status.1.html
distro/common/html/knife-tag.1.html
distro/common/html/knife.1.html
distro/common/man/man1/chef-shell.1
distro/common/man/man1/knife-bootstrap.1
distro/common/man/man1/knife-client.1
distro/common/man/man1/knife-configure.1
distro/common/man/man1/knife-cookbook-site.1
distro/common/man/man1/knife-cookbook.1
distro/common/man/man1/knife-data-bag.1
distro/common/man/man1/knife-environment.1
distro/common/man/man1/knife-exec.1
distro/common/man/man1/knife-index.1
distro/common/man/man1/knife-node.1
distro/common/man/man1/knife-role.1
distro/common/man/man1/knife-search.1
distro/common/man/man1/knife-ssh.1
distro/common/man/man1/knife-status.1
distro/common/man/man1/knife-tag.1
distro/common/man/man1/knife.1
distro/common/man/man8/chef-client.8
distro/common/man/man8/chef-expander.8
distro/common/man/man8/chef-expanderctl.8
distro/common/man/man8/chef-server-webui.8
distro/common/man/man8/chef-server.8
distro/common/man/man8/chef-solo.8
distro/common/man/man8/chef-solr.8
lib/chef/api_client.rb
lib/chef/rest.rb
lib/chef/version.rb
spec/functional/knife/ssh_spec.rb
spec/functional/resource/cookbook_file_spec.rb
spec/spec_helper.rb
spec/stress/win32/security_spec.rb
spec/support/shared/functional/securable_resource.rb
spec/unit/config_spec.rb
spec/unit/knife/ssh_spec.rb
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
| |
The opscode/chef repository now only contains the core Chef library code
used by chef-client, knife and chef-solo!
|
| |
|
|
| |
all with proper deps
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Chef::Log::Formatter, Chef::Compile, and all the tests
|