vagrant-scp-sync 0.5.16 → 0.5.18
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/.github/workflows/lint-release-and-publish.yml +3 -0
- data/.github/workflows/ruby-lint.yml +3 -0
- data/CHANGELOG.md +16 -0
- data/lib/vagrant-scp-sync/action/scp_sync.rb +21 -9
- data/lib/vagrant-scp-sync/command/scp.rb +2 -2
- data/lib/vagrant-scp-sync/plugin.rb +6 -3
- data/lib/vagrant-scp-sync/version.rb +1 -1
- metadata +1 -2
- data/lib/vagrant-scp-sync/ssh_options.rb +0 -19
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 202a5cc4b0e787ee75edac044883999f882f8a16915f11ee922aefb9b44c9bc6
         | 
| 4 | 
            +
              data.tar.gz: d2adac7f2cd87ab29a2d8d3f20ca07a8727b93af1af17d2cd486eef26dd86c3e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: d4058c20ffda654f4daa6124b42696bc2748c6c5275226fa3c44ea568d69782b8da5c3e4a48563efad0fbddb2d141a0578141376f0e1bbe657b7a41a94b315dc
         | 
| 7 | 
            +
              data.tar.gz: 220dfc0f19c48566db5d556ef38e9610db96ae5113210881dd3bc1b9cd1e28ab0cfdce76bad14982cd941d2a0d582deee94441b6e156927ec0746d20b1655178
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,5 +1,21 @@ | |
| 1 1 | 
             
            # Changelog
         | 
