vagrant-hitch 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source 'https://www.rubygems.org'
2
2
  gem 'rake', :group => :test
3
3
  gemspec :path => '.'
data/Gemfile.lock CHANGED
@@ -1,37 +1,37 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vagrant-hitch (0.1.0)
4
+ vagrant-hitch (0.1.2)
5
5
  backports
6
6
  deep_merge
7
7
  vagrant
8
8
 
9
9
  GEM
10
- remote: http://rubygems.org/
10
+ remote: https://www.rubygems.org/
11
11
  specs:
12
12
  archive-tar-minitar (0.5.2)
13
- backports (2.8.2)
14
- childprocess (0.3.7)
15
- ffi (~> 1.0, >= 1.0.6)
13
+ backports (3.1.0)
14
+ childprocess (0.3.9)
15
+ ffi (~> 1.0, >= 1.0.11)
16
16
  deep_merge (1.0.0)
17
- diff-lcs (1.1.3)
17
+ diff-lcs (1.2.1)
18
18
  erubis (2.7.0)
19
- ffi (1.3.1)
20
- i18n (0.6.1)
21
- json (1.5.4)
19
+ ffi (1.4.0)
20
+ i18n (0.6.4)
21
+ json (1.5.5)
22
22
  log4r (1.1.10)
23
23
  net-scp (1.0.4)
24
24
  net-ssh (>= 1.99.1)
25
25
  net-ssh (2.2.2)
26
26
  rake (10.0.3)
27
- rspec (2.11.0)
28
- rspec-core (~> 2.11.0)
29
- rspec-expectations (~> 2.11.0)
30
- rspec-mocks (~> 2.11.0)
31
- rspec-core (2.11.1)
32
- rspec-expectations (2.11.3)
33
- diff-lcs (~> 1.1.3)
34
- rspec-mocks (2.11.3)
27
+ rspec (2.13.0)
28
+ rspec-core (~> 2.13.0)
29
+ rspec-expectations (~> 2.13.0)
30
+ rspec-mocks (~> 2.13.0)
31
+ rspec-core (2.13.0)
32
+ rspec-expectations (2.13.0)
33
+ diff-lcs (>= 1.1.3, < 2.0)
34
+ rspec-mocks (2.13.0)
35
35
  vagrant (1.0.6)
36
36
  archive-tar-minitar (= 0.5.2)
37
37
  childprocess (~> 0.3.1)
data/Rakefile CHANGED
@@ -25,6 +25,8 @@ end
25
25
  desc "set up all ruby environments"
26
26
  namespace :bootstrap do
27
27
  task :all_rubies do
28
+ system("rvm use 1.8.7-p370; bundle install")
29
+ system("rvm use 1.9.3-p194; bundle install")
28
30
  end
29
31
  end
30
32
 
data/lib/vagrant-hitch.rb CHANGED
@@ -2,7 +2,6 @@ require 'yaml'
2
2
  require 'vagrant'
3
3
  require 'backports'
4
4
  require 'deep_merge'
5
- require 'pry'
6
5
 
7
6
  module VagrantHitch
8
7
  def self.validate(cfdir)
data/spec/hitch_spec.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'tmpdir'
2
- require 'ap'
3
2
 
4
3
  require File.join(File.dirname(__FILE__),'..','/lib/vagrant-hitch')
5
4
  describe 'Hash' do
@@ -51,21 +50,23 @@ describe VagrantHitch do
51
50
 
52
51
  context 'single vagrant box configuration' do
53
52
  let(:vagrant_env) { ::Vagrant::Environment.new(:cwd => @tempdir) }
53
+ let(:test1) { vagrant_env.vms[:test1] }
54
+ let(:test2) { vagrant_env.vms[:test2] }
54
55
 
55
56
  it 'should configure cpu' do
56
- vagrant_env.vms_ordered.first.config.vm.customizations.should include(["modifyvm", :id, "--cpus", "2"])
57
+ test1.config.vm.customizations.should include(["modifyvm", :id, "--cpus", "2"])
57
58
  end
58
59
 
59
60
  it 'should configure memory' do
60
- vagrant_env.vms_ordered.first.config.vm.customizations.should include(["modifyvm", :id, "--memory", "512"])
61
+ test1.config.vm.customizations.should include(["modifyvm", :id, "--memory", "512"])
61
62
  end
62
63
 
63
64
  it 'should have a hostname' do
64
- vagrant_env.vms_ordered.first.config.vm.host_name.should eql("test1.vagrant.test")
65
+ test1.config.vm.host_name.should eql("test1.vagrant.test")
65
66
  end
66
67
 
67
68
  it 'should have a network' do
68
- vagrant_env.vms_ordered.first.config.vm.networks.should include([:hostonly, ["10.10.10.10", {:netmask=>"255.255.255.0"}]])
69
+ test1.config.vm.networks.should include([:hostonly, ["10.10.10.10", {:netmask=>"255.255.255.0"}]])
69
70
  end
70
71
 
71
72
  it 'should have dns' do
@@ -73,18 +74,18 @@ describe VagrantHitch do
73
74
  end
74
75
 
75
76
  it 'should have a provisioner' do
76
- vagrant_env.vms_ordered.first.config.vm.provisioners.first.provisioner.should eql(Vagrant::Provisioners::Puppet)
77
+ test1.config.vm.provisioners.first.provisioner.should eql(Vagrant::Provisioners::Puppet)
77
78
  end
78
79
 
79
80
  it 'should have network ports forward' do
80
- vagrant_env.vms_ordered.first.config.vm.forwarded_ports.should include({:name=>"ssh", :guestport=>22,
81
+ test1.config.vm.forwarded_ports.should include({:name=>"ssh", :guestport=>22,
81
82
  :hostport=>2222, :protocol=>:tcp,
82
83
  :adapter=>1, :auto=>true})
83
84
  end
84
85
 
85
86
  it 'should mounted folders' do
86
- vagrant_env.vms_ordered.first.config.vm.shared_folders.should have(3).items
87
- vagrant_env.vms_ordered.first.config.vm.shared_folders.should include(
87
+ test1.config.vm.shared_folders.should have(3).items
88
+ test1.config.vm.shared_folders.should include(
88
89
  "webapp"=> {:guestpath=>"/opt/www/", :hostpath=>"./", :create=>"true",
89
90
  :owner=>"vagrant", :group=>nil, :nfs=>false,
90
91
  :transient=>false, :extra=>nil},
@@ -99,6 +100,9 @@ describe VagrantHitch do
99
100
 
100
101
  context 'property merging' do
101
102
  let(:vagrant_env) { ::Vagrant::Environment.new(:cwd => @tempdir) }
103
+ let(:test1) { vagrant_env.vms[:test1] }
104
+ let(:test2) { vagrant_env.vms[:test2] }
105
+
102
106
  it 'should create a vagrant environment' do
103
107
  vagrant_env.should_not be_nil
104
108
  end
@@ -109,7 +113,7 @@ describe VagrantHitch do
109
113
  end
110
114
 
111
115
  it 'should merge the default provisioner settings properly' do
112
- puppet_provisioner = vagrant_env.vms_ordered.first.config.vm.provisioners.first
116
+ puppet_provisioner = test1.config.vm.provisioners.first
113
117
  puppet_provisioner.provisioner.should eql(Vagrant::Provisioners::Puppet)
114
118
  puppet_provisioner.config.module_path.should have(2).items
115
119
  puppet_provisioner.config.manifests_path.should eql("../manifests")
@@ -117,7 +121,7 @@ describe VagrantHitch do
117
121
  end
118
122
 
119
123
  it 'should configure multiple provisioners' do
120
- vagrant_env.vms_ordered.last.config.vm.provisioners.should have(2).items
124
+ test2.config.vm.provisioners.should have(2).items
121
125
  end
122
126
  end
123
127
 
@@ -17,5 +17,5 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.name = "vagrant-hitch"
19
19
  gem.require_paths = ["lib"]
20
- gem.version = "0.1.2"
20
+ gem.version = "0.1.3"
21
21
  end
metadata CHANGED
@@ -1,89 +1,90 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: vagrant-hitch
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.2
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 3
10
+ version: 0.1.3
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Aziz Shamim
9
14
  - James Fryman
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2013-02-20 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
18
+
19
+ date: 2013-03-08 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
16
22
  name: vagrant
17
- requirement: !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
23
- type: :runtime
24
23
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
30
- version: '0'
31
- - !ruby/object:Gem::Dependency
32
- name: backports
33
- requirement: !ruby/object:Gem::Requirement
24
+ requirement: &id001 !ruby/object:Gem::Requirement
34
25
  none: false
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: '0'
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
39
33
  type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: backports
40
37
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
- - !ruby/object:Gem::Dependency
48
- name: deep_merge
49
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &id002 !ruby/object:Gem::Requirement
50
39
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
55
47
  type: :runtime
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: deep_merge
56
51
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
52
+ requirement: &id003 !ruby/object:Gem::Requirement
58
53
  none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- - !ruby/object:Gem::Dependency
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ type: :runtime
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
64
64
  name: rspec
65
- requirement: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ! '>='
69
- - !ruby/object:Gem::Version
70
- version: '0'
71
- type: :development
72
65
  prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
66
+ requirement: &id004 !ruby/object:Gem::Requirement
74
67
  none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
78
- version: '0'
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ hash: 3
72
+ segments:
73
+ - 0
74
+ version: "0"
75
+ type: :development
76
+ version_requirements: *id004
79
77
  description: Creates and use a data driven vagrant environment
80
- email:
78
+ email:
81
79
  - azizshamim@gmail.com
82
80
  - james@frymanet.com
83
81
  executables: []
82
+
84
83
  extensions: []
84
+
85
85
  extra_rdoc_files: []
86
- files:
86
+
87
+ files:
87
88
  - .gitignore
88
89
  - .rspec
89
90
  - .travis.yml
@@ -105,27 +106,36 @@ files:
105
106
  - vagrant-hitch.gemspec
106
107
  homepage: https://github.com/fup/vagrant-hitch
107
108
  licenses: []
109
+
108
110
  post_install_message:
109
111
  rdoc_options: []
110
- require_paths:
112
+
113
+ require_paths:
111
114
  - lib
112
- required_ruby_version: !ruby/object:Gem::Requirement
115
+ required_ruby_version: !ruby/object:Gem::Requirement
113
116
  none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
125
  none: false
120
- requirements:
121
- - - ! '>='
122
- - !ruby/object:Gem::Version
123
- version: '0'
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ hash: 3
130
+ segments:
131
+ - 0
132
+ version: "0"
124
133
  requirements: []
134
+
125
135
  rubyforge_project:
126
136
  rubygems_version: 1.8.24
127
137
  signing_key:
128
138
  specification_version: 3
129
139
  summary: Creates and use a data driven vagrant environment
130
- test_files:
140
+ test_files:
131
141
  - spec/hitch_spec.rb