chef 0.7.12 → 0.7.14

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of chef might be problematic. Click here for more details.

@@ -27,7 +27,7 @@ require 'chef/config'
27
27
  Dir[File.join(File.dirname(__FILE__), 'chef/mixin/**/*.rb')].sort.each { |lib| require lib }
28
28
 
29
29
  class Chef
30
- VERSION = '0.7.12'
30
+ VERSION = '0.7.14'
31
31
  end
32
32
 
33
33
  # Adds a Dir.glob to Ruby 1.8.5, for compat
@@ -74,6 +74,8 @@ class Chef
74
74
  ]
75
75
 
76
76
  file_list_str = file_list.keys.join("\n")
77
+ Chef::Log.debug("Searching for preferred file in\n#{file_list_str}")
78
+
77
79
  preferences.each do |pref|
78
80
  Chef::Log.debug("Looking for #{pref}")
79
81
  matcher = /^(.+#{pref})$/
@@ -167,7 +167,7 @@ class Chef
167
167
  end
168
168
 
169
169
  def all_releases
170
- Dir.glob(@new_resource.deploy_to + "/releases/*")
170
+ Dir.glob(@new_resource.deploy_to + "/releases/*").sort
171
171
  end
172
172
 
173
173
  def update_cached_repo
@@ -39,11 +39,13 @@ class Chef
39
39
  clone
40
40
  checkout
41
41
  enable_submodules
42
+ @new_resource.updated = true
42
43
  end
43
44
 
44
45
  def action_export
45
46
  action_checkout
46
47
  FileUtils.rm_rf(::File.join(@new_resource.destination,".git"))
48
+ @new_resource.updated = true
47
49
  end
48
50
 
49
51
  def action_sync
@@ -53,6 +55,8 @@ class Chef
53
55
  sync
54
56
  enable_submodules
55
57
  end
58
+
59
+ @new_resource.updated = true
56
60
  end
57
61
 
58
62
  def find_current_revision
@@ -191,4 +195,4 @@ class Chef
191
195
 
192
196
  end
193
197
  end
194
- end
198
+ end
@@ -34,6 +34,8 @@ import yum
34
34
 
35
35
  from yum import Errors
36
36
 
37
+ PIDFILE='/var/run/yum.pid'
38
+
37
39
  # Seconds to wait for exclusive access to yum
38
40
  lock_timeout = 10
39
41
 
@@ -54,7 +56,7 @@ try:
54
56
  countdown = lock_timeout
55
57
  while True:
56
58
  try:
57
- y.doLock()
59
+ y.doLock(PIDFILE)
58
60
  except Errors.LockError, e:
59
61
  time.sleep(1)
60
62
  countdown -= 1
@@ -80,7 +82,7 @@ try:
80
82
  # Ensure we clear the lock.
81
83
  finally:
82
84
  try:
83
- y.doUnlock()
85
+ y.doUnlock(PIDFILE)
84
86
  # Keep Unlock from raising a second exception as it does with a yum.conf
85
87
  # config error.
86
88
  except Errors.YumBaseError:
@@ -37,10 +37,12 @@ class Chef
37
37
 
38
38
  def action_checkout
39
39
  run_command(run_options(:command => checkout_command))
40
+ @new_resource.updated = true
40
41
  end
41
42
 
42
43
  def action_export
43
44
  run_command(run_options(:command => export_command))
45
+ @new_resource.updated = true
44
46
  end
45
47
 
46
48
  def action_sync
@@ -49,6 +51,7 @@ class Chef
49
51
  else
50
52
  run_command(run_options(:command => sync_command))
51
53
  end
54
+ @new_resource.updated = true
52
55
  end
53
56
 
54
57
  def sync_command
@@ -69,10 +69,9 @@ class Chef
69
69
  @remote = "origin"
70
70
  @enable_submodules = false
71
71
  @shallow_clone = false
72
- @force_deploy = false
73
72
  @scm_provider = Chef::Provider::Git
74
73
  @provider = Chef::Provider::Deploy::Timestamped
75
- @allowed_actions.push(:deploy, :rollback)
74
+ @allowed_actions.push(:force_deploy, :deploy, :rollback)
76
75
  end
77
76
 
78
77
  # where the checked out/cloned code goes
@@ -244,15 +243,6 @@ class Chef
244
243
  )
245
244
  end
246
245
 
247
- # Shall we run the deploy even if the code has not changed?
248
- def force_deploy(arg=nil)
249
- set_or_return(
250
- :force_deploy,
251
- arg,
252
- :kind_of => [ TrueClass, FalseClass ]
253
- )
254
- end
255
-
256
246
  def scm_provider(arg=nil)
257
247
  set_or_return(
258
248
  :scm_provider,
@@ -357,4 +347,4 @@ class Chef
357
347
 
358
348
  end
359
349
  end
360
- end
350
+ end
@@ -185,6 +185,8 @@ def create_cookbook(dir)
185
185
  sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "recipes")}"
186
186
  sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "definitions")}"
187
187
  sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "libraries")}"
188
+ sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "resources")}"
189
+ sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "providers")}"
188
190
  sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "files", "default")}"
189
191
  sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "templates", "default")}"
190
192
  unless File.exists?(File.join(dir, ENV["COOKBOOK"], "recipes", "default.rb"))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.12
4
+ version: 0.7.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-21 00:00:00 +13:00
12
+ date: 2009-10-27 00:00:00 +13:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.4
33
+ version: 0.3.6
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: mixlib-cli