| 2 2 |  | 
| 3 | 
            +
            ## [0.5.18](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.17...v0.5.18) (2024-12-23)
         | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
            ### Bug Fixes
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            * added vagrant sync as an alias ([b4519cd](https://github.com/STARTcloud/vagrant-scp-sync/commit/b4519cd9a0cd1e4b00481266ab91196392fcb277))
         | 
| 9 | 
            +
            * added vagrant sync as an alias ([fef3ce9](https://github.com/STARTcloud/vagrant-scp-sync/commit/fef3ce994a291d0b1c795af3101049b325740510))
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            ## [0.5.17](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.16...v0.5.17) (2024-12-23)
         | 
| 12 | 
            +
             | 
| 13 | 
            +
             | 
| 14 | 
            +
            ### Bug Fixes
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            * single file sync - lint ([814d333](https://github.com/STARTcloud/vagrant-scp-sync/commit/814d333a78b41e7d7e62b69086abd36d3182c0cd))
         | 
| 17 | 
            +
            * single file sync - lint ([7b9bb34](https://github.com/STARTcloud/vagrant-scp-sync/commit/7b9bb345c8137030f83a438aa6e101e07be3d7fb))
         | 
| 18 | 
            +
             | 
| 3 19 | 
             
            ## [0.5.16](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.15...v0.5.16) (2024-12-23)
         | 
| 4 20 |  | 
| 5 21 |  | 
| @@ -2,10 +2,22 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            require 'vagrant/util/platform'
         | 
| 4 4 | 
             
            require 'vagrant/util/subprocess'
         | 
| 5 | 
            -
            require 'vagrant-scp-sync/ssh_options'
         | 
| 6 | 
            -
             | 
| 7 5 | 
             
            module VagrantPlugins
         | 
| 8 6 | 
             
              module ScpSync
         | 
| 7 | 
            +
                # Helper class for building SSH options
         | 
| 8 | 
            +
                class SshOptions
         | 
| 9 | 
            +
                  def self.build(ssh_info)
         | 
| 10 | 
            +
                    opts = %w[
         | 
| 11 | 
            +
                      -o StrictHostKeyChecking=no
         | 
| 12 | 
            +
                      -o UserKnownHostsFile=/dev/null
         | 
| 13 | 
            +
                      -o LogLevel=ERROR
         | 
| 14 | 
            +
                    ]
         | 
| 15 | 
            +
                    opts << "-o port=#{ssh_info[:port]}"
         | 
| 16 | 
            +
                    opts << ssh_info[:private_key_path].map { |k| "-i #{k}" }.join(' ')
         | 
| 17 | 
            +
                    opts
         | 
| 18 | 
            +
                  end
         | 
| 19 | 
            +
                end
         | 
| 20 | 
            +
             | 
| 9 21 | 
             
                # This will SCP the files
         | 
| 10 22 | 
             
                class ScpSyncHelper
         | 
| 11 23 | 
             
                  def self.scp_single(machine, opts, scp_path)
         | 
| @@ -74,19 +86,19 @@ module VagrantPlugins | |
| 74 86 | 
             
                      make_dir = "mkdir -p #{target_dir}"
         | 
| 75 87 | 
             
                    end
         | 
| 76 88 |  | 
| 77 | 
            -
                    # Execute commands  | 
| 78 | 
            -
                    execute_command(machine, remove_dir, true,  | 
| 79 | 
            -
                    execute_command(machine, make_dir, true,  | 
| 89 | 
            +
                    # Execute commands silently for setup
         | 
| 90 | 
            +
                    execute_command(machine, remove_dir, true, nil, opts) if delete
         | 
| 91 | 
            +
                    execute_command(machine, make_dir, true, nil, opts)
         | 
| 80 92 |  | 
| 81 93 | 
             
                    # For upload, ensure remote directory permissions
         | 
| 82 94 | 
             
                    if opts[:direction] == :upload || opts[:direction].nil?
         | 
| 83 | 
            -
                      execute_command(machine, change_ownership, true,  | 
| 84 | 
            -
                      execute_command(machine, change_permissions, true,  | 
| 95 | 
            +
                      execute_command(machine, change_ownership, true, nil, opts)
         | 
| 96 | 
            +
                      execute_command(machine, change_permissions, true, nil, opts)
         | 
| 85 97 | 
             
                    end
         | 
| 86 98 |  | 
| 87 | 
            -
                    # Build and execute the scp command
         | 
| 99 | 
            +
                    # Build and execute the scp command with sync message
         | 
| 88 100 | 
             
                    synchronize = build_scp_command(scp_path, ssh_opts, source, target)
         | 
| 89 | 
            -
                    execute_command(machine, synchronize, true, ' | 
| 101 | 
            +
                    execute_command(machine, synchronize, true, 'scp_sync_folder', opts)
         | 
| 90 102 | 
             
                  end
         | 
| 91 103 |  | 
| 92 104 | 
             
                  def self.expand_path(path, machine)
         | 
| @@ -58,8 +58,8 @@ module VagrantPlugins | |
| 58 58 |  | 
| 59 59 | 
             
                    def parse_args
         | 
| 60 60 | 
             
                      opts = OptionParser.new do |o|
         | 
| 61 | 
            -
                        o.banner =  "Usage: vagrant scp <local_path> [vm_name]:<remote_path> \n"
         | 
| 62 | 
            -
                        o.banner += "       vagrant scp [vm_name]:<remote_path> <local_path> \n"
         | 
| 61 | 
            +
                        o.banner =  "Usage: vagrant scp|sync <local_path> [vm_name]:<remote_path> \n"
         | 
| 62 | 
            +
                        o.banner += "       vagrant scp|sync [vm_name]:<remote_path> <local_path> \n"
         | 
| 63 63 | 
             
                        o.banner += 'Directories will be copied recursively.'
         | 
| 64 64 | 
             
                        o.separator ''
         | 
| 65 65 | 
             
                        o.separator 'Options:'
         | 
| @@ -64,9 +64,12 @@ module VagrantPlugins | |
| 64 64 | 
             
                  setup_logging
         | 
| 65 65 | 
             
                  setup_i18n
         | 
| 66 66 |  | 
| 67 | 
            -
                   | 
| 68 | 
            -
             | 
| 69 | 
            -
                     | 
| 67 | 
            +
                  # Register both 'scp' and 'sync' commands to point to the same command class
         | 
| 68 | 
            +
                  %w[scp sync].each do |cmd|
         | 
| 69 | 
            +
                    command(cmd) do
         | 
| 70 | 
            +
                      require_relative 'command/scp'
         | 
| 71 | 
            +
                      Command::ScpSyncCommand
         | 
| 72 | 
            +
                    end
         | 
| 70 73 | 
             
                  end
         | 
| 71 74 | 
             
                end
         | 
| 72 75 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: vagrant-scp-sync
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.18
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Mark Gilbert
         | 
| @@ -143,7 +143,6 @@ files: | |
| 143 143 | 
             
            - lib/vagrant-scp-sync/command/scp.rb
         | 
| 144 144 | 
             
            - lib/vagrant-scp-sync/errors.rb
         | 
| 145 145 | 
             
            - lib/vagrant-scp-sync/plugin.rb
         | 
| 146 | 
            -
            - lib/vagrant-scp-sync/ssh_options.rb
         | 
| 147 146 | 
             
            - lib/vagrant-scp-sync/synced_folder.rb
         | 
| 148 147 | 
             
            - lib/vagrant-scp-sync/version.rb
         | 
| 149 148 | 
             
            - locales/en.yml
         | 
| @@ -1,19 +0,0 @@ | |
| 1 | 
            -
            # frozen_string_literal: true
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            module VagrantPlugins
         | 
| 4 | 
            -
              module ScpSync
         | 
| 5 | 
            -
                # Helper class for building SSH options
         | 
| 6 | 
            -
                class SshOptions
         | 
| 7 | 
            -
                  def self.build(ssh_info)
         | 
| 8 | 
            -
                    opts = %w[
         | 
| 9 | 
            -
                      -o StrictHostKeyChecking=no
         | 
| 10 | 
            -
                      -o UserKnownHostsFile=/dev/null
         | 
| 11 | 
            -
                      -o LogLevel=ERROR
         | 
| 12 | 
            -
                    ]
         | 
| 13 | 
            -
                    opts << "-o port=#{ssh_info[:port]}"
         | 
| 14 | 
            -
                    opts << ssh_info[:private_key_path].map { |k| "-i #{k}" }.join(' ')
         | 
| 15 | 
            -
                    opts
         | 
| 16 | 
            -
                  end
         | 
| 17 | 
            -
                end
         | 
| 18 | 
            -
              end
         | 
| 19 | 
            -
            end
         |