vagrant-hitch 0.0.2 → 0.0.3

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/.gitignore CHANGED
@@ -2,3 +2,5 @@
2
2
  graph
3
3
  iso
4
4
  pkg
5
+ *.gem
6
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec :path => '.'
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!
@@ -16,6 +16,8 @@ default: &default
16
16
  tomcat:
17
17
  host: 18080
18
18
  guest: 8080
19
+ default_app: &default_app
20
+ web_default: &web_default
19
21
  test1:
20
22
  <<: *default
21
23
  test2:
@@ -1,6 +1,6 @@
1
1
  chef:
2
2
  log_level: 'debug'
3
3
  environment: "development"
4
- base_roles:
4
+ roles:
5
5
  - base
6
6
  - vagrant
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 these keys.
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
- ignore_config.each { |ignore_key| profiles.delete(ignore_key) }
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}/#{host_name}"].each { |d| Dir.mkdir(d) if !File.directory?(d) }
97
- node_config['puppet']['options'] << "--graphdir=/vagrant/graph/#{host_name}"
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
@@ -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.2"
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.2
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-10-04 00:00:00.000000000 Z
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