chef 11.16.0-x86-mingw32 → 11.16.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49b6fe3b7b3cc9463d7faa2c42c063805a8c0622
4
- data.tar.gz: bf2edeaa5447924dc2f5d6c4f21409f99e268f03
3
+ metadata.gz: 790b4f7bf0a72d93f0b8f2ec04ffcfb2bd130306
4
+ data.tar.gz: f3eae2509195aace61ca51c97d887f7830cfd01f
5
5
  SHA512:
6
- metadata.gz: edd6c14fb435fc1c2ee3f19ae061221c3f895b650b77f44f5142c5ba6b0af671e7205535c76a90f23d24c4e96fbd5e45fb1eeb5f7e0a754733274d9e770b8057
7
- data.tar.gz: 8f044ddd62016822cc9fdbfd3d80c9d1598b34aff1af8c0274bdfcd5339eebe61bdca9d0bd25c53cb114eded9a62fd45d412752eec5ff6064c2516326e71e986
6
+ metadata.gz: c9a2d24e05758cc459a70ad833a44e377ed34d37a1d029d392529ef0abd4fba325beaa0ccca67c0d8477fedf6c340567a3014616560d5e5bcb3cc4bf9768347d
7
+ data.tar.gz: a005349645748b2d458725968e13c501fcbdb5cd94972182eec9ee20cbbd1c5fda5024c33a880e528cd05f0dffaeb5d75eff63dab474f25ceeb09aa1fa89b750
@@ -19,7 +19,7 @@
19
19
  class Chef
20
20
  class Provider
21
21
  class WhyrunSafeRubyBlock < Chef::Provider::RubyBlock
22
- def action_create
22
+ def action_run
23
23
  @new_resource.block.call
24
24
  @new_resource.updated_by_last_action(true)
25
25
  @run_context.events.resource_update_applied(@new_resource, :create, "execute the whyrun_safe_ruby_block #{@new_resource.name}")
data/lib/chef/version.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  class Chef
19
19
  CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__)))
20
- VERSION = '11.16.0'
20
+ VERSION = '11.16.2'
21
21
  end
22
22
 
23
23
  # NOTE: the Chef::Version class is defined in version_class.rb
@@ -0,0 +1,51 @@
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::WhyrunSafeRubyBlock do
22
+ let(:node) { Chef::Node.new }
23
+
24
+ let(:run_context) {
25
+ events = Chef::EventDispatch::Dispatcher.new
26
+ Chef::RunContext.new(node, {}, events)
27
+ }
28
+
29
+ before do
30
+ $evil_global_evil_laugh = :wahwah
31
+ Chef::Config[:why_run] = true
32
+ end
33
+
34
+ after do
35
+ Chef::Config[:why_run] = false
36
+ end
37
+
38
+ describe "when testing the resource" do
39
+ let(:new_resource) do
40
+ r = Chef::Resource::WhyrunSafeRubyBlock.new("reload all", run_context)
41
+ r.block { $evil_global_evil_laugh = :mwahahaha }
42
+ r
43
+ end
44
+
45
+ it "updates the evil laugh, even in why-run mode" do
46
+ new_resource.run_action(new_resource.action)
47
+ $evil_global_evil_laugh.should == :mwahahaha
48
+ new_resource.should be_updated
49
+ end
50
+ end
51
+ end
@@ -30,14 +30,14 @@ describe Chef::Provider::WhyrunSafeRubyBlock, "initialize" do
30
30
  end
31
31
 
32
32
  it "should call the block and flag the resource as updated" do
33
- @provider.run_action(:create)
33
+ @provider.run_action(:run)
34
34
  $evil_global_evil_laugh.should == :mwahahaha
35
35
  @new_resource.should be_updated
36
36
  end
37
37
 
38
38
  it "should call the block and flat the resource as updated - even in whyrun" do
39
39
  Chef::Config[:why_run] = true
40
- @provider.run_action(:create)
40
+ @provider.run_action(:run)
41
41
  $evil_global_evil_laugh.should == :mwahahaha
42
42
  @new_resource.should be_updated
43
43
  Chef::Config[:why_run] = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.16.0
4
+ version: 11.16.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-08 00:00:00.000000000 Z
11
+ date: 2014-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-config
@@ -1596,6 +1596,7 @@ files:
1596
1596
  - spec/functional/knife/smoke_test.rb
1597
1597
  - spec/functional/knife/ssh_spec.rb
1598
1598
  - spec/functional/provider/remote_file/cache_control_data_spec.rb
1599
+ - spec/functional/provider/whyrun_safe_ruby_block_spec.rb
1599
1600
  - spec/functional/resource/base.rb
1600
1601
  - spec/functional/resource/batch_spec.rb
1601
1602
  - spec/functional/resource/bff_spec.rb