meez 0.0.7 → 0.0.8
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 +8 -8
- data/lib/meez/meez.rb +39 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmIyODg2Y2M4ODZjNjgzNGUyZWZhY2RiZTMyYjE1NTc3MWVlYzg3Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDNiYTUzMDQ5NzkzOTFkMDQyMjg1ZjA2NjRiNjc4ZmExZDkzZGNmZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTJlNDVlMmFkZjJlZjgwNTE1NGFlMzE1ODY2ZjFjYmU4MmM2NWMyMzhjN2E2
|
10
|
+
N2FjZTMyZDNjNDk4YmZiYjUxMDY5YmUxZDk3YzI1NmY2OWNiMDllMWVjM2Y4
|
11
|
+
YWNmYjQxYjBhM2E2YTVkNzU4MGY2N2VjOWEwNzc4NzgyMDRlZWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmM3NzU4ZTE4ZTc1OGY1NDU2MjNmOGZhNGUyMDI1MDc3NGFmMGE4NWFlOTI4
|
14
|
+
ODI5MGEwNjk3ZjM1NjIzMDIwNjk4MGZhMTkyY2M4MWVjZDQ5MzBmN2IzMDQy
|
15
|
+
NTI0YjBkYjE2NTFiOWVjYTIyMmY0NjU0YzFiZDJjODAxMjM1ZGY=
|
data/lib/meez/meez.rb
CHANGED
@@ -6,6 +6,7 @@ class Meez
|
|
6
6
|
def self.init(cookbook_name, options)
|
7
7
|
init_cookbook(cookbook_name, options)
|
8
8
|
init_berkshelf(cookbook_name, options)
|
9
|
+
init_vagrant(cookbook_name, options)
|
9
10
|
init_strainer(cookbook_name, options)
|
10
11
|
init_knife(cookbook_name, options)
|
11
12
|
init_rubocop(cookbook_name, options)
|
@@ -41,6 +42,13 @@ class Meez
|
|
41
42
|
Git.init( path, { repository: path } )
|
42
43
|
end
|
43
44
|
|
45
|
+
# Every Vagrant virtual environment requires a box to build off of.
|
46
|
+
#config.vm.box = "<%= berkshelf_config.vagrant.vm.box %>"
|
47
|
+
|
48
|
+
# The url from where the 'config.vm.box' box will be fetched if it
|
49
|
+
# doesn't already exist on the user's system.
|
50
|
+
#config.vm.box_url = "<%= berkshelf_config.vagrant.vm.box_url %>"
|
51
|
+
|
44
52
|
def self.init_berkshelf(cookbook_name, options)
|
45
53
|
puts '* Initializing Berkshelf'
|
46
54
|
path = File.join(options[:path], cookbook_name)
|
@@ -51,7 +59,8 @@ class Meez
|
|
51
59
|
Berkshelf::InitGenerator.new(
|
52
60
|
[path],
|
53
61
|
{
|
54
|
-
skip_test_kitchen: true
|
62
|
+
skip_test_kitchen: true,
|
63
|
+
skip_vagrant: true
|
55
64
|
}
|
56
65
|
).invoke_all
|
57
66
|
File.open(File.join(path, 'Berksfile'), 'a') { |f| f.write("metadata\n") }
|
@@ -85,6 +94,35 @@ suites:
|
|
85
94
|
end
|
86
95
|
end
|
87
96
|
|
97
|
+
def self.init_vagrant(cookbook_name, options)
|
98
|
+
puts '* Initializing Vagranfile'
|
99
|
+
path = File.join(options[:path], cookbook_name)
|
100
|
+
File.open(File.join(path, 'Vagrantfile'), 'w') do |file|
|
101
|
+
contents = <<-EOF
|
102
|
+
# -*- mode: ruby -*-
|
103
|
+
# vi: set ft=ruby :
|
104
|
+
|
105
|
+
Vagrant.configure('2') do |config|
|
106
|
+
config.vm.hostname = '#{cookbook_name}'
|
107
|
+
config.vm.box = 'ubuntu-12.04'
|
108
|
+
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_\#{config.vm.box}_chef-provisionerless.box"
|
109
|
+
config.omnibus.chef_version = 'latest'
|
110
|
+
config.berkshelf.enabled = true
|
111
|
+
|
112
|
+
config.vm.provision :chef_solo do |chef|
|
113
|
+
chef.json = {
|
114
|
+
}
|
115
|
+
|
116
|
+
chef.run_list = [
|
117
|
+
'recipe[#{cookbook_name}::default]'
|
118
|
+
]
|
119
|
+
end
|
120
|
+
end
|
121
|
+
EOF
|
122
|
+
file.write(contents)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
88
126
|
def self.init_chefspec(cookbook_name, options)
|
89
127
|
puts '* Initializing Chef Spec'
|
90
128
|
path = File.join(options[:path], cookbook_name)
|