knife-spork 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ ## 1.0.10 (22nd November, 2012)
2
+ Bugfixes:
3
+
4
+ - Load all cookbook versions from remote server when checking dependencies (thanks to gmcmillan)
5
+
1
6
  ## 1.0.9 (28th October, 2012)
2
7
  Features:
3
8
 
data/README.md CHANGED
@@ -51,6 +51,15 @@ plugins:
51
51
  - Web Operations
52
52
  notify: true
53
53
  color: yellow
54
+ jabber:
55
+ username: YOURUSER
56
+ password: YOURPASSWORD
57
+ nickname: Chef Bot
58
+ server_name: your.jabberserver.com
59
+ server_port: 5222
60
+ rooms:
61
+ - engineering@your.conference.com/spork
62
+ - systems@your.conference.com/spork
54
63
  git:
55
64
  enabled: true
56
65
  irccat:
@@ -2,7 +2,7 @@ $:.push File.expand_path('../lib', __FILE__)
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'knife-spork'
5
- gem.version = '1.0.9'
5
+ gem.version = '1.0.10'
6
6
  gem.authors = ["Jon Cowie"]
7
7
  gem.email = 'jonlives@gmail.com'
8
8
  gem.homepage = 'https://github.com/jonlives/knife-spork'
@@ -17,10 +17,14 @@ module KnifeSpork
17
17
  ui.error("You must specify at least a cookbook name")
18
18
  exit 1
19
19
  end
20
-
20
+
21
+ #First load so plugins etc know what to work with
21
22
  @cookbook = load_cookbook(name_args.first)
22
23
 
23
24
  run_plugins(:before_bump)
25
+
26
+ #Reload cookbook in case a VCS plugin found updates
27
+ @cookbook = load_cookbook(name_args.first)
24
28
  bump
25
29
  run_plugins(:after_bump)
26
30
  end
@@ -25,14 +25,14 @@ module KnifeSpork
25
25
  exit(1)
26
26
  end
27
27
 
28
- begin
29
- @cookbook = load_cookbook(name_args.first)
30
- rescue Chef::Exceptions::CookbookNotFoundInRepo => e
31
- ui.error "#{name_args.first} does not exist locally in your cookbook path(s), Exiting."
32
- exit(1)
33
- end
28
+ #First load so plugins etc know what to work with
29
+ initial_load
34
30
 
35
31
  run_plugins(:before_check)
32
+
33
+ #Reload cookbook in case a VCS plugin found updates
34
+ initial_load
35
+
36
36
  check
37
37
  run_plugins(:after_check)
38
38
  end
@@ -71,6 +71,15 @@ module KnifeSpork
71
71
  ui.msg 'Everything looks good!'
72
72
  end
73
73
 
74
+ def initial_load
75
+ begin
76
+ @cookbook = load_cookbook(name_args.first)
77
+ rescue Chef::Exceptions::CookbookNotFoundInRepo => e
78
+ ui.error "#{name_args.first} does not exist locally in your cookbook path(s), Exiting."
79
+ exit(1)
80
+ end
81
+ end
82
+
74
83
  def local_version
75
84
  @cookbook.version
76
85
  end
@@ -28,10 +28,14 @@ module KnifeSpork
28
28
  exit 1
29
29
  end
30
30
 
31
+ #First load so plugins etc know what to work with
31
32
  @environments, @cookbook = load_environments_and_cookbook
32
33
 
33
34
  run_plugins(:before_promote)
34
35
 
36
+ #Reload cookbook and env in case a VCS plugin found updates
37
+ @environments, @cookbook = load_environments_and_cookbook
38
+
35
39
  check_cookbook_uploaded(@cookbook)
36
40
 
37
41
  @environments.each do |e|
@@ -40,10 +40,16 @@ module KnifeSpork
40
40
  exit 1
41
41
  end
42
42
 
43
+ #First load so plugins etc know what to work with
43
44
  @cookbooks = load_cookbooks(name_args)
44
45
  include_dependencies if config[:depends]
45
46
 
46
47
  run_plugins(:before_upload)
48
+
49
+ #Reload cookbook in case a VCS plugin found updates
50
+ @cookbooks = load_cookbooks(name_args)
51
+ include_dependencies if config[:depends]
52
+
47
53
  upload
48
54
  run_plugins(:after_upload)
49
55
  end
@@ -75,7 +81,7 @@ module KnifeSpork
75
81
  ui.info "Freezing #{cookbook.name} at #{cookbook.version}..."
76
82
  cookbook.freeze_version
77
83
  uploader.upload_cookbook
78
-
84
+
79
85
  end
80
86
  end
81
87
  rescue Net::HTTPServerException => e
@@ -102,7 +108,7 @@ module KnifeSpork
102
108
  end
103
109
 
104
110
  def server_side_cookbooks(cookbook_name, version)
105
- @server_side_cookbooks ||= Chef::CookbookVersion.list
111
+ @server_side_cookbooks ||= Chef::CookbookVersion.list_all_versions
106
112
 
107
113
  hash = @server_side_cookbooks[cookbook_name]
108
114
  hash && hash['versions'] && hash['versions'].any?{ |v| Chef::VersionConstraint.new(version).include?(v['version']) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-spork
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-28 00:00:00.000000000 Z
12
+ date: 2012-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
16
- requirement: &70361786030120 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.10.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70361786030120
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.10.4
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: git
27
- requirement: &70361786029160 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 1.2.5
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70361786029160
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.2.5
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: app_conf
38
- requirement: &70361786028040 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,7 +53,12 @@ dependencies:
43
53
  version: 0.4.0
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *70361786028040
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.4.0
47
62
  description: A workflow plugin to help many devs work with the same chef repo/server
48
63
  email: jonlives@gmail.com
49
64
  executables: []
@@ -105,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
120
  version: '0'
106
121
  requirements: []
107
122
  rubyforge_project:
108
- rubygems_version: 1.8.10
123
+ rubygems_version: 1.8.24
109
124
  signing_key:
110
125
  specification_version: 3
111
126
  summary: A workflow plugin to help many devs work with the same chef repo/server