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 +4 -4
 - data/lib/vagrant-tart/cap/reboot.rb +25 -0
 - data/lib/vagrant-tart/plugin.rb +6 -0
 - data/lib/vagrant-tart/version.rb +1 -1
 - data/locales/en.yml +4 -0
 - metadata +4 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 650f00d3fd371a7e600493744b280db27ff73fc016a9710fb3f5966c3d849d95
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 1adeca2266555ab024ee09345c2ffcaf4d2ca68c9f594d9ed34d657d05589751
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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
         
     | 
    
        data/lib/vagrant-tart/plugin.rb
    CHANGED
    
    | 
         @@ -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"
         
     | 
    
        data/lib/vagrant-tart/version.rb
    CHANGED
    
    
    
        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 
     | 
| 
      
 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- 
     | 
| 
      
 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. 
     | 
| 
      
 74 
     | 
    
         
            +
            rubygems_version: 3.3.27
         
     | 
| 
       74 
75 
     | 
    
         
             
            signing_key:
         
     | 
| 
       75 
76 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       76 
77 
     | 
    
         
             
            summary: Vagrant Tart provider
         
     |