fairchild-poolparty 1.2.12 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +202 -0
- data/Rakefile +7 -21
- data/VERSION.yml +2 -2
- data/bin/cloud +20 -14
- data/bin/cloud-bootstrap +9 -19
- data/bin/cloud-compile +33 -0
- data/bin/cloud-configure +14 -20
- data/bin/cloud-console +8 -6
- data/bin/cloud-contract +18 -13
- data/bin/cloud-expand +19 -20
- data/bin/cloud-list +19 -21
- data/bin/cloud-osxcopy +2 -3
- data/bin/cloud-setup +36 -0
- data/bin/cloud-show +11 -20
- data/bin/cloud-ssh +7 -11
- data/bin/cloud-start +19 -13
- data/bin/cloud-terminate +12 -18
- data/bin/cloud-thrift +77 -0
- data/bin/cloud-verify +2 -3
- data/config/jeweler.rb +10 -18
- data/examples/basic.rb +17 -9
- data/examples/custom_bootstrap.sh +7 -0
- data/examples/eucalyptus.rb +63 -0
- data/examples/eucalyptus_test_run.sh +31 -0
- data/examples/knock.sh +27 -0
- data/examples/monitored_cloud.rb +22 -0
- data/examples/simple.rb +9 -5
- data/examples/ssh_garden.rb +21 -0
- data/examples/thrift/erlang/Emakefile +5 -0
- data/examples/thrift/erlang/Makefile +26 -0
- data/examples/thrift/erlang/deps/thrift/COPYING +24 -0
- data/examples/thrift/erlang/deps/thrift/LICENSE +24 -0
- data/examples/thrift/erlang/deps/thrift/Makefile +18 -0
- data/examples/thrift/erlang/deps/thrift/README +31 -0
- data/examples/thrift/erlang/deps/thrift/build/beamver +59 -0
- data/examples/thrift/erlang/deps/thrift/build/buildtargets.mk +14 -0
- data/examples/thrift/erlang/deps/thrift/build/colors.mk +24 -0
- data/examples/thrift/erlang/deps/thrift/build/docs.mk +12 -0
- data/examples/thrift/erlang/deps/thrift/build/mime.types +98 -0
- data/examples/thrift/erlang/deps/thrift/build/otp.mk +146 -0
- data/examples/thrift/erlang/deps/thrift/build/otp_subdir.mk +85 -0
- data/examples/thrift/erlang/deps/thrift/build/raw_test.mk +29 -0
- data/examples/thrift/erlang/deps/thrift/ebin/thrift.app +44 -0
- data/examples/thrift/erlang/deps/thrift/ebin/thrift.appup +1 -0
- data/examples/thrift/erlang/deps/thrift/include/thrift_constants.hrl +40 -0
- data/examples/thrift/erlang/deps/thrift/include/thrift_protocol.hrl +12 -0
- data/examples/thrift/erlang/deps/thrift/src/Makefile +116 -0
- data/examples/thrift/erlang/deps/thrift/src/test_handler.erl +7 -0
- data/examples/thrift/erlang/deps/thrift/src/test_service.erl +10 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift.app.src +44 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift.appup.src +1 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_app.erl +55 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_base64_transport.erl +45 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_binary_protocol.erl +318 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_buffered_transport.erl +168 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_client.erl +328 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_disk_log_transport.erl +106 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_file_transport.erl +69 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_framed_transport.erl +196 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_http_transport.erl +169 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_processor.erl +174 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_protocol.erl +326 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_server.erl +171 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_service.erl +6 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_socket_server.erl +245 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_socket_transport.erl +100 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_sup.erl +53 -0
- data/examples/thrift/erlang/deps/thrift/src/thrift_transport.erl +38 -0
- data/examples/thrift/erlang/deps/thrift/vsn.mk +1 -0
- data/examples/thrift/erlang/include/commandInterface_thrift.hrl +5 -0
- data/examples/thrift/erlang/include/poolparty_constants.hrl +9 -0
- data/examples/thrift/erlang/include/poolparty_types.hrl +8 -0
- data/examples/thrift/erlang/src/commandInterface_thrift.erl +29 -0
- data/examples/thrift/erlang/src/poolparty_types.erl +30 -0
- data/examples/thrift/erlang/src/thrift_example.erl +32 -0
- data/examples/thrift/thrift_example.py +28 -0
- data/examples/thrift/thrift_example.rb +36 -0
- data/examples/vmware.rb +18 -0
- data/lib/cloud_providers.rb +19 -0
- data/lib/cloud_providers/cloud_provider.rb +85 -0
- data/lib/cloud_providers/cloud_provider_instance.rb +283 -0
- data/lib/cloud_providers/connections.rb +99 -0
- data/lib/cloud_providers/ec2/ec2.rb +197 -0
- data/lib/cloud_providers/ec2/ec2_helpers.rb +45 -0
- data/lib/cloud_providers/ec2/ec2_instance.rb +120 -0
- data/lib/cloud_providers/ec2/ec2_response.rb +79 -0
- data/lib/cloud_providers/ssh/ssh.rb +68 -0
- data/lib/cloud_providers/ssh/ssh_instance.rb +41 -0
- data/lib/cloud_providers/vmware/vmware.rb +127 -0
- data/lib/cloud_providers/vmware/vmware_instance.rb +56 -0
- data/lib/core/array.rb +54 -0
- data/lib/core/hash.rb +80 -0
- data/lib/core/integer.rb +11 -0
- data/lib/core/module.rb +14 -0
- data/lib/core/object.rb +92 -0
- data/lib/core/proc.rb +55 -0
- data/lib/core/string.rb +150 -0
- data/lib/core/symbol.rb +29 -0
- data/lib/{poolparty/core → core}/time.rb +0 -0
- data/lib/dependency_resolver.rb +11 -0
- data/lib/dependency_resolvers/base.rb +122 -0
- data/lib/dependency_resolvers/chef.rb +239 -0
- data/lib/dependency_resolvers/chef/resources/chef_attributes_file.rb +51 -0
- data/lib/dependency_resolvers/chef/resources/chef_recipe.rb +51 -0
- data/lib/dependency_resolvers/chef/resources/http_request.rb +39 -0
- data/lib/dependency_resolvers/chef/resources/remote_directory.rb +54 -0
- data/lib/dependency_resolvers/chef/resources/remote_file.rb +69 -0
- data/lib/dependency_resolvers/chef/resources/route.rb +52 -0
- data/lib/dependency_resolvers/chef/resources/script.rb +62 -0
- data/lib/dependency_resolvers/proxy_object.rb +98 -0
- data/lib/keypair.rb +93 -0
- data/lib/mixins/askable.rb +163 -0
- data/lib/mixins/callbacks.rb +56 -0
- data/lib/mixins/delayed.rb +65 -0
- data/lib/mixins/pinger.rb +31 -0
- data/lib/mixins/printing.rb +35 -0
- data/lib/mixins/searchable_paths.rb +87 -0
- data/lib/poolparty.rb +53 -127
- data/lib/poolparty/base.rb +233 -0
- data/lib/poolparty/cloud.rb +301 -0
- data/lib/poolparty/default.rb +32 -0
- data/lib/poolparty/dsl_base.rb +36 -0
- data/lib/poolparty/installer.rb +111 -0
- data/lib/poolparty/installers/ec2.rb +72 -113
- data/lib/poolparty/installers/vmware.rb +161 -0
- data/lib/poolparty/monitor.rb +61 -0
- data/lib/poolparty/plugin.rb +12 -0
- data/lib/poolparty/plugins/apache.rb +207 -0
- data/lib/poolparty/plugins/apache2/apache2.conf.erb +630 -0
- data/lib/poolparty/plugins/apache2/base.conf.erb +171 -0
- data/lib/poolparty/plugins/apache2/browser_fixes.conf.erb +26 -0
- data/lib/poolparty/plugins/apache2/default-site.conf.erb +41 -0
- data/lib/poolparty/{templates → plugins}/apache2/mime-minimal.conf.erb +0 -0
- data/lib/poolparty/plugins/apache2/passenger_site.rb +14 -17
- data/lib/poolparty/plugins/apache2/php5.rb +11 -10
- data/lib/poolparty/plugins/apache2/virtual_host.rb +25 -19
- data/lib/poolparty/plugins/git.rb +8 -85
- data/lib/poolparty/plugins/git/git_repository.rb +83 -0
- data/lib/poolparty/plugins/rails.rb +25 -0
- data/lib/poolparty/plugins/rails/app.rb +29 -0
- data/lib/poolparty/pool.rb +180 -0
- data/lib/poolparty/pool_party_error.rb +19 -0
- data/lib/poolparty/pool_party_log.rb +47 -0
- data/lib/poolparty/resource.rb +293 -0
- data/lib/poolparty/resources/conditional.rb +65 -0
- data/lib/poolparty/resources/cron.rb +31 -22
- data/lib/poolparty/resources/directory.rb +32 -21
- data/lib/poolparty/resources/exec.rb +36 -30
- data/lib/poolparty/resources/file.rb +44 -44
- data/lib/poolparty/resources/gem_package.rb +55 -0
- data/lib/poolparty/resources/group.rb +37 -12
- data/lib/poolparty/resources/line.rb +67 -0
- data/lib/poolparty/resources/link.rb +49 -0
- data/lib/poolparty/resources/mount.rb +26 -10
- data/lib/poolparty/resources/package.rb +26 -12
- data/lib/poolparty/resources/service.rb +30 -14
- data/lib/poolparty/resources/user.rb +55 -30
- data/lib/poolparty/resources/variable.rb +31 -4
- data/lib/proto/command_interface_handler.rb +31 -0
- data/lib/proto/gen-erl/commandInterface_thrift.erl +29 -0
- data/lib/proto/gen-erl/commandInterface_thrift.hrl +5 -0
- data/lib/proto/gen-erl/poolparty_constants.hrl +9 -0
- data/lib/proto/gen-erl/poolparty_types.erl +30 -0
- data/lib/proto/gen-erl/poolparty_types.hrl +8 -0
- data/lib/{poolparty/core/proc.rb → proto/gen-py/__init__.py} +0 -0
- data/lib/proto/gen-py/cloudthrift/CommandInterface-remote +79 -0
- data/lib/proto/gen-py/cloudthrift/CommandInterface.py +251 -0
- data/lib/proto/gen-py/cloudthrift/CommandInterface.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/__init__.py +1 -0
- data/lib/proto/gen-py/cloudthrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/constants.py +9 -0
- data/lib/proto/gen-py/cloudthrift/constants.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/ttypes.py +160 -0
- data/lib/proto/gen-py/cloudthrift/ttypes.pyc +0 -0
- data/lib/proto/gen-py/thrift/TSCons.py +33 -0
- data/lib/proto/gen-py/thrift/Thrift.py +123 -0
- data/lib/proto/gen-py/thrift/Thrift.pyc +0 -0
- data/lib/proto/gen-py/thrift/__init__.py +20 -0
- data/lib/proto/gen-py/thrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TBinaryProtocol.py +259 -0
- data/lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TProtocol.py +205 -0
- data/lib/proto/gen-py/thrift/protocol/TProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/__init__.py +20 -0
- data/lib/proto/gen-py/thrift/protocol/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/fastbinary.c +1203 -0
- data/lib/proto/gen-py/thrift/server/THttpServer.py +63 -0
- data/lib/proto/gen-py/thrift/server/TNonblockingServer.py +309 -0
- data/lib/proto/gen-py/thrift/server/TServer.py +270 -0
- data/lib/proto/gen-py/thrift/server/__init__.py +20 -0
- data/lib/proto/gen-py/thrift/transport/THttpClient.py +100 -0
- data/lib/proto/gen-py/thrift/transport/TSocket.py +149 -0
- data/lib/proto/gen-py/thrift/transport/TSocket.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TTransport.py +326 -0
- data/lib/proto/gen-py/thrift/transport/TTransport.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TTwisted.py +181 -0
- data/lib/proto/gen-py/thrift/transport/__init__.py +20 -0
- data/lib/proto/gen-py/thrift/transport/__init__.pyc +0 -0
- data/lib/proto/gen-rb/command_interface.rb +84 -0
- data/lib/proto/gen-rb/poolparty_constants.rb +10 -0
- data/lib/proto/gen-rb/poolparty_types.rb +45 -0
- data/lib/proto/poolparty.thrift +17 -0
- data/lib/provision/bootstrap_scripts/build_centos.sh +72 -0
- data/lib/provision/bootstrap_scripts/build_ubuntu.sh +76 -0
- data/lib/provision/bootstrap_scripts/determine_os.sh +21 -0
- data/lib/provision/bootstrapper.rb +44 -0
- data/lib/provision/configure_scripts/configure_centos.erb +7 -0
- data/lib/provision/configure_scripts/configure_ubuntu.erb +7 -0
- data/tasks/development.rake +6 -6
- data/tasks/poolparty.rake +12 -0
- data/tasks/test.rake +40 -0
- data/test/fixtures/bad_perms_test_key +27 -0
- data/test/fixtures/chef/recipes/sudo/attributes/sudoers.rb +30 -0
- data/test/fixtures/chef/recipes/sudo/recipes/default.rb +33 -0
- data/test/fixtures/chef/recipes/sudo/templates/default/sudoers.erb +22 -0
- data/test/fixtures/clouds/fake_clouds.rb +9 -0
- data/test/fixtures/clouds/simple_cloud.rb +13 -0
- data/test/fixtures/clouds/ssh_cloud.rb +11 -0
- data/test/fixtures/clouds/vmware_cloud.rb +16 -0
- data/test/fixtures/ec2/ec2-describe-instances_response_body.xml +70 -0
- data/test/fixtures/ec2/ec2-run-instances_response_body.xml +35 -0
- data/test/fixtures/ec2/ec2-terminate-instances_response_body.xml +16 -0
- data/test/fixtures/keys/test_key +27 -0
- data/test/fixtures/keys/test_pub_key +8 -0
- data/test/fixtures/resources/fake_plugin.rb +19 -0
- data/test/fixtures/resources/fake_resource.rb +18 -0
- data/test/fixtures/resources/random_proc_file.rb +7 -0
- data/test/fixtures/templates/apache_conf.erb +2 -0
- data/test/lib/cloud_providers/cloud_provider_instance_test.rb +68 -0
- data/test/lib/cloud_providers/cloud_provider_test.rb +25 -0
- data/test/lib/cloud_providers/connections_test.rb +71 -0
- data/test/lib/cloud_providers/ec2/ec2_helpers_test.rb +29 -0
- data/test/lib/cloud_providers/ec2/ec2_instance_test.rb +59 -0
- data/test/lib/cloud_providers/ec2/ec2_response_test.rb +41 -0
- data/test/lib/cloud_providers/ec2/ec2_test.rb +116 -0
- data/test/lib/cloud_providers/ssh/ssh_test.rb +61 -0
- data/test/lib/cloud_providers/vmware/vmware_test.rb +46 -0
- data/test/lib/core/array_test.rb +53 -0
- data/test/lib/core/hash_test.rb +41 -0
- data/test/lib/core/integer_test.rb +19 -0
- data/test/lib/core/module_test.rb +38 -0
- data/test/lib/core/object_test.rb +57 -0
- data/test/lib/core/proc_test.rb +26 -0
- data/test/lib/core/string_test.rb +73 -0
- data/test/lib/core/symbol_test.rb +26 -0
- data/test/lib/core/time_test.rb +51 -0
- data/test/lib/dependency_resolvers/base_test.rb +42 -0
- data/test/lib/dependency_resolvers/chef/resources/chef_recipe_test.rb +21 -0
- data/test/lib/dependency_resolvers/chef/resources/http_request_test.rb +29 -0
- data/test/lib/dependency_resolvers/chef/resources/remote_directory_test.rb +45 -0
- data/test/lib/dependency_resolvers/chef/resources/remote_file_test.rb +36 -0
- data/test/lib/dependency_resolvers/chef/resources/route_test.rb +37 -0
- data/test/lib/dependency_resolvers/chef/resources/script_test.rb +49 -0
- data/test/lib/dependency_resolvers/chef_test.rb +136 -0
- data/test/lib/dependency_resolvers/proxy_object_test.rb +75 -0
- data/test/lib/mixins/callbacks_test.rb +48 -0
- data/test/lib/mixins/delayed_test.rb +50 -0
- data/test/lib/mixins/searchable_paths_test.rb +83 -0
- data/test/lib/poolparty/base_test.rb +47 -0
- data/test/lib/poolparty/cloud_test.rb +156 -0
- data/test/lib/poolparty/default_test.rb +17 -0
- data/test/lib/poolparty/dsl_base_test.rb +30 -0
- data/test/lib/poolparty/installers/vmware_installer_test.rb +16 -0
- data/test/lib/poolparty/keypair_test.rb +42 -0
- data/test/lib/poolparty/monitor_test.rb +30 -0
- data/test/lib/poolparty/plugins/apache2/php5_test.rb +26 -0
- data/test/lib/poolparty/plugins/apache2/virtual_host_test.rb +28 -0
- data/test/lib/poolparty/plugins/apache_test.rb +35 -0
- data/test/lib/poolparty/pool_party_error_test.rb +20 -0
- data/test/lib/poolparty/pool_party_log_test.rb +17 -0
- data/test/lib/poolparty/pool_test.rb +26 -0
- data/test/lib/poolparty/resource_test.rb +150 -0
- data/test/lib/poolparty/resources/conditional_test.rb +49 -0
- data/test/lib/poolparty/resources/cron_test.rb +31 -0
- data/test/lib/poolparty/resources/directory_test.rb +21 -0
- data/test/lib/poolparty/resources/exec_test.rb +62 -0
- data/test/lib/poolparty/resources/file_test.rb +38 -0
- data/test/lib/poolparty/resources/group_test.rb +21 -0
- data/test/lib/poolparty/resources/line_test.rb +20 -0
- data/test/lib/poolparty/resources/link_test.rb +27 -0
- data/test/lib/poolparty/resources/mount_test.rb +32 -0
- data/test/lib/poolparty/resources/package_test.rb +28 -0
- data/test/lib/poolparty/resources/service_test.rb +31 -0
- data/test/lib/poolparty/resources/user_test.rb +33 -0
- data/test/lib/poolparty/resources/variable_test.rb +43 -0
- data/test/lib/provision/base_test.rb +16 -0
- data/test/lib/provision/bootstrapper_test.rb +44 -0
- data/test/test_helper.rb +21 -10
- data/test/test_methods.rb +62 -1
- data/vendor/gems/{suitcase → colors}/LICENSE +0 -0
- data/vendor/gems/colors/README.rdoc +52 -0
- data/vendor/gems/colors/Rakefile +56 -0
- data/vendor/gems/colors/VERSION.yml +4 -0
- data/vendor/gems/colors/colors.gemspec +29 -0
- data/vendor/gems/colors/lib/colors.rb +45 -0
- data/vendor/gems/colors/test/colors_test.rb +26 -0
- data/vendor/gems/colors/test/test_helper.rb +10 -0
- data/vendor/gems/context/History.txt +10 -0
- data/vendor/gems/context/License.txt +20 -0
- data/vendor/gems/context/Manifest.txt +26 -0
- data/{spec/poolparty/poolparty/test_plugins/virtual_host_template.erb → vendor/gems/context/PostInstall.txt} +0 -0
- data/vendor/gems/context/README.rdoc +158 -0
- data/vendor/gems/context/Rakefile +4 -0
- data/vendor/gems/context/config/hoe.rb +73 -0
- data/vendor/gems/context/config/requirements.rb +15 -0
- data/vendor/gems/context/context.gemspec +44 -0
- data/vendor/gems/context/countloc.rb +65 -0
- data/vendor/gems/context/coverage/-Library-Ruby-Gems-1_8-gems-rcov-0_8_1_2_0-lib-rcov_rb.html +1598 -0
- data/vendor/gems/context/coverage/index.html +441 -0
- data/vendor/gems/context/coverage/lib-context-context_rb.html +669 -0
- data/vendor/gems/context/coverage/lib-context-core_ext-string_rb.html +627 -0
- data/vendor/gems/context/coverage/lib-context-lifecycle_rb.html +683 -0
- data/vendor/gems/context/coverage/lib-context-shared_behavior_rb.html +708 -0
- data/vendor/gems/context/coverage/lib-context-suite_rb.html +649 -0
- data/vendor/gems/context/coverage/lib-context-test_rb.html +637 -0
- data/vendor/gems/context/coverage/lib-context-version_rb.html +619 -0
- data/vendor/gems/context/coverage/lib-context_rb.html +623 -0
- data/vendor/gems/context/lib/context.rb +19 -0
- data/vendor/gems/context/lib/context/context.rb +64 -0
- data/vendor/gems/context/lib/context/core_ext/rails_hacks.rb +10 -0
- data/vendor/gems/context/lib/context/core_ext/string.rb +17 -0
- data/vendor/gems/context/lib/context/lifecycle.rb +103 -0
- data/vendor/gems/context/lib/context/shared_behavior.rb +98 -0
- data/vendor/gems/context/lib/context/suite.rb +39 -0
- data/vendor/gems/context/lib/context/test.rb +37 -0
- data/vendor/gems/context/lib/context/version.rb +9 -0
- data/vendor/gems/context/setup.rb +1585 -0
- data/vendor/gems/context/tasks/deployment.rake +34 -0
- data/{tasks → vendor/gems/context/tasks}/environment.rake +0 -0
- data/vendor/gems/context/test/test_context.rb +57 -0
- data/vendor/gems/context/test/test_core_ext.rb +21 -0
- data/vendor/gems/context/test/test_helper.rb +2 -0
- data/vendor/gems/context/test/test_lifecycle.rb +224 -0
- data/vendor/gems/context/test/test_nested_lifecycle.rb +44 -0
- data/vendor/gems/context/test/test_shared.rb +116 -0
- data/vendor/gems/context/test/test_test.rb +23 -0
- data/vendor/gems/daemons/LICENSE +29 -0
- data/vendor/gems/daemons/README +223 -0
- data/vendor/gems/daemons/Rakefile +84 -0
- data/vendor/gems/daemons/Releases +126 -0
- data/vendor/gems/daemons/TODO +6 -0
- data/vendor/gems/daemons/examples/call/call.rb +56 -0
- data/vendor/gems/daemons/examples/call/call_monitor.rb +55 -0
- data/vendor/gems/daemons/examples/daemonize/daemonize.rb +20 -0
- data/vendor/gems/daemons/examples/run/ctrl_crash.rb +17 -0
- data/vendor/gems/daemons/examples/run/ctrl_exec.rb +16 -0
- data/vendor/gems/daemons/examples/run/ctrl_exit.rb +15 -0
- data/vendor/gems/daemons/examples/run/ctrl_keep_pid_files.rb +17 -0
- data/vendor/gems/daemons/examples/run/ctrl_monitor.rb +16 -0
- data/vendor/gems/daemons/examples/run/ctrl_multiple.rb +16 -0
- data/vendor/gems/daemons/examples/run/ctrl_normal.rb +12 -0
- data/vendor/gems/daemons/examples/run/ctrl_ontop.rb +16 -0
- data/vendor/gems/daemons/examples/run/ctrl_optionparser.rb +43 -0
- data/vendor/gems/daemons/examples/run/ctrl_proc.rb +25 -0
- data/vendor/gems/daemons/examples/run/ctrl_proc.rb.output +101 -0
- data/vendor/gems/daemons/examples/run/ctrl_proc_multiple.rb +22 -0
- data/vendor/gems/daemons/examples/run/ctrl_proc_multiple.rb.output +2 -0
- data/vendor/gems/daemons/examples/run/ctrl_proc_simple.rb +17 -0
- data/vendor/gems/daemons/examples/run/myserver.rb +12 -0
- data/vendor/gems/daemons/examples/run/myserver_crashing.rb +14 -0
- data/vendor/gems/daemons/examples/run/myserver_crashing.rb.output +30 -0
- data/vendor/gems/daemons/examples/run/myserver_exiting.rb +8 -0
- data/vendor/gems/daemons/lib/daemons.rb +283 -0
- data/vendor/gems/daemons/lib/daemons/application.rb +372 -0
- data/vendor/gems/daemons/lib/daemons/application_group.rb +152 -0
- data/vendor/gems/daemons/lib/daemons/cmdline.rb +117 -0
- data/vendor/gems/daemons/lib/daemons/controller.rb +134 -0
- data/vendor/gems/daemons/lib/daemons/daemonize.rb +263 -0
- data/vendor/gems/daemons/lib/daemons/exceptions.rb +28 -0
- data/vendor/gems/daemons/lib/daemons/monitor.rb +127 -0
- data/vendor/gems/daemons/lib/daemons/pid.rb +101 -0
- data/vendor/gems/daemons/lib/daemons/pidfile.rb +111 -0
- data/vendor/gems/daemons/lib/daemons/pidmem.rb +10 -0
- data/vendor/gems/daemons/setup.rb +1360 -0
- data/vendor/gems/fakeweb/CHANGELOG +163 -0
- data/vendor/gems/fakeweb/LICENSE.txt +281 -0
- data/vendor/gems/fakeweb/README.rdoc +193 -0
- data/vendor/gems/fakeweb/Rakefile +76 -0
- data/vendor/gems/fakeweb/fakeweb.gemspec +21 -0
- data/vendor/gems/fakeweb/lib/fake_web.rb +172 -0
- data/vendor/gems/fakeweb/lib/fake_web/ext/net_http.rb +71 -0
- data/vendor/gems/fakeweb/lib/fake_web/registry.rb +103 -0
- data/vendor/gems/fakeweb/lib/fake_web/responder.rb +113 -0
- data/vendor/gems/fakeweb/lib/fake_web/response.rb +10 -0
- data/vendor/gems/fakeweb/lib/fake_web/stub_socket.rb +15 -0
- data/vendor/gems/fakeweb/lib/fake_web/utility.rb +22 -0
- data/vendor/gems/fakeweb/lib/fakeweb.rb +2 -0
- data/vendor/gems/fakeweb/test/fixtures/google_response_from_curl +12 -0
- data/vendor/gems/fakeweb/test/fixtures/google_response_with_transfer_encoding +17 -0
- data/vendor/gems/fakeweb/test/fixtures/google_response_without_transfer_encoding +11 -0
- data/vendor/gems/fakeweb/test/fixtures/test_example.txt +1 -0
- data/vendor/gems/fakeweb/test/fixtures/test_txt_file +3 -0
- data/vendor/gems/fakeweb/test/test_allow_net_connect.rb +85 -0
- data/vendor/gems/fakeweb/test/test_deprecations.rb +54 -0
- data/vendor/gems/fakeweb/test/test_fake_authentication.rb +92 -0
- data/vendor/gems/fakeweb/test/test_fake_web.rb +518 -0
- data/vendor/gems/fakeweb/test/test_fake_web_open_uri.rb +58 -0
- data/vendor/gems/fakeweb/test/test_helper.rb +74 -0
- data/vendor/gems/fakeweb/test/test_missing_open_uri.rb +25 -0
- data/vendor/gems/fakeweb/test/test_precedence.rb +51 -0
- data/vendor/gems/fakeweb/test/test_query_string.rb +45 -0
- data/vendor/gems/fakeweb/test/test_regexes.rb +103 -0
- data/vendor/gems/fakeweb/test/test_response_headers.rb +73 -0
- data/vendor/gems/fakeweb/test/test_trailing_slashes.rb +53 -0
- data/vendor/gems/fakeweb/test/test_utility.rb +70 -0
- data/vendor/gems/gratr/Grater.xcf +0 -0
- data/vendor/gems/gratr/README +335 -0
- data/vendor/gems/gratr/Rakefile +220 -0
- data/vendor/gems/gratr/examples/graph_self.rb +54 -0
- data/vendor/gems/gratr/examples/module_graph.jpg +0 -0
- data/vendor/gems/gratr/examples/module_graph.rb +12 -0
- data/vendor/gems/gratr/examples/self_graph.dot +117 -0
- data/vendor/gems/gratr/examples/self_graph.jpg +0 -0
- data/vendor/gems/gratr/examples/visualize.dot +58 -0
- data/vendor/gems/gratr/examples/visualize.jpg +0 -0
- data/vendor/gems/gratr/examples/visualize.rb +11 -0
- data/vendor/gems/gratr/install.rb +49 -0
- data/vendor/gems/gratr/lib/gratr.rb +42 -0
- data/vendor/gems/gratr/lib/gratr/adjacency_graph.rb +230 -0
- data/vendor/gems/gratr/lib/gratr/base.rb +34 -0
- data/vendor/gems/gratr/lib/gratr/biconnected.rb +116 -0
- data/vendor/gems/gratr/lib/gratr/chinese_postman.rb +123 -0
- data/vendor/gems/gratr/lib/gratr/common.rb +73 -0
- data/vendor/gems/gratr/lib/gratr/comparability.rb +92 -0
- data/vendor/gems/gratr/lib/gratr/digraph.rb +115 -0
- data/vendor/gems/gratr/lib/gratr/digraph_distance.rb +185 -0
- data/vendor/gems/gratr/lib/gratr/dot.rb +95 -0
- data/vendor/gems/gratr/lib/gratr/edge.rb +145 -0
- data/vendor/gems/gratr/lib/gratr/graph.rb +315 -0
- data/vendor/gems/gratr/lib/gratr/graph_api.rb +82 -0
- data/vendor/gems/gratr/lib/gratr/import.rb +44 -0
- data/vendor/gems/gratr/lib/gratr/labels.rb +103 -0
- data/vendor/gems/gratr/lib/gratr/maximum_flow.rb +107 -0
- data/vendor/gems/gratr/lib/gratr/rdot.rb +332 -0
- data/vendor/gems/gratr/lib/gratr/search.rb +422 -0
- data/vendor/gems/gratr/lib/gratr/strong_components.rb +127 -0
- data/vendor/gems/gratr/lib/gratr/undirected_graph.rb +153 -0
- data/vendor/gems/gratr/lib/priority-queue/benchmark/dijkstra.rb +171 -0
- data/vendor/gems/gratr/lib/priority-queue/compare_comments.rb +49 -0
- data/vendor/gems/gratr/lib/priority-queue/ext/priority_queue/CPriorityQueue/extconf.rb +2 -0
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue.rb +14 -0
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/c_priority_queue.rb +1 -0
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/poor_priority_queue.rb +46 -0
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/ruby_priority_queue.rb +525 -0
- data/vendor/gems/gratr/lib/priority-queue/setup.rb +1551 -0
- data/vendor/gems/gratr/lib/priority-queue/test/priority_queue_test.rb +371 -0
- data/vendor/gems/gratr/tests/TestBiconnected.rb +53 -0
- data/vendor/gems/gratr/tests/TestChinesePostman.rb +53 -0
- data/vendor/gems/gratr/tests/TestComplement.rb +54 -0
- data/vendor/gems/gratr/tests/TestDigraph.rb +333 -0
- data/vendor/gems/gratr/tests/TestDigraphDistance.rb +138 -0
- data/vendor/gems/gratr/tests/TestDot.rb +75 -0
- data/vendor/gems/gratr/tests/TestEdge.rb +171 -0
- data/vendor/gems/gratr/tests/TestInspection.rb +57 -0
- data/vendor/gems/gratr/tests/TestMultiEdge.rb +57 -0
- data/vendor/gems/gratr/tests/TestNeighborhood.rb +64 -0
- data/vendor/gems/gratr/tests/TestProperties.rb +160 -0
- data/vendor/gems/gratr/tests/TestSearch.rb +277 -0
- data/vendor/gems/gratr/tests/TestStrongComponents.rb +85 -0
- data/vendor/gems/gratr/tests/TestTriagulated.rb +137 -0
- data/vendor/gems/gratr/tests/TestUndirectedGraph.rb +219 -0
- data/vendor/gems/json/CHANGES +93 -0
- data/vendor/gems/json/GPL +340 -0
- data/vendor/gems/json/README +78 -0
- data/vendor/gems/json/RUBY +58 -0
- data/vendor/gems/json/Rakefile +309 -0
- data/vendor/gems/json/TODO +1 -0
- data/vendor/gems/json/VERSION +1 -0
- data/vendor/gems/json/benchmarks/benchmark.txt +133 -0
- data/vendor/gems/json/benchmarks/benchmark_generator.rb +48 -0
- data/vendor/gems/json/benchmarks/benchmark_parser.rb +26 -0
- data/vendor/gems/json/benchmarks/benchmark_rails.rb +26 -0
- data/vendor/gems/json/bin/edit_json.rb +10 -0
- data/vendor/gems/json/bin/prettify_json.rb +76 -0
- data/vendor/gems/json/data/example.json +1 -0
- data/vendor/gems/json/data/index.html +38 -0
- data/vendor/gems/json/data/prototype.js +4184 -0
- data/vendor/gems/json/ext/json/ext/generator/extconf.rb +9 -0
- data/vendor/gems/json/ext/json/ext/generator/generator.c +885 -0
- data/vendor/gems/json/ext/json/ext/generator/unicode.c +182 -0
- data/vendor/gems/json/ext/json/ext/generator/unicode.h +53 -0
- data/vendor/gems/json/ext/json/ext/parser/Makefile +181 -0
- data/vendor/gems/json/ext/json/ext/parser/extconf.rb +9 -0
- data/vendor/gems/json/ext/json/ext/parser/gem_make.out +14 -0
- data/vendor/gems/json/ext/json/ext/parser/parser.c +1769 -0
- data/vendor/gems/json/ext/json/ext/parser/parser.rl +637 -0
- data/vendor/gems/json/ext/json/ext/parser/unicode.c +154 -0
- data/vendor/gems/json/ext/json/ext/parser/unicode.h +58 -0
- data/vendor/gems/json/ext/json/ext/parser/unicode.o +0 -0
- data/vendor/gems/json/install.rb +26 -0
- data/vendor/gems/json/lib/json.rb +235 -0
- data/vendor/gems/json/lib/json/Array.xpm +21 -0
- data/vendor/gems/json/lib/json/FalseClass.xpm +21 -0
- data/vendor/gems/json/lib/json/Hash.xpm +21 -0
- data/vendor/gems/json/lib/json/Key.xpm +73 -0
- data/vendor/gems/json/lib/json/NilClass.xpm +21 -0
- data/vendor/gems/json/lib/json/Numeric.xpm +28 -0
- data/vendor/gems/json/lib/json/String.xpm +96 -0
- data/vendor/gems/json/lib/json/TrueClass.xpm +21 -0
- data/vendor/gems/json/lib/json/add/core.rb +135 -0
- data/vendor/gems/json/lib/json/add/rails.rb +58 -0
- data/vendor/gems/json/lib/json/common.rb +354 -0
- data/vendor/gems/json/lib/json/editor.rb +1362 -0
- data/vendor/gems/json/lib/json/ext.rb +13 -0
- data/vendor/gems/json/lib/json/json.xpm +1499 -0
- data/vendor/gems/json/lib/json/pure.rb +75 -0
- data/vendor/gems/json/lib/json/pure/generator.rb +394 -0
- data/vendor/gems/json/lib/json/pure/parser.rb +259 -0
- data/vendor/gems/json/lib/json/version.rb +9 -0
- data/vendor/gems/json/tests/fixtures/fail1.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail10.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail11.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail12.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail13.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail14.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail18.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail19.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail2.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail20.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail21.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail22.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail23.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail24.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail25.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail27.json +2 -0
- data/vendor/gems/json/tests/fixtures/fail28.json +2 -0
- data/vendor/gems/json/tests/fixtures/fail3.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail4.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail5.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail6.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail7.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail8.json +1 -0
- data/vendor/gems/json/tests/fixtures/fail9.json +1 -0
- data/vendor/gems/json/tests/fixtures/pass1.json +56 -0
- data/vendor/gems/json/tests/fixtures/pass15.json +1 -0
- data/vendor/gems/json/tests/fixtures/pass16.json +1 -0
- data/vendor/gems/json/tests/fixtures/pass17.json +1 -0
- data/vendor/gems/json/tests/fixtures/pass2.json +1 -0
- data/vendor/gems/json/tests/fixtures/pass26.json +1 -0
- data/vendor/gems/json/tests/fixtures/pass3.json +6 -0
- data/vendor/gems/json/tests/runner.rb +25 -0
- data/vendor/gems/json/tests/test_json.rb +293 -0
- data/vendor/gems/json/tests/test_json_addition.rb +161 -0
- data/vendor/gems/json/tests/test_json_fixtures.rb +30 -0
- data/vendor/gems/json/tests/test_json_generate.rb +100 -0
- data/vendor/gems/json/tests/test_json_rails.rb +118 -0
- data/vendor/gems/json/tests/test_json_unicode.rb +61 -0
- data/vendor/gems/json/tools/fuzz.rb +140 -0
- data/vendor/gems/json/tools/server.rb +62 -0
- data/vendor/gems/net-ssh/CHANGELOG.rdoc +127 -0
- data/vendor/gems/net-ssh/Manifest +104 -0
- data/vendor/gems/net-ssh/README.rdoc +110 -0
- data/vendor/gems/net-ssh/Rakefile +26 -0
- data/vendor/gems/net-ssh/THANKS.rdoc +16 -0
- data/vendor/gems/net-ssh/lib/net/ssh.rb +215 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/agent.rb +176 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/constants.rb +18 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/key_manager.rb +193 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/abstract.rb +60 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/hostbased.rb +71 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/keyboard_interactive.rb +66 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/password.rb +39 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/publickey.rb +92 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/pageant.rb +183 -0
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/session.rb +134 -0
- data/vendor/gems/net-ssh/lib/net/ssh/buffer.rb +340 -0
- data/vendor/gems/net-ssh/lib/net/ssh/buffered_io.rb +149 -0
- data/vendor/gems/net-ssh/lib/net/ssh/config.rb +181 -0
- data/vendor/gems/net-ssh/lib/net/ssh/connection/channel.rb +625 -0
- data/vendor/gems/net-ssh/lib/net/ssh/connection/constants.rb +33 -0
- data/vendor/gems/net-ssh/lib/net/ssh/connection/session.rb +596 -0
- data/vendor/gems/net-ssh/lib/net/ssh/connection/term.rb +178 -0
- data/vendor/gems/net-ssh/lib/net/ssh/errors.rb +85 -0
- data/vendor/gems/net-ssh/lib/net/ssh/key_factory.rb +102 -0
- data/vendor/gems/net-ssh/lib/net/ssh/known_hosts.rb +129 -0
- data/vendor/gems/net-ssh/lib/net/ssh/loggable.rb +61 -0
- data/vendor/gems/net-ssh/lib/net/ssh/packet.rb +102 -0
- data/vendor/gems/net-ssh/lib/net/ssh/prompt.rb +93 -0
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/errors.rb +14 -0
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/http.rb +94 -0
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/socks4.rb +70 -0
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/socks5.rb +129 -0
- data/vendor/gems/net-ssh/lib/net/ssh/ruby_compat.rb +7 -0
- data/vendor/gems/net-ssh/lib/net/ssh/service/forward.rb +267 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test.rb +89 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/channel.rb +129 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/extensions.rb +152 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/kex.rb +44 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/local_packet.rb +51 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/packet.rb +81 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/remote_packet.rb +38 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/script.rb +157 -0
- data/vendor/gems/net-ssh/lib/net/ssh/test/socket.rb +59 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/algorithms.rb +384 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/cipher_factory.rb +80 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/constants.rb +30 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac.rb +31 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/abstract.rb +78 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/md5.rb +12 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/md5_96.rb +11 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/none.rb +15 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/sha1.rb +13 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/sha1_96.rb +11 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb +55 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex.rb +13 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +208 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +77 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/openssl.rb +128 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/packet_stream.rb +230 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/server_version.rb +60 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/session.rb +276 -0
- data/vendor/gems/net-ssh/lib/net/ssh/transport/state.rb +201 -0
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/lenient.rb +30 -0
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/null.rb +12 -0
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/strict.rb +53 -0
- data/vendor/gems/net-ssh/lib/net/ssh/version.rb +62 -0
- data/vendor/gems/net-ssh/net-ssh.gemspec +33 -0
- data/vendor/gems/net-ssh/setup.rb +1585 -0
- data/vendor/gems/net-ssh/test/authentication/methods/common.rb +28 -0
- data/vendor/gems/net-ssh/test/authentication/methods/test_abstract.rb +51 -0
- data/vendor/gems/net-ssh/test/authentication/methods/test_hostbased.rb +114 -0
- data/vendor/gems/net-ssh/test/authentication/methods/test_keyboard_interactive.rb +98 -0
- data/vendor/gems/net-ssh/test/authentication/methods/test_password.rb +50 -0
- data/vendor/gems/net-ssh/test/authentication/methods/test_publickey.rb +127 -0
- data/vendor/gems/net-ssh/test/authentication/test_agent.rb +205 -0
- data/vendor/gems/net-ssh/test/authentication/test_key_manager.rb +105 -0
- data/vendor/gems/net-ssh/test/authentication/test_session.rb +93 -0
- data/vendor/gems/net-ssh/test/common.rb +106 -0
- data/vendor/gems/net-ssh/test/configs/eqsign +3 -0
- data/vendor/gems/net-ssh/test/configs/exact_match +8 -0
- data/vendor/gems/net-ssh/test/configs/wild_cards +14 -0
- data/vendor/gems/net-ssh/test/connection/test_channel.rb +452 -0
- data/vendor/gems/net-ssh/test/connection/test_session.rb +488 -0
- data/vendor/gems/net-ssh/test/test_all.rb +6 -0
- data/vendor/gems/net-ssh/test/test_buffer.rb +336 -0
- data/vendor/gems/net-ssh/test/test_buffered_io.rb +63 -0
- data/vendor/gems/net-ssh/test/test_config.rb +84 -0
- data/vendor/gems/net-ssh/test/test_key_factory.rb +67 -0
- data/vendor/gems/net-ssh/test/transport/hmac/test_md5.rb +39 -0
- data/vendor/gems/net-ssh/test/transport/hmac/test_md5_96.rb +25 -0
- data/vendor/gems/net-ssh/test/transport/hmac/test_none.rb +34 -0
- data/vendor/gems/net-ssh/test/transport/hmac/test_sha1.rb +34 -0
- data/vendor/gems/net-ssh/test/transport/hmac/test_sha1_96.rb +25 -0
- data/vendor/gems/net-ssh/test/transport/kex/test_diffie_hellman_group1_sha1.rb +146 -0
- data/vendor/gems/net-ssh/test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb +92 -0
- data/vendor/gems/net-ssh/test/transport/test_algorithms.rb +302 -0
- data/vendor/gems/net-ssh/test/transport/test_cipher_factory.rb +171 -0
- data/vendor/gems/net-ssh/test/transport/test_hmac.rb +34 -0
- data/vendor/gems/net-ssh/test/transport/test_identity_cipher.rb +40 -0
- data/vendor/gems/net-ssh/test/transport/test_packet_stream.rb +435 -0
- data/vendor/gems/net-ssh/test/transport/test_server_version.rb +57 -0
- data/vendor/gems/net-ssh/test/transport/test_session.rb +315 -0
- data/vendor/gems/net-ssh/test/transport/test_state.rb +173 -0
- data/vendor/gems/parenting/Rakefile +17 -1
- data/vendor/gems/parenting/lib/parenting/parenting.rb +13 -6
- data/vendor/gems/right_aws/History.txt +246 -0
- data/vendor/gems/right_aws/Manifest.txt +34 -0
- data/vendor/gems/right_aws/README.txt +166 -0
- data/vendor/gems/right_aws/Rakefile +112 -0
- data/vendor/gems/right_aws/lib/acf/right_acf_interface.rb +379 -0
- data/vendor/gems/right_aws/lib/awsbase/benchmark_fix.rb +39 -0
- data/vendor/gems/right_aws/lib/awsbase/right_awsbase.rb +797 -0
- data/vendor/gems/right_aws/lib/awsbase/support.rb +111 -0
- data/vendor/gems/right_aws/lib/ec2/right_ec2.rb +1737 -0
- data/vendor/gems/right_aws/lib/right_aws.rb +69 -0
- data/vendor/gems/right_aws/lib/s3/right_s3.rb +1094 -0
- data/vendor/gems/right_aws/lib/s3/right_s3_interface.rb +1175 -0
- data/vendor/gems/right_aws/lib/sdb/active_sdb.rb +930 -0
- data/vendor/gems/right_aws/lib/sdb/right_sdb_interface.rb +698 -0
- data/vendor/gems/right_aws/lib/sqs/right_sqs.rb +388 -0
- data/vendor/gems/right_aws/lib/sqs/right_sqs_gen2.rb +286 -0
- data/vendor/gems/right_aws/lib/sqs/right_sqs_gen2_interface.rb +444 -0
- data/vendor/gems/right_aws/lib/sqs/right_sqs_interface.rb +596 -0
- data/vendor/gems/right_aws/test/acf/test_helper.rb +2 -0
- data/vendor/gems/right_aws/test/acf/test_right_acf.rb +146 -0
- data/vendor/gems/right_aws/test/ec2/test_helper.rb +2 -0
- data/vendor/gems/right_aws/test/ec2/test_right_ec2.rb +108 -0
- data/vendor/gems/right_aws/test/http_connection.rb +87 -0
- data/vendor/gems/right_aws/test/s3/test_helper.rb +2 -0
- data/vendor/gems/right_aws/test/s3/test_right_s3.rb +419 -0
- data/vendor/gems/right_aws/test/s3/test_right_s3_stubbed.rb +95 -0
- data/vendor/gems/right_aws/test/sdb/test_active_sdb.rb +299 -0
- data/vendor/gems/right_aws/test/sdb/test_helper.rb +3 -0
- data/vendor/gems/right_aws/test/sdb/test_right_sdb.rb +247 -0
- data/vendor/gems/right_aws/test/sqs/test_helper.rb +2 -0
- data/vendor/gems/right_aws/test/sqs/test_right_sqs.rb +291 -0
- data/vendor/gems/right_aws/test/sqs/test_right_sqs_gen2.rb +209 -0
- data/vendor/gems/right_aws/test/test_credentials.rb +37 -0
- data/vendor/gems/right_aws/test/ts_right_aws.rb +14 -0
- data/vendor/gems/right_http_connection/History.txt +59 -0
- data/vendor/gems/right_http_connection/Manifest.txt +7 -0
- data/vendor/gems/right_http_connection/README.txt +54 -0
- data/vendor/gems/right_http_connection/Rakefile +103 -0
- data/vendor/gems/right_http_connection/lib/net_fix.rb +160 -0
- data/vendor/gems/right_http_connection/lib/right_http_connection.rb +442 -0
- data/vendor/gems/right_http_connection/right_http_connection.gemspec +31 -0
- data/vendor/gems/right_http_connection/setup.rb +1585 -0
- data/vendor/gems/shoulda/CONTRIBUTION_GUIDELINES.rdoc +10 -0
- data/vendor/gems/shoulda/MIT-LICENSE +22 -0
- data/vendor/gems/shoulda/README.rdoc +171 -0
- data/vendor/gems/shoulda/Rakefile +72 -0
- data/vendor/gems/shoulda/bin/convert_to_should_syntax +42 -0
- data/vendor/gems/shoulda/init.rb +1 -0
- data/vendor/gems/shoulda/lib/shoulda.rb +9 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller.rb +26 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/macros.rb +240 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers.rb +37 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/assign_to_matcher.rb +109 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/filter_param_matcher.rb +57 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb +81 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb +74 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/respond_with_matcher.rb +81 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/route_matcher.rb +93 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/set_session_matcher.rb +87 -0
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb +85 -0
- data/vendor/gems/shoulda/lib/shoulda/action_mailer.rb +10 -0
- data/vendor/gems/shoulda/lib/shoulda/action_mailer/assertions.rb +38 -0
- data/vendor/gems/shoulda/lib/shoulda/action_view.rb +10 -0
- data/vendor/gems/shoulda/lib/shoulda/action_view/macros.rb +61 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record.rb +16 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/assertions.rb +69 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/helpers.rb +27 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/macros.rb +512 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb +43 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb +83 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/allow_value_matcher.rb +102 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/association_matcher.rb +226 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb +87 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb +141 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_db_column_matcher.rb +169 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_db_index_matcher.rb +112 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb +128 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb +59 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb +41 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_format_of_matcher.rb +67 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb +39 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb +60 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb +148 -0
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validation_matcher.rb +57 -0
- data/vendor/gems/shoulda/lib/shoulda/assertions.rb +71 -0
- data/vendor/gems/shoulda/lib/shoulda/autoload_macros.rb +46 -0
- data/vendor/gems/shoulda/lib/shoulda/context.rb +402 -0
- data/vendor/gems/shoulda/lib/shoulda/helpers.rb +8 -0
- data/vendor/gems/shoulda/lib/shoulda/macros.rb +133 -0
- data/vendor/gems/shoulda/lib/shoulda/private_helpers.rb +13 -0
- data/vendor/gems/shoulda/lib/shoulda/proc_extensions.rb +14 -0
- data/vendor/gems/shoulda/lib/shoulda/rails.rb +13 -0
- data/vendor/gems/shoulda/lib/shoulda/rspec.rb +11 -0
- data/vendor/gems/shoulda/lib/shoulda/tasks.rb +3 -0
- data/vendor/gems/shoulda/lib/shoulda/tasks/list_tests.rake +29 -0
- data/vendor/gems/shoulda/lib/shoulda/tasks/yaml_to_shoulda.rake +28 -0
- data/vendor/gems/shoulda/lib/shoulda/test_unit.rb +22 -0
- data/vendor/gems/shoulda/rails/init.rb +7 -0
- data/vendor/gems/shoulda/shoulda.gemspec +31 -0
- data/vendor/gems/shoulda/tasks/shoulda.rake +1 -0
- data/vendor/gems/shoulda/test/README +36 -0
- data/vendor/gems/shoulda/test/fail_macros.rb +39 -0
- data/vendor/gems/shoulda/test/fixtures/addresses.yml +3 -0
- data/vendor/gems/shoulda/test/fixtures/friendships.yml +0 -0
- data/vendor/gems/shoulda/test/fixtures/posts.yml +5 -0
- data/vendor/gems/shoulda/test/fixtures/products.yml +0 -0
- data/vendor/gems/shoulda/test/fixtures/taggings.yml +0 -0
- data/vendor/gems/shoulda/test/fixtures/tags.yml +9 -0
- data/vendor/gems/shoulda/test/fixtures/users.yml +6 -0
- data/vendor/gems/shoulda/test/functional/posts_controller_test.rb +121 -0
- data/vendor/gems/shoulda/test/functional/users_controller_test.rb +19 -0
- data/vendor/gems/shoulda/test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb +68 -0
- data/vendor/gems/shoulda/test/matchers/active_record/allow_value_matcher_test.rb +64 -0
- data/vendor/gems/shoulda/test/matchers/active_record/association_matcher_test.rb +263 -0
- data/vendor/gems/shoulda/test/matchers/active_record/ensure_inclusion_of_matcher_test.rb +80 -0
- data/vendor/gems/shoulda/test/matchers/active_record/ensure_length_of_matcher_test.rb +158 -0
- data/vendor/gems/shoulda/test/matchers/active_record/have_db_column_matcher_test.rb +169 -0
- data/vendor/gems/shoulda/test/matchers/active_record/have_db_index_matcher_test.rb +91 -0
- data/vendor/gems/shoulda/test/matchers/active_record/have_named_scope_matcher_test.rb +65 -0
- data/vendor/gems/shoulda/test/matchers/active_record/have_readonly_attributes_matcher_test.rb +29 -0
- data/vendor/gems/shoulda/test/matchers/active_record/validate_acceptance_of_matcher_test.rb +44 -0
- data/vendor/gems/shoulda/test/matchers/active_record/validate_format_of_matcher_test.rb +39 -0
- data/vendor/gems/shoulda/test/matchers/active_record/validate_numericality_of_matcher_test.rb +52 -0
- data/vendor/gems/shoulda/test/matchers/active_record/validate_presence_of_matcher_test.rb +86 -0
- data/vendor/gems/shoulda/test/matchers/active_record/validate_uniqueness_of_matcher_test.rb +147 -0
- data/vendor/gems/shoulda/test/matchers/controller/assign_to_matcher_test.rb +35 -0
- data/vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb +32 -0
- data/vendor/gems/shoulda/test/matchers/controller/render_with_layout_matcher_test.rb +33 -0
- data/vendor/gems/shoulda/test/matchers/controller/respond_with_content_type_matcher_test.rb +32 -0
- data/vendor/gems/shoulda/test/matchers/controller/respond_with_matcher_test.rb +106 -0
- data/vendor/gems/shoulda/test/matchers/controller/route_matcher_test.rb +58 -0
- data/vendor/gems/shoulda/test/matchers/controller/set_session_matcher_test.rb +38 -0
- data/vendor/gems/shoulda/test/matchers/controller/set_the_flash_matcher.rb +41 -0
- data/vendor/gems/shoulda/test/model_builder.rb +106 -0
- data/vendor/gems/shoulda/test/other/autoload_macro_test.rb +18 -0
- data/vendor/gems/shoulda/test/other/context_test.rb +189 -0
- data/vendor/gems/shoulda/test/other/convert_to_should_syntax_test.rb +63 -0
- data/vendor/gems/shoulda/test/other/helpers_test.rb +340 -0
- data/vendor/gems/shoulda/test/other/private_helpers_test.rb +32 -0
- data/vendor/gems/shoulda/test/other/should_test.rb +271 -0
- data/vendor/gems/shoulda/test/rails_root/app/controllers/application_controller.rb +25 -0
- data/vendor/gems/shoulda/test/rails_root/app/controllers/posts_controller.rb +87 -0
- data/vendor/gems/shoulda/test/rails_root/app/controllers/users_controller.rb +84 -0
- data/vendor/gems/shoulda/test/rails_root/app/helpers/application_helper.rb +3 -0
- data/vendor/gems/shoulda/test/rails_root/app/helpers/posts_helper.rb +2 -0
- data/vendor/gems/shoulda/test/rails_root/app/helpers/users_helper.rb +2 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/address.rb +7 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/flea.rb +3 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/friendship.rb +4 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/pets/cat.rb +7 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/pets/dog.rb +10 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/post.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/product.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/profile.rb +2 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/registration.rb +2 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/tag.rb +8 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/tagging.rb +4 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/treat.rb +3 -0
- data/vendor/gems/shoulda/test/rails_root/app/models/user.rb +32 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/posts.rhtml +19 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/users.rhtml +17 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/wide.html.erb +1 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/edit.rhtml +27 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/index.rhtml +25 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/new.rhtml +26 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/show.rhtml +18 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/users/edit.rhtml +22 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/users/index.rhtml +22 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/users/new.rhtml +21 -0
- data/vendor/gems/shoulda/test/rails_root/app/views/users/show.rhtml +13 -0
- data/vendor/gems/shoulda/test/rails_root/config/boot.rb +110 -0
- data/vendor/gems/shoulda/test/rails_root/config/database.yml +4 -0
- data/vendor/gems/shoulda/test/rails_root/config/environment.rb +18 -0
- data/vendor/gems/shoulda/test/rails_root/config/environments/test.rb +0 -0
- data/vendor/gems/shoulda/test/rails_root/config/initializers/new_rails_defaults.rb +15 -0
- data/vendor/gems/shoulda/test/rails_root/config/initializers/shoulda.rb +8 -0
- data/vendor/gems/shoulda/test/rails_root/config/routes.rb +6 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb +19 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/002_create_posts.rb +13 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/003_create_taggings.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/004_create_tags.rb +11 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/005_create_dogs.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/006_create_addresses.rb +14 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/007_create_fleas.rb +11 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/008_create_dogs_fleas.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/009_create_products.rb +17 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/010_create_friendships.rb +14 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/011_create_treats.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090506203502_create_profiles.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090506203536_create_registrations.rb +14 -0
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090513104502_create_cats.rb +12 -0
- data/vendor/gems/shoulda/test/rails_root/db/schema.rb +0 -0
- data/vendor/gems/shoulda/test/rails_root/public/404.html +30 -0
- data/vendor/gems/shoulda/test/rails_root/public/422.html +30 -0
- data/vendor/gems/shoulda/test/rails_root/public/500.html +30 -0
- data/vendor/gems/shoulda/test/rails_root/script/console +3 -0
- data/vendor/gems/shoulda/test/rails_root/script/generate +3 -0
- data/vendor/gems/shoulda/test/rails_root/test/shoulda_macros/custom_macro.rb +6 -0
- data/vendor/gems/shoulda/test/rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +6 -0
- data/vendor/gems/shoulda/test/rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +6 -0
- data/vendor/gems/shoulda/test/rspec_test.rb +207 -0
- data/vendor/gems/shoulda/test/test_helper.rb +28 -0
- data/vendor/gems/shoulda/test/unit/address_test.rb +10 -0
- data/vendor/gems/shoulda/test/unit/cat_test.rb +7 -0
- data/vendor/gems/shoulda/test/unit/dog_test.rb +9 -0
- data/vendor/gems/shoulda/test/unit/flea_test.rb +6 -0
- data/vendor/gems/shoulda/test/unit/friendship_test.rb +6 -0
- data/vendor/gems/shoulda/test/unit/post_test.rb +19 -0
- data/vendor/gems/shoulda/test/unit/product_test.rb +23 -0
- data/vendor/gems/shoulda/test/unit/tag_test.rb +15 -0
- data/vendor/gems/shoulda/test/unit/tagging_test.rb +6 -0
- data/vendor/gems/shoulda/test/unit/user_test.rb +80 -0
- data/vendor/gems/thrift/CHANGELOG +1 -0
- data/vendor/gems/thrift/Makefile.am +47 -0
- data/vendor/gems/thrift/Manifest +81 -0
- data/vendor/gems/thrift/README +43 -0
- data/vendor/gems/thrift/Rakefile +104 -0
- data/vendor/gems/thrift/benchmark/Benchmark.thrift +24 -0
- data/vendor/gems/thrift/benchmark/benchmark.rb +271 -0
- data/vendor/gems/thrift/benchmark/client.rb +74 -0
- data/vendor/gems/thrift/benchmark/server.rb +82 -0
- data/vendor/gems/thrift/benchmark/thin_server.rb +44 -0
- data/vendor/gems/thrift/ext/binary_protocol_accelerated.c +474 -0
- data/vendor/gems/thrift/ext/binary_protocol_accelerated.h +20 -0
- data/vendor/gems/thrift/ext/compact_protocol.c +665 -0
- data/vendor/gems/thrift/ext/compact_protocol.h +20 -0
- data/vendor/gems/thrift/ext/constants.h +95 -0
- data/vendor/gems/thrift/ext/extconf.rb +26 -0
- data/vendor/gems/thrift/ext/macros.h +41 -0
- data/vendor/gems/thrift/ext/memory_buffer.c +76 -0
- data/vendor/gems/thrift/ext/memory_buffer.h +20 -0
- data/vendor/gems/thrift/ext/protocol.c +185 -0
- data/vendor/gems/thrift/ext/protocol.h +20 -0
- data/vendor/gems/thrift/ext/struct.c +606 -0
- data/vendor/gems/thrift/ext/struct.h +67 -0
- data/vendor/gems/thrift/ext/thrift_native.c +194 -0
- data/vendor/gems/thrift/lib/thrift.rb +59 -0
- data/vendor/gems/thrift/lib/thrift/client.rb +62 -0
- data/vendor/gems/thrift/lib/thrift/core_ext.rb +23 -0
- data/vendor/gems/thrift/lib/thrift/core_ext/fixnum.rb +29 -0
- data/vendor/gems/thrift/lib/thrift/exceptions.rb +82 -0
- data/vendor/gems/thrift/lib/thrift/processor.rb +57 -0
- data/vendor/gems/thrift/lib/thrift/protocol/base_protocol.rb +290 -0
- data/vendor/gems/thrift/lib/thrift/protocol/binary_protocol.rb +225 -0
- data/vendor/gems/thrift/lib/thrift/protocol/binary_protocol_accelerated.rb +35 -0
- data/vendor/gems/thrift/lib/thrift/protocol/compact_protocol.rb +422 -0
- data/vendor/gems/thrift/lib/thrift/serializer/deserializer.rb +33 -0
- data/vendor/gems/thrift/lib/thrift/serializer/serializer.rb +34 -0
- data/vendor/gems/thrift/lib/thrift/server/base_server.rb +31 -0
- data/vendor/gems/thrift/lib/thrift/server/mongrel_http_server.rb +58 -0
- data/vendor/gems/thrift/lib/thrift/server/nonblocking_server.rb +296 -0
- data/vendor/gems/thrift/lib/thrift/server/simple_server.rb +43 -0
- data/vendor/gems/thrift/lib/thrift/server/thread_pool_server.rb +75 -0
- data/vendor/gems/thrift/lib/thrift/server/threaded_server.rb +47 -0
- data/vendor/gems/thrift/lib/thrift/struct.rb +298 -0
- data/vendor/gems/thrift/lib/thrift/thrift_native.rb +24 -0
- data/vendor/gems/thrift/lib/thrift/transport/base_server_transport.rb +37 -0
- data/vendor/gems/thrift/lib/thrift/transport/base_transport.rb +70 -0
- data/vendor/gems/thrift/lib/thrift/transport/buffered_transport.rb +77 -0
- data/vendor/gems/thrift/lib/thrift/transport/framed_transport.rb +90 -0
- data/vendor/gems/thrift/lib/thrift/transport/http_client_transport.rb +45 -0
- data/vendor/gems/thrift/lib/thrift/transport/io_stream_transport.rb +39 -0
- data/vendor/gems/thrift/lib/thrift/transport/memory_buffer_transport.rb +96 -0
- data/vendor/gems/thrift/lib/thrift/transport/server_socket.rb +63 -0
- data/vendor/gems/thrift/lib/thrift/transport/socket.rb +136 -0
- data/vendor/gems/thrift/lib/thrift/transport/unix_server_socket.rb +60 -0
- data/vendor/gems/thrift/lib/thrift/transport/unix_socket.rb +40 -0
- data/vendor/gems/thrift/lib/thrift/types.rb +101 -0
- data/vendor/gems/thrift/script/proto_benchmark.rb +121 -0
- data/vendor/gems/thrift/script/read_struct.rb +43 -0
- data/vendor/gems/thrift/script/write_struct.rb +30 -0
- data/vendor/gems/thrift/setup.rb +1585 -0
- data/vendor/gems/thrift/spec/ThriftSpec.thrift +84 -0
- data/vendor/gems/thrift/spec/base_protocol_spec.rb +160 -0
- data/vendor/gems/thrift/spec/base_transport_spec.rb +351 -0
- data/vendor/gems/thrift/spec/binary_protocol_accelerated_spec.rb +41 -0
- data/vendor/gems/thrift/spec/binary_protocol_spec.rb +63 -0
- data/vendor/gems/thrift/spec/binary_protocol_spec_shared.rb +375 -0
- data/vendor/gems/thrift/spec/client_spec.rb +100 -0
- data/vendor/gems/thrift/spec/compact_protocol_spec.rb +117 -0
- data/vendor/gems/thrift/spec/exception_spec.rb +142 -0
- data/vendor/gems/thrift/spec/http_client_spec.rb +49 -0
- data/vendor/gems/thrift/spec/mongrel_http_server_spec.rb +117 -0
- data/vendor/gems/thrift/spec/nonblocking_server_spec.rb +265 -0
- data/vendor/gems/thrift/spec/processor_spec.rb +83 -0
- data/vendor/gems/thrift/spec/serializer_spec.rb +69 -0
- data/vendor/gems/thrift/spec/server_socket_spec.rb +80 -0
- data/vendor/gems/thrift/spec/server_spec.rb +160 -0
- data/vendor/gems/thrift/spec/socket_spec.rb +61 -0
- data/vendor/gems/thrift/spec/socket_spec_shared.rb +104 -0
- data/vendor/gems/thrift/spec/spec_helper.rb +60 -0
- data/vendor/gems/thrift/spec/struct_spec.rb +252 -0
- data/vendor/gems/thrift/spec/types_spec.rb +116 -0
- data/vendor/gems/thrift/spec/unix_socket_spec.rb +108 -0
- data/vendor/gems/trollop/FAQ.txt +66 -17
- data/vendor/gems/trollop/History.txt +4 -0
- data/vendor/gems/trollop/lib/trollop.rb +9 -5
- data/vendor/gems/trollop/test/test_trollop.rb +6 -0
- data/vendor/gems/trollop/www/index.html +12 -7
- metadata +958 -548
- data/History.txt +0 -38
- data/PostInstall.txt +0 -19
- data/README.txt +0 -67
- data/bin/cloud-provision +0 -45
- data/bin/cloud-run +0 -37
- data/bin/cloud-setup-dev +0 -36
- data/bin/install-poolparty +0 -22
- data/bin/server-butterfly +0 -25
- data/bin/server-cloud-elections +0 -31
- data/bin/server-ensure-provisioning +0 -33
- data/bin/server-fire-cmd +0 -14
- data/bin/server-get-load +0 -15
- data/bin/server-list-active +0 -32
- data/bin/server-manage-election +0 -58
- data/bin/server-monitor.ru +0 -42
- data/bin/server-query-agent +0 -15
- data/bin/server-rerun +0 -23
- data/bin/server-send-command +0 -18
- data/bin/server-show-stats +0 -17
- data/bin/server-write-new-nodes +0 -26
- data/examples/fairchild.rb +0 -37
- data/examples/fairchild_chef.rb +0 -19
- data/examples/maize.rb +0 -37
- data/examples/metavirt_cloud.rb +0 -33
- data/examples/paparazzi.conf.erb +0 -21
- data/examples/plugin_without_plugin_directory.rb +0 -12
- data/examples/vmrun_cloud.rb +0 -17
- data/generators/poolspec/USAGE +0 -5
- data/generators/poolspec/poolspec_generator.rb +0 -58
- data/generators/poolspec/templates/pool_spec_template.erb +0 -9
- data/lib/poolparty/aska.rb +0 -144
- data/lib/poolparty/core/array.rb +0 -60
- data/lib/poolparty/core/class.rb +0 -26
- data/lib/poolparty/core/exception.rb +0 -10
- data/lib/poolparty/core/float.rb +0 -13
- data/lib/poolparty/core/hash.rb +0 -139
- data/lib/poolparty/core/integer.rb +0 -11
- data/lib/poolparty/core/kernel.rb +0 -66
- data/lib/poolparty/core/my_open_struct.rb +0 -18
- data/lib/poolparty/core/nil.rb +0 -8
- data/lib/poolparty/core/object.rb +0 -125
- data/lib/poolparty/core/ordered_hash.rb +0 -99
- data/lib/poolparty/core/string.rb +0 -213
- data/lib/poolparty/core/symbol.rb +0 -27
- data/lib/poolparty/dependencies.rb +0 -49
- data/lib/poolparty/dependency_resolver/chef_resolver.rb +0 -254
- data/lib/poolparty/dependency_resolver/dependency_resolver.rb +0 -42
- data/lib/poolparty/dependency_resolver/dependency_resolver_cloud_extensions.rb +0 -29
- data/lib/poolparty/dependency_resolver/puppet.rb +0 -74
- data/lib/poolparty/dependency_resolver/puppet_resolver.rb +0 -166
- data/lib/poolparty/exceptions/CloudNotFoundException.rb +0 -7
- data/lib/poolparty/exceptions/LoadRulesException.rb +0 -7
- data/lib/poolparty/exceptions/MasterException.rb +0 -10
- data/lib/poolparty/exceptions/ProvisionerException.rb +0 -5
- data/lib/poolparty/exceptions/RemoteException.rb +0 -12
- data/lib/poolparty/exceptions/ResourceException.rb +0 -7
- data/lib/poolparty/exceptions/RuntimeException.rb +0 -7
- data/lib/poolparty/exceptions/SpecException.rb +0 -7
- data/lib/poolparty/exceptions/TemplateNotFound.rb +0 -7
- data/lib/poolparty/exceptions/UnacceptableCommand.rb +0 -5
- data/lib/poolparty/exceptions/dependency_resolver_exception.rb +0 -5
- data/lib/poolparty/exceptions/package_exception.rb +0 -7
- data/lib/poolparty/extra/duration.rb +0 -96
- data/lib/poolparty/helpers/binary.rb +0 -70
- data/lib/poolparty/helpers/console.rb +0 -43
- data/lib/poolparty/helpers/hash_printer.rb +0 -44
- data/lib/poolparty/helpers/loading.rb +0 -4
- data/lib/poolparty/helpers/nice_printer.rb +0 -36
- data/lib/poolparty/helpers/optioner.rb +0 -161
- data/lib/poolparty/helpers/ruberl.rb +0 -33
- data/lib/poolparty/installers/base_installer.rb +0 -113
- data/lib/poolparty/installers/vmrun.rb +0 -144
- data/lib/poolparty/lite.rb +0 -33
- data/lib/poolparty/modules/callbacks.rb +0 -57
- data/lib/poolparty/modules/cloud_dsl.rb +0 -38
- data/lib/poolparty/modules/cloud_resourcer.rb +0 -110
- data/lib/poolparty/modules/daemonizable.rb +0 -140
- data/lib/poolparty/modules/definable_resource.rb +0 -53
- data/lib/poolparty/modules/file_writer.rb +0 -95
- data/lib/poolparty/modules/output.rb +0 -13
- data/lib/poolparty/modules/pinger.rb +0 -35
- data/lib/poolparty/modules/pretty_printer.rb +0 -40
- data/lib/poolparty/modules/resourcing_dsl.rb +0 -50
- data/lib/poolparty/modules/s3_string.rb +0 -32
- data/lib/poolparty/modules/safe_instance.rb +0 -31
- data/lib/poolparty/modules/searchable_paths.rb +0 -100
- data/lib/poolparty/modules/thread_pool.rb +0 -107
- data/lib/poolparty/modules/user_helpers.rb +0 -20
- data/lib/poolparty/monitors/base_monitor.rb +0 -97
- data/lib/poolparty/monitors/monitor_daemon.rb +0 -168
- data/lib/poolparty/monitors/monitor_rack.rb +0 -137
- data/lib/poolparty/monitors/monitors/clock_monitor.rb +0 -20
- data/lib/poolparty/monitors/monitors/cloud_monitor.rb +0 -36
- data/lib/poolparty/monitors/monitors/elections_monitor.rb +0 -76
- data/lib/poolparty/monitors/monitors/favicon_monitor.rb +0 -12
- data/lib/poolparty/monitors/monitors/load_monitor.rb +0 -9
- data/lib/poolparty/monitors/monitors/memory_monitor.rb +0 -50
- data/lib/poolparty/monitors/monitors/neighborhood_monitor.rb +0 -80
- data/lib/poolparty/monitors/monitors/stats_monitor.rb +0 -206
- data/lib/poolparty/net/init.rb +0 -16
- data/lib/poolparty/net/remote_instance.rb +0 -93
- data/lib/poolparty/net/remoter/cloud_control.rb +0 -24
- data/lib/poolparty/net/remoter/connections.rb +0 -177
- data/lib/poolparty/net/remoter/interactive.rb +0 -62
- data/lib/poolparty/net/remoter_base.rb +0 -262
- data/lib/poolparty/net/remoter_bases/ec2/ec2.rb +0 -300
- data/lib/poolparty/net/remoter_bases/ec2/ec2_remote_instance.rb +0 -64
- data/lib/poolparty/net/remoter_bases/ec2/ec2_response_object.rb +0 -129
- data/lib/poolparty/net/remoter_bases/libvirt/libvirt.rb +0 -73
- data/lib/poolparty/net/remoter_bases/libvirt/libvirt_instance.rb +0 -64
- data/lib/poolparty/net/remoter_bases/metavirt/metavirt.rb +0 -110
- data/lib/poolparty/net/remoter_bases/metavirt/metavirt_instance.rb +0 -37
- data/lib/poolparty/net/remoter_bases/vmrun/utilities/vm_disk.rb +0 -12
- data/lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb +0 -33
- data/lib/poolparty/net/remoter_bases/vmrun/utilities/vmx_file.rb +0 -117
- data/lib/poolparty/net/remoter_bases/vmrun/vmrun.rb +0 -181
- data/lib/poolparty/net/remoter_bases/vmrun/vmrun_instance.rb +0 -87
- data/lib/poolparty/plugins/apache2/apache.rb +0 -266
- data/lib/poolparty/plugins/authorized_key.rb +0 -29
- data/lib/poolparty/plugins/bind.rb +0 -10
- data/lib/poolparty/plugins/chef/chef.rb +0 -161
- data/lib/poolparty/plugins/chef/chef_deploy.rb +0 -55
- data/lib/poolparty/plugins/chef/chef_deploy_definition.rb +0 -32
- data/lib/poolparty/plugins/chef/chef_library.rb +0 -7
- data/lib/poolparty/plugins/chef/chef_recipe.rb +0 -7
- data/lib/poolparty/plugins/chef/include_chef_recipe.rb +0 -14
- data/lib/poolparty/plugins/deploy_directory.rb +0 -62
- data/lib/poolparty/plugins/gem_package.rb +0 -65
- data/lib/poolparty/plugins/haproxy.rb +0 -60
- data/lib/poolparty/plugins/heartbeat.rb +0 -16
- data/lib/poolparty/plugins/host.rb +0 -39
- data/lib/poolparty/plugins/line_in_file.rb +0 -36
- data/lib/poolparty/plugins/plugin_template.rb +0 -13
- data/lib/poolparty/plugins/poolparty_base_packages.rb +0 -14
- data/lib/poolparty/plugins/rails_deploy.rb +0 -128
- data/lib/poolparty/plugins/ruby.rb +0 -42
- data/lib/poolparty/plugins/runit.rb +0 -21
- data/lib/poolparty/plugins/sshkey.rb +0 -50
- data/lib/poolparty/plugins/svn.rb +0 -67
- data/lib/poolparty/poolparty/cloud.rb +0 -399
- data/lib/poolparty/poolparty/default.rb +0 -165
- data/lib/poolparty/poolparty/key.rb +0 -69
- data/lib/poolparty/poolparty/loggable.rb +0 -28
- data/lib/poolparty/poolparty/neighborhoods.rb +0 -113
- data/lib/poolparty/poolparty/plugin.rb +0 -102
- data/lib/poolparty/poolparty/pool.rb +0 -103
- data/lib/poolparty/poolparty/poolparty_base_class.rb +0 -212
- data/lib/poolparty/poolparty/resource.rb +0 -184
- data/lib/poolparty/poolparty/script.rb +0 -58
- data/lib/poolparty/poolparty/service.rb +0 -38
- data/lib/poolparty/poolparty/template.rb +0 -27
- data/lib/poolparty/provision/boot_strapper.rb +0 -175
- data/lib/poolparty/provision/configurations/chef.rb +0 -26
- data/lib/poolparty/provision/configurations/puppet.rb +0 -28
- data/lib/poolparty/provision/dr_configure.rb +0 -147
- data/lib/poolparty/resources.rb +0 -42
- data/lib/poolparty/resources/remote_file.rb +0 -52
- data/lib/poolparty/resources/symlink.rb +0 -48
- data/lib/poolparty/schema.rb +0 -77
- data/lib/poolparty/templates/apache2/apache2.conf +0 -14
- data/lib/poolparty/templates/apache2/base.conf.erb +0 -168
- data/lib/poolparty/templates/apache2/browser_fixes.conf.erb +0 -26
- data/lib/poolparty/templates/apache2/debian.conf.erb +0 -675
- data/lib/poolparty/templates/apache2/default-site.conf.erb +0 -41
- data/lib/poolparty/templates/apache2/directory_indexes.conf.erb +0 -101
- data/lib/poolparty/templates/apache2/logging-syslog.conf.erb +0 -42
- data/lib/poolparty/templates/apache2/mime-extras.conf.erb +0 -211
- data/lib/poolparty/templates/apache2/mpm-worker.conf.erb +0 -20
- data/lib/poolparty/templates/apache2/mpm-worker.erb +0 -20
- data/lib/poolparty/templates/apache2/passenger.conf.erb +0 -20
- data/lib/poolparty/templates/apache2/php.ini.erb +0 -1253
- data/lib/poolparty/templates/apache2/server-status.erb +0 -19
- data/lib/poolparty/templates/authkeys +0 -2
- data/lib/poolparty/templates/cib.xml +0 -54
- data/lib/poolparty/templates/erlang_cookie_maker +0 -6
- data/lib/poolparty/templates/gem +0 -27
- data/lib/poolparty/templates/gemrc_template +0 -11
- data/lib/poolparty/templates/ha.cf +0 -17
- data/lib/poolparty/templates/haproxy.conf +0 -38
- data/lib/poolparty/templates/haresources +0 -3
- data/lib/poolparty/templates/logd.cf +0 -42
- data/lib/poolparty/templates/messenger/client/log-run.erb +0 -2
- data/lib/poolparty/templates/messenger/client/run.erb +0 -4
- data/lib/poolparty/templates/messenger/master/log-run.erb +0 -2
- data/lib/poolparty/templates/messenger/master/run.erb +0 -4
- data/lib/poolparty/templates/messenger/node/log-run.erb +0 -2
- data/lib/poolparty/templates/messenger/node/run.erb +0 -4
- data/lib/poolparty/templates/monitor.ru +0 -29
- data/lib/poolparty/templates/namespaceauth.conf +0 -19
- data/lib/poolparty/templates/php.ini.erb +0 -1253
- data/lib/poolparty/templates/poolparty.monitor +0 -14
- data/lib/poolparty/templates/puppet/add_puppet_to_hosts +0 -6
- data/lib/poolparty/templates/puppet/puppet.conf +0 -2
- data/lib/poolparty/templates/puppet/puppetrunner +0 -14
- data/lib/poolparty/templates/puppet/site.pp +0 -4
- data/lib/poolparty/templates/puppetrunner +0 -14
- data/lib/poolparty/templates/yaws.conf +0 -19
- data/lib/poolparty/verification/verifier_base.rb +0 -27
- data/lib/poolparty/verification/verifiers/http_match.rb +0 -43
- data/lib/poolparty/verification/verifiers/http_status.rb +0 -59
- data/lib/poolparty/verification/verifiers/ping.rb +0 -34
- data/lib/poolparty/verification/verify.rb +0 -80
- data/lib/poolpartycl.rb +0 -21
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/spec/bin/bin_spec_helper.rb +0 -8
- data/spec/bin/fixtures/bin_cloud_for_test.rb +0 -13
- data/spec/bin/server-list-active_spec.rb +0 -22
- data/spec/poolparty/aska/aska_spec.rb +0 -117
- data/spec/poolparty/bin/console_spec.rb +0 -83
- data/spec/poolparty/core/array_spec.rb +0 -48
- data/spec/poolparty/core/float.rb +0 -13
- data/spec/poolparty/core/hash_spec.rb +0 -83
- data/spec/poolparty/core/kernel_spec.rb +0 -24
- data/spec/poolparty/core/object_spec.rb +0 -7
- data/spec/poolparty/core/ordered_hash_spec.rb +0 -48
- data/spec/poolparty/core/string_spec.rb +0 -145
- data/spec/poolparty/core/time_spec.rb +0 -49
- data/spec/poolparty/dependencies_spec.rb +0 -11
- data/spec/poolparty/dependency_resolver/chef_resolver_spec.rb +0 -105
- data/spec/poolparty/dependency_resolver/dependency_resolver_cloud_extensions_spec.rb +0 -131
- data/spec/poolparty/dependency_resolver/dependency_resolver_spec.rb +0 -16
- data/spec/poolparty/dependency_resolver/puppet_resolver_spec.rb +0 -121
- data/spec/poolparty/extra/deployments_spec.rb +0 -68
- data/spec/poolparty/fixtures/clouds.json +0 -128
- data/spec/poolparty/fixtures/fake_key.pub +0 -1
- data/spec/poolparty/fixtures/test_template.erb +0 -1
- data/spec/poolparty/helpers/binary_spec.rb +0 -26
- data/spec/poolparty/helpers/hash_printer_spec.rb +0 -34
- data/spec/poolparty/helpers/optioner_spec.rb +0 -43
- data/spec/poolparty/modules/cloud_resourcer_spec.rb +0 -67
- data/spec/poolparty/modules/definable_resource.rb +0 -9
- data/spec/poolparty/modules/file_writer_spec.rb +0 -64
- data/spec/poolparty/modules/s3_string_spec.rb +0 -15
- data/spec/poolparty/modules/searchable_paths_spec.rb +0 -83
- data/spec/poolparty/monitors/base_monitor_spec.rb +0 -112
- data/spec/poolparty/monitors/monitors/cpu_monitor_spec.rb +0 -18
- data/spec/poolparty/monitors/monitors/memory_monitor_spec.rb +0 -48
- data/spec/poolparty/net/remote_instance_spec.rb +0 -16
- data/spec/poolparty/net/remote_spec.rb +0 -287
- data/spec/poolparty/net/remoter_base_spec.rb +0 -31
- data/spec/poolparty/net/remoter_bases/ec2_mocks_and_stubs.rb +0 -22
- data/spec/poolparty/net/remoter_bases/ec2_remote_instance_spec.rb +0 -74
- data/spec/poolparty/net/remoter_bases/ec2_spec.rb +0 -137
- data/spec/poolparty/net/remoter_spec.rb +0 -132
- data/spec/poolparty/plugins/authorized_key_spec.rb +0 -23
- data/spec/poolparty/plugins/chef_spec.rb +0 -7
- data/spec/poolparty/plugins/deploydirectory_spec.rb +0 -64
- data/spec/poolparty/plugins/git_spec.rb +0 -38
- data/spec/poolparty/plugins/line_spec.rb +0 -22
- data/spec/poolparty/poolparty/cloud_spec.rb +0 -335
- data/spec/poolparty/poolparty/configurers/files/ruby_basic.rb +0 -14
- data/spec/poolparty/poolparty/configurers/files/ruby_plugins.rb +0 -16
- data/spec/poolparty/poolparty/configurers/ruby_spec.rb +0 -37
- data/spec/poolparty/poolparty/default_spec.rb +0 -140
- data/spec/poolparty/poolparty/example_spec.rb +0 -81
- data/spec/poolparty/poolparty/haproxy_spec.rb +0 -7
- data/spec/poolparty/poolparty/heartbeat_spec.rb +0 -7
- data/spec/poolparty/poolparty/key_spec.rb +0 -42
- data/spec/poolparty/poolparty/neighborhoods_spec.rb +0 -65
- data/spec/poolparty/poolparty/plugin_model_spec.rb +0 -50
- data/spec/poolparty/poolparty/plugin_spec.rb +0 -41
- data/spec/poolparty/poolparty/pool_spec.rb +0 -94
- data/spec/poolparty/poolparty/resource_spec.rb +0 -204
- data/spec/poolparty/poolparty/script_spec.rb +0 -46
- data/spec/poolparty/poolparty/service_spec.rb +0 -5
- data/spec/poolparty/poolparty/template_spec.rb +0 -26
- data/spec/poolparty/poolparty/test_plugins/sshkey_test +0 -2
- data/spec/poolparty/poolparty/test_plugins/webserver.rb +0 -32
- data/spec/poolparty/poolparty_base_class_spec.rb +0 -84
- data/spec/poolparty/poolparty_spec.rb +0 -36
- data/spec/poolparty/resources/cron_spec.rb +0 -44
- data/spec/poolparty/resources/directory_spec.rb +0 -40
- data/spec/poolparty/resources/exec_spec.rb +0 -37
- data/spec/poolparty/resources/file_spec.rb +0 -64
- data/spec/poolparty/resources/gem_spec.rb +0 -7
- data/spec/poolparty/resources/package_spec.rb +0 -26
- data/spec/poolparty/resources/service_spec.rb +0 -29
- data/spec/poolparty/resources/sshkey_spec.rb +0 -39
- data/spec/poolparty/resources/symlink_spec.rb +0 -29
- data/spec/poolparty/resources/user_spec.rb +0 -48
- data/spec/poolparty/resources/variable_spec.rb +0 -26
- data/spec/poolparty/schema_spec.rb +0 -53
- data/spec/poolparty/spec_helper.rb +0 -233
- data/spec/poolparty/test_spec_helper.rb +0 -13
- data/tasks/cloud.rake +0 -3
- data/tasks/ec2.rake +0 -13
- data/tasks/instance.rake +0 -2
- data/tasks/server.rake +0 -44
- data/tasks/spec.rake +0 -54
- data/test/fixtures/fake_clouds.rb +0 -11
- data/test/fixtures/metavirt_cloud.json +0 -1
- data/test/fixtures/test_key +0 -1
- data/test/poolparty/core/array_test.rb +0 -32
- data/test/poolparty/core/hash_test.rb +0 -34
- data/test/poolparty/core/object_test.rb +0 -29
- data/test/poolparty/core/string_test.rb +0 -29
- data/test/poolparty/dependency_resolver/chef_resolver_test.rb +0 -82
- data/test/poolparty/dependency_resolver/puppet_resolver_test.rb +0 -85
- data/test/poolparty/modules/callbacks_test.rb +0 -40
- data/test/poolparty/modules/cloud_dsl_test.rb +0 -60
- data/test/poolparty/monitors/test_base_monitor.rb +0 -17
- data/test/poolparty/monitors/test_monitor_rack.rb +0 -26
- data/test/poolparty/net/remoter_base_test.rb +0 -17
- data/test/poolparty/net/remoter_bases/libvirt/libvirt_test.rb +0 -70
- data/test/poolparty/net/remoter_bases/metavirt/metavirt_test.rb +0 -81
- data/test/poolparty/net/remoter_bases/vmrun/vmrun_test.rb +0 -81
- data/test/poolparty/net/remoter_test.rb +0 -14
- data/test/poolparty/plugins/chef_deploy_test.rb +0 -37
- data/test/poolparty/plugins/chef_plugin_test.rb +0 -23
- data/test/poolparty/plugins/rails_deploy_test.rb +0 -50
- data/test/poolparty/poolparty/cloud_test.rb +0 -65
- data/test/poolparty/poolparty/isolated_cloud_test.rb +0 -25
- data/test/poolparty/poolparty/neighborhood_test.rb +0 -23
- data/test/poolparty/poolparty/plugin_test.rb +0 -19
- data/test/poolparty/poolparty/pool_test.rb +0 -22
- data/test/poolparty/poolparty/poolparty_base_class_test.rb +0 -122
- data/test/poolparty/poolparty/schema_test.rb +0 -13
- data/test/poolparty/poolparty/template_test.rb +0 -31
- data/test/poolparty/provision/boot_strapper_test.rb +0 -6
- data/test/poolparty/provision/dr_configure_test.rb +0 -6
- data/test/poolparty/verification/verify_test.rb +0 -53
- data/test/test_generator_helper.rb +0 -29
- data/test/test_pool_spec_generator.rb +0 -47
- data/test/test_poolparty.rb +0 -12
- data/vendor/gems/suitcase/README.rdoc +0 -31
- data/vendor/gems/suitcase/Rakefile +0 -57
- data/vendor/gems/suitcase/VERSION.yml +0 -4
- data/vendor/gems/suitcase/lib/suitcase.rb +0 -5
- data/vendor/gems/suitcase/lib/suitcase/unzipper.rb +0 -15
- data/vendor/gems/suitcase/lib/suitcase/zipper.rb +0 -167
- data/vendor/gems/suitcase/suitcase.gemspec +0 -32
- data/vendor/gems/suitcase/test/suitcase_test.rb +0 -108
- data/vendor/gems/suitcase/test/test_dir/box.rb +0 -1
- data/vendor/gems/suitcase/test/test_dir/gems/famoseagle-carrot-0.6.0.gem +0 -0
- data/vendor/gems/suitcase/test/test_dir/test.txt +0 -1
- data/vendor/gems/suitcase/test/test_helper.rb +0 -12
@@ -0,0 +1,149 @@
|
|
1
|
+
require 'net/ssh/buffer'
|
2
|
+
require 'net/ssh/loggable'
|
3
|
+
|
4
|
+
module Net; module SSH
|
5
|
+
|
6
|
+
# This module is used to extend sockets and other IO objects, to allow
|
7
|
+
# them to be buffered for both read and write. This abstraction makes it
|
8
|
+
# quite easy to write a select-based event loop
|
9
|
+
# (see Net::SSH::Connection::Session#listen_to).
|
10
|
+
#
|
11
|
+
# The general idea is that instead of calling #read directly on an IO that
|
12
|
+
# has been extended with this module, you call #fill (to add pending input
|
13
|
+
# to the internal read buffer), and then #read_available (to read from that
|
14
|
+
# buffer). Likewise, you don't call #write directly, you call #enqueue to
|
15
|
+
# add data to the write buffer, and then #send_pending or #wait_for_pending_sends
|
16
|
+
# to actually send the data across the wire.
|
17
|
+
#
|
18
|
+
# In this way you can easily use the object as an argument to IO.select,
|
19
|
+
# calling #fill when it is available for read, or #send_pending when it is
|
20
|
+
# available for write, and then call #enqueue and #read_available during
|
21
|
+
# the idle times.
|
22
|
+
#
|
23
|
+
# socket = TCPSocket.new(address, port)
|
24
|
+
# socket.extend(Net::SSH::BufferedIo)
|
25
|
+
#
|
26
|
+
# ssh.listen_to(socket)
|
27
|
+
#
|
28
|
+
# ssh.loop do
|
29
|
+
# if socket.available > 0
|
30
|
+
# puts socket.read_available
|
31
|
+
# socket.enqueue("response\n")
|
32
|
+
# end
|
33
|
+
# end
|
34
|
+
#
|
35
|
+
# Note that this module must be used to extend an instance, and should not
|
36
|
+
# be included in a class. If you do want to use it via an include, then you
|
37
|
+
# must make sure to invoke the private #initialize_buffered_io method in
|
38
|
+
# your class' #initialize method:
|
39
|
+
#
|
40
|
+
# class Foo < IO
|
41
|
+
# include Net::SSH::BufferedIo
|
42
|
+
#
|
43
|
+
# def initialize
|
44
|
+
# initialize_buffered_io
|
45
|
+
# # ...
|
46
|
+
# end
|
47
|
+
# end
|
48
|
+
module BufferedIo
|
49
|
+
include Loggable
|
50
|
+
|
51
|
+
# Called when the #extend is called on an object, with this module as the
|
52
|
+
# argument. It ensures that the modules instance variables are all properly
|
53
|
+
# initialized.
|
54
|
+
def self.extended(object) #:nodoc:
|
55
|
+
# need to use __send__ because #send is overridden in Socket
|
56
|
+
object.__send__(:initialize_buffered_io)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Tries to read up to +n+ bytes of data from the remote end, and appends
|
60
|
+
# the data to the input buffer. It returns the number of bytes read, or 0
|
61
|
+
# if no data was available to be read.
|
62
|
+
def fill(n=8192)
|
63
|
+
input.consume!
|
64
|
+
data = recv(n)
|
65
|
+
debug { "read #{data.length} bytes" }
|
66
|
+
input.append(data)
|
67
|
+
return data.length
|
68
|
+
end
|
69
|
+
|
70
|
+
# Read up to +length+ bytes from the input buffer. If +length+ is nil,
|
71
|
+
# all available data is read from the buffer. (See #available.)
|
72
|
+
def read_available(length=nil)
|
73
|
+
input.read(length || available)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Returns the number of bytes available to be read from the input buffer.
|
77
|
+
# (See #read_available.)
|
78
|
+
def available
|
79
|
+
input.available
|
80
|
+
end
|
81
|
+
|
82
|
+
# Enqueues data in the output buffer, to be written when #send_pending
|
83
|
+
# is called. Note that the data is _not_ sent immediately by this method!
|
84
|
+
def enqueue(data)
|
85
|
+
output.append(data)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Returns +true+ if there is data waiting in the output buffer, and
|
89
|
+
# +false+ otherwise.
|
90
|
+
def pending_write?
|
91
|
+
output.length > 0
|
92
|
+
end
|
93
|
+
|
94
|
+
# Sends as much of the pending output as possible. Returns +true+ if any
|
95
|
+
# data was sent, and +false+ otherwise.
|
96
|
+
def send_pending
|
97
|
+
if output.length > 0
|
98
|
+
sent = send(output.to_s, 0)
|
99
|
+
debug { "sent #{sent} bytes" }
|
100
|
+
output.consume!(sent)
|
101
|
+
return sent > 0
|
102
|
+
else
|
103
|
+
return false
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# Calls #send_pending repeatedly, if necessary, blocking until the output
|
108
|
+
# buffer is empty.
|
109
|
+
def wait_for_pending_sends
|
110
|
+
send_pending
|
111
|
+
while output.length > 0
|
112
|
+
result = IO.select(nil, [self]) or next
|
113
|
+
next unless result[1].any?
|
114
|
+
send_pending
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
public # these methods are primarily for use in tests
|
119
|
+
|
120
|
+
def write_buffer #:nodoc:
|
121
|
+
output.to_s
|
122
|
+
end
|
123
|
+
|
124
|
+
def read_buffer #:nodoc:
|
125
|
+
input.to_s
|
126
|
+
end
|
127
|
+
|
128
|
+
private
|
129
|
+
|
130
|
+
#--
|
131
|
+
# Can't use attr_reader here (after +private+) without incurring the
|
132
|
+
# wrath of "ruby -w". We hates it.
|
133
|
+
#++
|
134
|
+
|
135
|
+
def input; @input; end
|
136
|
+
def output; @output; end
|
137
|
+
|
138
|
+
# Initializes the intput and output buffers for this object. This method
|
139
|
+
# is called automatically when the module is mixed into an object via
|
140
|
+
# Object#extend (see Net::SSH::BufferedIo.extended), but must be called
|
141
|
+
# explicitly in the +initialize+ method of any class that uses
|
142
|
+
# Module#include to add this module.
|
143
|
+
def initialize_buffered_io
|
144
|
+
@input = Net::SSH::Buffer.new
|
145
|
+
@output = Net::SSH::Buffer.new
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
end; end
|
@@ -0,0 +1,181 @@
|
|
1
|
+
module Net; module SSH
|
2
|
+
|
3
|
+
# The Net::SSH::Config class is used to parse OpenSSH configuration files,
|
4
|
+
# and translates that syntax into the configuration syntax that Net::SSH
|
5
|
+
# understands. This lets Net::SSH scripts read their configuration (to
|
6
|
+
# some extent) from OpenSSH configuration files (~/.ssh/config, /etc/ssh_config,
|
7
|
+
# and so forth).
|
8
|
+
#
|
9
|
+
# Only a subset of OpenSSH configuration options are understood:
|
10
|
+
#
|
11
|
+
# * Ciphers => maps to the :encryption option
|
12
|
+
# * Compression => :compression
|
13
|
+
# * CompressionLevel => :compression_level
|
14
|
+
# * ConnectTimeout => maps to the :timeout option
|
15
|
+
# * ForwardAgent => :forward_agent
|
16
|
+
# * GlobalKnownHostsFile => :global_known_hosts_file
|
17
|
+
# * HostBasedAuthentication => maps to the :auth_methods option
|
18
|
+
# * HostKeyAlgorithms => maps to :host_key option
|
19
|
+
# * HostKeyAlias => :host_key_alias
|
20
|
+
# * HostName => :host_name
|
21
|
+
# * IdentityFile => maps to the :keys option
|
22
|
+
# * Macs => maps to the :hmac option
|
23
|
+
# * PasswordAuthentication => maps to the :auth_methods option
|
24
|
+
# * Port => :port
|
25
|
+
# * PreferredAuthentications => maps to the :auth_methods option
|
26
|
+
# * RekeyLimit => :rekey_limit
|
27
|
+
# * User => :user
|
28
|
+
# * UserKnownHostsFile => :user_known_hosts_file
|
29
|
+
#
|
30
|
+
# Note that you will never need to use this class directly--you can control
|
31
|
+
# whether the OpenSSH configuration files are read by passing the :config
|
32
|
+
# option to Net::SSH.start. (They are, by default.)
|
33
|
+
class Config
|
34
|
+
class <<self
|
35
|
+
@@default_files = %w(~/.ssh/config /etc/ssh_config /etc/ssh/ssh_config)
|
36
|
+
|
37
|
+
# Returns an array of locations of OpenSSH configuration files
|
38
|
+
# to parse by default.
|
39
|
+
def default_files
|
40
|
+
@@default_files
|
41
|
+
end
|
42
|
+
|
43
|
+
# Loads the configuration data for the given +host+ from all of the
|
44
|
+
# given +files+ (defaulting to the list of files returned by
|
45
|
+
# #default_files), translates the resulting hash into the options
|
46
|
+
# recognized by Net::SSH, and returns them.
|
47
|
+
def for(host, files=default_files)
|
48
|
+
translate(files.inject({}) { |settings, file| load(file, host, settings) })
|
49
|
+
end
|
50
|
+
|
51
|
+
# Load the OpenSSH configuration settings in the given +file+ for the
|
52
|
+
# given +host+. If +settings+ is given, the options are merged into
|
53
|
+
# that hash, with existing values taking precedence over newly parsed
|
54
|
+
# ones. Returns a hash containing the OpenSSH options. (See
|
55
|
+
# #translate for how to convert the OpenSSH options into Net::SSH
|
56
|
+
# options.)
|
57
|
+
def load(file, host, settings={})
|
58
|
+
file = File.expand_path(file)
|
59
|
+
return settings unless File.readable?(file)
|
60
|
+
|
61
|
+
in_match = false
|
62
|
+
IO.foreach(file) do |line|
|
63
|
+
next if line =~ /^\s*(?:#.*)?$/
|
64
|
+
|
65
|
+
if line =~ /^\s*(\S+)\s*=(.*)$/
|
66
|
+
key, value = $1, $2
|
67
|
+
else
|
68
|
+
key, value = line.strip.split(/\s+/, 2)
|
69
|
+
end
|
70
|
+
|
71
|
+
# silently ignore malformed entries
|
72
|
+
next if value.nil?
|
73
|
+
|
74
|
+
key.downcase!
|
75
|
+
value = $1 if value =~ /^"(.*)"$/
|
76
|
+
|
77
|
+
value = case value.strip
|
78
|
+
when /^\d+$/ then value.to_i
|
79
|
+
when /^no$/i then false
|
80
|
+
when /^yes$/i then true
|
81
|
+
else value
|
82
|
+
end
|
83
|
+
|
84
|
+
if key == 'host'
|
85
|
+
in_match = (host =~ pattern2regex(value))
|
86
|
+
elsif in_match
|
87
|
+
if key == 'identityfile'
|
88
|
+
settings[key] ||= []
|
89
|
+
settings[key] << value
|
90
|
+
else
|
91
|
+
settings[key] = value unless settings.key?(key)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
return settings
|
97
|
+
end
|
98
|
+
|
99
|
+
# Given a hash of OpenSSH configuration options, converts them into
|
100
|
+
# a hash of Net::SSH options. Unrecognized options are ignored. The
|
101
|
+
# +settings+ hash must have Strings for keys, all downcased, and
|
102
|
+
# the returned hash will have Symbols for keys.
|
103
|
+
def translate(settings)
|
104
|
+
settings.inject({}) do |hash, (key, value)|
|
105
|
+
case key
|
106
|
+
when 'ciphers' then
|
107
|
+
hash[:encryption] = value.split(/,/)
|
108
|
+
when 'compression' then
|
109
|
+
hash[:compression] = value
|
110
|
+
when 'compressionlevel' then
|
111
|
+
hash[:compression_level] = value
|
112
|
+
when 'connecttimeout' then
|
113
|
+
hash[:timeout] = value
|
114
|
+
when 'forwardagent' then
|
115
|
+
hash[:forward_agent] = value
|
116
|
+
when 'globalknownhostsfile'
|
117
|
+
hash[:global_known_hosts_file] = value
|
118
|
+
when 'hostbasedauthentication' then
|
119
|
+
if value
|
120
|
+
hash[:auth_methods] ||= []
|
121
|
+
hash[:auth_methods] << "hostbased"
|
122
|
+
end
|
123
|
+
when 'hostkeyalgorithms' then
|
124
|
+
hash[:host_key] = value.split(/,/)
|
125
|
+
when 'hostkeyalias' then
|
126
|
+
hash[:host_key_alias] = value
|
127
|
+
when 'hostname' then
|
128
|
+
hash[:host_name] = value
|
129
|
+
when 'identityfile' then
|
130
|
+
hash[:keys] = value
|
131
|
+
when 'macs' then
|
132
|
+
hash[:hmac] = value.split(/,/)
|
133
|
+
when 'passwordauthentication'
|
134
|
+
if value
|
135
|
+
hash[:auth_methods] ||= []
|
136
|
+
hash[:auth_methods] << "password"
|
137
|
+
end
|
138
|
+
when 'port'
|
139
|
+
hash[:port] = value
|
140
|
+
when 'preferredauthentications'
|
141
|
+
hash[:auth_methods] = value.split(/,/)
|
142
|
+
when 'pubkeyauthentication'
|
143
|
+
if value
|
144
|
+
hash[:auth_methods] ||= []
|
145
|
+
hash[:auth_methods] << "publickey"
|
146
|
+
end
|
147
|
+
when 'rekeylimit'
|
148
|
+
hash[:rekey_limit] = interpret_size(value)
|
149
|
+
when 'user'
|
150
|
+
hash[:user] = value
|
151
|
+
when 'userknownhostsfile'
|
152
|
+
hash[:user_known_hosts_file] = value
|
153
|
+
end
|
154
|
+
hash
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
private
|
159
|
+
|
160
|
+
# Converts an ssh_config pattern into a regex for matching against
|
161
|
+
# host names.
|
162
|
+
def pattern2regex(pattern)
|
163
|
+
pattern = "^" + pattern.to_s.gsub(/\./, "\\.").
|
164
|
+
gsub(/\?/, '.').
|
165
|
+
gsub(/\*/, '.*') + "$"
|
166
|
+
Regexp.new(pattern, true)
|
167
|
+
end
|
168
|
+
|
169
|
+
# Converts the given size into an integer number of bytes.
|
170
|
+
def interpret_size(size)
|
171
|
+
case size
|
172
|
+
when /k$/i then size.to_i * 1024
|
173
|
+
when /m$/i then size.to_i * 1024 * 1024
|
174
|
+
when /g$/i then size.to_i * 1024 * 1024 * 1024
|
175
|
+
else size.to_i
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
end; end
|
@@ -0,0 +1,625 @@
|
|
1
|
+
require 'net/ssh/loggable'
|
2
|
+
require 'net/ssh/connection/constants'
|
3
|
+
require 'net/ssh/connection/term'
|
4
|
+
|
5
|
+
module Net; module SSH; module Connection
|
6
|
+
|
7
|
+
# The channel abstraction. Multiple "channels" can be multiplexed onto a
|
8
|
+
# single SSH channel, each operating independently and seemingly in parallel.
|
9
|
+
# This class represents a single such channel. Most operations performed
|
10
|
+
# with the Net::SSH library will involve using one or more channels.
|
11
|
+
#
|
12
|
+
# Channels are intended to be used asynchronously. You request that one be
|
13
|
+
# opened (via Connection::Session#open_channel), and when it is opened, your
|
14
|
+
# callback is invoked. Then, you set various other callbacks on the newly
|
15
|
+
# opened channel, which are called in response to the corresponding events.
|
16
|
+
# Programming with Net::SSH works best if you think of your programs as
|
17
|
+
# state machines. Complex programs are best implemented as objects that
|
18
|
+
# wrap a channel. See Net::SCP and Net::SFTP for examples of how complex
|
19
|
+
# state machines can be built on top of the SSH protocol.
|
20
|
+
#
|
21
|
+
# ssh.open_channel do |channel|
|
22
|
+
# channel.exec("/invoke/some/command") do |ch, success|
|
23
|
+
# abort "could not execute command" unless success
|
24
|
+
#
|
25
|
+
# channel.on_data do |ch, data|
|
26
|
+
# puts "got stdout: #{data}"
|
27
|
+
# channel.send_data "something for stdin\n"
|
28
|
+
# end
|
29
|
+
#
|
30
|
+
# channel.on_extended_data do |ch, type, data|
|
31
|
+
# puts "got stderr: #{data}"
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# channel.on_close do |ch|
|
35
|
+
# puts "channel is closing!"
|
36
|
+
# end
|
37
|
+
# end
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# ssh.loop
|
41
|
+
#
|
42
|
+
# Channels also have a basic hash-like interface, that allows programs to
|
43
|
+
# store arbitrary state information on a channel object. This helps simplify
|
44
|
+
# the writing of state machines, especially when you may be juggling
|
45
|
+
# multiple open channels at the same time.
|
46
|
+
#
|
47
|
+
# Note that data sent across SSH channels are governed by maximum packet
|
48
|
+
# sizes and maximum window sizes. These details are managed internally
|
49
|
+
# by Net::SSH::Connection::Channel, so you may remain blissfully ignorant
|
50
|
+
# if you so desire, but you can always inspect the current maximums, as
|
51
|
+
# well as the remaining window size, using the reader attributes for those
|
52
|
+
# values.
|
53
|
+
class Channel
|
54
|
+
include Constants, Loggable
|
55
|
+
|
56
|
+
# The local id for this channel, assigned by the Net::SSH::Connection::Session instance.
|
57
|
+
attr_reader :local_id
|
58
|
+
|
59
|
+
# The remote id for this channel, assigned by the remote host.
|
60
|
+
attr_reader :remote_id
|
61
|
+
|
62
|
+
# The type of this channel, usually "session".
|
63
|
+
attr_reader :type
|
64
|
+
|
65
|
+
# The underlying Net::SSH::Connection::Session instance that supports this channel.
|
66
|
+
attr_reader :connection
|
67
|
+
|
68
|
+
# The maximum packet size that the local host can receive.
|
69
|
+
attr_reader :local_maximum_packet_size
|
70
|
+
|
71
|
+
# The maximum amount of data that the local end of this channel can
|
72
|
+
# receive. This is a total, not per-packet.
|
73
|
+
attr_reader :local_maximum_window_size
|
74
|
+
|
75
|
+
# The maximum packet size that the remote host can receive.
|
76
|
+
attr_reader :remote_maximum_packet_size
|
77
|
+
|
78
|
+
# The maximum amount of data that the remote end of this channel can
|
79
|
+
# receive. This is a total, not per-packet.
|
80
|
+
attr_reader :remote_maximum_window_size
|
81
|
+
|
82
|
+
# This is the remaining window size on the local end of this channel. When
|
83
|
+
# this reaches zero, no more data can be received.
|
84
|
+
attr_reader :local_window_size
|
85
|
+
|
86
|
+
# This is the remaining window size on the remote end of this channel. When
|
87
|
+
# this reaches zero, no more data can be sent.
|
88
|
+
attr_reader :remote_window_size
|
89
|
+
|
90
|
+
# A hash of properties for this channel. These can be used to store state
|
91
|
+
# information about this channel. See also #[] and #[]=.
|
92
|
+
attr_reader :properties
|
93
|
+
|
94
|
+
# The output buffer for this channel. Data written to the channel is
|
95
|
+
# enqueued here, to be written as CHANNEL_DATA packets during each pass of
|
96
|
+
# the event loop. See Connection::Session#process and #enqueue_pending_output.
|
97
|
+
attr_reader :output #:nodoc:
|
98
|
+
|
99
|
+
# The list of pending requests. Each time a request is sent which requires
|
100
|
+
# a reply, the corresponding callback is pushed onto this queue. As responses
|
101
|
+
# arrive, they are shifted off the front and handled.
|
102
|
+
attr_reader :pending_requests #:nodoc:
|
103
|
+
|
104
|
+
# Instantiates a new channel on the given connection, of the given type,
|
105
|
+
# and with the given id. If a block is given, it will be remembered until
|
106
|
+
# the channel is confirmed open by the server, and will be invoked at
|
107
|
+
# that time (see #do_open_confirmation).
|
108
|
+
#
|
109
|
+
# This also sets the default maximum packet size and maximum window size.
|
110
|
+
def initialize(connection, type, local_id, &on_confirm_open)
|
111
|
+
self.logger = connection.logger
|
112
|
+
|
113
|
+
@connection = connection
|
114
|
+
@type = type
|
115
|
+
@local_id = local_id
|
116
|
+
|
117
|
+
@local_maximum_packet_size = 0x10000
|
118
|
+
@local_window_size = @local_maximum_window_size = 0x20000
|
119
|
+
|
120
|
+
@on_confirm_open = on_confirm_open
|
121
|
+
|
122
|
+
@output = Buffer.new
|
123
|
+
|
124
|
+
@properties = {}
|
125
|
+
|
126
|
+
@pending_requests = []
|
127
|
+
@on_open_failed = @on_data = @on_extended_data = @on_process = @on_close = @on_eof = nil
|
128
|
+
@on_request = {}
|
129
|
+
@closing = @eof = false
|
130
|
+
end
|
131
|
+
|
132
|
+
# A shortcut for accessing properties of the channel (see #properties).
|
133
|
+
def [](name)
|
134
|
+
@properties[name]
|
135
|
+
end
|
136
|
+
|
137
|
+
# A shortcut for setting properties of the channel (see #properties).
|
138
|
+
def []=(name, value)
|
139
|
+
@properties[name] = value
|
140
|
+
end
|
141
|
+
|
142
|
+
# Syntactic sugar for executing a command. Sends a channel request asking
|
143
|
+
# that the given command be invoked. If the block is given, it will be
|
144
|
+
# called when the server responds. The first parameter will be the
|
145
|
+
# channel, and the second will be true or false, indicating whether the
|
146
|
+
# request succeeded or not. In this case, success means that the command
|
147
|
+
# is being executed, not that it has completed, and failure means that the
|
148
|
+
# command altogether failed to be executed.
|
149
|
+
#
|
150
|
+
# channel.exec "ls -l /home" do |ch, success|
|
151
|
+
# if success
|
152
|
+
# puts "command has begun executing..."
|
153
|
+
# # this is a good place to hang callbacks like #on_data...
|
154
|
+
# else
|
155
|
+
# puts "alas! the command could not be invoked!"
|
156
|
+
# end
|
157
|
+
# end
|
158
|
+
def exec(command, &block)
|
159
|
+
send_channel_request("exec", :string, command, &block)
|
160
|
+
end
|
161
|
+
|
162
|
+
# Syntactic sugar for requesting that a subsystem be started. Subsystems
|
163
|
+
# are a way for other protocols (like SFTP) to be run, using SSH as
|
164
|
+
# the transport. Generally, you'll never need to call this directly unless
|
165
|
+
# you are the implementor of something that consumes an SSH subsystem, like
|
166
|
+
# SFTP.
|
167
|
+
#
|
168
|
+
# channel.subsystem("sftp") do |ch, success|
|
169
|
+
# if success
|
170
|
+
# puts "subsystem successfully started"
|
171
|
+
# else
|
172
|
+
# puts "subsystem could not be started"
|
173
|
+
# end
|
174
|
+
# end
|
175
|
+
def subsystem(subsystem, &block)
|
176
|
+
send_channel_request("subsystem", :string, subsystem, &block)
|
177
|
+
end
|
178
|
+
|
179
|
+
# Syntactic sugar for setting an environment variable in the remote
|
180
|
+
# process' environment. Note that for security reasons, the server may
|
181
|
+
# refuse to set certain environment variables, or all, at the server's
|
182
|
+
# discretion. If you are connecting to an OpenSSH server, you will
|
183
|
+
# need to update the AcceptEnv setting in the sshd_config to include the
|
184
|
+
# environment variables you want to send.
|
185
|
+
#
|
186
|
+
# channel.env "PATH", "/usr/local/bin"
|
187
|
+
def env(variable_name, variable_value, &block)
|
188
|
+
send_channel_request("env", :string, variable_name, :string, variable_value, &block)
|
189
|
+
end
|
190
|
+
|
191
|
+
# A hash of the valid PTY options (see #request_pty).
|
192
|
+
VALID_PTY_OPTIONS = { :term => "xterm",
|
193
|
+
:chars_wide => 80,
|
194
|
+
:chars_high => 24,
|
195
|
+
:pixels_wide => 640,
|
196
|
+
:pixels_high => 480,
|
197
|
+
:modes => {} }
|
198
|
+
|
199
|
+
# Requests that a pseudo-tty (or "pty") be made available for this channel.
|
200
|
+
# This is useful when you want to invoke and interact with some kind of
|
201
|
+
# screen-based program (e.g., vim, or some menuing system).
|
202
|
+
#
|
203
|
+
# Note, that without a pty some programs (e.g. sudo, or subversion) on
|
204
|
+
# some systems, will not be able to run interactively, and will error
|
205
|
+
# instead of prompt if they ever need some user interaction.
|
206
|
+
#
|
207
|
+
# Note, too, that when a pty is requested, user's shell configuration
|
208
|
+
# scripts (.bashrc and such) are not run by default, whereas they are
|
209
|
+
# run when a pty is not present.
|
210
|
+
#
|
211
|
+
# channel.request_pty do |ch, success|
|
212
|
+
# if success
|
213
|
+
# puts "pty successfully obtained"
|
214
|
+
# else
|
215
|
+
# puts "could not obtain pty"
|
216
|
+
# end
|
217
|
+
# end
|
218
|
+
def request_pty(opts={}, &block)
|
219
|
+
extra = opts.keys - VALID_PTY_OPTIONS.keys
|
220
|
+
raise ArgumentError, "invalid option(s) to request_pty: #{extra.inspect}" if extra.any?
|
221
|
+
|
222
|
+
opts = VALID_PTY_OPTIONS.merge(opts)
|
223
|
+
|
224
|
+
modes = opts[:modes].inject(Buffer.new) do |memo, (mode, data)|
|
225
|
+
memo.write_byte(mode).write_long(data)
|
226
|
+
end
|
227
|
+
# mark the end of the mode opcode list with a 0 byte
|
228
|
+
modes.write_byte(0)
|
229
|
+
|
230
|
+
send_channel_request("pty-req", :string, opts[:term],
|
231
|
+
:long, opts[:chars_wide], :long, opts[:chars_high],
|
232
|
+
:long, opts[:pixels_wide], :long, opts[:pixels_high],
|
233
|
+
:string, modes.to_s, &block)
|
234
|
+
end
|
235
|
+
|
236
|
+
# Sends data to the channel's remote endpoint. This usually has the
|
237
|
+
# effect of sending the given string to the remote process' stdin stream.
|
238
|
+
# Note that it does not immediately send the data across the channel,
|
239
|
+
# but instead merely appends the given data to the channel's output buffer,
|
240
|
+
# preparatory to being packaged up and sent out the next time the connection
|
241
|
+
# is accepting data. (A connection might not be accepting data if, for
|
242
|
+
# instance, it has filled its data window and has not yet been resized by
|
243
|
+
# the remote end-point.)
|
244
|
+
#
|
245
|
+
# This will raise an exception if the channel has previously declared
|
246
|
+
# that no more data will be sent (see #eof!).
|
247
|
+
#
|
248
|
+
# channel.send_data("the password\n")
|
249
|
+
def send_data(data)
|
250
|
+
raise EOFError, "cannot send data if channel has declared eof" if eof?
|
251
|
+
output.append(data.to_s)
|
252
|
+
end
|
253
|
+
|
254
|
+
# Returns true if the channel exists in the channel list of the session,
|
255
|
+
# and false otherwise. This can be used to determine whether a channel has
|
256
|
+
# been closed or not.
|
257
|
+
#
|
258
|
+
# ssh.loop { channel.active? }
|
259
|
+
def active?
|
260
|
+
connection.channels.key?(local_id)
|
261
|
+
end
|
262
|
+
|
263
|
+
# Runs the SSH event loop until the channel is no longer active. This is
|
264
|
+
# handy for blocking while you wait for some channel to finish.
|
265
|
+
#
|
266
|
+
# channel.exec("grep ...") { ... }
|
267
|
+
# channel.wait
|
268
|
+
def wait
|
269
|
+
connection.loop { active? }
|
270
|
+
end
|
271
|
+
|
272
|
+
# Returns true if the channel is currently closing, but not actually
|
273
|
+
# closed. A channel is closing when, for instance, #close has been
|
274
|
+
# invoked, but the server has not yet responded with a CHANNEL_CLOSE
|
275
|
+
# packet of its own.
|
276
|
+
def closing?
|
277
|
+
@closing
|
278
|
+
end
|
279
|
+
|
280
|
+
# Requests that the channel be closed. If the channel is already closing,
|
281
|
+
# this does nothing, nor does it do anything if the channel has not yet
|
282
|
+
# been confirmed open (see #do_open_confirmation). Otherwise, it sends a
|
283
|
+
# CHANNEL_CLOSE message and marks the channel as closing.
|
284
|
+
def close
|
285
|
+
return if @closing
|
286
|
+
if remote_id
|
287
|
+
@closing = true
|
288
|
+
connection.send_message(Buffer.from(:byte, CHANNEL_CLOSE, :long, remote_id))
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
# Returns true if the local end of the channel has declared that no more
|
293
|
+
# data is forthcoming (see #eof!). Trying to send data via #send_data when
|
294
|
+
# this is true will result in an exception being raised.
|
295
|
+
def eof?
|
296
|
+
@eof
|
297
|
+
end
|
298
|
+
|
299
|
+
# Tells the remote end of the channel that no more data is forthcoming
|
300
|
+
# from this end of the channel. The remote end may still send data.
|
301
|
+
def eof!
|
302
|
+
return if eof?
|
303
|
+
@eof = true
|
304
|
+
connection.send_message(Buffer.from(:byte, CHANNEL_EOF, :long, remote_id))
|
305
|
+
end
|
306
|
+
|
307
|
+
# If an #on_process handler has been set up, this will cause it to be
|
308
|
+
# invoked (passing the channel itself as an argument). It also causes all
|
309
|
+
# pending output to be enqueued as CHANNEL_DATA packets (see #enqueue_pending_output).
|
310
|
+
def process
|
311
|
+
@on_process.call(self) if @on_process
|
312
|
+
enqueue_pending_output
|
313
|
+
end
|
314
|
+
|
315
|
+
# Registers a callback to be invoked when data packets are received by the
|
316
|
+
# channel. The callback is called with the channel as the first argument,
|
317
|
+
# and the data as the second.
|
318
|
+
#
|
319
|
+
# channel.on_data do |ch, data|
|
320
|
+
# puts "got data: #{data.inspect}"
|
321
|
+
# end
|
322
|
+
#
|
323
|
+
# Data received this way is typically the data written by the remote
|
324
|
+
# process to its +stdout+ stream.
|
325
|
+
def on_data(&block)
|
326
|
+
old, @on_data = @on_data, block
|
327
|
+
old
|
328
|
+
end
|
329
|
+
|
330
|
+
# Registers a callback to be invoked when extended data packets are received
|
331
|
+
# by the channel. The callback is called with the channel as the first
|
332
|
+
# argument, the data type (as an integer) as the second, and the data as
|
333
|
+
# the third. Extended data is almost exclusively used to send +stderr+ data
|
334
|
+
# (+type+ == 1). Other extended data types are not defined by the SSH
|
335
|
+
# protocol.
|
336
|
+
#
|
337
|
+
# channel.on_extended_data do |ch, type, data|
|
338
|
+
# puts "got stderr: #{data.inspect}"
|
339
|
+
# end
|
340
|
+
def on_extended_data(&block)
|
341
|
+
old, @on_extended_data = @on_extended_data, block
|
342
|
+
old
|
343
|
+
end
|
344
|
+
|
345
|
+
# Registers a callback to be invoked for each pass of the event loop for
|
346
|
+
# this channel. There are no guarantees on timeliness in the event loop,
|
347
|
+
# but it will be called roughly once for each packet received by the
|
348
|
+
# connection (not the channel). This callback is invoked with the channel
|
349
|
+
# as the sole argument.
|
350
|
+
#
|
351
|
+
# Here's an example that accumulates the channel data into a variable on
|
352
|
+
# the channel itself, and displays individual lines in the input one
|
353
|
+
# at a time when the channel is processed:
|
354
|
+
#
|
355
|
+
# channel[:data] = ""
|
356
|
+
#
|
357
|
+
# channel.on_data do |ch, data|
|
358
|
+
# channel[:data] << data
|
359
|
+
# end
|
360
|
+
#
|
361
|
+
# channel.on_process do |ch|
|
362
|
+
# if channel[:data] =~ /^.*?\n/
|
363
|
+
# puts $&
|
364
|
+
# channel[:data] = $'
|
365
|
+
# end
|
366
|
+
# end
|
367
|
+
def on_process(&block)
|
368
|
+
old, @on_process = @on_process, block
|
369
|
+
old
|
370
|
+
end
|
371
|
+
|
372
|
+
# Registers a callback to be invoked when the server acknowledges that a
|
373
|
+
# channel is closed. This is invoked with the channel as the sole argument.
|
374
|
+
#
|
375
|
+
# channel.on_close do |ch|
|
376
|
+
# puts "remote end is closing!"
|
377
|
+
# end
|
378
|
+
def on_close(&block)
|
379
|
+
old, @on_close = @on_close, block
|
380
|
+
old
|
381
|
+
end
|
382
|
+
|
383
|
+
# Registers a callback to be invoked when the server indicates that no more
|
384
|
+
# data will be sent to the channel (although the channel can still send
|
385
|
+
# data to the server). The channel is the sole argument to the callback.
|
386
|
+
#
|
387
|
+
# channel.on_eof do |ch|
|
388
|
+
# puts "remote end is done sending data"
|
389
|
+
# end
|
390
|
+
def on_eof(&block)
|
391
|
+
old, @on_eof = @on_eof, block
|
392
|
+
old
|
393
|
+
end
|
394
|
+
|
395
|
+
# Registers a callback to be invoked when the server was unable to open
|
396
|
+
# the requested channel. The channel itself will be passed to the block,
|
397
|
+
# along with the integer "reason code" for the failure, and a textual
|
398
|
+
# description of the failure from the server.
|
399
|
+
#
|
400
|
+
# channel = session.open_channel do |ch|
|
401
|
+
# # ..
|
402
|
+
# end
|
403
|
+
#
|
404
|
+
# channel.on_open_failed { |ch, code, desc| ... }
|
405
|
+
def on_open_failed(&block)
|
406
|
+
old, @on_open_failed = @on_open_failed, block
|
407
|
+
old
|
408
|
+
end
|
409
|
+
|
410
|
+
# Registers a callback to be invoked when a channel request of the given
|
411
|
+
# type is received. The callback will receive the channel as the first
|
412
|
+
# argument, and the associated (unparsed) data as the second. The data
|
413
|
+
# will be a Net::SSH::Buffer that you will need to parse, yourself,
|
414
|
+
# according to the kind of request you are watching.
|
415
|
+
#
|
416
|
+
# By default, if the request wants a reply, Net::SSH will send a
|
417
|
+
# CHANNEL_SUCCESS response for any request that was handled by a registered
|
418
|
+
# callback, and CHANNEL_FAILURE for any that wasn't, but if you want your
|
419
|
+
# registered callback to result in a CHANNEL_FAILURE response, just raise
|
420
|
+
# Net::SSH::ChannelRequestFailed.
|
421
|
+
#
|
422
|
+
# Some common channel requests that your programs might want to listen
|
423
|
+
# for are:
|
424
|
+
#
|
425
|
+
# * "exit-status" : the exit status of the remote process will be reported
|
426
|
+
# as a long integer in the data buffer, which you can grab via
|
427
|
+
# data.read_long.
|
428
|
+
# * "exit-signal" : if the remote process died as a result of a signal
|
429
|
+
# being sent to it, the signal will be reported as a string in the
|
430
|
+
# data, via data.read_string. (Not all SSH servers support this channel
|
431
|
+
# request type.)
|
432
|
+
#
|
433
|
+
# channel.on_request "exit-status" do |ch, data|
|
434
|
+
# puts "process terminated with exit status: #{data.read_long}"
|
435
|
+
# end
|
436
|
+
def on_request(type, &block)
|
437
|
+
old, @on_request[type] = @on_request[type], block
|
438
|
+
old
|
439
|
+
end
|
440
|
+
|
441
|
+
# Sends a new channel request with the given name. The extra +data+
|
442
|
+
# parameter must either be empty, or consist of an even number of
|
443
|
+
# arguments. See Net::SSH::Buffer.from for a description of their format.
|
444
|
+
# If a block is given, it is registered as a callback for a pending
|
445
|
+
# request, and the packet will be flagged so that the server knows a
|
446
|
+
# reply is required. If no block is given, the server will send no
|
447
|
+
# response to this request. Responses, where required, will cause the
|
448
|
+
# callback to be invoked with the channel as the first argument, and
|
449
|
+
# either true or false as the second, depending on whether the request
|
450
|
+
# succeeded or not. The meaning of "success" and "failure" in this context
|
451
|
+
# is dependent on the specific request that was sent.
|
452
|
+
#
|
453
|
+
# channel.send_channel_request "shell" do |ch, success|
|
454
|
+
# if success
|
455
|
+
# puts "user shell started successfully"
|
456
|
+
# else
|
457
|
+
# puts "could not start user shell"
|
458
|
+
# end
|
459
|
+
# end
|
460
|
+
#
|
461
|
+
# Most channel requests you'll want to send are already wrapped in more
|
462
|
+
# convenient helper methods (see #exec and #subsystem).
|
463
|
+
def send_channel_request(request_name, *data, &callback)
|
464
|
+
info { "sending channel request #{request_name.inspect}" }
|
465
|
+
msg = Buffer.from(:byte, CHANNEL_REQUEST,
|
466
|
+
:long, remote_id, :string, request_name,
|
467
|
+
:bool, !callback.nil?, *data)
|
468
|
+
connection.send_message(msg)
|
469
|
+
pending_requests << callback if callback
|
470
|
+
end
|
471
|
+
|
472
|
+
public # these methods are public, but for Net::SSH internal use only
|
473
|
+
|
474
|
+
# Enqueues pending output at the connection as CHANNEL_DATA packets. This
|
475
|
+
# does nothing if the channel has not yet been confirmed open (see
|
476
|
+
# #do_open_confirmation). This is called automatically by #process, which
|
477
|
+
# is called from the event loop (Connection::Session#process). You will
|
478
|
+
# generally not need to invoke it directly.
|
479
|
+
def enqueue_pending_output #:nodoc:
|
480
|
+
return unless remote_id
|
481
|
+
|
482
|
+
while output.length > 0
|
483
|
+
length = output.length
|
484
|
+
length = remote_window_size if length > remote_window_size
|
485
|
+
length = remote_maximum_packet_size if length > remote_maximum_packet_size
|
486
|
+
|
487
|
+
if length > 0
|
488
|
+
connection.send_message(Buffer.from(:byte, CHANNEL_DATA, :long, remote_id, :string, output.read(length)))
|
489
|
+
output.consume!
|
490
|
+
@remote_window_size -= length
|
491
|
+
else
|
492
|
+
break
|
493
|
+
end
|
494
|
+
end
|
495
|
+
end
|
496
|
+
|
497
|
+
# Invoked when the server confirms that a channel has been opened.
|
498
|
+
# The remote_id is the id of the channel as assigned by the remote host,
|
499
|
+
# and max_window and max_packet are the maximum window and maximum
|
500
|
+
# packet sizes, respectively. If an open-confirmation callback was
|
501
|
+
# given when the channel was created, it is invoked at this time with
|
502
|
+
# the channel itself as the sole argument.
|
503
|
+
def do_open_confirmation(remote_id, max_window, max_packet) #:nodoc:
|
504
|
+
@remote_id = remote_id
|
505
|
+
@remote_window_size = @remote_maximum_window_size = max_window
|
506
|
+
@remote_maximum_packet_size = max_packet
|
507
|
+
connection.forward.agent(self) if connection.options[:forward_agent] && type == "session"
|
508
|
+
@on_confirm_open.call(self) if @on_confirm_open
|
509
|
+
end
|
510
|
+
|
511
|
+
# Invoked when the server failed to open the channel. If an #on_open_failed
|
512
|
+
# callback was specified, it will be invoked with the channel, reason code,
|
513
|
+
# and description as arguments. Otherwise, a ChannelOpenFailed exception
|
514
|
+
# will be raised.
|
515
|
+
def do_open_failed(reason_code, description)
|
516
|
+
if @on_open_failed
|
517
|
+
@on_open_failed.call(self, reason_code, description)
|
518
|
+
else
|
519
|
+
raise ChannelOpenFailed.new(reason_code, description)
|
520
|
+
end
|
521
|
+
end
|
522
|
+
|
523
|
+
# Invoked when the server sends a CHANNEL_WINDOW_ADJUST packet, and
|
524
|
+
# causes the remote window size to be adjusted upwards by the given
|
525
|
+
# number of bytes. This has the effect of allowing more data to be sent
|
526
|
+
# from the local end to the remote end of the channel.
|
527
|
+
def do_window_adjust(bytes) #:nodoc:
|
528
|
+
@remote_maximum_window_size += bytes
|
529
|
+
@remote_window_size += bytes
|
530
|
+
end
|
531
|
+
|
532
|
+
# Invoked when the server sends a channel request. If any #on_request
|
533
|
+
# callback has been registered for the specific type of this request,
|
534
|
+
# it is invoked. If +want_reply+ is true, a packet will be sent of
|
535
|
+
# either CHANNEL_SUCCESS or CHANNEL_FAILURE type. If there was no callback
|
536
|
+
# to handle the request, CHANNEL_FAILURE will be sent. Otherwise,
|
537
|
+
# CHANNEL_SUCCESS, unless the callback raised ChannelRequestFailed. The
|
538
|
+
# callback should accept the channel as the first argument, and the
|
539
|
+
# request-specific data as the second.
|
540
|
+
def do_request(request, want_reply, data) #:nodoc:
|
541
|
+
result = true
|
542
|
+
|
543
|
+
begin
|
544
|
+
callback = @on_request[request] or raise ChannelRequestFailed
|
545
|
+
callback.call(self, data)
|
546
|
+
rescue ChannelRequestFailed
|
547
|
+
result = false
|
548
|
+
end
|
549
|
+
|
550
|
+
if want_reply
|
551
|
+
msg = Buffer.from(:byte, result ? CHANNEL_SUCCESS : CHANNEL_FAILURE, :long, remote_id)
|
552
|
+
connection.send_message(msg)
|
553
|
+
end
|
554
|
+
end
|
555
|
+
|
556
|
+
# Invokes the #on_data callback when the server sends data to the
|
557
|
+
# channel. This will reduce the available window size on the local end,
|
558
|
+
# but does not actually throttle requests that come in illegally when
|
559
|
+
# the window size is too small. The callback is invoked with the channel
|
560
|
+
# as the first argument, and the data as the second.
|
561
|
+
def do_data(data) #:nodoc:
|
562
|
+
update_local_window_size(data.length)
|
563
|
+
@on_data.call(self, data) if @on_data
|
564
|
+
end
|
565
|
+
|
566
|
+
# Invokes the #on_extended_data callback when the server sends
|
567
|
+
# extended data to the channel. This will reduce the available window
|
568
|
+
# size on the local end. The callback is invoked with the channel,
|
569
|
+
# type, and data.
|
570
|
+
def do_extended_data(type, data)
|
571
|
+
update_local_window_size(data.length)
|
572
|
+
@on_extended_data.call(self, type, data) if @on_extended_data
|
573
|
+
end
|
574
|
+
|
575
|
+
# Invokes the #on_eof callback when the server indicates that no
|
576
|
+
# further data is forthcoming. The callback is invoked with the channel
|
577
|
+
# as the argument.
|
578
|
+
def do_eof
|
579
|
+
@on_eof.call(self) if @on_eof
|
580
|
+
end
|
581
|
+
|
582
|
+
# Invokes the #on_close callback when the server closes a channel.
|
583
|
+
# The channel is the only argument.
|
584
|
+
def do_close
|
585
|
+
@on_close.call(self) if @on_close
|
586
|
+
end
|
587
|
+
|
588
|
+
# Invokes the next pending request callback with +false+ as the second
|
589
|
+
# argument.
|
590
|
+
def do_failure
|
591
|
+
if callback = pending_requests.shift
|
592
|
+
callback.call(self, false)
|
593
|
+
else
|
594
|
+
error { "channel failure recieved with no pending request to handle it (bug?)" }
|
595
|
+
end
|
596
|
+
end
|
597
|
+
|
598
|
+
# Invokes the next pending request callback with +true+ as the second
|
599
|
+
# argument.
|
600
|
+
def do_success
|
601
|
+
if callback = pending_requests.shift
|
602
|
+
callback.call(self, true)
|
603
|
+
else
|
604
|
+
error { "channel success recieved with no pending request to handle it (bug?)" }
|
605
|
+
end
|
606
|
+
end
|
607
|
+
|
608
|
+
private
|
609
|
+
|
610
|
+
# Updates the local window size by the given amount. If the window
|
611
|
+
# size drops to less than half of the local maximum (an arbitrary
|
612
|
+
# threshold), a CHANNEL_WINDOW_ADJUST message will be sent to the
|
613
|
+
# server telling it that the window size has grown.
|
614
|
+
def update_local_window_size(size)
|
615
|
+
@local_window_size -= size
|
616
|
+
if local_window_size < local_maximum_window_size/2
|
617
|
+
connection.send_message(Buffer.from(:byte, CHANNEL_WINDOW_ADJUST,
|
618
|
+
:long, remote_id, :long, 0x20000))
|
619
|
+
@local_window_size += 0x20000
|
620
|
+
@local_maximum_window_size += 0x20000
|
621
|
+
end
|
622
|
+
end
|
623
|
+
end
|
624
|
+
|
625
|
+
end; end; end
|