vagrant-fixed-ssh 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +46 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +723 -0
- data/Gemfile +3 -0
- data/LICENSE +22 -0
- data/README.md +121 -0
- data/Rakefile +18 -0
- data/bin/vagrant +60 -0
- data/config/default.rb +30 -0
- data/contrib/README.md +12 -0
- data/contrib/emacs/vagrant.el +8 -0
- data/contrib/vim/vagrantfile.vim +9 -0
- data/keys/README.md +17 -0
- data/keys/vagrant +27 -0
- data/keys/vagrant.pub +1 -0
- data/lib/vagrant.rb +197 -0
- data/lib/vagrant/action.rb +63 -0
- data/lib/vagrant/action/box/destroy.rb +25 -0
- data/lib/vagrant/action/box/download.rb +84 -0
- data/lib/vagrant/action/box/package.rb +19 -0
- data/lib/vagrant/action/box/unpackage.rb +61 -0
- data/lib/vagrant/action/box/verify.rb +23 -0
- data/lib/vagrant/action/builder.rb +128 -0
- data/lib/vagrant/action/builtin.rb +171 -0
- data/lib/vagrant/action/env/set.rb +21 -0
- data/lib/vagrant/action/environment.rb +12 -0
- data/lib/vagrant/action/general/check_virtualbox.rb +28 -0
- data/lib/vagrant/action/general/package.rb +101 -0
- data/lib/vagrant/action/general/validate.rb +18 -0
- data/lib/vagrant/action/runner.rb +53 -0
- data/lib/vagrant/action/vm/boot.rb +53 -0
- data/lib/vagrant/action/vm/check_accessible.rb +23 -0
- data/lib/vagrant/action/vm/check_box.rb +33 -0
- data/lib/vagrant/action/vm/check_guest_additions.rb +38 -0
- data/lib/vagrant/action/vm/check_port_collisions.rb +89 -0
- data/lib/vagrant/action/vm/clean_machine_folder.rb +43 -0
- data/lib/vagrant/action/vm/clear_forwarded_ports.rb +18 -0
- data/lib/vagrant/action/vm/clear_network_interfaces.rb +31 -0
- data/lib/vagrant/action/vm/clear_shared_folders.rb +18 -0
- data/lib/vagrant/action/vm/customize.rb +36 -0
- data/lib/vagrant/action/vm/default_name.rb +22 -0
- data/lib/vagrant/action/vm/destroy.rb +19 -0
- data/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +20 -0
- data/lib/vagrant/action/vm/discard_state.rb +22 -0
- data/lib/vagrant/action/vm/export.rb +57 -0
- data/lib/vagrant/action/vm/forward_ports.rb +92 -0
- data/lib/vagrant/action/vm/halt.rb +32 -0
- data/lib/vagrant/action/vm/host_name.rb +21 -0
- data/lib/vagrant/action/vm/import.rb +48 -0
- data/lib/vagrant/action/vm/match_mac_address.rb +21 -0
- data/lib/vagrant/action/vm/network.rb +403 -0
- data/lib/vagrant/action/vm/nfs.rb +196 -0
- data/lib/vagrant/action/vm/package.rb +23 -0
- data/lib/vagrant/action/vm/package_vagrantfile.rb +36 -0
- data/lib/vagrant/action/vm/provision.rb +61 -0
- data/lib/vagrant/action/vm/provisioner_cleanup.rb +26 -0
- data/lib/vagrant/action/vm/prune_nfs_exports.rb +20 -0
- data/lib/vagrant/action/vm/resume.rb +20 -0
- data/lib/vagrant/action/vm/sane_defaults.rb +78 -0
- data/lib/vagrant/action/vm/setup_package_files.rb +54 -0
- data/lib/vagrant/action/vm/share_folders.rb +114 -0
- data/lib/vagrant/action/vm/suspend.rb +20 -0
- data/lib/vagrant/action/warden.rb +92 -0
- data/lib/vagrant/box.rb +44 -0
- data/lib/vagrant/box_collection.rb +58 -0
- data/lib/vagrant/cli.rb +76 -0
- data/lib/vagrant/command.rb +24 -0
- data/lib/vagrant/command/base.rb +167 -0
- data/lib/vagrant/command/box.rb +58 -0
- data/lib/vagrant/command/box_add.rb +37 -0
- data/lib/vagrant/command/box_list.rb +28 -0
- data/lib/vagrant/command/box_remove.rb +27 -0
- data/lib/vagrant/command/box_repackage.rb +27 -0
- data/lib/vagrant/command/destroy.rb +64 -0
- data/lib/vagrant/command/gem.rb +39 -0
- data/lib/vagrant/command/halt.rb +39 -0
- data/lib/vagrant/command/init.rb +40 -0
- data/lib/vagrant/command/package.rb +75 -0
- data/lib/vagrant/command/provision.rb +40 -0
- data/lib/vagrant/command/reload.rb +39 -0
- data/lib/vagrant/command/resume.rb +33 -0
- data/lib/vagrant/command/ssh.rb +90 -0
- data/lib/vagrant/command/ssh_config.rb +51 -0
- data/lib/vagrant/command/start_mixins.rb +26 -0
- data/lib/vagrant/command/status.rb +36 -0
- data/lib/vagrant/command/suspend.rb +33 -0
- data/lib/vagrant/command/up.rb +40 -0
- data/lib/vagrant/communication.rb +7 -0
- data/lib/vagrant/communication/base.rb +56 -0
- data/lib/vagrant/communication/ssh.rb +230 -0
- data/lib/vagrant/config.rb +49 -0
- data/lib/vagrant/config/base.rb +82 -0
- data/lib/vagrant/config/container.rb +37 -0
- data/lib/vagrant/config/error_recorder.rb +19 -0
- data/lib/vagrant/config/loader.rb +127 -0
- data/lib/vagrant/config/nfs.rb +8 -0
- data/lib/vagrant/config/package.rb +7 -0
- data/lib/vagrant/config/ssh.rb +27 -0
- data/lib/vagrant/config/top.rb +72 -0
- data/lib/vagrant/config/vagrant.rb +14 -0
- data/lib/vagrant/config/vm.rb +168 -0
- data/lib/vagrant/config/vm/provisioner.rb +52 -0
- data/lib/vagrant/config/vm/sub_vm.rb +17 -0
- data/lib/vagrant/data_store.rb +92 -0
- data/lib/vagrant/downloaders.rb +7 -0
- data/lib/vagrant/downloaders/base.rb +25 -0
- data/lib/vagrant/downloaders/file.rb +22 -0
- data/lib/vagrant/downloaders/http.rb +97 -0
- data/lib/vagrant/driver.rb +8 -0
- data/lib/vagrant/driver/virtualbox.rb +134 -0
- data/lib/vagrant/driver/virtualbox_4_0.rb +459 -0
- data/lib/vagrant/driver/virtualbox_4_1.rb +459 -0
- data/lib/vagrant/driver/virtualbox_4_2.rb +606 -0
- data/lib/vagrant/driver/virtualbox_base.rb +326 -0
- data/lib/vagrant/environment.rb +522 -0
- data/lib/vagrant/errors.rb +445 -0
- data/lib/vagrant/guest.rb +18 -0
- data/lib/vagrant/guest/arch.rb +56 -0
- data/lib/vagrant/guest/base.rb +99 -0
- data/lib/vagrant/guest/debian.rb +64 -0
- data/lib/vagrant/guest/fedora.rb +66 -0
- data/lib/vagrant/guest/freebsd.rb +86 -0
- data/lib/vagrant/guest/gentoo.rb +46 -0
- data/lib/vagrant/guest/linux.rb +118 -0
- data/lib/vagrant/guest/linux/config.rb +19 -0
- data/lib/vagrant/guest/linux/error.rb +9 -0
- data/lib/vagrant/guest/openbsd.rb +20 -0
- data/lib/vagrant/guest/redhat.rb +67 -0
- data/lib/vagrant/guest/solaris.rb +118 -0
- data/lib/vagrant/guest/suse.rb +17 -0
- data/lib/vagrant/guest/ubuntu.rb +23 -0
- data/lib/vagrant/hosts.rb +37 -0
- data/lib/vagrant/hosts/arch.rb +55 -0
- data/lib/vagrant/hosts/base.rb +66 -0
- data/lib/vagrant/hosts/bsd.rb +97 -0
- data/lib/vagrant/hosts/fedora.rb +47 -0
- data/lib/vagrant/hosts/freebsd.rb +41 -0
- data/lib/vagrant/hosts/gentoo.rb +20 -0
- data/lib/vagrant/hosts/linux.rb +94 -0
- data/lib/vagrant/hosts/opensuse.rb +30 -0
- data/lib/vagrant/hosts/windows.rb +16 -0
- data/lib/vagrant/plugin.rb +81 -0
- data/lib/vagrant/provisioners.rb +12 -0
- data/lib/vagrant/provisioners/base.rb +44 -0
- data/lib/vagrant/provisioners/chef.rb +168 -0
- data/lib/vagrant/provisioners/chef_client.rb +132 -0
- data/lib/vagrant/provisioners/chef_solo.rb +234 -0
- data/lib/vagrant/provisioners/puppet.rb +176 -0
- data/lib/vagrant/provisioners/puppet_server.rb +78 -0
- data/lib/vagrant/provisioners/shell.rb +103 -0
- data/lib/vagrant/registry.rb +52 -0
- data/lib/vagrant/ssh.rb +126 -0
- data/lib/vagrant/test_helpers.rb +154 -0
- data/lib/vagrant/ui.rb +168 -0
- data/lib/vagrant/util.rb +12 -0
- data/lib/vagrant/util/ansi_escape_code_remover.rb +34 -0
- data/lib/vagrant/util/busy.rb +59 -0
- data/lib/vagrant/util/counter.rb +24 -0
- data/lib/vagrant/util/file_checksum.rb +38 -0
- data/lib/vagrant/util/file_mode.rb +12 -0
- data/lib/vagrant/util/hash_with_indifferent_access.rb +63 -0
- data/lib/vagrant/util/is_port_open.rb +38 -0
- data/lib/vagrant/util/line_ending_helpers.rb +14 -0
- data/lib/vagrant/util/network_ip.rb +28 -0
- data/lib/vagrant/util/platform.rb +68 -0
- data/lib/vagrant/util/retryable.rb +25 -0
- data/lib/vagrant/util/safe_exec.rb +36 -0
- data/lib/vagrant/util/safe_puts.rb +31 -0
- data/lib/vagrant/util/stacked_proc_runner.rb +35 -0
- data/lib/vagrant/util/subprocess.rb +247 -0
- data/lib/vagrant/util/template_renderer.rb +83 -0
- data/lib/vagrant/version.rb +6 -0
- data/lib/vagrant/vm.rb +195 -0
- data/tasks/acceptance.rake +113 -0
- data/tasks/bundler.rake +3 -0
- data/tasks/test.rake +20 -0
- data/templates/commands/init/Vagrantfile.erb +99 -0
- data/templates/commands/ssh_config/config.erb +15 -0
- data/templates/config/validation_failed.erb +7 -0
- data/templates/guests/arch/network_dhcp.erb +7 -0
- data/templates/guests/arch/network_static.erb +7 -0
- data/templates/guests/debian/network_dhcp.erb +6 -0
- data/templates/guests/debian/network_static.erb +7 -0
- data/templates/guests/fedora/network_dhcp.erb +6 -0
- data/templates/guests/fedora/network_static.erb +13 -0
- data/templates/guests/freebsd/network_dhcp.erb +3 -0
- data/templates/guests/freebsd/network_static.erb +3 -0
- data/templates/guests/gentoo/network_dhcp.erb +4 -0
- data/templates/guests/gentoo/network_static.erb +4 -0
- data/templates/guests/redhat/network_dhcp.erb +6 -0
- data/templates/guests/redhat/network_static.erb +7 -0
- data/templates/locales/en.yml +759 -0
- data/templates/nfs/exports.erb +5 -0
- data/templates/nfs/exports_freebsd.erb +5 -0
- data/templates/nfs/exports_linux.erb +5 -0
- data/templates/package_Vagrantfile.erb +11 -0
- data/templates/provisioners/chef_client/client.erb +32 -0
- data/templates/provisioners/chef_solo/solo.erb +25 -0
- data/test/acceptance/base.rb +48 -0
- data/test/acceptance/box_test.rb +99 -0
- data/test/acceptance/destroy_test.rb +37 -0
- data/test/acceptance/halt_test.rb +72 -0
- data/test/acceptance/init_test.rb +33 -0
- data/test/acceptance/networking/host_only_test.rb +37 -0
- data/test/acceptance/networking/port_forward_test.rb +125 -0
- data/test/acceptance/package_test.rb +46 -0
- data/test/acceptance/provisioning/basic_test.rb +61 -0
- data/test/acceptance/provisioning/chef_solo_test.rb +37 -0
- data/test/acceptance/provisioning/shell_test.rb +53 -0
- data/test/acceptance/resume_test.rb +17 -0
- data/test/acceptance/shared_folders_test.rb +84 -0
- data/test/acceptance/skeletons/chef_solo_basic/README.md +3 -0
- data/test/acceptance/skeletons/chef_solo_basic/cookbooks/basic/recipes/default.rb +5 -0
- data/test/acceptance/skeletons/chef_solo_json/README.md +3 -0
- data/test/acceptance/skeletons/chef_solo_json/cookbooks/basic/recipes/default.rb +6 -0
- data/test/acceptance/skeletons/provisioner_multi/README.md +3 -0
- data/test/acceptance/skeletons/provisioner_multi/cookbooks/basic/recipes/default.rb +5 -0
- data/test/acceptance/ssh_test.rb +46 -0
- data/test/acceptance/support/config.rb +42 -0
- data/test/acceptance/support/isolated_environment.rb +117 -0
- data/test/acceptance/support/matchers/have_color.rb +9 -0
- data/test/acceptance/support/matchers/match_output.rb +14 -0
- data/test/acceptance/support/matchers/succeed.rb +14 -0
- data/test/acceptance/support/network_tests.rb +29 -0
- data/test/acceptance/support/output.rb +95 -0
- data/test/acceptance/support/shared/base_context.rb +72 -0
- data/test/acceptance/support/shared/command_examples.rb +33 -0
- data/test/acceptance/support/virtualbox.rb +36 -0
- data/test/acceptance/suspend_test.rb +56 -0
- data/test/acceptance/up_basic_test.rb +33 -0
- data/test/acceptance/up_with_box_url.rb +40 -0
- data/test/acceptance/vagrant_test.rb +47 -0
- data/test/acceptance/version_test.rb +15 -0
- data/test/buildbot/README.md +72 -0
- data/test/buildbot/buildbot_config/__init__.py +0 -0
- data/test/buildbot/buildbot_config/config/__init__.py +0 -0
- data/test/buildbot/buildbot_config/config/loader.py +24 -0
- data/test/buildbot/buildbot_config/config/master.py +24 -0
- data/test/buildbot/buildbot_config/config/slave.py +22 -0
- data/test/buildbot/buildbot_config/master/__init__.py +6 -0
- data/test/buildbot/buildbot_config/master/builders.py +78 -0
- data/test/buildbot/buildbot_config/master/buildsteps.py +100 -0
- data/test/buildbot/buildbot_config/master/change_sources.py +8 -0
- data/test/buildbot/buildbot_config/master/schedulers.py +32 -0
- data/test/buildbot/buildbot_config/master/slaves.py +60 -0
- data/test/buildbot/buildbot_config/master/status.py +52 -0
- data/test/buildbot/master/Makefile.sample +28 -0
- data/test/buildbot/master/buildbot.tac +36 -0
- data/test/buildbot/master/master.cfg +67 -0
- data/test/buildbot/master/public_html/bg_gradient.jpg +0 -0
- data/test/buildbot/master/public_html/default.css +545 -0
- data/test/buildbot/master/public_html/favicon.ico +0 -0
- data/test/buildbot/master/public_html/robots.txt +10 -0
- data/test/buildbot/master/public_html/static/css/bootstrap-1.4.0.min.css +356 -0
- data/test/buildbot/master/public_html/static/css/prettify.css +97 -0
- data/test/buildbot/master/public_html/static/css/syntax.css +60 -0
- data/test/buildbot/master/public_html/static/css/vagrant.base.css +205 -0
- data/test/buildbot/master/public_html/static/images/base_box_mac.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/getting-started/success.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/icons/error.png +0 -0
- data/test/buildbot/master/public_html/static/images/vagrant_chilling.png +0 -0
- data/test/buildbot/master/public_html/static/images/vagrant_holding.png +0 -0
- data/test/buildbot/master/public_html/static/images/vagrant_looking.png +0 -0
- data/test/buildbot/master/public_html/static/images/windows/alter_path.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/edit_path.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/environment_variables_button.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/port_and_ppk_path.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/ppk_selection.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/putty_first_screen.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/save_result.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/vbox_manage_default_location.jpg +0 -0
- data/test/buildbot/master/public_html/static/js/bootstrap-tabs.js +80 -0
- data/test/buildbot/master/public_html/static/js/jquery-1.7.min.js +4 -0
- data/test/buildbot/master/templates/authfail.html +9 -0
- data/test/buildbot/master/templates/build.html +205 -0
- data/test/buildbot/master/templates/builder.html +118 -0
- data/test/buildbot/master/templates/builders.html +33 -0
- data/test/buildbot/master/templates/buildslave.html +72 -0
- data/test/buildbot/master/templates/buildslaves.html +70 -0
- data/test/buildbot/master/templates/change.html +15 -0
- data/test/buildbot/master/templates/layouts/base.html +58 -0
- data/test/buildbot/master/templates/macros/box.html +37 -0
- data/test/buildbot/master/templates/macros/build_line.html +50 -0
- data/test/buildbot/master/templates/macros/change.html +81 -0
- data/test/buildbot/master/templates/macros/forms.html +300 -0
- data/test/buildbot/master/templates/root.html +42 -0
- data/test/buildbot/master/templates/waterfall.html +53 -0
- data/test/buildbot/requirements.txt +4 -0
- data/test/buildbot/scripts/deploy.sh +38 -0
- data/test/buildbot/scripts/setup.sh +107 -0
- data/test/buildbot/slave/buildbot.tac +43 -0
- data/test/buildbot/slave/info/admin +1 -0
- data/test/buildbot/slave/info/host +1 -0
- data/test/buildbot/tests/__init__.py +0 -0
- data/test/buildbot/tests/master/__init__.py +0 -0
- data/test/buildbot/tests/master/test_slaves.py +41 -0
- data/test/buildbot/vendor/choices-0.4.0.tar.gz +0 -0
- data/test/config/acceptance_boxes.yml +7 -0
- data/test/support/isolated_environment.rb +46 -0
- data/test/support/tempdir.rb +34 -0
- data/test/unit/base.rb +21 -0
- data/test/unit/support/isolated_environment.rb +47 -0
- data/test/unit/support/shared/base_context.rb +30 -0
- data/test/unit/vagrant/action/builder_test.rb +156 -0
- data/test/unit/vagrant/action/environment_test.rb +16 -0
- data/test/unit/vagrant/action/runner_test.rb +65 -0
- data/test/unit/vagrant/action/warden_test.rb +92 -0
- data/test/unit/vagrant/box_collection_test.rb +56 -0
- data/test/unit/vagrant/box_test.rb +34 -0
- data/test/unit/vagrant/command/base_test.rb +150 -0
- data/test/unit/vagrant/config/base_test.rb +48 -0
- data/test/unit/vagrant/config/loader_test.rb +79 -0
- data/test/unit/vagrant/config/ssh_test.rb +17 -0
- data/test/unit/vagrant/config/top_test.rb +69 -0
- data/test/unit/vagrant/config/vm_test.rb +71 -0
- data/test/unit/vagrant/config_test.rb +27 -0
- data/test/unit/vagrant/data_store_test.rb +79 -0
- data/test/unit/vagrant/downloaders/base_test.rb +18 -0
- data/test/unit/vagrant/downloaders/file_test.rb +75 -0
- data/test/unit/vagrant/downloaders/http_test.rb +19 -0
- data/test/unit/vagrant/environment_test.rb +220 -0
- data/test/unit/vagrant/hosts_test.rb +36 -0
- data/test/unit/vagrant/registry_test.rb +74 -0
- data/test/unit/vagrant/util/ansi_escape_code_remover_test.rb +16 -0
- data/test/unit/vagrant/util/file_checksum_test.rb +23 -0
- data/test/unit/vagrant/util/hash_with_indifferent_access_test.rb +38 -0
- data/test/unit/vagrant/util/is_port_open_test.rb +53 -0
- data/test/unit/vagrant/util/line_endings_helper_test.rb +16 -0
- data/test/unit/vagrant/util/network_ip_test.rb +17 -0
- data/test/unit/vagrant/util/retryable_test.rb +106 -0
- data/test/unit/vagrant_test.rb +27 -0
- data/test/unit_legacy/locales/en.yml +8 -0
- data/test/unit_legacy/test_helper.rb +32 -0
- data/test/unit_legacy/vagrant/action/box/destroy_test.rb +18 -0
- data/test/unit_legacy/vagrant/action/box/download_test.rb +125 -0
- data/test/unit_legacy/vagrant/action/box/package_test.rb +25 -0
- data/test/unit_legacy/vagrant/action/box/unpackage_test.rb +84 -0
- data/test/unit_legacy/vagrant/action/box/verify_test.rb +30 -0
- data/test/unit_legacy/vagrant/action/env/set_test.rb +24 -0
- data/test/unit_legacy/vagrant/action/general/package_test.rb +268 -0
- data/test/unit_legacy/vagrant/action/general/validate_test.rb +31 -0
- data/test/unit_legacy/vagrant/action/vm/boot_test.rb +66 -0
- data/test/unit_legacy/vagrant/action/vm/check_accessible_test.rb +61 -0
- data/test/unit_legacy/vagrant/action/vm/check_box_test.rb +61 -0
- data/test/unit_legacy/vagrant/action/vm/check_guest_additions_test.rb +9 -0
- data/test/unit_legacy/vagrant/action/vm/clean_machine_folder_test.rb +84 -0
- data/test/unit_legacy/vagrant/action/vm/clear_forwarded_ports_test.rb +52 -0
- data/test/unit_legacy/vagrant/action/vm/clear_nfs_exports_test.rb +22 -0
- data/test/unit_legacy/vagrant/action/vm/clear_shared_folders_test.rb +40 -0
- data/test/unit_legacy/vagrant/action/vm/customize_test.rb +37 -0
- data/test/unit_legacy/vagrant/action/vm/destroy_test.rb +25 -0
- data/test/unit_legacy/vagrant/action/vm/destroy_unused_network_interfaces_test.rb +49 -0
- data/test/unit_legacy/vagrant/action/vm/discard_state_test.rb +45 -0
- data/test/unit_legacy/vagrant/action/vm/export_test.rb +107 -0
- data/test/unit_legacy/vagrant/action/vm/forward_ports_helpers_test.rb +77 -0
- data/test/unit_legacy/vagrant/action/vm/forward_ports_test.rb +197 -0
- data/test/unit_legacy/vagrant/action/vm/halt_test.rb +79 -0
- data/test/unit_legacy/vagrant/action/vm/host_name_test.rb +36 -0
- data/test/unit_legacy/vagrant/action/vm/import_test.rb +66 -0
- data/test/unit_legacy/vagrant/action/vm/match_mac_address_test.rb +40 -0
- data/test/unit_legacy/vagrant/action/vm/modify_test.rb +38 -0
- data/test/unit_legacy/vagrant/action/vm/network_test.rb +286 -0
- data/test/unit_legacy/vagrant/action/vm/nfs_helpers_test.rb +26 -0
- data/test/unit_legacy/vagrant/action/vm/nfs_test.rb +260 -0
- data/test/unit_legacy/vagrant/action/vm/package_test.rb +25 -0
- data/test/unit_legacy/vagrant/action/vm/package_vagrantfile_test.rb +46 -0
- data/test/unit_legacy/vagrant/action/vm/provision_test.rb +65 -0
- data/test/unit_legacy/vagrant/action/vm/provisioner_cleanup_test.rb +56 -0
- data/test/unit_legacy/vagrant/action/vm/resume_test.rb +35 -0
- data/test/unit_legacy/vagrant/action/vm/share_folders_test.rb +144 -0
- data/test/unit_legacy/vagrant/action/vm/suspend_test.rb +35 -0
- data/test/unit_legacy/vagrant/action_test.rb +89 -0
- data/test/unit_legacy/vagrant/box_collection_test.rb +45 -0
- data/test/unit_legacy/vagrant/box_test.rb +74 -0
- data/test/unit_legacy/vagrant/cli_test.rb +35 -0
- data/test/unit_legacy/vagrant/command/base_test.rb +23 -0
- data/test/unit_legacy/vagrant/command/group_base_test.rb +15 -0
- data/test/unit_legacy/vagrant/command/helpers_test.rb +88 -0
- data/test/unit_legacy/vagrant/command/init_test.rb +10 -0
- data/test/unit_legacy/vagrant/command/package_test.rb +27 -0
- data/test/unit_legacy/vagrant/config/base_test.rb +52 -0
- data/test/unit_legacy/vagrant/config/error_recorder_test.rb +18 -0
- data/test/unit_legacy/vagrant/config/ssh_test.rb +12 -0
- data/test/unit_legacy/vagrant/config/vagrant_test.rb +35 -0
- data/test/unit_legacy/vagrant/config/vm/provisioner_test.rb +92 -0
- data/test/unit_legacy/vagrant/config/vm_test.rb +47 -0
- data/test/unit_legacy/vagrant/config_test.rb +148 -0
- data/test/unit_legacy/vagrant/downloaders/http_test.rb +93 -0
- data/test/unit_legacy/vagrant/environment_test.rb +539 -0
- data/test/unit_legacy/vagrant/errors_test.rb +42 -0
- data/test/unit_legacy/vagrant/hosts/base_test.rb +46 -0
- data/test/unit_legacy/vagrant/hosts/bsd_test.rb +53 -0
- data/test/unit_legacy/vagrant/hosts/linux_test.rb +54 -0
- data/test/unit_legacy/vagrant/plugin_test.rb +9 -0
- data/test/unit_legacy/vagrant/provisioners/base_test.rb +63 -0
- data/test/unit_legacy/vagrant/provisioners/chef_client_test.rb +190 -0
- data/test/unit_legacy/vagrant/provisioners/chef_solo_test.rb +115 -0
- data/test/unit_legacy/vagrant/provisioners/chef_test.rb +209 -0
- data/test/unit_legacy/vagrant/provisioners/puppet_server_test.rb +68 -0
- data/test/unit_legacy/vagrant/provisioners/puppet_test.rb +182 -0
- data/test/unit_legacy/vagrant/provisioners/shell_test.rb +79 -0
- data/test/unit_legacy/vagrant/ssh/session_test.rb +40 -0
- data/test/unit_legacy/vagrant/ssh_test.rb +304 -0
- data/test/unit_legacy/vagrant/systems/base_test.rb +18 -0
- data/test/unit_legacy/vagrant/systems/linux_test.rb +104 -0
- data/test/unit_legacy/vagrant/util/busy_test.rb +106 -0
- data/test/unit_legacy/vagrant/util/counter_test.rb +29 -0
- data/test/unit_legacy/vagrant/util/platform_test.rb +18 -0
- data/test/unit_legacy/vagrant/util/stacked_proc_runner_test.rb +43 -0
- data/test/unit_legacy/vagrant/util/template_renderer_test.rb +145 -0
- data/test/unit_legacy/vagrant/vm_test.rb +300 -0
- data/vagrant-fixed-ssh.gemspec +70 -0
- metadata +712 -0
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010-2012 Mitchell Hashimoto and John Bender
|
4
|
+
Additional dependency modifications by Erik Hollensbe, 2013
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
14
|
+
all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
# Vagrant Fixed SSH
|
2
|
+
|
3
|
+
This fixes the SSH dependencies in Vagrant 1.0. Quite a few chef-related tools
|
4
|
+
are broken as a result of mitchellh's stubbornness.
|
5
|
+
|
6
|
+
After a few months, and many bundler-related hoops jumped, I unfortunately am
|
7
|
+
forced to cut a release with the dependencies modified.
|
8
|
+
|
9
|
+
**The only change to this gem is the net-ssh and net-scp dependencies, the
|
10
|
+
name, additions to the maintainer's list, and a comment in the LICENSE to
|
11
|
+
reflect the change.**.
|
12
|
+
|
13
|
+
As mentioned [here](https://github.com/mitchellh/vagrant/pull/1361), the tests
|
14
|
+
still pass (there are some that break regardless of what net-ssh version is in
|
15
|
+
use). I have seen no net-ssh related breakage myself, and do quite a bit with
|
16
|
+
this modified vagrant as a part of projects, and in several test suites.
|
17
|
+
|
18
|
+
[This](https://github.com/mitchellh/vagrant/pull/1361#issuecomment-13255143) is
|
19
|
+
mitchell's take on the matter.
|
20
|
+
|
21
|
+
In the event mitchell ever fixes this, I'll stop maintaining this gem. Until
|
22
|
+
then, you can expect this gem to get as close to patch parity with the 1.0.x
|
23
|
+
series as is possible given the above modifications.
|
24
|
+
|
25
|
+
In the unlikely event something actually breaks related to this change, post an
|
26
|
+
issue and I'll fix it and cut a new release. Solutions, not excuses and all
|
27
|
+
that.
|
28
|
+
|
29
|
+
The original readme is below.
|
30
|
+
|
31
|
+
# Vagrant
|
32
|
+
|
33
|
+
* Website: [http://vagrantup.com](http://vagrantup.com)
|
34
|
+
* Source: [https://github.com/mitchellh/vagrant](https://github.com/mitchellh/vagrant)
|
35
|
+
* IRC: `#vagrant` on Freenode
|
36
|
+
* Mailing list: [Google Groups](http://groups.google.com/group/vagrant-up)
|
37
|
+
|
38
|
+
Vagrant is a tool for building and distributing virtualized development environments.
|
39
|
+
|
40
|
+
By providing automated creation and provisioning of virtual machines using [Oracle’s VirtualBox](http://www.virtualbox.org),
|
41
|
+
Vagrant provides the tools to create and configure lightweight, reproducible, and portable
|
42
|
+
virtual environments. For more information, see the part of the getting started guide
|
43
|
+
on “[Why Vagrant?](http://vagrantup.com/docs/getting-started/why.html)”
|
44
|
+
|
45
|
+
## Quick Start
|
46
|
+
|
47
|
+
First, make sure your development machine has [VirtualBox](http://www.virtualbox.org)
|
48
|
+
installed. The setup from that point forward is very easy, since Vagrant is simply
|
49
|
+
a rubygem.
|
50
|
+
|
51
|
+
gem install vagrant
|
52
|
+
|
53
|
+
To build your first virtual environment:
|
54
|
+
|
55
|
+
vagrant init lucid32 http://files.vagrantup.com/lucid32.box
|
56
|
+
vagrant up
|
57
|
+
|
58
|
+
Note: The above `vagrant up` command will also trigger Vagrant to download the
|
59
|
+
`lucid32` box via the specified URL. Vagrant only does this if it detects that
|
60
|
+
the box doesn't already exist on your system.
|
61
|
+
|
62
|
+
## Getting Started Guide
|
63
|
+
|
64
|
+
To learn how to build a fully functional rails development environment, view the
|
65
|
+
[getting started guide](http://vagrantup.com/docs/getting-started/index.html).
|
66
|
+
|
67
|
+
## Installing the Gem from Git
|
68
|
+
|
69
|
+
If you want the bleeding edge version of Vagrant, we try to keep master pretty stable
|
70
|
+
and you're welcome to give it a shot. The following is an example showing how to do this:
|
71
|
+
|
72
|
+
rake install
|
73
|
+
|
74
|
+
## Contributing to Vagrant
|
75
|
+
|
76
|
+
### Dependencies and Unit Tests
|
77
|
+
|
78
|
+
To hack on vagrant, you'll need [bundler](http://github.com/carlhuda/bundler) which can
|
79
|
+
be installed with a simple `gem install bundler`. Afterwords, do the following:
|
80
|
+
|
81
|
+
bundle install
|
82
|
+
rake
|
83
|
+
|
84
|
+
This will run the unit test suite, which should come back all green! Then you're good to go!
|
85
|
+
|
86
|
+
If you want to run Vagrant without having to install the gem, you may use `bundle exec`,
|
87
|
+
like so:
|
88
|
+
|
89
|
+
bundle exec bin/vagrant help
|
90
|
+
|
91
|
+
### Acceptance Tests
|
92
|
+
|
93
|
+
Vagrant also comes with an acceptance test suite which runs the system
|
94
|
+
end-to-end, without mocking out any dependencies. Note that this test
|
95
|
+
suite is **extremely slow**, with the test suite taking hours on even
|
96
|
+
a decent system. A CI will be setup in due time to run these tests
|
97
|
+
automatically. However, it is still useful to know how to run these
|
98
|
+
tests since it is often useful to run a single test if you're working
|
99
|
+
on a specific feature.
|
100
|
+
|
101
|
+
The acceptance tests have absolutely _zero_ dependence on the Vagrant
|
102
|
+
source. Instead, an external configuration file must be used to give
|
103
|
+
the acceptance tests some parameters (such as what Vagrant version is
|
104
|
+
running, where the Vagrant `vagrant` binary is, etc.). If you want to
|
105
|
+
run acceptance tests against source, or just want to see an example of
|
106
|
+
this file, you can generate it automatically for the source code:
|
107
|
+
|
108
|
+
rake acceptance:config
|
109
|
+
|
110
|
+
This will drop an `acceptance_config.yml` file in your working directory.
|
111
|
+
You can then run a specific acceptance test like so:
|
112
|
+
|
113
|
+
ACCEPTANCE_CONFIG=./acceptance_config.yml ruby test/acceptance/version_test.rb
|
114
|
+
|
115
|
+
That's it!
|
116
|
+
|
117
|
+
If you're developing an acceptance test and you're unsure why things
|
118
|
+
might be failing, you can also view log output for the acceptance tests,
|
119
|
+
which can be very verbose but are a great help in finding bugs:
|
120
|
+
|
121
|
+
ACCEPTANCE_LOGGING=debug ACCEPTANCE_CONFIG=./acceptance_config.yml ruby test/acceptance/version_test.rb
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
# Immediately sync all stdout so that tools like buildbot can
|
5
|
+
# immediately load in the output.
|
6
|
+
$stdout.sync = true
|
7
|
+
$stderr.sync = true
|
8
|
+
|
9
|
+
# Load all the rake tasks from the "tasks" folder. This folder
|
10
|
+
# allows us to nicely separate rake tasks into individual files
|
11
|
+
# based on their role, which makes development and debugging easier
|
12
|
+
# than one monolithic file.
|
13
|
+
task_dir = File.expand_path("../tasks", __FILE__)
|
14
|
+
Dir["#{task_dir}/**/*.rake"].each do |task_file|
|
15
|
+
load task_file
|
16
|
+
end
|
17
|
+
|
18
|
+
task :default => "test:unit"
|
data/bin/vagrant
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'log4r'
|
3
|
+
require 'vagrant'
|
4
|
+
require 'vagrant/cli'
|
5
|
+
require 'vagrant/util/platform'
|
6
|
+
|
7
|
+
# Create a logger right away
|
8
|
+
logger = Log4r::Logger.new("vagrant::bin::vagrant")
|
9
|
+
logger.info("`vagrant` invoked: #{ARGV.inspect}")
|
10
|
+
|
11
|
+
# Stdout/stderr should not buffer output
|
12
|
+
$stdout.sync = true
|
13
|
+
$stderr.sync = true
|
14
|
+
|
15
|
+
# These will be the options that are passed to initialze the Vagrant
|
16
|
+
# environment.
|
17
|
+
opts = {}
|
18
|
+
|
19
|
+
# Disable color if the proper argument was passed or if we're
|
20
|
+
# on Windows since the default Windows terminal doesn't support
|
21
|
+
# colors.
|
22
|
+
if ARGV.include?("--no-color") || !$stdout.tty? || !Vagrant::Util::Platform.terminal_supports_colors?
|
23
|
+
# Delete the argument from the list so that it doesn't cause any
|
24
|
+
# invalid arguments down the road.
|
25
|
+
ARGV.delete("--no-color")
|
26
|
+
opts[:ui_class] = Vagrant::UI::Basic
|
27
|
+
else
|
28
|
+
opts[:ui_class] = Vagrant::UI::Colored
|
29
|
+
end
|
30
|
+
|
31
|
+
env = nil
|
32
|
+
begin
|
33
|
+
# Create the environment, which is the cwd of wherever the
|
34
|
+
# `vagrant` command was invoked from
|
35
|
+
logger.debug("Creating Vagrant environment")
|
36
|
+
env = Vagrant::Environment.new(opts)
|
37
|
+
|
38
|
+
# Load the environment
|
39
|
+
logger.debug("Loading environment")
|
40
|
+
env.load!
|
41
|
+
|
42
|
+
# Execute the CLI interface, and exit with the proper error code
|
43
|
+
exit(env.cli(ARGV))
|
44
|
+
rescue Vagrant::Errors::VagrantError => e
|
45
|
+
logger.error("Vagrant experienced an error! Details:")
|
46
|
+
logger.error(e.inspect)
|
47
|
+
logger.error(e.message)
|
48
|
+
logger.error(e.backtrace.join("\n"))
|
49
|
+
|
50
|
+
if env
|
51
|
+
opts = { :prefix => false }
|
52
|
+
env.ui.error e.message, opts if e.message
|
53
|
+
else
|
54
|
+
$stderr.puts "Vagrant failed to initialize at a very early stage:\n\n"
|
55
|
+
$stderr.puts e.message
|
56
|
+
end
|
57
|
+
|
58
|
+
exit e.status_code if e.respond_to?(:status_code)
|
59
|
+
exit 999 # An error occurred with no status code defined
|
60
|
+
end
|
data/config/default.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
Vagrant::Config.run do |config|
|
2
|
+
# default config goes here
|
3
|
+
config.vagrant.dotfile_name = ".vagrant"
|
4
|
+
config.vagrant.host = :detect
|
5
|
+
|
6
|
+
config.ssh.username = "vagrant"
|
7
|
+
config.ssh.host = "127.0.0.1"
|
8
|
+
config.ssh.guest_port = 22
|
9
|
+
config.ssh.max_tries = 100
|
10
|
+
config.ssh.timeout = 10
|
11
|
+
config.ssh.forward_agent = false
|
12
|
+
config.ssh.forward_x11 = false
|
13
|
+
config.ssh.shell = "bash"
|
14
|
+
|
15
|
+
config.vm.auto_port_range = (2200..2250)
|
16
|
+
config.vm.box_url = nil
|
17
|
+
config.vm.base_mac = nil
|
18
|
+
config.vm.forward_port 22, 2222, :name => "ssh", :auto => true
|
19
|
+
config.vm.boot_mode = "headless"
|
20
|
+
config.vm.guest = :linux
|
21
|
+
|
22
|
+
# Share the root folder. This can then be overridden by
|
23
|
+
# other Vagrantfiles, if they wish.
|
24
|
+
config.vm.share_folder("v-root", "/vagrant", ".")
|
25
|
+
|
26
|
+
config.nfs.map_uid = :auto
|
27
|
+
config.nfs.map_gid = :auto
|
28
|
+
|
29
|
+
config.package.name = 'package.box'
|
30
|
+
end
|
data/contrib/README.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Vagrant Contrib
|
2
|
+
|
3
|
+
Miscellaneous contributions which assist people in using Vagrant will
|
4
|
+
make their way into this directory. An up-to-date list of short descriptions
|
5
|
+
for each item will be kept below.
|
6
|
+
|
7
|
+
## List of Contrib Items
|
8
|
+
|
9
|
+
* `emacs` - Contains a file showing how to associate `Vagrantfile` with
|
10
|
+
Ruby syntax highlighting.
|
11
|
+
* `vim` - Contains a `.vim` file for enabling Ruby syntax highlighting
|
12
|
+
for `Vagrantfile`s.
|
@@ -0,0 +1,8 @@
|
|
1
|
+
;;--------------------------------------------------------------------
|
2
|
+
;; Teach emacs to syntax highlight Vagrantfile as Ruby.
|
3
|
+
;;
|
4
|
+
;; Installation: Copy the line below into your emacs configuration,
|
5
|
+
;; or drop this file anywhere in your "~/.emacs.d" directory and be
|
6
|
+
;; sure to "load" it.
|
7
|
+
;;--------------------------------------------------------------------
|
8
|
+
(add-to-list 'auto-mode-alist '("Vagrantfile$" . ruby-mode))
|
data/keys/README.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Insecure Keypair
|
2
|
+
|
3
|
+
These keys are the "insecure" public/private keypair we offer to
|
4
|
+
[base box creators](http://vagrantup.com/docs/base_boxes.html) for use in their base boxes so that
|
5
|
+
vagrant installations can automatically SSH into the boxes.
|
6
|
+
|
7
|
+
If you're working with a team or company or with a custom box and
|
8
|
+
you want more secure SSH, you should create your own keypair
|
9
|
+
and configure the private key in the Vagrantfile with
|
10
|
+
`config.ssh.private_key_path`
|
11
|
+
|
12
|
+
# Putty
|
13
|
+
|
14
|
+
If you are using Vagrant on windows, the .ppk file contained here, in the keys directory,
|
15
|
+
has been generated from the private key and should be used to connect Putty to any VMs that
|
16
|
+
are leveraging the default key pair. See [guide](http://vagrantup.com/docs/getting-started/windows.html)
|
17
|
+
in the documentation for more details on using Putty with Vagrant.
|
data/keys/vagrant
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
|
3
|
+
w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
|
4
|
+
kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
|
5
|
+
hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
|
6
|
+
Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
|
7
|
+
yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
|
8
|
+
ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
|
9
|
+
Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
|
10
|
+
TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
|
11
|
+
iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
|
12
|
+
sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
|
13
|
+
4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
|
14
|
+
cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
|
15
|
+
EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
|
16
|
+
CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
|
17
|
+
3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
|
18
|
+
YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
|
19
|
+
3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
|
20
|
+
dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
|
21
|
+
6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
|
22
|
+
P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
|
23
|
+
llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
|
24
|
+
kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
|
25
|
+
+vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
|
26
|
+
NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
|
27
|
+
-----END RSA PRIVATE KEY-----
|
data/keys/vagrant.pub
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
|
data/lib/vagrant.rb
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
require 'log4r'
|
2
|
+
|
3
|
+
# Enable logging if it is requested. We do this before
|
4
|
+
# anything else so that we can setup the output before
|
5
|
+
# any logging occurs.
|
6
|
+
if ENV["VAGRANT_LOG"] && ENV["VAGRANT_LOG"] != ""
|
7
|
+
# Require Log4r and define the levels we'll be using
|
8
|
+
require 'log4r/config'
|
9
|
+
Log4r.define_levels(*Log4r::Log4rConfig::LogLevels)
|
10
|
+
|
11
|
+
level = nil
|
12
|
+
begin
|
13
|
+
level = Log4r.const_get(ENV["VAGRANT_LOG"].upcase)
|
14
|
+
rescue NameError
|
15
|
+
# This means that the logging constant wasn't found,
|
16
|
+
# which is fine. We just keep `level` as `nil`. But
|
17
|
+
# we tell the user.
|
18
|
+
level = nil
|
19
|
+
end
|
20
|
+
|
21
|
+
# Some constants, such as "true" resolve to booleans, so the
|
22
|
+
# above error checking doesn't catch it. This will check to make
|
23
|
+
# sure that the log level is an integer, as Log4r requires.
|
24
|
+
level = nil if !level.is_a?(Integer)
|
25
|
+
|
26
|
+
if !level
|
27
|
+
# We directly write to stderr here because the VagrantError system
|
28
|
+
# is not setup yet.
|
29
|
+
$stderr.puts "Invalid VAGRANT_LOG level is set: #{ENV["VAGRANT_LOG"]}"
|
30
|
+
$stderr.puts ""
|
31
|
+
$stderr.puts "Please use one of the standard log levels: debug, info, warn, or error"
|
32
|
+
exit 1
|
33
|
+
end
|
34
|
+
|
35
|
+
# Set the logging level on all "vagrant" namespaced
|
36
|
+
# logs as long as we have a valid level.
|
37
|
+
if level
|
38
|
+
logger = Log4r::Logger.new("vagrant")
|
39
|
+
logger.outputters = Log4r::Outputter.stderr
|
40
|
+
logger.level = level
|
41
|
+
logger = nil
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
require 'pathname'
|
46
|
+
require 'childprocess'
|
47
|
+
require 'json'
|
48
|
+
require 'i18n'
|
49
|
+
|
50
|
+
# OpenSSL must be loaded here since when it is loaded via `autoload`
|
51
|
+
# there are issues with ciphers not being properly loaded.
|
52
|
+
require 'openssl'
|
53
|
+
|
54
|
+
# Always make the version available
|
55
|
+
require 'vagrant/version'
|
56
|
+
Log4r::Logger.new("vagrant::global").info("Vagrant version: #{Vagrant::VERSION}")
|
57
|
+
|
58
|
+
module Vagrant
|
59
|
+
autoload :Action, 'vagrant/action'
|
60
|
+
autoload :Box, 'vagrant/box'
|
61
|
+
autoload :BoxCollection, 'vagrant/box_collection'
|
62
|
+
autoload :CLI, 'vagrant/cli'
|
63
|
+
autoload :Command, 'vagrant/command'
|
64
|
+
autoload :Communication, 'vagrant/communication'
|
65
|
+
autoload :Config, 'vagrant/config'
|
66
|
+
autoload :DataStore, 'vagrant/data_store'
|
67
|
+
autoload :Downloaders, 'vagrant/downloaders'
|
68
|
+
autoload :Driver, 'vagrant/driver'
|
69
|
+
autoload :Environment, 'vagrant/environment'
|
70
|
+
autoload :Errors, 'vagrant/errors'
|
71
|
+
autoload :Guest, 'vagrant/guest'
|
72
|
+
autoload :Hosts, 'vagrant/hosts'
|
73
|
+
autoload :Plugin, 'vagrant/plugin'
|
74
|
+
autoload :Provisioners, 'vagrant/provisioners'
|
75
|
+
autoload :Registry, 'vagrant/registry'
|
76
|
+
autoload :SSH, 'vagrant/ssh'
|
77
|
+
autoload :TestHelpers, 'vagrant/test_helpers'
|
78
|
+
autoload :UI, 'vagrant/ui'
|
79
|
+
autoload :Util, 'vagrant/util'
|
80
|
+
autoload :VM, 'vagrant/vm'
|
81
|
+
|
82
|
+
# Returns a `Vagrant::Registry` object that contains all the built-in
|
83
|
+
# middleware stacks.
|
84
|
+
def self.actions
|
85
|
+
@actions ||= Vagrant::Action::Builtin.new
|
86
|
+
end
|
87
|
+
|
88
|
+
# The source root is the path to the root directory of
|
89
|
+
# the Vagrant gem.
|
90
|
+
def self.source_root
|
91
|
+
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
92
|
+
end
|
93
|
+
|
94
|
+
# Global registry of commands that are available via the CLI.
|
95
|
+
#
|
96
|
+
# This registry is used to look up the sub-commands that are available
|
97
|
+
# to Vagrant.
|
98
|
+
def self.commands
|
99
|
+
@commands ||= Registry.new
|
100
|
+
end
|
101
|
+
|
102
|
+
# Global registry of config keys that are available.
|
103
|
+
#
|
104
|
+
# This registry is used to look up the keys for `config` objects.
|
105
|
+
# For example, `config.vagrant` looks up the `:vagrant` config key
|
106
|
+
# for the configuration class to use.
|
107
|
+
def self.config_keys
|
108
|
+
@config_keys ||= Registry.new
|
109
|
+
end
|
110
|
+
|
111
|
+
# Global registry of available host classes and shortcut symbols
|
112
|
+
# associated with them.
|
113
|
+
#
|
114
|
+
# This registry is used to look up the shorcuts for `config.vagrant.host`,
|
115
|
+
# or to query all hosts for automatically detecting the host system.
|
116
|
+
# The registry is global to all of Vagrant.
|
117
|
+
def self.hosts
|
118
|
+
@hosts ||= Registry.new
|
119
|
+
end
|
120
|
+
|
121
|
+
# Global registry of available guest classes and shortcut symbols
|
122
|
+
# associated with them.
|
123
|
+
#
|
124
|
+
# This registry is used to look up the shortcuts for `config.vm.guest`.
|
125
|
+
def self.guests
|
126
|
+
@guests ||= Registry.new
|
127
|
+
end
|
128
|
+
|
129
|
+
# Global registry of provisioners.
|
130
|
+
#
|
131
|
+
# This registry is used to look up the provisioners provided for
|
132
|
+
# `config.vm.provision`.
|
133
|
+
def self.provisioners
|
134
|
+
@provisioners ||= Registry.new
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# # Default I18n to load the en locale
|
139
|
+
I18n.load_path << File.expand_path("templates/locales/en.yml", Vagrant.source_root)
|
140
|
+
|
141
|
+
# Register the built-in commands
|
142
|
+
Vagrant.commands.register(:box) { Vagrant::Command::Box }
|
143
|
+
Vagrant.commands.register(:destroy) { Vagrant::Command::Destroy }
|
144
|
+
Vagrant.commands.register(:gem) { Vagrant::Command::Gem }
|
145
|
+
Vagrant.commands.register(:halt) { Vagrant::Command::Halt }
|
146
|
+
Vagrant.commands.register(:init) { Vagrant::Command::Init }
|
147
|
+
Vagrant.commands.register(:package) { Vagrant::Command::Package }
|
148
|
+
Vagrant.commands.register(:provision) { Vagrant::Command::Provision }
|
149
|
+
Vagrant.commands.register(:reload) { Vagrant::Command::Reload }
|
150
|
+
Vagrant.commands.register(:resume) { Vagrant::Command::Resume }
|
151
|
+
Vagrant.commands.register(:ssh) { Vagrant::Command::SSH }
|
152
|
+
Vagrant.commands.register(:"ssh-config") { Vagrant::Command::SSHConfig }
|
153
|
+
Vagrant.commands.register(:status) { Vagrant::Command::Status }
|
154
|
+
Vagrant.commands.register(:suspend) { Vagrant::Command::Suspend }
|
155
|
+
Vagrant.commands.register(:up) { Vagrant::Command::Up }
|
156
|
+
|
157
|
+
# Register the built-in config keys
|
158
|
+
Vagrant.config_keys.register(:vagrant) { Vagrant::Config::VagrantConfig }
|
159
|
+
Vagrant.config_keys.register(:ssh) { Vagrant::Config::SSHConfig }
|
160
|
+
Vagrant.config_keys.register(:nfs) { Vagrant::Config::NFSConfig }
|
161
|
+
Vagrant.config_keys.register(:vm) { Vagrant::Config::VMConfig }
|
162
|
+
Vagrant.config_keys.register(:package) { Vagrant::Config::PackageConfig }
|
163
|
+
|
164
|
+
# Register the built-in hosts
|
165
|
+
Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch }
|
166
|
+
Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD }
|
167
|
+
Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora }
|
168
|
+
Vagrant.hosts.register(:opensuse) { Vagrant::Hosts::OpenSUSE }
|
169
|
+
Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD }
|
170
|
+
Vagrant.hosts.register(:gentoo) { Vagrant::Hosts::Gentoo }
|
171
|
+
Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux }
|
172
|
+
Vagrant.hosts.register(:windows) { Vagrant::Hosts::Windows }
|
173
|
+
|
174
|
+
# Register the built-in guests
|
175
|
+
Vagrant.guests.register(:arch) { Vagrant::Guest::Arch }
|
176
|
+
Vagrant.guests.register(:debian) { Vagrant::Guest::Debian }
|
177
|
+
Vagrant.guests.register(:fedora) { Vagrant::Guest::Fedora }
|
178
|
+
Vagrant.guests.register(:freebsd) { Vagrant::Guest::FreeBSD }
|
179
|
+
Vagrant.guests.register(:gentoo) { Vagrant::Guest::Gentoo }
|
180
|
+
Vagrant.guests.register(:linux) { Vagrant::Guest::Linux }
|
181
|
+
Vagrant.guests.register(:openbsd) { Vagrant::Guest::OpenBSD }
|
182
|
+
Vagrant.guests.register(:redhat) { Vagrant::Guest::Redhat }
|
183
|
+
Vagrant.guests.register(:solaris) { Vagrant::Guest::Solaris }
|
184
|
+
Vagrant.guests.register(:suse) { Vagrant::Guest::Suse }
|
185
|
+
Vagrant.guests.register(:ubuntu) { Vagrant::Guest::Ubuntu }
|
186
|
+
|
187
|
+
# Register the built-in provisioners
|
188
|
+
Vagrant.provisioners.register(:chef_solo) { Vagrant::Provisioners::ChefSolo }
|
189
|
+
Vagrant.provisioners.register(:chef_client) { Vagrant::Provisioners::ChefClient }
|
190
|
+
Vagrant.provisioners.register(:puppet) { Vagrant::Provisioners::Puppet }
|
191
|
+
Vagrant.provisioners.register(:puppet_server) { Vagrant::Provisioners::PuppetServer }
|
192
|
+
Vagrant.provisioners.register(:shell) { Vagrant::Provisioners::Shell }
|
193
|
+
|
194
|
+
# Register the built-in systems
|
195
|
+
Vagrant.config_keys.register(:freebsd) { Vagrant::Guest::FreeBSD::FreeBSDConfig }
|
196
|
+
Vagrant.config_keys.register(:linux) { Vagrant::Guest::Linux::LinuxConfig }
|
197
|
+
Vagrant.config_keys.register(:solaris) { Vagrant::Guest::Solaris::SolarisConfig }
|