vagrant-foodtaster-server 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,28 +26,33 @@ class VagrantFoodtasterServer
26
26
  $stderr = stderr
27
27
  end
28
28
 
29
- def prepare_vm(vm_name)
30
- unless vm_prepared?(vm_name)
31
- vm = get_vm(vm_name)
32
- sahara = sahara_for(vm)
29
+ def make_initial_snapshot_on_vm(vm_name)
30
+ vm = get_vm(vm_name)
31
+ sahara_for(vm).on
32
+ end
33
33
 
34
- if vm.state.id.to_s != 'running'
35
- chef_run_list = get_chef_solo_run_list(vm)
36
- provision_types = [:shell, :puppet]
34
+ def start_vm(vm_name)
35
+ vm = get_vm(vm_name)
36
+ chef_run_list = get_chef_solo_run_list(vm)
37
+ provision_types = [:shell, :puppet]
37
38
 
38
- unless chef_run_list.empty?
39
- provision_types << :chef_solo
40
- end
39
+ unless chef_run_list.empty?
40
+ provision_types << :chef_solo
41
+ end
41
42
 
42
- vm.action(:up,
43
- provision_types: provision_types,
44
- provision_enabled: true)
45
- end
43
+ vm.action(:up,
44
+ provision_types: provision_types,
45
+ provision_enabled: true)
46
+ end
46
47
 
47
- unless sahara.is_snapshot_mode_on?
48
- sahara.on
49
- end
50
- end
48
+ def vm_running?(vm_name)
49
+ vm = get_vm(vm_name)
50
+ vm.state.id.to_s == 'running'
51
+ end
52
+
53
+ def initial_snapshot_made_on_vm?(vm_name)
54
+ vm = get_vm(vm_name)
55
+ sahara_for(vm).is_snapshot_mode_on?
51
56
  end
52
57
 
53
58
  def rollback_vm(vm_name)
@@ -1,3 +1,3 @@
1
1
  class VagrantFoodtasterServer
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vagrant-foodtaster-server
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mike Lapshin