vagrant-unbundled 1.8.4.2 → 1.8.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +52 -0
- data/Gemfile.lock +9 -7
- data/RELEASE.md +37 -14
- data/lib/vagrant/action/builtin/box_add.rb +3 -1
- data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +5 -0
- data/lib/vagrant/box_collection.rb +2 -1
- data/lib/vagrant/bundler.rb +36 -1
- data/lib/vagrant/errors.rb +16 -8
- data/lib/vagrant/plugin/state_file.rb +8 -1
- data/lib/vagrant/util/platform.rb +1 -1
- data/plugins/guests/arch/cap/change_host_name.rb +13 -10
- data/plugins/guests/arch/cap/configure_networks.rb +11 -8
- data/plugins/guests/arch/cap/nfs.rb +35 -0
- data/plugins/guests/arch/cap/rsync.rb +16 -0
- data/plugins/guests/arch/cap/smb.rb +17 -0
- data/plugins/guests/arch/plugin.rb +28 -3
- data/plugins/guests/atomic/cap/change_host_name.rb +13 -10
- data/plugins/guests/atomic/plugin.rb +3 -3
- data/plugins/guests/{netbsd → bsd}/cap/halt.rb +2 -2
- data/plugins/guests/bsd/cap/nfs.rb +49 -0
- data/plugins/guests/bsd/cap/public_key.rb +65 -0
- data/plugins/guests/bsd/cap/virtualbox.rb +16 -0
- data/plugins/guests/bsd/guest.rb +9 -0
- data/plugins/guests/bsd/plugin.rb +40 -0
- data/plugins/guests/coreos/cap/change_host_name.rb +1 -1
- data/plugins/guests/coreos/plugin.rb +4 -4
- data/plugins/guests/darwin/cap/change_host_name.rb +4 -1
- data/plugins/guests/darwin/cap/configure_networks.rb +12 -5
- data/plugins/guests/darwin/cap/halt.rb +3 -1
- data/plugins/guests/darwin/cap/rsync.rb +7 -4
- data/plugins/guests/darwin/plugin.rb +13 -28
- data/plugins/guests/debian/cap/change_host_name.rb +14 -15
- data/plugins/guests/debian/cap/configure_networks.rb +2 -6
- data/plugins/guests/debian/cap/{nfs_client.rb → nfs.rb} +2 -1
- data/plugins/guests/debian/cap/rsync.rb +5 -6
- data/plugins/guests/debian/plugin.rb +8 -8
- data/plugins/guests/esxi/cap/mount_nfs_folder.rb +2 -2
- data/plugins/guests/esxi/plugin.rb +6 -6
- data/plugins/guests/fedora/cap/flavor.rb +1 -1
- data/plugins/guests/fedora/plugin.rb +2 -17
- data/plugins/guests/freebsd/cap/change_host_name.rb +2 -3
- data/plugins/guests/freebsd/cap/rsync.rb +7 -4
- data/plugins/guests/freebsd/plugin.rb +9 -29
- data/plugins/guests/funtoo/plugin.rb +3 -8
- data/plugins/guests/gentoo/cap/change_host_name.rb +21 -6
- data/plugins/guests/gentoo/cap/configure_networks.rb +35 -26
- data/plugins/guests/gentoo/plugin.rb +4 -4
- data/plugins/guests/linux/cap/choose_addressable_ip_addr.rb +2 -3
- data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +31 -45
- data/plugins/guests/linux/cap/network_interfaces.rb +20 -0
- data/plugins/guests/linux/cap/nfs.rb +57 -0
- data/plugins/guests/linux/cap/public_key.rb +65 -0
- data/plugins/guests/linux/cap/rsync.rb +7 -4
- data/plugins/guests/linux/plugin.rb +30 -25
- data/plugins/guests/mint/plugin.rb +1 -1
- data/plugins/guests/netbsd/plugin.rb +10 -30
- data/plugins/guests/nixos/plugin.rb +5 -5
- data/plugins/guests/omnios/cap/change_host_name.rb +1 -1
- data/plugins/guests/omnios/plugin.rb +4 -4
- data/plugins/guests/openbsd/cap/change_host_name.rb +21 -3
- data/plugins/guests/openbsd/plugin.rb +10 -30
- data/plugins/guests/photon/cap/change_host_name.rb +1 -1
- data/plugins/guests/photon/plugin.rb +4 -4
- data/plugins/guests/pld/cap/change_host_name.rb +1 -1
- data/plugins/guests/pld/plugin.rb +4 -4
- data/plugins/guests/redhat/cap/change_host_name.rb +4 -3
- data/plugins/guests/redhat/cap/configure_networks.rb +1 -24
- data/plugins/guests/redhat/plugin.rb +7 -7
- data/plugins/guests/slackware/cap/change_host_name.rb +1 -1
- data/plugins/guests/slackware/cap/configure_networks.rb +1 -5
- data/plugins/guests/slackware/plugin.rb +3 -3
- data/plugins/guests/smartos/plugin.rb +12 -12
- data/plugins/guests/solaris/plugin.rb +14 -14
- data/plugins/guests/solaris11/plugin.rb +12 -12
- data/plugins/guests/suse/cap/change_host_name.rb +1 -1
- data/plugins/guests/suse/cap/configure_networks.rb +1 -5
- data/plugins/guests/suse/plugin.rb +8 -8
- data/plugins/guests/tinycore/cap/mount_nfs.rb +2 -2
- data/plugins/guests/tinycore/plugin.rb +7 -7
- data/plugins/guests/trisquel/plugin.rb +1 -1
- data/plugins/guests/ubuntu/guest.rb +1 -1
- data/plugins/guests/ubuntu/plugin.rb +1 -6
- data/plugins/guests/windows/plugin.rb +2 -2
- data/plugins/kernel_v2/config/vm.rb +8 -1
- data/plugins/providers/hyperv/scripts/get_vm_status.ps1 +25 -5
- data/plugins/providers/virtualbox/driver/meta.rb +1 -0
- data/plugins/providers/virtualbox/driver/version_5_1.rb +734 -0
- data/plugins/providers/virtualbox/plugin.rb +1 -0
- data/plugins/synced_folders/nfs/synced_folder.rb +10 -2
- data/plugins/synced_folders/rsync/helper.rb +11 -4
- data/scripts/{bintray_upload.sh → sign.sh} +0 -0
- data/templates/guests/arch/network_static.erb +3 -3
- data/templates/guests/arch/network_static6.erb +8 -0
- data/templates/guests/freebsd/network_static6.erb +6 -0
- data/templates/guests/funtoo/network_static6.erb +9 -0
- data/templates/guests/gentoo/network_dhcp.erb +1 -1
- data/templates/guests/gentoo/network_static.erb +4 -4
- data/templates/guests/gentoo/network_static6.erb +7 -0
- data/templates/guests/redhat/network_dhcp.erb +1 -1
- data/templates/guests/redhat/network_static.erb +4 -1
- data/templates/guests/{fedora → redhat}/network_static6.erb +5 -2
- data/templates/locales/en.yml +40 -6
- data/test/unit/plugins/guests/arch/cap/change_host_name_test.rb +6 -6
- data/test/unit/plugins/guests/arch/cap/configure_networks_test.rb +20 -15
- data/test/unit/plugins/guests/arch/cap/rsync_test.rb +30 -0
- data/test/unit/plugins/guests/arch/cap/smb_test.rb +38 -0
- data/test/unit/plugins/guests/atomic/cap/change_host_name_test.rb +9 -8
- data/test/unit/plugins/guests/{freebsd → bsd}/cap/halt_test.rb +11 -10
- data/test/unit/plugins/guests/{freebsd → bsd}/cap/insert_public_key_test.rb +7 -6
- data/test/unit/plugins/guests/bsd/cap/nfs_test.rb +68 -0
- data/test/unit/plugins/guests/coreos/cap/change_host_name_test.rb +5 -5
- data/test/unit/plugins/guests/darwin/cap/change_host_name_test.rb +5 -5
- data/test/unit/plugins/guests/darwin/cap/halt_test.rb +36 -0
- data/test/unit/plugins/guests/debian/cap/change_host_name_test.rb +3 -5
- data/test/unit/plugins/guests/debian/cap/configure_networks_test.rb +13 -9
- data/test/unit/plugins/guests/debian/cap/rsync_test.rb +3 -11
- data/test/unit/plugins/guests/freebsd/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/linux/cap/mount_nfs_test.rb +16 -3
- data/test/unit/plugins/guests/omnios/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/photon/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/pld/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/redhat/cap/change_host_name_test.rb +4 -3
- data/test/unit/plugins/guests/redhat/cap/configure_networks_test.rb +17 -33
- data/test/unit/plugins/guests/slackware/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/slackware/cap/configure_networks_test.rb +8 -4
- data/test/unit/plugins/guests/suse/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/suse/cap/configure_networks_test.rb +13 -16
- data/test/unit/plugins/kernel_v2/config/vm_test.rb +10 -2
- data/test/unit/templates/guests/arch/network_static_test.rb +4 -2
- data/test/unit/templates/guests/gentoo/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/gentoo/network_static_test.rb +10 -10
- data/test/unit/templates/guests/redhat/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/redhat/network_static_test.rb +9 -9
- data/vagrant.gemspec +3 -3
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CHANGELOG.md +1 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CONTRIBUTING.md +38 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/README.md +297 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/bin/listen +12 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/base.rb +141 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/bsd.rb +106 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb +26 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/darwin.rb +92 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb +106 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/polling.rb +37 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/windows.rb +98 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter.rb +45 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/backend.rb +38 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/change.rb +76 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/cli.rb +65 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/directory.rb +87 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/config.rb +55 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/loop.rb +117 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/processor.rb +122 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/queue.rb +55 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/file.rb +80 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/fsm.rb +132 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb +29 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener/config.rb +41 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener.rb +133 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/logger.rb +32 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/options.rb +23 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/queue_optimizer.rb +132 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/entry.rb +64 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/symlink_detector.rb +39 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record.rb +118 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer/controller.rb +48 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer.rb +97 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/version.rb +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen.rb +57 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.gitignore +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rspec +2 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop-disables.yml +384 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop.yml +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.travis.yml +43 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/AUTHORS +98 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Gemfile +11 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/LICENSE +21 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/README.md +667 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Rakefile +132 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/bin/restclient +92 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/history.md +310 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest-client.rb +2 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest_client.rb +2 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/abstract_response.rb +226 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/exceptions.rb +244 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/params_array.rb +72 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/payload.rb +209 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/platform.rb +49 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/raw_response.rb +38 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/request.rb +904 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/resource.rb +168 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/response.rb +80 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/utils.rb +235 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/version.rb +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows/root_certs.rb +105 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows.rb +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient.rb +184 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.gemspec +31 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.windows.gemspec +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/helpers.rb +22 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/_lib.rb +1 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/244b5494.0 +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/81b9768f.0 +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/README +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/digicert.crt +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/415660c1.0 +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/7651b327.0 +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/README +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/verisign.crt +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/digicert.crt +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/verisign.crt +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/httpbin_spec.rb +86 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/integration_spec.rb +125 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/request_spec.rb +127 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/spec_helper.rb +29 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/_lib.rb +1 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/abstract_response_spec.rb +145 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/exceptions_spec.rb +108 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/master_shake.jpg +0 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/params_array_spec.rb +36 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/payload_spec.rb +263 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/raw_response_spec.rb +18 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request2_spec.rb +54 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request_spec.rb +1265 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/resource_spec.rb +130 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/response_spec.rb +241 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/restclient_spec.rb +79 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/utils_spec.rb +147 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/windows/root_certs_spec.rb +22 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.gitignore +10 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rspec +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rubocop.yml +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.travis.yml +11 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/LICENSE.txt +21 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/README.md +151 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/logger.rb +16 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/quiet.rb +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/ruby_version.rb +58 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis/ruby_version.rb +59 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis.rb +58 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/version.rb +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/warning.rb +97 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep.rb +2 -0
- data/vendor/bundle/ruby/2.3.0/specifications/listen-3.1.5.gemspec +44 -0
- data/vendor/bundle/ruby/2.3.0/specifications/rest-client-2.0.0.gemspec +60 -0
- data/vendor/bundle/ruby/2.3.0/specifications/ruby_dep-1.4.0.gemspec +34 -0
- data/version.txt +1 -1
- metadata +147 -44
- data/plugins/guests/darwin/cap/insert_public_key.rb +0 -33
- data/plugins/guests/darwin/cap/mount_nfs_folder.rb +0 -37
- data/plugins/guests/darwin/cap/remove_public_key.rb +0 -21
- data/plugins/guests/fedora/cap/change_host_name.rb +0 -29
- data/plugins/guests/fedora/cap/configure_networks.rb +0 -135
- data/plugins/guests/fedora/cap/network_scripts_dir.rb +0 -15
- data/plugins/guests/freebsd/cap/halt.rb +0 -16
- data/plugins/guests/freebsd/cap/insert_public_key.rb +0 -34
- data/plugins/guests/freebsd/cap/mount_nfs_folder.rb +0 -24
- data/plugins/guests/freebsd/cap/remove_public_key.rb +0 -21
- data/plugins/guests/funtoo/cap/change_host_name.rb +0 -17
- data/plugins/guests/linux/cap/insert_public_key.rb +0 -31
- data/plugins/guests/linux/cap/mount_nfs.rb +0 -50
- data/plugins/guests/linux/cap/nfs_client.rb +0 -11
- data/plugins/guests/linux/cap/remove_public_key.rb +0 -24
- data/plugins/guests/netbsd/cap/insert_public_key.rb +0 -21
- data/plugins/guests/netbsd/cap/mount_nfs_folder.rb +0 -17
- data/plugins/guests/netbsd/cap/remove_public_key.rb +0 -21
- data/plugins/guests/openbsd/cap/halt.rb +0 -16
- data/plugins/guests/openbsd/cap/insert_public_key.rb +0 -21
- data/plugins/guests/openbsd/cap/mount_nfs_folder.rb +0 -14
- data/plugins/guests/openbsd/cap/remove_public_key.rb +0 -21
- data/plugins/guests/ubuntu/cap/change_host_name.rb +0 -52
- data/templates/guests/fedora/network_dhcp.erb +0 -6
- data/templates/guests/fedora/network_static.erb +0 -16
- data/test/unit/plugins/guests/freebsd/cap/mount_nfs_folder_test.rb +0 -53
- data/test/unit/plugins/guests/ubuntu/cap/change_host_name_test.rb +0 -42
- data/test/unit/templates/guests/fedora/network_dhcp_test.rb +0 -21
- data/test/unit/templates/guests/fedora/network_static6_test.rb +0 -25
- data/test/unit/templates/guests/fedora/network_static_test.rb +0 -71
@@ -0,0 +1,106 @@
|
|
1
|
+
# Listener implementation for BSD's `kqueue`.
|
2
|
+
# @see http://www.freebsd.org/cgi/man.cgi?query=kqueue
|
3
|
+
# @see https://github.com/mat813/rb-kqueue/blob/master/lib/rb-kqueue/queue.rb
|
4
|
+
#
|
5
|
+
module Listen
|
6
|
+
module Adapter
|
7
|
+
class BSD < Base
|
8
|
+
OS_REGEXP = /bsd|dragonfly/i
|
9
|
+
|
10
|
+
DEFAULTS = {
|
11
|
+
events: [
|
12
|
+
:delete,
|
13
|
+
:write,
|
14
|
+
:extend,
|
15
|
+
:attrib,
|
16
|
+
:rename
|
17
|
+
# :link, :revoke
|
18
|
+
]
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
BUNDLER_DECLARE_GEM = <<-EOS.gsub(/^ {6}/, '')
|
22
|
+
Please add the following to your Gemfile to avoid polling for changes:
|
23
|
+
require 'rbconfig'
|
24
|
+
if RbConfig::CONFIG['target_os'] =~ /#{OS_REGEXP}/
|
25
|
+
gem 'rb-kqueue', '>= 0.2'
|
26
|
+
end
|
27
|
+
EOS
|
28
|
+
|
29
|
+
def self.usable?
|
30
|
+
return false unless super
|
31
|
+
require 'rb-kqueue'
|
32
|
+
require 'find'
|
33
|
+
true
|
34
|
+
rescue LoadError
|
35
|
+
Kernel.warn BUNDLER_DECLARE_GEM
|
36
|
+
false
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def _configure(directory, &callback)
|
42
|
+
@worker ||= KQueue::Queue.new
|
43
|
+
@callback = callback
|
44
|
+
# use Record to make a snapshot of dir, so we
|
45
|
+
# can detect new files
|
46
|
+
_find(directory.to_s) { |path| _watch_file(path, @worker) }
|
47
|
+
end
|
48
|
+
|
49
|
+
def _run
|
50
|
+
@worker.run
|
51
|
+
end
|
52
|
+
|
53
|
+
def _process_event(dir, event)
|
54
|
+
full_path = _event_path(event)
|
55
|
+
if full_path.directory?
|
56
|
+
# Force dir content tracking to kick in, or we won't have
|
57
|
+
# names of added files
|
58
|
+
_queue_change(:dir, dir, '.', recursive: true)
|
59
|
+
elsif full_path.exist?
|
60
|
+
path = full_path.relative_path_from(dir)
|
61
|
+
_queue_change(:file, dir, path.to_s, change: _change(event.flags))
|
62
|
+
end
|
63
|
+
|
64
|
+
# If it is a directory, and it has a write flag, it means a
|
65
|
+
# file has been added so find out which and deal with it.
|
66
|
+
# No need to check for removed files, kqueue will forget them
|
67
|
+
# when the vfs does.
|
68
|
+
_watch_for_new_file(event) if full_path.directory?
|
69
|
+
end
|
70
|
+
|
71
|
+
def _change(event_flags)
|
72
|
+
{ modified: [:attrib, :extend],
|
73
|
+
added: [:write],
|
74
|
+
removed: [:rename, :delete]
|
75
|
+
}.each do |change, flags|
|
76
|
+
return change unless (flags & event_flags).empty?
|
77
|
+
end
|
78
|
+
nil
|
79
|
+
end
|
80
|
+
|
81
|
+
def _event_path(event)
|
82
|
+
Pathname.new(event.watcher.path)
|
83
|
+
end
|
84
|
+
|
85
|
+
def _watch_for_new_file(event)
|
86
|
+
queue = event.watcher.queue
|
87
|
+
_find(_event_path(event).to_s) do |file_path|
|
88
|
+
unless queue.watchers.detect { |_, v| v.path == file_path.to_s }
|
89
|
+
_watch_file(file_path, queue)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def _watch_file(path, queue)
|
95
|
+
queue.watch_file(path, *options.events, &@callback)
|
96
|
+
rescue Errno::ENOENT => e
|
97
|
+
_log :warn, "kqueue: watch file failed: #{e.message}"
|
98
|
+
end
|
99
|
+
|
100
|
+
# Quick rubocop workaround
|
101
|
+
def _find(*paths, &block)
|
102
|
+
Find.send(:find, *paths, &block)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
module Listen
|
4
|
+
module Adapter
|
5
|
+
class Config
|
6
|
+
attr_reader :directories
|
7
|
+
attr_reader :silencer
|
8
|
+
attr_reader :queue
|
9
|
+
attr_reader :adapter_options
|
10
|
+
|
11
|
+
def initialize(directories, queue, silencer, adapter_options)
|
12
|
+
# Default to current directory if no directories are supplied
|
13
|
+
directories = [Dir.pwd] if directories.to_a.empty?
|
14
|
+
|
15
|
+
# TODO: fix (flatten, array, compact?)
|
16
|
+
@directories = directories.map do |directory|
|
17
|
+
Pathname.new(directory.to_s).realpath
|
18
|
+
end
|
19
|
+
|
20
|
+
@silencer = silencer
|
21
|
+
@queue = queue
|
22
|
+
@adapter_options = adapter_options
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require 'thread'
|
2
|
+
require 'listen/internals/thread_pool'
|
3
|
+
|
4
|
+
module Listen
|
5
|
+
module Adapter
|
6
|
+
# Adapter implementation for Mac OS X `FSEvents`.
|
7
|
+
#
|
8
|
+
class Darwin < Base
|
9
|
+
OS_REGEXP = /darwin(?<major_version>1\d+)/i
|
10
|
+
|
11
|
+
# The default delay between checking for changes.
|
12
|
+
DEFAULTS = { latency: 0.1 }.freeze
|
13
|
+
|
14
|
+
INCOMPATIBLE_GEM_VERSION = <<-EOS.gsub(/^ {8}/, '')
|
15
|
+
rb-fsevent > 0.9.4 no longer supports OS X 10.6 through 10.8.
|
16
|
+
|
17
|
+
Please add the following to your Gemfile to avoid polling for changes:
|
18
|
+
require 'rbconfig'
|
19
|
+
if RbConfig::CONFIG['target_os'] =~ /darwin(1[0-3])/i
|
20
|
+
gem 'rb-fsevent', '<= 0.9.4'
|
21
|
+
end
|
22
|
+
EOS
|
23
|
+
|
24
|
+
def self.usable?
|
25
|
+
require 'rb-fsevent'
|
26
|
+
version = RbConfig::CONFIG['target_os'][OS_REGEXP, :major_version]
|
27
|
+
return false unless version
|
28
|
+
return true if version.to_i >= 13 # darwin13 is OS X 10.9
|
29
|
+
|
30
|
+
fsevent_version = Gem::Version.new(FSEvent::VERSION)
|
31
|
+
return true if fsevent_version <= Gem::Version.new('0.9.4')
|
32
|
+
Kernel.warn INCOMPATIBLE_GEM_VERSION
|
33
|
+
false
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
# NOTE: each directory gets a DIFFERENT callback!
|
39
|
+
def _configure(dir, &callback)
|
40
|
+
opts = { latency: options.latency }
|
41
|
+
|
42
|
+
@workers ||= ::Queue.new
|
43
|
+
@workers << FSEvent.new.tap do |worker|
|
44
|
+
_log :debug, "fsevent: watching: #{dir.to_s.inspect}"
|
45
|
+
worker.watch(dir.to_s, opts, &callback)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def _run
|
50
|
+
first = @workers.pop
|
51
|
+
|
52
|
+
# NOTE: _run is called within a thread, so run every other
|
53
|
+
# worker in it's own thread
|
54
|
+
_run_workers_in_background(_to_array(@workers))
|
55
|
+
_run_worker(first)
|
56
|
+
end
|
57
|
+
|
58
|
+
def _process_event(dir, event)
|
59
|
+
_log :debug, "fsevent: processing event: #{event.inspect}"
|
60
|
+
event.each do |path|
|
61
|
+
new_path = Pathname.new(path.sub(%r{\/$}, ''))
|
62
|
+
_log :debug, "fsevent: #{new_path}"
|
63
|
+
# TODO: does this preserve symlinks?
|
64
|
+
rel_path = new_path.relative_path_from(dir).to_s
|
65
|
+
_queue_change(:dir, dir, rel_path, recursive: true)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def _run_worker(worker)
|
70
|
+
_log :debug, "fsevent: running worker: #{worker.inspect}"
|
71
|
+
worker.run
|
72
|
+
rescue
|
73
|
+
format_string = 'fsevent: running worker failed: %s:%s called from: %s'
|
74
|
+
_log_exception format_string, caller
|
75
|
+
end
|
76
|
+
|
77
|
+
def _run_workers_in_background(workers)
|
78
|
+
workers.each do |worker|
|
79
|
+
# NOTE: while passing local variables to the block below is not
|
80
|
+
# thread safe, using 'worker' from the enumerator above is ok
|
81
|
+
Listen::Internals::ThreadPool.add { _run_worker(worker) }
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
def _to_array(queue)
|
86
|
+
workers = []
|
87
|
+
workers << queue.pop until queue.empty?
|
88
|
+
workers
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
module Listen
|
2
|
+
module Adapter
|
3
|
+
# @see https://github.com/nex3/rb-inotify
|
4
|
+
class Linux < Base
|
5
|
+
OS_REGEXP = /linux/i
|
6
|
+
|
7
|
+
DEFAULTS = {
|
8
|
+
events: [
|
9
|
+
:recursive,
|
10
|
+
:attrib,
|
11
|
+
:create,
|
12
|
+
:delete,
|
13
|
+
:move,
|
14
|
+
:close_write
|
15
|
+
],
|
16
|
+
wait_for_delay: 0.1
|
17
|
+
}.freeze
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
WIKI_URL = 'https://github.com/guard/listen'\
|
22
|
+
'/wiki/Increasing-the-amount-of-inotify-watchers'.freeze
|
23
|
+
|
24
|
+
INOTIFY_LIMIT_MESSAGE = <<-EOS.gsub(/^\s*/, '')
|
25
|
+
FATAL: Listen error: unable to monitor directories for changes.
|
26
|
+
Visit #{WIKI_URL} for info on how to fix this.
|
27
|
+
EOS
|
28
|
+
|
29
|
+
def _configure(directory, &callback)
|
30
|
+
require 'rb-inotify'
|
31
|
+
@worker ||= ::INotify::Notifier.new
|
32
|
+
@worker.watch(directory.to_s, *options.events, &callback)
|
33
|
+
rescue Errno::ENOSPC
|
34
|
+
abort(INOTIFY_LIMIT_MESSAGE)
|
35
|
+
end
|
36
|
+
|
37
|
+
def _run
|
38
|
+
Thread.current[:listen_blocking_read_thread] = true
|
39
|
+
@worker.run
|
40
|
+
Thread.current[:listen_blocking_read_thread] = false
|
41
|
+
end
|
42
|
+
|
43
|
+
def _process_event(dir, event)
|
44
|
+
# NOTE: avoid using event.absolute_name since new API
|
45
|
+
# will need to have a custom recursion implemented
|
46
|
+
# to properly match events to configured directories
|
47
|
+
path = Pathname.new(event.watcher.path) + event.name
|
48
|
+
rel_path = path.relative_path_from(dir).to_s
|
49
|
+
|
50
|
+
_log(:debug) { "inotify: #{rel_path} (#{event.flags.inspect})" }
|
51
|
+
|
52
|
+
if /1|true/ =~ ENV['LISTEN_GEM_SIMULATE_FSEVENT']
|
53
|
+
if (event.flags & [:moved_to, :moved_from]) || _dir_event?(event)
|
54
|
+
rel_path = path.dirname.relative_path_from(dir).to_s
|
55
|
+
end
|
56
|
+
_queue_change(:dir, dir, rel_path, {})
|
57
|
+
return
|
58
|
+
end
|
59
|
+
|
60
|
+
return if _skip_event?(event)
|
61
|
+
|
62
|
+
cookie_params = event.cookie.zero? ? {} : { cookie: event.cookie }
|
63
|
+
|
64
|
+
# Note: don't pass options to force rescanning the directory, so we can
|
65
|
+
# detect moving/deleting a whole tree
|
66
|
+
if _dir_event?(event)
|
67
|
+
_queue_change(:dir, dir, rel_path, cookie_params)
|
68
|
+
return
|
69
|
+
end
|
70
|
+
|
71
|
+
params = cookie_params.merge(change: _change(event.flags))
|
72
|
+
|
73
|
+
_queue_change(:file, dir, rel_path, params)
|
74
|
+
end
|
75
|
+
|
76
|
+
def _skip_event?(event)
|
77
|
+
# Event on root directory
|
78
|
+
return true if event.name == ''
|
79
|
+
# INotify reports changes to files inside directories as events
|
80
|
+
# on the directories themselves too.
|
81
|
+
#
|
82
|
+
# @see http://linux.die.net/man/7/inotify
|
83
|
+
_dir_event?(event) && (event.flags & [:close, :modify]).any?
|
84
|
+
end
|
85
|
+
|
86
|
+
def _change(event_flags)
|
87
|
+
{ modified: [:attrib, :close_write],
|
88
|
+
moved_to: [:moved_to],
|
89
|
+
moved_from: [:moved_from],
|
90
|
+
added: [:create],
|
91
|
+
removed: [:delete] }.each do |change, flags|
|
92
|
+
return change unless (flags & event_flags).empty?
|
93
|
+
end
|
94
|
+
nil
|
95
|
+
end
|
96
|
+
|
97
|
+
def _dir_event?(event)
|
98
|
+
event.flags.include?(:isdir)
|
99
|
+
end
|
100
|
+
|
101
|
+
def _stop
|
102
|
+
@worker && @worker.close
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Listen
|
2
|
+
module Adapter
|
3
|
+
# Polling Adapter that works cross-platform and
|
4
|
+
# has no dependencies. This is the adapter that
|
5
|
+
# uses the most CPU processing power and has higher
|
6
|
+
# file IO than the other implementations.
|
7
|
+
#
|
8
|
+
class Polling < Base
|
9
|
+
OS_REGEXP = // # match every OS
|
10
|
+
|
11
|
+
DEFAULTS = { latency: 1.0, wait_for_delay: 0.05 }.freeze
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def _configure(_, &callback)
|
16
|
+
@polling_callbacks ||= []
|
17
|
+
@polling_callbacks << callback
|
18
|
+
end
|
19
|
+
|
20
|
+
def _run
|
21
|
+
loop do
|
22
|
+
start = Time.now.to_f
|
23
|
+
@polling_callbacks.each do |callback|
|
24
|
+
callback.call(nil)
|
25
|
+
nap_time = options.latency - (Time.now.to_f - start)
|
26
|
+
# TODO: warn if nap_time is negative (polling too slow)
|
27
|
+
sleep(nap_time) if nap_time > 0
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def _process_event(dir, _)
|
33
|
+
_queue_change(:dir, dir, '.', recursive: true)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
module Listen
|
2
|
+
module Adapter
|
3
|
+
# Adapter implementation for Windows `wdm`.
|
4
|
+
#
|
5
|
+
class Windows < Base
|
6
|
+
OS_REGEXP = /mswin|mingw|cygwin/i
|
7
|
+
|
8
|
+
BUNDLER_DECLARE_GEM = <<-EOS.gsub(/^ {6}/, '')
|
9
|
+
Please add the following to your Gemfile to avoid polling for changes:
|
10
|
+
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
|
11
|
+
EOS
|
12
|
+
|
13
|
+
def self.usable?
|
14
|
+
return false unless super
|
15
|
+
require 'wdm'
|
16
|
+
true
|
17
|
+
rescue LoadError
|
18
|
+
_log :debug, format('wdm - load failed: %s:%s', $ERROR_INFO,
|
19
|
+
$ERROR_POSITION * "\n")
|
20
|
+
|
21
|
+
Kernel.warn BUNDLER_DECLARE_GEM
|
22
|
+
false
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def _configure(dir)
|
28
|
+
require 'wdm'
|
29
|
+
_log :debug, 'wdm - starting...'
|
30
|
+
@worker ||= WDM::Monitor.new
|
31
|
+
@worker.watch_recursively(dir.to_s, :files) do |change|
|
32
|
+
yield([:file, change])
|
33
|
+
end
|
34
|
+
|
35
|
+
@worker.watch_recursively(dir.to_s, :directories) do |change|
|
36
|
+
yield([:dir, change])
|
37
|
+
end
|
38
|
+
|
39
|
+
events = [:attributes, :last_write]
|
40
|
+
@worker.watch_recursively(dir.to_s, *events) do |change|
|
41
|
+
yield([:attr, change])
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def _run
|
46
|
+
@worker.run!
|
47
|
+
end
|
48
|
+
|
49
|
+
def _process_event(dir, event)
|
50
|
+
_log :debug, "wdm - callback: #{event.inspect}"
|
51
|
+
|
52
|
+
type, change = event
|
53
|
+
|
54
|
+
full_path = Pathname(change.path)
|
55
|
+
|
56
|
+
rel_path = full_path.relative_path_from(dir).to_s
|
57
|
+
|
58
|
+
options = { change: _change(change.type) }
|
59
|
+
|
60
|
+
case type
|
61
|
+
when :file
|
62
|
+
_queue_change(:file, dir, rel_path, options)
|
63
|
+
when :attr
|
64
|
+
unless full_path.directory?
|
65
|
+
_queue_change(:file, dir, rel_path, options)
|
66
|
+
end
|
67
|
+
when :dir
|
68
|
+
if change.type == :removed
|
69
|
+
# TODO: check if watched dir?
|
70
|
+
_queue_change(:dir, dir, Pathname(rel_path).dirname.to_s, {})
|
71
|
+
elsif change.type == :added
|
72
|
+
_queue_change(:dir, dir, rel_path, {})
|
73
|
+
# do nothing - changed directory means either:
|
74
|
+
# - removed subdirs (handled above)
|
75
|
+
# - added subdirs (handled above)
|
76
|
+
# - removed files (handled by _file_callback)
|
77
|
+
# - added files (handled by _file_callback)
|
78
|
+
# so what's left?
|
79
|
+
end
|
80
|
+
end
|
81
|
+
rescue
|
82
|
+
details = event.inspect
|
83
|
+
_log :error, format('wdm - callback (%s): %s:%s', details, $ERROR_INFO,
|
84
|
+
$ERROR_POSITION * "\n")
|
85
|
+
raise
|
86
|
+
end
|
87
|
+
|
88
|
+
def _change(type)
|
89
|
+
{ modified: [:modified, :attrib], # TODO: is attrib really passed?
|
90
|
+
added: [:added, :renamed_new_file],
|
91
|
+
removed: [:removed, :renamed_old_file] }.each do |change, types|
|
92
|
+
return change if types.include?(type)
|
93
|
+
end
|
94
|
+
nil
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|