cheffish 0.8.4 → 0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed4803169ba4ce8995e1b2750dca669ad39a8119
4
- data.tar.gz: 5069fb4b7ffe1768ad8eae1f882576320016818b
3
+ metadata.gz: 280a15807486f3701531748ad3ecdbbac7db11f5
4
+ data.tar.gz: 6f9ea7c5d418ae9ef1c0cfb203edabc361d7d9ff
5
5
  SHA512:
6
- metadata.gz: 75d5f527069714521e3c492ce2cdd570cd98bb79478facf5bd7f127cb3c60b476a7bf94cad3d41b7b52012dde563175dc4d38cca3fcb6df49336a7979a3e2c3b
7
- data.tar.gz: 3b5665854ddd4ac6e578b0cc6517b275eccf60580a888c420b11b4d28e5d3a1accb48cfc295fc993598c3ec4f7a44017c69e77cffb7c4fbd05526cdfb552f91e
6
+ metadata.gz: fbf09a12550f4575261e8f301c5f05193da1cf81684a13c57677b9749a144816c8afae3c4a730d8aec77b90aea62ed1c3cb099706250671920e6213db9dcd462
7
+ data.tar.gz: bc9d77f57bfb8b29068b085ef6f07cc8d6280aa080cbdb312d3471ab54a859f6473c0a26e87b97d3a229ef835756110147b611a877c04156aa845028d9e9b7e2
@@ -38,7 +38,7 @@ class Chef::Resource::PrivateKey < Chef::Resource::LWRPBase
38
38
  end
39
39
 
40
40
  # We are not interested in Chef's cloning behavior here.
41
- def load_prior_resource
41
+ def load_prior_resource(*args)
42
42
  Chef::Log.debug("Overloading #{resource_name}.load_prior_resource with NOOP")
43
43
  end
44
44
  end
@@ -15,7 +15,7 @@ class Chef::Resource::PublicKey < Chef::Resource::LWRPBase
15
15
  attribute :source_key_pass_phrase
16
16
 
17
17
  # We are not interested in Chef's cloning behavior here.
18
- def load_prior_resource
18
+ def load_prior_resource(*args)
19
19
  Chef::Log.debug("Overloading #{resource_name}.load_prior_resource with NOOP")
20
20
  end
21
21
  end
@@ -237,7 +237,7 @@ module Cheffish
237
237
  end
238
238
 
239
239
  # We are not interested in Chef's cloning behavior here.
240
- def load_prior_resource
240
+ def load_prior_resource(*args)
241
241
  Chef::Log.debug("Overloading #{resource_name}.load_prior_resource with NOOP")
242
242
  end
243
243
  end
@@ -2,11 +2,11 @@ require 'chef/event_dispatch/base'
2
2
 
3
3
  module Cheffish
4
4
  class ChefRunListener < Chef::EventDispatch::Base
5
- def initialize(run_context)
6
- @run_context = run_context
5
+ def initialize(node)
6
+ @node = node
7
7
  end
8
8
 
9
- attr_reader :run_context
9
+ attr_reader :node
10
10
 
11
11
  def run_complete(node)
12
12
  disconnect
@@ -20,7 +20,7 @@ module Cheffish
20
20
 
21
21
  def disconnect
22
22
  # Stop the servers
23
- run_context.cheffish.local_servers.each do |server|
23
+ node.run_context.cheffish.local_servers.each do |server|
24
24
  server.stop
25
25
  end
26
26
  end
@@ -87,7 +87,7 @@ class Chef
87
87
  # Copy over to string keys for things that use string keys (ChefFS)...
88
88
  # TODO: Fix ChefFS to take symbols or use something that is insensitive to the difference
89
89
  options[string_key] = options[symbol_key]
90
- end
90
+ end
91
91
 
92
92
  chef_fs = Chef::ChefFS::Config.new(options).local_fs
93
93
  chef_fs.write_pretty_json = true
@@ -119,21 +119,23 @@ class Chef
119
119
 
120
120
  class RunContext
121
121
  def cheffish
122
- @cheffish ||= begin
122
+ node.run_state[:cheffish] ||= begin
123
123
  run_data = Cheffish::ChefRunData.new(config)
124
- events.register(Cheffish::ChefRunListener.new(self))
124
+ events.register(Cheffish::ChefRunListener.new(node))
125
125
  run_data
126
126
  end
127
127
  end
128
128
 
129
129
  def config
130
- @config ||= Cheffish.profiled_config(Chef::Config)
130
+ node.run_state[:chef_config] ||= Cheffish.profiled_config(Chef::Config)
131
131
  end
132
132
  end
133
133
 
134
134
  Chef::Client.when_run_starts do |run_status|
135
135
  # Pulling on cheffish_run_data makes it initialize right now
136
- run_status.run_context.cheffish
136
+ run_status.node.run_state[:chef_config] = config = Cheffish.profiled_config(Chef::Config)
137
+ run_status.node.run_state[:cheffish] = run_data = Cheffish::ChefRunData.new(config)
138
+ run_status.events.register(Cheffish::ChefRunListener.new(run_status.node))
137
139
  end
138
140
 
139
141
  end
@@ -1,3 +1,3 @@
1
1
  module Cheffish
2
- VERSION = '0.8.4'
2
+ VERSION = '0.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheffish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: '0.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-04 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-zero