jamie-vagrant 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/jamie-vagrant.gemspec +1 -1
- data/lib/jamie/driver/vagrant.rb +12 -12
- data/lib/jamie/driver/vagrant_version.rb +1 -1
- data/lib/jamie/vagrant.rb +3 -3
- metadata +6 -6
data/jamie-vagrant.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_dependency 'jamie', '~> 0.1.0.
|
20
|
+
gem.add_dependency 'jamie', '~> 0.1.0.alpha21'
|
21
21
|
gem.add_dependency 'vagrant', '~> 1.0.5'
|
22
22
|
|
23
23
|
gem.add_development_dependency 'cane'
|
data/lib/jamie/driver/vagrant.rb
CHANGED
@@ -27,33 +27,33 @@ module Jamie
|
|
27
27
|
# @author Fletcher Nichol <fnichol@nichol.ca>
|
28
28
|
class Vagrant < Jamie::Driver::SSHBase
|
29
29
|
|
30
|
-
default_config
|
30
|
+
default_config :customize, {:memory => '256'}
|
31
31
|
|
32
32
|
def create(state)
|
33
33
|
# @todo Vagrantfile setup will be placed in any dependency hook
|
34
34
|
# checks when feature is released
|
35
|
-
vagrantfile = File.join(config[
|
35
|
+
vagrantfile = File.join(config[:jamie_root], "Vagrantfile")
|
36
36
|
create_vagrantfile(vagrantfile) unless File.exists?(vagrantfile)
|
37
37
|
|
38
|
-
state[
|
39
|
-
run "vagrant up #{state[
|
40
|
-
info("Vagrant instance <#{state[
|
38
|
+
state[:hostname] = instance.name
|
39
|
+
run "vagrant up #{state[:hostname]} --no-provision"
|
40
|
+
info("Vagrant instance <#{state[:hostname]}> created.")
|
41
41
|
end
|
42
42
|
|
43
43
|
def converge(state)
|
44
|
-
run "vagrant provision #{state[
|
44
|
+
run "vagrant provision #{state[:hostname]}"
|
45
45
|
end
|
46
46
|
|
47
47
|
def destroy(state)
|
48
|
-
return if state[
|
48
|
+
return if state[:hostname].nil?
|
49
49
|
|
50
|
-
run "vagrant destroy #{state[
|
51
|
-
info("Vagrant instance <#{state[
|
52
|
-
state.delete(
|
50
|
+
run "vagrant destroy #{state[:hostname]} -f"
|
51
|
+
info("Vagrant instance <#{state[:hostname]}> destroyed.")
|
52
|
+
state.delete(:hostname)
|
53
53
|
end
|
54
54
|
|
55
55
|
def login_command(state)
|
56
|
-
%W{vagrant ssh #{state[
|
56
|
+
%W{vagrant ssh #{state[:hostname]}}
|
57
57
|
end
|
58
58
|
|
59
59
|
protected
|
@@ -63,7 +63,7 @@ module Jamie
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def run(cmd)
|
66
|
-
cmd = "echo #{cmd}" if config[
|
66
|
+
cmd = "echo #{cmd}" if config[:dry_run]
|
67
67
|
run_command(cmd)
|
68
68
|
end
|
69
69
|
|
data/lib/jamie/vagrant.rb
CHANGED
@@ -64,11 +64,11 @@ module Jamie
|
|
64
64
|
driver = instance.driver
|
65
65
|
|
66
66
|
config.vm.define instance.name do |c|
|
67
|
-
c.vm.box = driver[
|
68
|
-
c.vm.box_url = driver[
|
67
|
+
c.vm.box = driver[:box]
|
68
|
+
c.vm.box_url = driver[:box_url] if driver[:box_url]
|
69
69
|
c.vm.host_name = "#{instance.name}.vagrantup.com"
|
70
70
|
|
71
|
-
driver[
|
71
|
+
driver[:customize].each do |key,value|
|
72
72
|
c.vm.customize ["modifyvm", :id, "--#{key}", value]
|
73
73
|
end
|
74
74
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jamie-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jamie
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.1.0.
|
21
|
+
version: 0.1.0.alpha21
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.1.0.
|
29
|
+
version: 0.1.0.alpha21
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: vagrant
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
segments:
|
124
124
|
- 0
|
125
|
-
hash:
|
125
|
+
hash: -1079953065975924610
|
126
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
segments:
|
133
133
|
- 0
|
134
|
-
hash:
|
134
|
+
hash: -1079953065975924610
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
137
|
rubygems_version: 1.8.24
|