chef 11.8.4.ohai7.0-x86-mingw32 → 11.10.0.alpha.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/distro/common/html/chef-client.8.html +3 -3
- data/distro/common/html/chef-expander.8.html +3 -3
- data/distro/common/html/chef-expanderctl.8.html +3 -3
- data/distro/common/html/chef-server-webui.8.html +3 -3
- data/distro/common/html/chef-server.8.html +3 -3
- data/distro/common/html/chef-shell.1.html +3 -3
- data/distro/common/html/chef-solo.8.html +3 -3
- data/distro/common/html/chef-solr.8.html +4 -4
- data/distro/common/html/knife-bootstrap.1.html +3 -3
- data/distro/common/html/knife-client.1.html +3 -3
- data/distro/common/html/knife-configure.1.html +3 -3
- data/distro/common/html/knife-cookbook-site.1.html +3 -3
- data/distro/common/html/knife-cookbook.1.html +3 -3
- data/distro/common/html/knife-data-bag.1.html +3 -3
- data/distro/common/html/knife-environment.1.html +3 -3
- data/distro/common/html/knife-exec.1.html +3 -3
- data/distro/common/html/knife-index.1.html +3 -3
- data/distro/common/html/knife-node.1.html +3 -3
- data/distro/common/html/knife-role.1.html +3 -3
- data/distro/common/html/knife-search.1.html +3 -3
- data/distro/common/html/knife-ssh.1.html +3 -3
- data/distro/common/html/knife-status.1.html +3 -3
- data/distro/common/html/knife-tag.1.html +3 -3
- data/distro/common/html/knife.1.html +3 -3
- data/distro/common/man/man8/chef-client.8 +3 -3
- data/distro/common/man/man8/chef-solo.8 +5 -2
- data/lib/chef.rb +2 -0
- data/lib/chef/application.rb +7 -2
- data/lib/chef/application/apply.rb +6 -0
- data/lib/chef/application/client.rb +3 -1
- data/lib/chef/application/knife.rb +2 -0
- data/lib/chef/application/solo.rb +1 -1
- data/lib/chef/client.rb +14 -11
- data/lib/chef/config.rb +4 -1
- data/lib/chef/cookbook_uploader.rb +14 -7
- data/lib/chef/encrypted_data_bag_item.rb +6 -303
- data/lib/chef/encrypted_data_bag_item/decryption_failure.rb +22 -0
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +201 -0
- data/lib/chef/encrypted_data_bag_item/encryptor.rb +142 -0
- data/lib/chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format.rb +22 -0
- data/lib/chef/encrypted_data_bag_item/unsupported_cipher.rb +22 -0
- data/lib/chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format.rb +22 -0
- data/lib/chef/exceptions.rb +1 -0
- data/lib/chef/formatters/doc.rb +19 -3
- data/lib/chef/http/basic_client.rb +1 -1
- data/lib/chef/http/http_request.rb +7 -0
- data/lib/chef/knife.rb +8 -1
- data/lib/chef/knife/bootstrap.rb +1 -1
- data/lib/chef/knife/cookbook_site_share.rb +2 -2
- data/lib/chef/knife/cookbook_upload.rb +7 -1
- data/lib/chef/knife/core/subcommand_loader.rb +2 -2
- data/lib/chef/knife/data_bag_create.rb +7 -0
- data/lib/chef/knife/environment_compare.rb +127 -0
- data/lib/chef/mixin/command.rb +11 -12
- data/lib/chef/mixin/deep_merge.rb +4 -4
- data/lib/chef/monkey_patches/net_http.rb +34 -0
- data/lib/chef/monkey_patches/uri.rb +70 -0
- data/lib/chef/platform/provider_mapping.rb +1 -0
- data/lib/chef/provider/cookbook_file.rb +8 -0
- data/lib/chef/provider/cron.rb +1 -1
- data/lib/chef/provider/directory.rb +7 -0
- data/lib/chef/provider/file.rb +17 -4
- data/lib/chef/provider/git.rb +23 -5
- data/lib/chef/provider/group.rb +30 -11
- data/lib/chef/provider/group/dscl.rb +26 -4
- data/lib/chef/provider/group/gpasswd.rb +14 -19
- data/lib/chef/provider/group/groupadd.rb +41 -1
- data/lib/chef/provider/group/groupmod.rb +46 -36
- data/lib/chef/provider/group/pw.rb +59 -16
- data/lib/chef/provider/group/suse.rb +16 -13
- data/lib/chef/provider/group/usermod.rb +38 -15
- data/lib/chef/provider/group/windows.rb +13 -6
- data/lib/chef/provider/ohai.rb +5 -6
- data/lib/chef/provider/remote_file.rb +8 -0
- data/lib/chef/provider/template.rb +8 -0
- data/lib/chef/provider/user.rb +5 -1
- data/lib/chef/provider/user/useradd.rb +7 -0
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +30 -0
- data/lib/chef/providers.rb +1 -0
- data/lib/chef/resource/deploy.rb +18 -0
- data/lib/chef/resource/group.rb +11 -0
- data/lib/chef/resource/scm.rb +18 -0
- data/lib/chef/resource/whyrun_safe_ruby_block.rb +31 -0
- data/lib/chef/resources.rb +1 -0
- data/lib/chef/run_context.rb +11 -0
- data/lib/chef/shell/ext.rb +1 -1
- data/lib/chef/util/windows/net_group.rb +5 -1
- data/lib/chef/version.rb +1 -1
- data/spec/functional/resource/base.rb +3 -1
- data/spec/functional/resource/deploy_revision_spec.rb +1 -1
- data/spec/functional/resource/git_spec.rb +1 -1
- data/spec/functional/resource/group_spec.rb +257 -118
- data/spec/integration/client/client_spec.rb +82 -8
- data/spec/integration/client/ipv6_spec.rb +133 -0
- data/spec/integration/knife/cookbook_api_ipv6_spec.rb +111 -0
- data/spec/scripts/ssl-serve.rb +52 -0
- data/spec/spec_helper.rb +7 -6
- data/spec/support/platform_helpers.rb +21 -0
- data/spec/support/shared/functional/windows_script.rb +2 -1
- data/spec/support/shared/unit/provider/file.rb +181 -43
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +18 -0
- data/spec/unit/application/client_spec.rb +1 -0
- data/spec/unit/client_spec.rb +14 -1
- data/spec/unit/config_spec.rb +20 -0
- data/spec/unit/encrypted_data_bag_item_spec.rb +32 -18
- data/spec/unit/knife/cookbook_upload_spec.rb +14 -0
- data/spec/unit/knife/core/subcommand_loader_spec.rb +2 -2
- data/spec/unit/knife/data_bag_create_spec.rb +7 -0
- data/spec/unit/knife/environment_compare_spec.rb +112 -0
- data/spec/unit/knife_spec.rb +6 -1
- data/spec/unit/monkey_patches/uri_spec.rb +34 -0
- data/spec/unit/provider/cookbook_file_spec.rb +2 -1
- data/spec/unit/provider/cron_spec.rb +6 -0
- data/spec/unit/provider/file_spec.rb +3 -1
- data/spec/unit/provider/git_spec.rb +28 -4
- data/spec/unit/provider/group/dscl_spec.rb +1 -0
- data/spec/unit/provider/group/gpasswd_spec.rb +16 -9
- data/spec/unit/provider/group/groupadd_spec.rb +3 -4
- data/spec/unit/provider/group/groupmod_spec.rb +0 -1
- data/spec/unit/provider/group/pw_spec.rb +11 -14
- data/spec/unit/provider/group/usermod_spec.rb +19 -4
- data/spec/unit/provider/group/windows_spec.rb +0 -8
- data/spec/unit/provider/group_spec.rb +26 -4
- data/spec/unit/provider/ohai_spec.rb +1 -0
- data/spec/unit/provider/remote_file_spec.rb +4 -3
- data/spec/unit/provider/template_spec.rb +5 -3
- data/spec/unit/provider/user_spec.rb +6 -0
- data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +47 -0
- data/spec/unit/resource/scm_spec.rb +10 -0
- data/spec/unit/rest/auth_credentials_spec.rb +4 -1
- data/spec/unit/rest_spec.rb +12 -3
- metadata +69 -121
- data/spec/functional/resource/ohai_spec.rb +0 -65
@@ -1,65 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Serdar Sutay (<serdar@opscode.com>)
|
3
|
-
# Copyright:: Copyright (c) 2014 Opscode, Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
require 'spec_helper'
|
20
|
-
|
21
|
-
describe Chef::Resource::Ohai do
|
22
|
-
let(:ohai) {
|
23
|
-
o = Ohai::System.new
|
24
|
-
o.all_plugins
|
25
|
-
o
|
26
|
-
}
|
27
|
-
|
28
|
-
let(:node) { Chef::Node.new }
|
29
|
-
|
30
|
-
let(:run_context) {
|
31
|
-
node.default[:platform] = ohai[:platform]
|
32
|
-
node.default[:platform_version] = ohai[:platform_version]
|
33
|
-
events = Chef::EventDispatch::Dispatcher.new
|
34
|
-
Chef::RunContext.new(node, {}, events)
|
35
|
-
}
|
36
|
-
|
37
|
-
shared_examples_for "reloaded :uptime" do
|
38
|
-
it "should reload :uptime" do
|
39
|
-
initial_uptime = ohai[:uptime]
|
40
|
-
|
41
|
-
# Sleep for a second so the uptime gets updated.
|
42
|
-
sleep 1
|
43
|
-
|
44
|
-
ohai_resource.run_action(:reload)
|
45
|
-
node[:uptime].should_not == initial_uptime
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
describe "when reloading all plugins" do
|
50
|
-
let(:ohai_resource) { Chef::Resource::Ohai.new("reload all", run_context)}
|
51
|
-
|
52
|
-
it_behaves_like "reloaded :uptime"
|
53
|
-
end
|
54
|
-
|
55
|
-
describe "when reloading only uptime" do
|
56
|
-
let(:ohai_resource) {
|
57
|
-
r = Chef::Resource::Ohai.new("reload all", run_context)
|
58
|
-
r.plugin("uptime")
|
59
|
-
r
|
60
|
-
}
|
61
|
-
|
62
|
-
|
63
|
-
it_behaves_like "reloaded :uptime"
|
64
|
-
end
|
65
|
-
end
|