vagrant-spatula 0.0.1

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.
data/.gemtest ADDED
File without changes
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 0.0.1 / 2011-03-13
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,5 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ lib/vagrant/spatula.rb
data/README.txt ADDED
@@ -0,0 +1,70 @@
1
+ = Vagrant Spatula
2
+
3
+ http://github.com/erikh/vagrant-spatula
4
+
5
+ == DESCRIPTION:
6
+
7
+ Vagrant Spatula uses the excellent 'spatula' gem and command-line utility to
8
+ provision new base boxes with chef-solo, including getting chef-solo on the
9
+ machine itself.
10
+
11
+ == FEATURES/PROBLEMS:
12
+
13
+ * Runs provision each time. Should be fixed in a later release.
14
+
15
+ == SYNOPSIS:
16
+
17
+ In your Vagrantfile:
18
+
19
+ require 'vagrant/spatula' # at the top
20
+
21
+ # where "bootstrap" is the name of your .json file in your config
22
+ # do this in the config block, obviously.
23
+
24
+ config.vm.provision SpatulaProvisioner do |spatula|
25
+ spatula.node = "bootstrap"
26
+ end
27
+
28
+ == REQUIREMENTS:
29
+
30
+ * vagrant
31
+ * spatula
32
+ * chef-solo recipes and configuration
33
+
34
+ == INSTALL:
35
+
36
+ * gem install vagrant-spatula, ensure the 'spatula' bin is in your path.
37
+
38
+ == DEVELOPERS:
39
+
40
+ After checking out the source, run:
41
+
42
+ $ rake newb
43
+
44
+ This task will install any missing dependencies, run the tests/specs,
45
+ and generate the RDoc.
46
+
47
+ == LICENSE:
48
+
49
+ (The MIT License)
50
+
51
+ Copyright (c) 2011 Erik Hollensbe
52
+
53
+ Permission is hereby granted, free of charge, to any person obtaining
54
+ a copy of this software and associated documentation files (the
55
+ 'Software'), to deal in the Software without restriction, including
56
+ without limitation the rights to use, copy, modify, merge, publish,
57
+ distribute, sublicense, and/or sell copies of the Software, and to
58
+ permit persons to whom the Software is furnished to do so, subject to
59
+ the following conditions:
60
+
61
+ The above copyright notice and this permission notice shall be
62
+ included in all copies or substantial portions of the Software.
63
+
64
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
65
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
66
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
67
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
68
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
69
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
70
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,21 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.plugins.delete :rubyforge
7
+ Hoe.plugin :git
8
+ Hoe.plugin :rcov
9
+
10
+ spec = Hoe.spec 'vagrant-spatula' do
11
+ developer('Erik Hollensbe', 'erik@hollensbe.org')
12
+
13
+ self.rubyforge_name = nil
14
+ end
15
+
16
+ desc "install the gem without sudo"
17
+ task :install => [:gem] do
18
+ sh "gem install pkg/#{spec.name}-#{spec.version}.gem"
19
+ end
20
+
21
+ # vim: syntax=ruby
@@ -0,0 +1,26 @@
1
+ class SpatulaProvisioner < Vagrant::Provisioners::Base
2
+ VERSION = "0.0.1"
3
+
4
+ class Config < Vagrant::Config::Base
5
+ attr_accessor :node
6
+ end
7
+
8
+ def provision!
9
+ @spatula_path = ENV["PATH"].
10
+ split(File::PATH_SEPARATOR).
11
+ map { |x| File.join(x, "spatula") }.
12
+ select { |x| File.executable?(x) }
13
+
14
+ @spatula_path = @spatula_path[0] rescue nil
15
+
16
+ raise "Cannot find spatula: gem install spatula" unless @spatula_path
17
+
18
+ extra_args = %W[--port #{vm.ssh.port} --identity #{config.top.ssh.private_key_path}]
19
+
20
+ args = [@spatula_path] + %w[prepare vagrant@localhost] + extra_args
21
+ system(*args)
22
+
23
+ args = [@spatula_path] + %W[cook vagrant@localhost #{config.node}] + extra_args
24
+ system(*args)
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-spatula
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Erik Hollensbe
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-03-12 23:00:00 -05:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: hoe
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: 2.9.1
25
+ type: :development
26
+ version_requirements: *id001
27
+ description: |-
28
+ Vagrant Spatula uses the excellent 'spatula' gem and command-line utility to
29
+ provision new base boxes with chef-solo, including getting chef-solo on the
30
+ machine itself.
31
+ email:
32
+ - erik@hollensbe.org
33
+ executables: []
34
+
35
+ extensions: []
36
+
37
+ extra_rdoc_files:
38
+ - History.txt
39
+ - Manifest.txt
40
+ - README.txt
41
+ files:
42
+ - History.txt
43
+ - Manifest.txt
44
+ - README.txt
45
+ - Rakefile
46
+ - lib/vagrant/spatula.rb
47
+ - .gemtest
48
+ has_rdoc: true
49
+ homepage: http://github.com/erikh/vagrant-spatula
50
+ licenses: []
51
+
52
+ post_install_message:
53
+ rdoc_options:
54
+ - --main
55
+ - README.txt
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: "0"
70
+ requirements: []
71
+
72
+ rubyforge_project:
73
+ rubygems_version: 1.6.2
74
+ signing_key:
75
+ specification_version: 3
76
+ summary: Vagrant Spatula uses the excellent 'spatula' gem and command-line utility to provision new base boxes with chef-solo, including getting chef-solo on the machine itself.
77
+ test_files: []
78
+