vagrant-hitch 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +45 -0
- data/example/config/nodes.yml +2 -0
- data/example/config/provisioner_chef.yml +1 -1
- data/lib/vagrant-hitch.rb +6 -4
- data/spec/hitch_spec.rb +4 -0
- data/vagrant-hitch.gemspec +2 -1
- metadata +20 -2
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
vagrant-hitch (0.0.2)
|
5
|
+
vagrant
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
archive-tar-minitar (0.5.2)
|
11
|
+
childprocess (0.3.6)
|
12
|
+
ffi (~> 1.0, >= 1.0.6)
|
13
|
+
diff-lcs (1.1.3)
|
14
|
+
erubis (2.7.0)
|
15
|
+
ffi (1.1.5)
|
16
|
+
i18n (0.6.1)
|
17
|
+
json (1.5.4)
|
18
|
+
log4r (1.1.10)
|
19
|
+
net-scp (1.0.4)
|
20
|
+
net-ssh (>= 1.99.1)
|
21
|
+
net-ssh (2.2.2)
|
22
|
+
rspec (2.11.0)
|
23
|
+
rspec-core (~> 2.11.0)
|
24
|
+
rspec-expectations (~> 2.11.0)
|
25
|
+
rspec-mocks (~> 2.11.0)
|
26
|
+
rspec-core (2.11.1)
|
27
|
+
rspec-expectations (2.11.3)
|
28
|
+
diff-lcs (~> 1.1.3)
|
29
|
+
rspec-mocks (2.11.3)
|
30
|
+
vagrant (1.0.5)
|
31
|
+
archive-tar-minitar (= 0.5.2)
|
32
|
+
childprocess (~> 0.3.1)
|
33
|
+
erubis (~> 2.7.0)
|
34
|
+
i18n (~> 0.6.0)
|
35
|
+
json (~> 1.5.1)
|
36
|
+
log4r (~> 1.1.9)
|
37
|
+
net-scp (~> 1.0.4)
|
38
|
+
net-ssh (~> 2.2.2)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
rspec
|
45
|
+
vagrant-hitch!
|
data/example/config/nodes.yml
CHANGED
data/lib/vagrant-hitch.rb
CHANGED
@@ -29,11 +29,13 @@ module VagrantHitch
|
|
29
29
|
exit
|
30
30
|
end
|
31
31
|
|
32
|
-
# Ignore any and all YAML blocks with
|
32
|
+
# Ignore any and all YAML blocks with "default" in the key name
|
33
33
|
# Typically, this should be used for any YAML anchors
|
34
34
|
# that may be reused for other Vagrantbox definitions
|
35
35
|
ignore_config = ['default']
|
36
|
-
|
36
|
+
profiles.delete_if do |profile, config|
|
37
|
+
true if ignore_config.find_index { |ignore_key| profile.include?(ignore_key) }
|
38
|
+
end
|
37
39
|
|
38
40
|
profiles.each do |profile, node_config|
|
39
41
|
# Bail out if it is one of our special 'ignore' config blocks
|
@@ -93,8 +95,8 @@ module VagrantHitch
|
|
93
95
|
if node_config['puppet']['options'].include?('--graph')
|
94
96
|
begin
|
95
97
|
graph_dir = File.join(config_dir,'..','graph')
|
96
|
-
[graph_dir, "#{graph_dir}/#{
|
97
|
-
node_config['puppet']['options'] << "--graphdir=/vagrant/graph/#{
|
98
|
+
[graph_dir, "#{graph_dir}/#{node_config['hostname']}"].each { |d| Dir.mkdir(d) if !File.directory?(d) }
|
99
|
+
node_config['puppet']['options'] << "--graphdir=/vagrant/graph/#{node_config['hostname']}"
|
98
100
|
rescue => e
|
99
101
|
puts "Unable to create Puppet Graph Directory: #{e}"
|
100
102
|
end
|
data/spec/hitch_spec.rb
CHANGED
@@ -11,4 +11,8 @@ describe VagrantHitch do
|
|
11
11
|
it 'should require a valid configuration path' do
|
12
12
|
expect { VagrantHitch.up!('somepath') }.to raise_error
|
13
13
|
end
|
14
|
+
|
15
|
+
it 'should return a correct status given a valid vagrantfile' do
|
16
|
+
Vagrant::Config.run &VagrantHitch.up!(File.join(File.dirname(__FILE__),'..','example','config'))
|
17
|
+
end
|
14
18
|
end
|
data/vagrant-hitch.gemspec
CHANGED
@@ -8,11 +8,12 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.homepage = "https://github.com/fup/vagrant-hitch"
|
9
9
|
|
10
10
|
gem.add_dependency "vagrant"
|
11
|
+
gem.add_development_dependency "rspec"
|
11
12
|
|
12
13
|
gem.files = `git ls-files`.split($\)
|
13
14
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
15
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
16
|
gem.name = "vagrant-hitch"
|
16
17
|
gem.require_paths = ["lib"]
|
17
|
-
gem.version = "0.0.
|
18
|
+
gem.version = "0.0.3"
|
18
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-11-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: vagrant
|
@@ -28,6 +28,22 @@ dependencies:
|
|
28
28
|
- - ! '>='
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: rspec
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :development
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
31
47
|
description: Creates and use a data driven vagrant environment
|
32
48
|
email:
|
33
49
|
- azizshamim@gmail.com
|
@@ -38,6 +54,8 @@ extra_rdoc_files: []
|
|
38
54
|
files:
|
39
55
|
- .gitignore
|
40
56
|
- .rspec
|
57
|
+
- Gemfile
|
58
|
+
- Gemfile.lock
|
41
59
|
- LICENSE
|
42
60
|
- README.mkd
|
43
61
|
- Rakefile
|