vagrant-tart 0.0.7 → 1.0.0

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: 1f6354db1d8746ea83a55aebde3987ecacb53015874ad76940b80237005a453f
4
- data.tar.gz: fd5f3ac73ed084dea827d4eab5da7cf590bd90aab2b3a9cdb96a443398393176
3
+ metadata.gz: 650f00d3fd371a7e600493744b280db27ff73fc016a9710fb3f5966c3d849d95
4
+ data.tar.gz: 1adeca2266555ab024ee09345c2ffcaf4d2ca68c9f594d9ed34d657d05589751
5
5
  SHA512:
6
- metadata.gz: 6055b302f275ce263e5a190135b26c0d21b6c2bbac0495a870ac798d0ad0c3e06c73b9bd68a8e7cd76d8930f4762162057c902c7113a764399f959b6c6ed4365
7
- data.tar.gz: a57e102f8e3773ad452ecb07635c1c6d724d0178a9a83f652fb70262b1d375b48f1ae9a1a9c21b9f339813716e589c56d647d110d1beab3e25dfc07b18982180
6
+ metadata.gz: 18237ada8a2da3efa4eb9d9481931f92d37a2ce58b491b7d6de976bb0e521db93d3dea82a20db1e825f9ae29fc2a18cb330ad44c7691df79cf909eeb7287cd06
7
+ data.tar.gz: f4cecf60468782b63618de6eaf2bb4a24eb425ce4d5e296186b971f060f3252d22ec7accbeec41f1ff1a9bf376e338272227d79c69c8cbb3984d5044c5f6356b
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "i18n"
4
+
5
+ module VagrantPlugins
6
+ module Tart
7
+ module Cap
8
+ # This class handles the reboot functionality
9
+ class Reboot
10
+ WAIT_SLEEP_TIME = 5
11
+
12
+ def self.reboot(machine)
13
+ comm = machine.communicate
14
+ reboot_cmd = "shutdown -r now"
15
+
16
+ machine.ui.info(I18n.t("vagrant_tart.messages.restarting_instance", name: machine.name))
17
+ comm.sudo(reboot_cmd)
18
+ sleep(WAIT_SLEEP_TIME)
19
+ rescue Vagrant::Errors::VagrantError => e
20
+ machine.ui.error(I18n.t("vagrant_tart.errors.unable_to_restart_instance", message: e.message))
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -36,6 +36,12 @@ module VagrantPlugins
36
36
  SyncedFolder
37
37
  end
38
38
 
39
+ # Register the guest capabilities.
40
+ guest_capability(:darwin, :reboot) do
41
+ require_relative "cap/reboot"
42
+ Cap::Reboot
43
+ end
44
+
39
45
  # Register the custom VNC command.
40
46
  command("vnc", primary: false) do
41
47
  require_relative "command/vnc"
@@ -4,6 +4,6 @@ module VagrantPlugins
4
4
  # Top level module for the Tart provider plugin.
5
5
  module Tart
6
6
  # Current version of the Tart provider plugin.
7
- VERSION = "0.0.7"
7
+ VERSION = "1.0.0"
8
8
  end
9
9
  end
data/locales/en.yml CHANGED
@@ -47,6 +47,8 @@ en:
47
47
  Tart provider. The provider this machine is using is: %{provider}
48
48
  tart_required: |-
49
49
  tart CLI is required to run this provider
50
+ unable_to_restart_instance: |-
51
+ Unable to restart the instance %{message}
50
52
 
51
53
  messages:
52
54
  cloning_instance: |-
@@ -83,6 +85,8 @@ en:
83
85
  Virtual machine not created. Moving on...
84
86
  pulling_image: |-
85
87
  Pulling image %{image}...
88
+ restarting_instance: |-
89
+ Restarting instance %{name}...
86
90
  starting_instance: |-
87
91
  Starting instance %{name}...
88
92
  stopping_instance: |-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-tart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Etiemble
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-08 00:00:00.000000000 Z
11
+ date: 2025-09-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Allows Vagrant to manage Tart virtual machines.
14
14
  email:
@@ -31,6 +31,7 @@ files:
31
31
  - lib/vagrant-tart/action/stop_instance.rb
32
32
  - lib/vagrant-tart/action/suspend_instance.rb
33
33
  - lib/vagrant-tart/action/vnc_connect.rb
34
+ - lib/vagrant-tart/cap/reboot.rb
34
35
  - lib/vagrant-tart/command/vnc.rb
35
36
  - lib/vagrant-tart/config.rb
36
37
  - lib/vagrant-tart/errors.rb
@@ -70,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
71
  - !ruby/object:Gem::Version
71
72
  version: '0'
72
73
  requirements: []
73
- rubygems_version: 3.5.11
74
+ rubygems_version: 3.3.27
74
75
  signing_key:
75
76
  specification_version: 4
76
77
  summary: Vagrant Tart provider