vagrant-chef-zero 0.4.1 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## 0.5.1
2
+
3
+ Minor bugfixes (hopefully) to fix installation behavior and berkshelf issues.
4
+
5
+ * Back out change adding ||= to berkshelf key replacement as it was causing issues.
6
+
7
+ * Attempt to match the Chef dependency order more closely to avoid ruby gem installation issues
8
+
9
+ ## 0.5.0
10
+
11
+ NOTE: This version is in beta status as I have not had time to fully test it due to issues with my Vagrant environment (old versions will still be availabe in the `0.4.X` series)
12
+
13
+ * Add support for `.rb` files by using the Chef Gem, thanks to @mattray for the PR.
14
+
15
+ ## 0.4.2
16
+
17
+ * Keep existing Berkshelf client key if one is already defined. Thanks to [Greg Symons](https://github.com/gregsymons) for the PR.
18
+
19
+ ## 0.4.1
20
+
21
+ * This is a belated changelog, as I apparently did not push one with this version in the past
22
+
23
+ * Fix issues with Chef-Zero and Vagrant reload action. See commit 2a2c6673d303f0768aec2909f19713a9f1ebb14e for more details
24
+
25
+
1
26
  ## 0.4.0
2
27
 
3
28
  * Always write out a simple Knife configuration file to `.zero-knife.rb` to make it easier to use Knife with the server.
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+
2
+ NOTE: This version (`0.5.0`) is in beta status as I have not had time to fully test it due to issues with my Vagrant environment (old versions will still be availabe in the `0.4.X` series)
3
+
4
+
1
5
  # Vagrant-Chef-Zero
2
6
  [![Build Status](https://travis-ci.org/andrewgross/vagrant-chef-zero.png)](https://travis-ci.org/andrewgross/vagrant-chef-zero)
3
7
  [![Code Climate](https://codeclimate.com/repos/51e419cc89af7e3a2a003663/badges/c7a21cef56cddb54ab12/gpa.png)](https://codeclimate.com/repos/51e419cc89af7e3a2a003663/feed)
@@ -1,3 +1,5 @@
1
+ require 'chef'
2
+
1
3
  module VagrantPlugins
2
4
  module ChefZero
3
5
  module Action
@@ -64,7 +66,13 @@ module VagrantPlugins
64
66
 
65
67
  environments = select_items(path)
66
68
  environments.each do |e|
67
- environment = JSON.parse(IO.read(e)).to_hash
69
+ if e =~ /.rb$/
70
+ envrb = ::Chef::Environment.new
71
+ envrb.from_file(e)
72
+ environment = envrb.to_hash
73
+ else
74
+ environment = JSON.parse(IO.read(e)).to_hash
75
+ end
68
76
  if ! existing_envs.any?{ |ee| ee['name'] == environment['name'] }
69
77
  env[:chef_zero].ui.info("Creating Environment #{environment['name']}")
70
78
  @conn.environment.create(environment)
@@ -81,7 +89,13 @@ module VagrantPlugins
81
89
 
82
90
  roles = select_items(path)
83
91
  roles.each do |r|
84
- role = JSON.parse(IO.read(r)).to_hash
92
+ if r =~ /.rb$/
93
+ rrb = ::Chef::Role.new
94
+ rrb.from_file(r)
95
+ role = rrb.to_hash
96
+ else
97
+ role = JSON.parse(IO.read(r)).to_hash
98
+ end
85
99
  if ! existing_roles.any?{ |er| er['name'] == role['name'] }
86
100
  env[:chef_zero].ui.info("Creating role #{role['name']}")
87
101
  @conn.role.create(role)
@@ -127,7 +141,7 @@ module VagrantPlugins
127
141
  elsif path.is_a?(Array)
128
142
  path
129
143
  elsif path.is_a?(String) && File.directory?(path)
130
- path = Dir.glob("#{path}/*.json")
144
+ path = Dir.glob("#{path}/*.json")+Dir.glob("#{path}/*.rb")
131
145
  elsif path.is_a?(String) && File.exists?(path)
132
146
  path = [path]
133
147
  else
@@ -151,4 +165,4 @@ module VagrantPlugins
151
165
 
152
166
  end
153
167
  end
154
- end
168
+ end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module ChefZero
3
- VERSION = "0.4.1"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
@@ -15,9 +15,10 @@ Gem::Specification.new do |s|
15
15
  s.rubyforge_project = "vagrant-chef-zero"
16
16
  s.license = "MIT"
17
17
 
18
+ s.add_dependency "json", ">= 1.4.4", "<= 1.7.7"
18
19
  s.add_dependency "chef-zero", "~> 1.3"
19
20
  s.add_dependency "ridley", ">= 1.0.0"
20
-
21
+ s.add_dependency "chef", "~> 11.0"
21
22
 
22
23
  # Stolen from Vagrant Berkshelf because Ruby hates dependency resolution
23
24
  # activesupport 3.2.13 contains an incompatible hard lock on i18n (= 0.6.1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-chef-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,30 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-09 00:00:00.000000000 Z
12
+ date: 2013-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: json
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.4.4
22
+ - - <=
23
+ - !ruby/object:Gem::Version
24
+ version: 1.7.7
25
+ type: :runtime
26
+ prerelease: false
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.4.4
33
+ - - <=
34
+ - !ruby/object:Gem::Version
35
+ version: 1.7.7
14
36
  - !ruby/object:Gem::Dependency
15
37
  name: chef-zero
16
38
  requirement: !ruby/object:Gem::Requirement
@@ -43,6 +65,22 @@ dependencies:
43
65
  - - ! '>='
44
66
  - !ruby/object:Gem::Version
45
67
  version: 1.0.0
68
+ - !ruby/object:Gem::Dependency
69
+ name: chef
70
+ requirement: !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '11.0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ~>
82
+ - !ruby/object:Gem::Version
83
+ version: '11.0'
46
84
  - !ruby/object:Gem::Dependency
47
85
  name: activesupport
48
86
  requirement: !ruby/object:Gem::Requirement
@@ -199,7 +237,8 @@ files:
199
237
  - lib/vagrant-chef-zero.rb
200
238
  - LICENSE.txt
201
239
  - Makefile
202
- - pkg/vagrant-chef-zero-0.4.0.gem
240
+ - pkg/vagrant-chef-zero-0.4.2.gem
241
+ - pkg/vagrant-chef-zero-0.5.0.gem
203
242
  - Rakefile
204
243
  - README.md
205
244
  - spec/lib/config_spec.rb
@@ -245,7 +284,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
284
  version: '0'
246
285
  segments:
247
286
  - 0
248
- hash: 3074438575813103530
287
+ hash: 3035003433799121851
249
288
  required_rubygems_version: !ruby/object:Gem::Requirement
250
289
  none: false
251
290
  requirements: