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 +1 -1
- data/Gemfile.lock +17 -17
- data/Rakefile +2 -0
- data/lib/vagrant-hitch.rb +0 -1
- data/spec/hitch_spec.rb +15 -11
- data/vagrant-hitch.gemspec +1 -1
- metadata +82 -72
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,37 +1,37 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vagrant-hitch (0.1.
|
4
|
+
vagrant-hitch (0.1.2)
|
5
5
|
backports
|
6
6
|
deep_merge
|
7
7
|
vagrant
|
8
8
|
|
9
9
|
GEM
|
10
|
-
remote:
|
10
|
+
remote: https://www.rubygems.org/
|
11
11
|
specs:
|
12
12
|
archive-tar-minitar (0.5.2)
|
13
|
-
backports (
|
14
|
-
childprocess (0.3.
|
15
|
-
ffi (~> 1.0, >= 1.0.
|
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
|
17
|
+
diff-lcs (1.2.1)
|
18
18
|
erubis (2.7.0)
|
19
|
-
ffi (1.
|
20
|
-
i18n (0.6.
|
21
|
-
json (1.5.
|
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.
|
28
|
-
rspec-core (~> 2.
|
29
|
-
rspec-expectations (~> 2.
|
30
|
-
rspec-mocks (~> 2.
|
31
|
-
rspec-core (2.
|
32
|
-
rspec-expectations (2.
|
33
|
-
diff-lcs (
|
34
|
-
rspec-mocks (2.
|
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
data/lib/vagrant-hitch.rb
CHANGED
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
|
-
|
57
|
+
test1.config.vm.customizations.should include(["modifyvm", :id, "--cpus", "2"])
|
57
58
|
end
|
58
59
|
|
59
60
|
it 'should configure memory' do
|
60
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
87
|
-
|
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 =
|
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
|
-
|
124
|
+
test2.config.vm.provisioners.should have(2).items
|
121
125
|
end
|
122
126
|
end
|
123
127
|
|
data/vagrant-hitch.gemspec
CHANGED
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
|
-
|
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
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
53
|
none: false
|
59
|
-
requirements:
|
60
|
-
- -
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
63
|
-
|
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
|
-
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
74
67
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
118
|
-
|
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
|
-
|
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
|