xanthus 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b32bb667df960d2a565943f27d57c28462cfc37e6ffd8e56f1fddb817afa828
4
- data.tar.gz: 772ac67b093aae2ee190481888405b97f08639494a86266c4017750b0da89fcb
3
+ metadata.gz: 66257493ff2d3fe1d22a7ca0706fdf65ee3bb61d7546ed5d63372dab6b5e603a
4
+ data.tar.gz: fd7b4332a60cb729740443a33edbfc199ac971d5b928ae67d500b85bcbb34e51
5
5
  SHA512:
6
- metadata.gz: d2f02645f8141275b74adf7b1b70c3a36609fc9172be148a949ed1b0c1acb18bec134eb13e9ed7717cf098f6fda40289a82b38066f650d49c0c2abcaac56a924
7
- data.tar.gz: 379c8d188ac86ee7abf532ef43f05458f541033abe4d97a4087c5026a72c01dd1c0db5da1b03bffbe0822cc9315b624db7e3dae30f654c12746851eac7c3ca6d
6
+ metadata.gz: a1d94ad4ee1548a22e23106d0fc3728d6595794f1f7e05ad86a831aa97547921a08c33be44e9d95688dbae5d234cd0a936f1ed65e5ed8f1e173fb7b41a03d05c
7
+ data.tar.gz: 4437c5b2b627079279b1c08655b22ec6009dd7b3d96300e2bccd38161873d0fe8d37547cf90e2f635ca6f788e0475ff360214c9d706263a7003126dc05ba405e
@@ -7,7 +7,7 @@ param1 = ARGV[1]
7
7
 
8
8
  if (instruction == 'version')
9
9
  Xanthus.version
10
- elsif (instruction == 'init')
10
+ elsif (instruction == 'init' && !param1.nil?)
11
11
  Xanthus::Init.init param1
12
12
  elsif (instruction == 'run')
13
13
  load('./.xanthus')
@@ -42,10 +42,13 @@ module Xanthus
42
42
  f.write(config.vms[machine].to_vagrant)
43
43
  end
44
44
  script = Script.new(scripts, config).to_s
45
- script += self.output_script(@outputs[machine]) unless @outputs[machine].nil?
46
45
  File.open('provision.sh', 'w+') do |f|
47
46
  f.write(script)
48
47
  end
48
+ script = self.output_script(@outputs[machine]) unless @outputs[machine].nil?
49
+ File.open('before_halt.sh', 'w+') do |f|
50
+ f.write(script)
51
+ end
49
52
  end
50
53
  end
51
54
 
@@ -1,5 +1,5 @@
1
1
  module Xanthus
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
 
4
4
  def self.version
5
5
  puts VERSION
@@ -48,6 +48,11 @@ script += %Q{
48
48
  vb.name = "#{@name}"
49
49
  end
50
50
  config.vm.provision "shell", path: "provision.sh"
51
+
52
+ config.trigger.before :halt do |trigger|
53
+ trigger.info = "Retrieving data before halt..."
54
+ trigger.run_remote = {path: "before_halt.sh"}
55
+ end
51
56
  end
52
57
  }
53
58
  return script
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xanthus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Pasquier
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-03-18 00:00:00.000000000 Z
12
+ date: 2019-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler