poolparty 1.3.15 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +2 -87
- data/Rakefile +85 -45
- data/VERSION.yml +2 -2
- data/bin/cloud +6 -10
- data/bin/cloud-bootstrap +2 -4
- data/bin/cloud-compile +1 -7
- data/bin/cloud-configure +1 -9
- data/bin/cloud-console +3 -6
- data/bin/cloud-contract +3 -7
- data/bin/cloud-list +4 -3
- data/bin/cloud-reboot +25 -0
- data/bin/cloud-show +13 -5
- data/bin/cloud-start +1 -26
- data/bin/cloud-terminate +3 -3
- data/examples/README.md +57 -0
- data/examples/chef_cloud/chef-repo/README +3 -0
- data/examples/chef_cloud/chef-repo/Rakefile +35 -0
- data/examples/chef_cloud/chef-repo/certificates/README +1 -0
- data/examples/chef_cloud/chef-repo/config/client.rb.example +22 -0
- data/examples/chef_cloud/chef-repo/config/rake.rb +60 -0
- data/examples/chef_cloud/chef-repo/config/server.rb.example +33 -0
- data/examples/chef_cloud/chef-repo/config/solo.rb.example +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/README +1 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/README.rdoc +68 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/attributes/apache.rb +74 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/apache_conf.rb +25 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/apache_module.rb +43 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/apache_site.rb +40 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/web_app.rb +49 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/metadata.json +508 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/metadata.rb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/default.rb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/god_monitor.rb +33 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_alias.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_dav.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_dav_svn.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_dir.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_env.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_expires.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_fcgid.rb +46 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_headers.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_mime.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_php5.rb +32 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_ajp.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_python.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_rails.rb +43 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_ssl.rb +42 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_status.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/apache2.conf.erb +230 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/charset.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/default-site.erb +57 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/README +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/deflate.conf.erb +3 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/mime.conf.erb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/ssl.conf.erb +72 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/status.conf.erb +16 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/security.erb +50 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/files/default/apt-cacher +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/files/default/apt-cacher.conf +144 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/metadata.json +51 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/metadata.rb +11 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/recipes/cacher.rb +42 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/recipes/default.rb +31 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/recipes/proxy.rb +34 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/README.rdoc +165 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/attributes/bootstrap.rb +49 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/metadata.json +57 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/metadata.rb +10 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/recipes/client.rb +94 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/recipes/default.rb +18 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/recipes/server.rb +120 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/client.rb.erb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/server.rb.erb +32 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-client-log-run.erb +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-client-run.erb +4 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-log-run.erb +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-run.erb +4 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-server-log-run.erb +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-server-run.erb +4 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/README.rdoc +221 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/attributes/chef.rb +60 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/metadata.json +231 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/metadata.rb +87 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/recipes/client.rb +76 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/recipes/server.rb +75 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/recipes/server_proxy.rb +59 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/templates/default/chef_server.conf.erb +49 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/templates/default/client.rb.erb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/templates/default/server.rb.erb +32 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/attributes/ec2_metadata.rb +44 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/attributes/ec2_recipe_options.rb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/metadata.rb +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/recipes/default.rb +19 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/README.rdoc +8 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/attributes/default.rb +14 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/metadata.rb +12 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/default.rb +141 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/gmetad.rb +44 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/monitor_sshd.rb +14 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/monitor_watson.rb +14 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/web.rb +17 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/gmetad.erb +38 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/gmond.erb +38 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/monitors/sshd_ganglia.sh.erb +13 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/monitors/watson_channels.sh.erb +13 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/ganglia-web-conf.php.erb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/gmetad.conf.erb +117 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/gmond.conf.erb +426 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/jaunty.sources.list.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/attributes/ntp.rb +11 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/metadata.json +97 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/metadata.rb +31 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/recipes/default.rb +41 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/templates/default/ntp.conf.erb +21 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/README.rdoc +55 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/attributes/rsyslog.rb +24 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/files/default/rsyslog.default +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/files/ubuntu-8.04/rsyslog.default +13 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/files/ubuntu-9.10/rsyslog.default +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/metadata.json +88 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/metadata.rb +29 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/recipes/client.rb +40 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/recipes/default.rb +61 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/recipes/server.rb +48 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/default/remote.conf.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/default/rsyslog.conf.erb +121 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/default/server.conf.erb +58 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/ubuntu-9.10/50-default.conf.erb +69 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/ubuntu-9.10/remote.conf.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/ubuntu-9.10/server.conf.erb +58 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/attributes/sv_bin.rb +27 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/definitions/runit_service.rb +75 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/metadata.json +85 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/metadata.rb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/recipes/default.rb +46 -0
- data/examples/chef_cloud/chef-repo/roles/README +1 -0
- data/examples/chef_cloud/chef-repo/roles/chef-upgrade.rb +14 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/README +1 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/README.rdoc +9 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/attributes/collectd.rb +3 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/files/ubuntu/collectd.default +17 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/metadata.rb +6 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/recipes/default.rb +62 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collectd.conf.erb +107 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collection.conf.erb +2 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collection3.conf.erb +4 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/attributes/hosts.rb +1 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/metadata.rb +4 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/recipes/default.rb +3 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/templates/default/hosts.erb +18 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/sysadmin/recipes/default.rb +22 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/metadata.json +42 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/metadata.rb +7 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/recipes/default.rb +31 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/templates/default/sources.list.erb +16 -0
- data/examples/chef_cloud/sample +2 -0
- data/examples/chef_cloud.rb +24 -0
- data/examples/ec2_infrastructure_only.rb +80 -0
- data/examples/simple.rb +22 -10
- data/lib/cloud_providers/cloud_provider.rb +43 -63
- data/lib/cloud_providers/connections.rb +29 -11
- data/lib/cloud_providers/default/base.rb +4 -0
- data/lib/cloud_providers/ec2/ec2.rb +258 -143
- data/lib/cloud_providers/ec2/ec2_instance.rb +87 -82
- data/lib/cloud_providers/ec2/helpers/authorize.rb +33 -0
- data/lib/cloud_providers/ec2/helpers/ec2_helper.rb +30 -0
- data/lib/cloud_providers/ec2/helpers/elastic_auto_scaler.rb +300 -0
- data/lib/cloud_providers/ec2/helpers/elastic_block_store.rb +9 -0
- data/lib/cloud_providers/ec2/helpers/elastic_ip.rb +33 -0
- data/lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb +200 -0
- data/lib/cloud_providers/ec2/helpers/revoke.rb +24 -0
- data/lib/cloud_providers/ec2/helpers/security_group.rb +98 -0
- data/lib/cloud_providers/remote_instance.rb +139 -0
- data/lib/cloud_providers.rb +4 -4
- data/lib/core/array.rb +0 -37
- data/lib/core/hash.rb +11 -37
- data/lib/core/object.rb +5 -86
- data/lib/core/string.rb +1 -103
- data/lib/keypair.rb +22 -11
- data/lib/poolparty/base.rb +15 -216
- data/lib/poolparty/chef_attribute.rb +36 -0
- data/lib/poolparty/cloud.rb +222 -260
- data/lib/poolparty/pool.rb +18 -171
- data/lib/poolparty.rb +6 -25
- data/test/fixtures/clouds/simple_cloud.rb +4 -6
- data/test/fixtures/ec2/ec2-describe-instances_response_body.xml +2 -2
- data/test/fixtures/ec2/elb-describe-load-balancers.xml +75 -0
- data/test/fixtures/resources/fake_plugin.rb +5 -0
- data/test/lib/core/array_test.rb +1 -34
- data/test/lib/core/hash_test.rb +12 -20
- data/test/lib/core/object_test.rb +6 -34
- data/test/lib/core/string_test.rb +2 -35
- data/test/lib/core/symbol_test.rb +0 -4
- data/test/lib/poolparty/cloud_test.rb +14 -133
- data/test/lib/poolparty/keypair_test.rb +1 -3
- data/test/lib/poolparty/pool_test.rb +5 -19
- data/test/test_methods.rb +6 -11
- data/vendor/gems/amazon-ec2/ChangeLog +289 -0
- data/vendor/gems/amazon-ec2/LICENSE +66 -0
- data/vendor/gems/amazon-ec2/README.rdoc +356 -0
- data/vendor/gems/amazon-ec2/README_dev.rdoc +12 -0
- data/vendor/gems/amazon-ec2/Rakefile +101 -0
- data/vendor/gems/amazon-ec2/VERSION +1 -0
- data/vendor/gems/amazon-ec2/amazon-ec2.gemspec +134 -0
- data/vendor/gems/amazon-ec2/bin/ec2-gem-example.rb +137 -0
- data/vendor/gems/amazon-ec2/bin/ec2-gem-profile.rb +10 -0
- data/vendor/gems/amazon-ec2/bin/ec2sh +62 -0
- data/vendor/gems/amazon-ec2/bin/setup.rb +28 -0
- data/vendor/gems/amazon-ec2/deps.rip +1 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Autoscaling/autoscaling.rb +283 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Autoscaling.rb +70 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Cloudwatch/monitoring.rb +80 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Cloudwatch.rb +32 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/availability_zones.rb +21 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/console.rb +23 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/elastic_ips.rb +81 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/image_attributes.rb +133 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/images.rb +101 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/instances.rb +212 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/keypairs.rb +61 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/products.rb +21 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/security_groups.rb +183 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/snapshots.rb +59 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/volumes.rb +115 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2.rb +33 -0
- data/vendor/gems/amazon-ec2/lib/AWS/ELB/load_balancers.rb +205 -0
- data/vendor/gems/amazon-ec2/lib/AWS/ELB.rb +71 -0
- data/vendor/gems/amazon-ec2/lib/AWS/exceptions.rb +122 -0
- data/vendor/gems/amazon-ec2/lib/AWS/responses.rb +21 -0
- data/vendor/gems/amazon-ec2/lib/AWS.rb +294 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof +0 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.dot +193 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.txt +126 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof.symbols +129 -0
- data/vendor/gems/amazon-ec2/test/test_Autoscaling_groups.rb +336 -0
- data/vendor/gems/amazon-ec2/test/test_EC2.rb +68 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_availability_zones.rb +49 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_console.rb +54 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_elastic_ips.rb +144 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_image_attributes.rb +238 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_images.rb +197 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_instances.rb +429 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_keypairs.rb +123 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_products.rb +48 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_responses.rb +53 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_s3_xmlsimple.rb +80 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_security_groups.rb +205 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_snapshots.rb +83 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_volumes.rb +142 -0
- data/vendor/gems/amazon-ec2/test/test_ELB_load_balancers.rb +239 -0
- data/vendor/gems/amazon-ec2/test/test_helper.rb +23 -0
- data/vendor/gems/amazon-ec2/wsdl/2007-08-29.ec2.wsdl +1269 -0
- data/vendor/gems/amazon-ec2/wsdl/2008-02-01.ec2.wsdl +1614 -0
- data/vendor/gems/amazon-ec2/wsdl/2008-05-05.ec2.wsdl +2052 -0
- data/vendor/gems/amazon-ec2/wsdl/2008-12-01.ec2.wsdl +2354 -0
- data/vendor/gems/searchable_paths/README.rdoc +18 -0
- data/vendor/gems/searchable_paths/Rakefile +56 -0
- data/vendor/gems/searchable_paths/lib/searchable_paths.rb +81 -0
- data/vendor/gems/searchable_paths/test/searchable_paths_test.rb +74 -0
- data/vendor/gems/searchable_paths/test/test_helper.rb +16 -0
- metadata +269 -886
- data/bin/cloud-misc +0 -34
- data/bin/cloud-osxcopy +0 -26
- data/bin/cloud-setup +0 -36
- data/bin/cloud-thrift +0 -91
- data/bin/cloud-verify +0 -40
- data/examples/basic.rb +0 -30
- data/examples/custom_bootstrap.sh +0 -7
- data/examples/deploy.rb +0 -5
- data/examples/eucalyptus.rb +0 -63
- data/examples/eucalyptus_test_run.sh +0 -31
- data/examples/monitored_cloud.rb +0 -22
- data/examples/ssh_garden.rb +0 -21
- data/examples/thrift/erlang/Emakefile +0 -5
- data/examples/thrift/erlang/Makefile +0 -26
- data/examples/thrift/erlang/deps/thrift/COPYING +0 -24
- data/examples/thrift/erlang/deps/thrift/LICENSE +0 -24
- data/examples/thrift/erlang/deps/thrift/Makefile +0 -18
- data/examples/thrift/erlang/deps/thrift/README +0 -31
- data/examples/thrift/erlang/deps/thrift/build/beamver +0 -59
- data/examples/thrift/erlang/deps/thrift/build/buildtargets.mk +0 -14
- data/examples/thrift/erlang/deps/thrift/build/colors.mk +0 -24
- data/examples/thrift/erlang/deps/thrift/build/docs.mk +0 -12
- data/examples/thrift/erlang/deps/thrift/build/mime.types +0 -98
- data/examples/thrift/erlang/deps/thrift/build/otp.mk +0 -146
- data/examples/thrift/erlang/deps/thrift/build/otp_subdir.mk +0 -85
- data/examples/thrift/erlang/deps/thrift/build/raw_test.mk +0 -29
- data/examples/thrift/erlang/deps/thrift/ebin/thrift.app +0 -44
- data/examples/thrift/erlang/deps/thrift/ebin/thrift.appup +0 -1
- data/examples/thrift/erlang/deps/thrift/include/thrift_constants.hrl +0 -40
- data/examples/thrift/erlang/deps/thrift/include/thrift_protocol.hrl +0 -12
- data/examples/thrift/erlang/deps/thrift/src/Makefile +0 -116
- data/examples/thrift/erlang/deps/thrift/src/test_handler.erl +0 -7
- data/examples/thrift/erlang/deps/thrift/src/test_service.erl +0 -10
- data/examples/thrift/erlang/deps/thrift/src/thrift.app.src +0 -44
- data/examples/thrift/erlang/deps/thrift/src/thrift.appup.src +0 -1
- data/examples/thrift/erlang/deps/thrift/src/thrift_app.erl +0 -55
- data/examples/thrift/erlang/deps/thrift/src/thrift_base64_transport.erl +0 -45
- data/examples/thrift/erlang/deps/thrift/src/thrift_binary_protocol.erl +0 -318
- data/examples/thrift/erlang/deps/thrift/src/thrift_buffered_transport.erl +0 -168
- data/examples/thrift/erlang/deps/thrift/src/thrift_client.erl +0 -328
- data/examples/thrift/erlang/deps/thrift/src/thrift_disk_log_transport.erl +0 -106
- data/examples/thrift/erlang/deps/thrift/src/thrift_file_transport.erl +0 -69
- data/examples/thrift/erlang/deps/thrift/src/thrift_framed_transport.erl +0 -196
- data/examples/thrift/erlang/deps/thrift/src/thrift_http_transport.erl +0 -169
- data/examples/thrift/erlang/deps/thrift/src/thrift_processor.erl +0 -174
- data/examples/thrift/erlang/deps/thrift/src/thrift_protocol.erl +0 -326
- data/examples/thrift/erlang/deps/thrift/src/thrift_server.erl +0 -171
- data/examples/thrift/erlang/deps/thrift/src/thrift_service.erl +0 -6
- data/examples/thrift/erlang/deps/thrift/src/thrift_socket_server.erl +0 -245
- data/examples/thrift/erlang/deps/thrift/src/thrift_socket_transport.erl +0 -100
- data/examples/thrift/erlang/deps/thrift/src/thrift_sup.erl +0 -53
- data/examples/thrift/erlang/deps/thrift/src/thrift_transport.erl +0 -38
- data/examples/thrift/erlang/deps/thrift/vsn.mk +0 -1
- data/examples/thrift/erlang/include/commandInterface_thrift.hrl +0 -5
- data/examples/thrift/erlang/include/poolparty_constants.hrl +0 -9
- data/examples/thrift/erlang/include/poolparty_types.hrl +0 -8
- data/examples/thrift/erlang/src/commandInterface_thrift.erl +0 -29
- data/examples/thrift/erlang/src/poolparty_types.erl +0 -30
- data/examples/thrift/erlang/src/thrift_example.erl +0 -32
- data/examples/thrift/thrift_example.py +0 -28
- data/examples/thrift/thrift_example.rb +0 -40
- data/examples/vmware.rb +0 -28
- data/lib/cloud_providers/cloud_provider_instance.rb +0 -288
- data/lib/cloud_providers/ec2/ec2_helpers.rb +0 -100
- data/lib/cloud_providers/ec2/ec2_response.rb +0 -79
- data/lib/cloud_providers/ssh/ssh.rb +0 -68
- data/lib/cloud_providers/ssh/ssh_instance.rb +0 -41
- data/lib/cloud_providers/vmware/vmware.rb +0 -130
- data/lib/cloud_providers/vmware/vmware_instance.rb +0 -56
- data/lib/core/file.rb +0 -12
- data/lib/core/integer.rb +0 -11
- data/lib/core/module.rb +0 -14
- data/lib/core/proc.rb +0 -55
- data/lib/core/time.rb +0 -62
- data/lib/dependency_resolver.rb +0 -11
- data/lib/dependency_resolvers/base.rb +0 -115
- data/lib/dependency_resolvers/chef/resources/chef_attributes_file.rb +0 -51
- data/lib/dependency_resolvers/chef/resources/chef_recipe.rb +0 -51
- data/lib/dependency_resolvers/chef/resources/http_request.rb +0 -39
- data/lib/dependency_resolvers/chef/resources/remote_directory.rb +0 -54
- data/lib/dependency_resolvers/chef/resources/remote_file.rb +0 -69
- data/lib/dependency_resolvers/chef/resources/route.rb +0 -52
- data/lib/dependency_resolvers/chef/resources/script.rb +0 -62
- data/lib/dependency_resolvers/chef.rb +0 -239
- data/lib/dependency_resolvers/proxy_object.rb +0 -98
- data/lib/mixins/askable.rb +0 -163
- data/lib/mixins/callbacks.rb +0 -56
- data/lib/mixins/delayed.rb +0 -65
- data/lib/mixins/pinger.rb +0 -31
- data/lib/mixins/printing.rb +0 -35
- data/lib/mixins/searchable_paths.rb +0 -87
- data/lib/poolparty/default.rb +0 -33
- data/lib/poolparty/dsl_base.rb +0 -36
- data/lib/poolparty/installer.rb +0 -111
- data/lib/poolparty/installers/ec2.rb +0 -88
- data/lib/poolparty/installers/vmware.rb +0 -161
- data/lib/poolparty/monitor.rb +0 -83
- data/lib/poolparty/plugin.rb +0 -8
- data/lib/poolparty/plugins/apache.rb +0 -228
- data/lib/poolparty/plugins/apache2/apache2.conf.erb +0 -630
- data/lib/poolparty/plugins/apache2/base.conf.erb +0 -171
- data/lib/poolparty/plugins/apache2/browser_fixes.conf.erb +0 -26
- data/lib/poolparty/plugins/apache2/default-site.conf.erb +0 -41
- data/lib/poolparty/plugins/apache2/mime-minimal.conf.erb +0 -15
- data/lib/poolparty/plugins/apache2/passenger_site.rb +0 -83
- data/lib/poolparty/plugins/apache2/php5.rb +0 -41
- data/lib/poolparty/plugins/apache2/virtual_host.rb +0 -59
- data/lib/poolparty/plugins/collectd/templates/collectd.conf.erb +0 -369
- data/lib/poolparty/plugins/collectd.rb +0 -24
- data/lib/poolparty/plugins/git/git_repository.rb +0 -83
- data/lib/poolparty/plugins/git.rb +0 -20
- data/lib/poolparty/plugins/hermes.rb +0 -102
- data/lib/poolparty/plugins/rails/app.rb +0 -29
- data/lib/poolparty/plugins/rails.rb +0 -25
- data/lib/poolparty/pool_party_log.rb +0 -47
- data/lib/poolparty/resource.rb +0 -296
- data/lib/poolparty/resources/conditional.rb +0 -65
- data/lib/poolparty/resources/cron.rb +0 -64
- data/lib/poolparty/resources/directory.rb +0 -54
- data/lib/poolparty/resources/exec.rb +0 -61
- data/lib/poolparty/resources/file.rb +0 -87
- data/lib/poolparty/resources/gem_package.rb +0 -55
- data/lib/poolparty/resources/group.rb +0 -46
- data/lib/poolparty/resources/line.rb +0 -67
- data/lib/poolparty/resources/link.rb +0 -50
- data/lib/poolparty/resources/mount.rb +0 -57
- data/lib/poolparty/resources/package.rb +0 -55
- data/lib/poolparty/resources/service.rb +0 -58
- data/lib/poolparty/resources/user.rb +0 -63
- data/lib/poolparty/resources/variable.rb +0 -61
- data/lib/proto/command_interface_handler.rb +0 -66
- data/lib/proto/command_query_handler.rb +0 -19
- data/lib/proto/gen-erl/commandInterface_thrift.erl +0 -29
- data/lib/proto/gen-erl/commandInterface_thrift.hrl +0 -5
- data/lib/proto/gen-erl/poolparty_constants.hrl +0 -9
- data/lib/proto/gen-erl/poolparty_types.erl +0 -30
- data/lib/proto/gen-erl/poolparty_types.hrl +0 -8
- data/lib/proto/gen-py/cloudthrift/CommandInterface-remote +0 -79
- data/lib/proto/gen-py/cloudthrift/CommandInterface.py +0 -251
- data/lib/proto/gen-py/cloudthrift/CommandInterface.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/__init__.py +0 -1
- data/lib/proto/gen-py/cloudthrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/constants.py +0 -9
- data/lib/proto/gen-py/cloudthrift/constants.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/ttypes.py +0 -160
- data/lib/proto/gen-py/cloudthrift/ttypes.pyc +0 -0
- data/lib/proto/gen-py/thrift/TSCons.py +0 -33
- data/lib/proto/gen-py/thrift/Thrift.py +0 -123
- data/lib/proto/gen-py/thrift/Thrift.pyc +0 -0
- data/lib/proto/gen-py/thrift/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TBinaryProtocol.py +0 -259
- data/lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TProtocol.py +0 -205
- data/lib/proto/gen-py/thrift/protocol/TProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/protocol/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/fastbinary.c +0 -1203
- data/lib/proto/gen-py/thrift/server/THttpServer.py +0 -63
- data/lib/proto/gen-py/thrift/server/TNonblockingServer.py +0 -309
- data/lib/proto/gen-py/thrift/server/TServer.py +0 -270
- data/lib/proto/gen-py/thrift/server/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/transport/THttpClient.py +0 -100
- data/lib/proto/gen-py/thrift/transport/TSocket.py +0 -149
- data/lib/proto/gen-py/thrift/transport/TSocket.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TTransport.py +0 -326
- data/lib/proto/gen-py/thrift/transport/TTransport.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TTwisted.py +0 -181
- data/lib/proto/gen-py/thrift/transport/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/transport/__init__.pyc +0 -0
- data/lib/proto/gen-rb/command_interface.rb +0 -84
- data/lib/proto/gen-rb/poolparty_constants.rb +0 -10
- data/lib/proto/gen-rb/poolparty_types.rb +0 -45
- data/lib/proto/poolparty.thrift +0 -18
- data/lib/provision/bootstrap_scripts/build_centos.sh +0 -72
- data/lib/provision/bootstrap_scripts/build_ubuntu.sh +0 -76
- data/lib/provision/bootstrap_scripts/determine_os.sh +0 -21
- data/lib/provision/bootstrapper.rb +0 -44
- data/lib/provision/configure_scripts/configure_centos.erb +0 -7
- data/lib/provision/configure_scripts/configure_ubuntu.erb +0 -7
- data/tasks/development.rake +0 -91
- data/tasks/poolparty.rake +0 -118
- data/tasks/test.rake +0 -40
- data/test/fixtures/clouds/fake_clouds.rb +0 -9
- data/test/lib/cloud_providers/cloud_provider_instance_test.rb +0 -68
- data/test/lib/cloud_providers/cloud_provider_test.rb +0 -25
- data/test/lib/cloud_providers/connections_test.rb +0 -71
- data/test/lib/cloud_providers/ec2/ec2_helpers_test.rb +0 -29
- data/test/lib/cloud_providers/ec2/ec2_instance_test.rb +0 -68
- data/test/lib/cloud_providers/ec2/ec2_response_test.rb +0 -41
- data/test/lib/cloud_providers/ec2/ec2_test.rb +0 -120
- data/test/lib/cloud_providers/ssh/ssh_test.rb +0 -61
- data/test/lib/cloud_providers/vmware/vmware_test.rb +0 -46
- data/test/lib/core/integer_test.rb +0 -19
- data/test/lib/core/module_test.rb +0 -38
- data/test/lib/core/proc_test.rb +0 -26
- data/test/lib/core/time_test.rb +0 -51
- data/test/lib/dependency_resolvers/base_test.rb +0 -42
- data/test/lib/dependency_resolvers/chef/resources/chef_recipe_test.rb +0 -21
- data/test/lib/dependency_resolvers/chef/resources/http_request_test.rb +0 -29
- data/test/lib/dependency_resolvers/chef/resources/remote_directory_test.rb +0 -45
- data/test/lib/dependency_resolvers/chef/resources/remote_file_test.rb +0 -36
- data/test/lib/dependency_resolvers/chef/resources/route_test.rb +0 -37
- data/test/lib/dependency_resolvers/chef/resources/script_test.rb +0 -49
- data/test/lib/dependency_resolvers/chef_test.rb +0 -136
- data/test/lib/dependency_resolvers/proxy_object_test.rb +0 -75
- data/test/lib/mixins/callbacks_test.rb +0 -48
- data/test/lib/mixins/delayed_test.rb +0 -50
- data/test/lib/mixins/searchable_paths_test.rb +0 -83
- data/test/lib/poolparty/base_test.rb +0 -47
- data/test/lib/poolparty/default_test.rb +0 -17
- data/test/lib/poolparty/dsl_base_test.rb +0 -30
- data/test/lib/poolparty/installers/vmware_installer_test.rb +0 -16
- data/test/lib/poolparty/monitor_test.rb +0 -57
- data/test/lib/poolparty/plugins/apache2/php5_test.rb +0 -26
- data/test/lib/poolparty/plugins/apache2/virtual_host_test.rb +0 -28
- data/test/lib/poolparty/plugins/apache_test.rb +0 -35
- data/test/lib/poolparty/pool_party_log_test.rb +0 -17
- data/test/lib/poolparty/resource_test.rb +0 -162
- data/test/lib/poolparty/resources/conditional_test.rb +0 -50
- data/test/lib/poolparty/resources/cron_test.rb +0 -31
- data/test/lib/poolparty/resources/directory_test.rb +0 -21
- data/test/lib/poolparty/resources/exec_test.rb +0 -62
- data/test/lib/poolparty/resources/file_test.rb +0 -38
- data/test/lib/poolparty/resources/group_test.rb +0 -21
- data/test/lib/poolparty/resources/line_test.rb +0 -20
- data/test/lib/poolparty/resources/link_test.rb +0 -27
- data/test/lib/poolparty/resources/mount_test.rb +0 -32
- data/test/lib/poolparty/resources/package_test.rb +0 -28
- data/test/lib/poolparty/resources/service_test.rb +0 -31
- data/test/lib/poolparty/resources/user_test.rb +0 -33
- data/test/lib/poolparty/resources/variable_test.rb +0 -43
- data/test/lib/proto/command_query_handler_test.rb +0 -11
- data/test/lib/provision/base_test.rb +0 -16
- data/test/lib/provision/bootstrapper_test.rb +0 -19
- data/vendor/chef/apache2/README.rdoc +0 -59
- data/vendor/chef/apache2/attributes/apache.rb +0 -72
- data/vendor/chef/apache2/definitions/apache_module.rb +0 -36
- data/vendor/chef/apache2/definitions/apache_site.rb +0 -36
- data/vendor/chef/apache2/definitions/web_app.rb +0 -45
- data/vendor/chef/apache2/files/default/apache2_module_conf_generate.pl +0 -41
- data/vendor/chef/apache2/recipes/default.rb +0 -132
- data/vendor/chef/apache2/recipes/mod_alias.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_auth_basic.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_auth_digest.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authn_file.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authnz_ldap.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_default.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_groupfile.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_host.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_user.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_autoindex.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_cgi.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_dav.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_dav_svn.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_deflate.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_dir.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_env.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_expires.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_fcgid.rb +0 -35
- data/vendor/chef/apache2/recipes/mod_headers.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_ldap.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_log_config.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_mime.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_negotiation.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_php5.rb +0 -27
- data/vendor/chef/apache2/recipes/mod_proxy.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_proxy_http.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_python.rb +0 -22
- data/vendor/chef/apache2/recipes/mod_rewrite.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_setenvif.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_ssl.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_status.rb +0 -20
- data/vendor/chef/apache2/templates/default/a2enmod.erb +0 -37
- data/vendor/chef/apache2/templates/default/apache2.conf.erb +0 -630
- data/vendor/chef/apache2/templates/default/default-site.erb +0 -45
- data/vendor/chef/chef-deploy/LICENSE +0 -201
- data/vendor/chef/chef-deploy/README.rdoc +0 -24
- data/vendor/chef/chef-deploy/Rakefile +0 -57
- data/vendor/chef/chef-deploy/TODO +0 -4
- data/vendor/chef/chef-deploy/lib/chef-deploy/cached_deploy.rb +0 -230
- data/vendor/chef/chef-deploy/lib/chef-deploy/git.rb +0 -132
- data/vendor/chef/chef-deploy/lib/chef-deploy/subversion.rb +0 -98
- data/vendor/chef/chef-deploy/lib/chef-deploy.rb +0 -183
- data/vendor/gems/colors/README.rdoc +0 -52
- data/vendor/gems/colors/Rakefile +0 -56
- data/vendor/gems/colors/VERSION.yml +0 -4
- data/vendor/gems/colors/colors.gemspec +0 -29
- data/vendor/gems/colors/lib/colors.rb +0 -45
- data/vendor/gems/colors/test/colors_test.rb +0 -26
- data/vendor/gems/colors/test/test_helper.rb +0 -10
- data/vendor/gems/context/History.txt +0 -10
- data/vendor/gems/context/License.txt +0 -20
- data/vendor/gems/context/Manifest.txt +0 -26
- data/vendor/gems/context/README.rdoc +0 -158
- data/vendor/gems/context/Rakefile +0 -4
- data/vendor/gems/context/config/hoe.rb +0 -73
- data/vendor/gems/context/config/requirements.rb +0 -15
- data/vendor/gems/context/context.gemspec +0 -44
- data/vendor/gems/context/countloc.rb +0 -65
- data/vendor/gems/context/coverage/-Library-Ruby-Gems-1_8-gems-rcov-0_8_1_2_0-lib-rcov_rb.html +0 -1598
- data/vendor/gems/context/coverage/index.html +0 -441
- data/vendor/gems/context/coverage/lib-context-context_rb.html +0 -669
- data/vendor/gems/context/coverage/lib-context-core_ext-string_rb.html +0 -627
- data/vendor/gems/context/coverage/lib-context-lifecycle_rb.html +0 -683
- data/vendor/gems/context/coverage/lib-context-shared_behavior_rb.html +0 -708
- data/vendor/gems/context/coverage/lib-context-suite_rb.html +0 -649
- data/vendor/gems/context/coverage/lib-context-test_rb.html +0 -637
- data/vendor/gems/context/coverage/lib-context-version_rb.html +0 -619
- data/vendor/gems/context/coverage/lib-context_rb.html +0 -623
- data/vendor/gems/context/lib/context/context.rb +0 -64
- data/vendor/gems/context/lib/context/core_ext/rails_hacks.rb +0 -10
- data/vendor/gems/context/lib/context/core_ext/string.rb +0 -17
- data/vendor/gems/context/lib/context/lifecycle.rb +0 -103
- data/vendor/gems/context/lib/context/shared_behavior.rb +0 -98
- data/vendor/gems/context/lib/context/suite.rb +0 -39
- data/vendor/gems/context/lib/context/test.rb +0 -37
- data/vendor/gems/context/lib/context/version.rb +0 -9
- data/vendor/gems/context/lib/context.rb +0 -19
- data/vendor/gems/context/setup.rb +0 -1585
- data/vendor/gems/context/tasks/deployment.rake +0 -34
- data/vendor/gems/context/tasks/environment.rake +0 -7
- data/vendor/gems/context/test/test_context.rb +0 -57
- data/vendor/gems/context/test/test_core_ext.rb +0 -21
- data/vendor/gems/context/test/test_helper.rb +0 -2
- data/vendor/gems/context/test/test_lifecycle.rb +0 -224
- data/vendor/gems/context/test/test_nested_lifecycle.rb +0 -44
- data/vendor/gems/context/test/test_shared.rb +0 -116
- data/vendor/gems/context/test/test_test.rb +0 -23
- data/vendor/gems/daemons/LICENSE +0 -29
- data/vendor/gems/daemons/README +0 -223
- data/vendor/gems/daemons/Rakefile +0 -84
- data/vendor/gems/daemons/Releases +0 -126
- data/vendor/gems/daemons/TODO +0 -6
- data/vendor/gems/daemons/examples/call/call.rb +0 -56
- data/vendor/gems/daemons/examples/call/call_monitor.rb +0 -55
- data/vendor/gems/daemons/examples/daemonize/daemonize.rb +0 -20
- data/vendor/gems/daemons/examples/run/ctrl_crash.rb +0 -17
- data/vendor/gems/daemons/examples/run/ctrl_exec.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_exit.rb +0 -15
- data/vendor/gems/daemons/examples/run/ctrl_keep_pid_files.rb +0 -17
- data/vendor/gems/daemons/examples/run/ctrl_monitor.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_multiple.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_normal.rb +0 -12
- data/vendor/gems/daemons/examples/run/ctrl_ontop.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_optionparser.rb +0 -43
- data/vendor/gems/daemons/examples/run/ctrl_proc.rb +0 -25
- data/vendor/gems/daemons/examples/run/ctrl_proc.rb.output +0 -101
- data/vendor/gems/daemons/examples/run/ctrl_proc_multiple.rb +0 -22
- data/vendor/gems/daemons/examples/run/ctrl_proc_multiple.rb.output +0 -2
- data/vendor/gems/daemons/examples/run/ctrl_proc_simple.rb +0 -17
- data/vendor/gems/daemons/examples/run/myserver.rb +0 -12
- data/vendor/gems/daemons/examples/run/myserver_crashing.rb +0 -14
- data/vendor/gems/daemons/examples/run/myserver_crashing.rb.output +0 -30
- data/vendor/gems/daemons/examples/run/myserver_exiting.rb +0 -8
- data/vendor/gems/daemons/lib/daemons/application.rb +0 -372
- data/vendor/gems/daemons/lib/daemons/application_group.rb +0 -152
- data/vendor/gems/daemons/lib/daemons/cmdline.rb +0 -117
- data/vendor/gems/daemons/lib/daemons/controller.rb +0 -134
- data/vendor/gems/daemons/lib/daemons/daemonize.rb +0 -263
- data/vendor/gems/daemons/lib/daemons/exceptions.rb +0 -28
- data/vendor/gems/daemons/lib/daemons/monitor.rb +0 -127
- data/vendor/gems/daemons/lib/daemons/pid.rb +0 -101
- data/vendor/gems/daemons/lib/daemons/pidfile.rb +0 -111
- data/vendor/gems/daemons/lib/daemons/pidmem.rb +0 -10
- data/vendor/gems/daemons/lib/daemons.rb +0 -283
- data/vendor/gems/daemons/setup.rb +0 -1360
- data/vendor/gems/fakeweb/CHANGELOG +0 -163
- data/vendor/gems/fakeweb/LICENSE.txt +0 -281
- data/vendor/gems/fakeweb/README.rdoc +0 -193
- data/vendor/gems/fakeweb/Rakefile +0 -76
- data/vendor/gems/fakeweb/fakeweb.gemspec +0 -21
- data/vendor/gems/fakeweb/lib/fake_web/ext/net_http.rb +0 -71
- data/vendor/gems/fakeweb/lib/fake_web/registry.rb +0 -103
- data/vendor/gems/fakeweb/lib/fake_web/responder.rb +0 -113
- data/vendor/gems/fakeweb/lib/fake_web/response.rb +0 -10
- data/vendor/gems/fakeweb/lib/fake_web/stub_socket.rb +0 -15
- data/vendor/gems/fakeweb/lib/fake_web/utility.rb +0 -22
- data/vendor/gems/fakeweb/lib/fake_web.rb +0 -172
- data/vendor/gems/fakeweb/lib/fakeweb.rb +0 -2
- data/vendor/gems/fakeweb/test/fixtures/google_response_from_curl +0 -12
- data/vendor/gems/fakeweb/test/fixtures/google_response_with_transfer_encoding +0 -17
- data/vendor/gems/fakeweb/test/fixtures/google_response_without_transfer_encoding +0 -11
- data/vendor/gems/fakeweb/test/fixtures/test_example.txt +0 -1
- data/vendor/gems/fakeweb/test/fixtures/test_txt_file +0 -3
- data/vendor/gems/fakeweb/test/test_allow_net_connect.rb +0 -85
- data/vendor/gems/fakeweb/test/test_deprecations.rb +0 -54
- data/vendor/gems/fakeweb/test/test_fake_authentication.rb +0 -92
- data/vendor/gems/fakeweb/test/test_fake_web.rb +0 -518
- data/vendor/gems/fakeweb/test/test_fake_web_open_uri.rb +0 -58
- data/vendor/gems/fakeweb/test/test_helper.rb +0 -74
- data/vendor/gems/fakeweb/test/test_missing_open_uri.rb +0 -25
- data/vendor/gems/fakeweb/test/test_precedence.rb +0 -51
- data/vendor/gems/fakeweb/test/test_query_string.rb +0 -45
- data/vendor/gems/fakeweb/test/test_regexes.rb +0 -103
- data/vendor/gems/fakeweb/test/test_response_headers.rb +0 -73
- data/vendor/gems/fakeweb/test/test_trailing_slashes.rb +0 -53
- data/vendor/gems/fakeweb/test/test_utility.rb +0 -70
- data/vendor/gems/gratr/Grater.xcf +0 -0
- data/vendor/gems/gratr/README +0 -335
- data/vendor/gems/gratr/Rakefile +0 -220
- data/vendor/gems/gratr/examples/graph_self.rb +0 -54
- data/vendor/gems/gratr/examples/module_graph.jpg +0 -0
- data/vendor/gems/gratr/examples/module_graph.rb +0 -12
- data/vendor/gems/gratr/examples/self_graph.dot +0 -117
- data/vendor/gems/gratr/examples/self_graph.jpg +0 -0
- data/vendor/gems/gratr/examples/visualize.dot +0 -58
- data/vendor/gems/gratr/examples/visualize.jpg +0 -0
- data/vendor/gems/gratr/examples/visualize.rb +0 -11
- data/vendor/gems/gratr/install.rb +0 -49
- data/vendor/gems/gratr/lib/gratr/adjacency_graph.rb +0 -230
- data/vendor/gems/gratr/lib/gratr/base.rb +0 -34
- data/vendor/gems/gratr/lib/gratr/biconnected.rb +0 -116
- data/vendor/gems/gratr/lib/gratr/chinese_postman.rb +0 -123
- data/vendor/gems/gratr/lib/gratr/common.rb +0 -73
- data/vendor/gems/gratr/lib/gratr/comparability.rb +0 -92
- data/vendor/gems/gratr/lib/gratr/digraph.rb +0 -115
- data/vendor/gems/gratr/lib/gratr/digraph_distance.rb +0 -185
- data/vendor/gems/gratr/lib/gratr/dot.rb +0 -95
- data/vendor/gems/gratr/lib/gratr/edge.rb +0 -145
- data/vendor/gems/gratr/lib/gratr/graph.rb +0 -315
- data/vendor/gems/gratr/lib/gratr/graph_api.rb +0 -82
- data/vendor/gems/gratr/lib/gratr/import.rb +0 -44
- data/vendor/gems/gratr/lib/gratr/labels.rb +0 -103
- data/vendor/gems/gratr/lib/gratr/maximum_flow.rb +0 -107
- data/vendor/gems/gratr/lib/gratr/rdot.rb +0 -332
- data/vendor/gems/gratr/lib/gratr/search.rb +0 -422
- data/vendor/gems/gratr/lib/gratr/strong_components.rb +0 -127
- data/vendor/gems/gratr/lib/gratr/undirected_graph.rb +0 -153
- data/vendor/gems/gratr/lib/gratr.rb +0 -42
- data/vendor/gems/gratr/lib/priority-queue/benchmark/dijkstra.rb +0 -171
- data/vendor/gems/gratr/lib/priority-queue/compare_comments.rb +0 -49
- data/vendor/gems/gratr/lib/priority-queue/ext/priority_queue/CPriorityQueue/extconf.rb +0 -2
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/c_priority_queue.rb +0 -1
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/poor_priority_queue.rb +0 -46
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/ruby_priority_queue.rb +0 -525
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue.rb +0 -14
- data/vendor/gems/gratr/lib/priority-queue/setup.rb +0 -1551
- data/vendor/gems/gratr/lib/priority-queue/test/priority_queue_test.rb +0 -371
- data/vendor/gems/gratr/tests/TestBiconnected.rb +0 -53
- data/vendor/gems/gratr/tests/TestChinesePostman.rb +0 -53
- data/vendor/gems/gratr/tests/TestComplement.rb +0 -54
- data/vendor/gems/gratr/tests/TestDigraph.rb +0 -333
- data/vendor/gems/gratr/tests/TestDigraphDistance.rb +0 -138
- data/vendor/gems/gratr/tests/TestDot.rb +0 -75
- data/vendor/gems/gratr/tests/TestEdge.rb +0 -171
- data/vendor/gems/gratr/tests/TestInspection.rb +0 -57
- data/vendor/gems/gratr/tests/TestMultiEdge.rb +0 -57
- data/vendor/gems/gratr/tests/TestNeighborhood.rb +0 -64
- data/vendor/gems/gratr/tests/TestProperties.rb +0 -160
- data/vendor/gems/gratr/tests/TestSearch.rb +0 -277
- data/vendor/gems/gratr/tests/TestStrongComponents.rb +0 -85
- data/vendor/gems/gratr/tests/TestTriagulated.rb +0 -137
- data/vendor/gems/gratr/tests/TestUndirectedGraph.rb +0 -219
- data/vendor/gems/net-ssh/CHANGELOG.rdoc +0 -127
- data/vendor/gems/net-ssh/Manifest +0 -104
- data/vendor/gems/net-ssh/README.rdoc +0 -110
- data/vendor/gems/net-ssh/Rakefile +0 -26
- data/vendor/gems/net-ssh/THANKS.rdoc +0 -16
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/agent.rb +0 -176
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/constants.rb +0 -18
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/key_manager.rb +0 -193
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/abstract.rb +0 -60
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/hostbased.rb +0 -71
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/keyboard_interactive.rb +0 -66
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/password.rb +0 -39
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/publickey.rb +0 -92
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/pageant.rb +0 -183
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/session.rb +0 -134
- data/vendor/gems/net-ssh/lib/net/ssh/buffer.rb +0 -340
- data/vendor/gems/net-ssh/lib/net/ssh/buffered_io.rb +0 -149
- data/vendor/gems/net-ssh/lib/net/ssh/config.rb +0 -181
- data/vendor/gems/net-ssh/lib/net/ssh/connection/channel.rb +0 -625
- data/vendor/gems/net-ssh/lib/net/ssh/connection/constants.rb +0 -33
- data/vendor/gems/net-ssh/lib/net/ssh/connection/session.rb +0 -596
- data/vendor/gems/net-ssh/lib/net/ssh/connection/term.rb +0 -178
- data/vendor/gems/net-ssh/lib/net/ssh/errors.rb +0 -85
- data/vendor/gems/net-ssh/lib/net/ssh/key_factory.rb +0 -102
- data/vendor/gems/net-ssh/lib/net/ssh/known_hosts.rb +0 -129
- data/vendor/gems/net-ssh/lib/net/ssh/loggable.rb +0 -61
- data/vendor/gems/net-ssh/lib/net/ssh/packet.rb +0 -102
- data/vendor/gems/net-ssh/lib/net/ssh/prompt.rb +0 -93
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/errors.rb +0 -14
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/http.rb +0 -94
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/socks4.rb +0 -70
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/socks5.rb +0 -129
- data/vendor/gems/net-ssh/lib/net/ssh/ruby_compat.rb +0 -7
- data/vendor/gems/net-ssh/lib/net/ssh/service/forward.rb +0 -267
- data/vendor/gems/net-ssh/lib/net/ssh/test/channel.rb +0 -129
- data/vendor/gems/net-ssh/lib/net/ssh/test/extensions.rb +0 -152
- data/vendor/gems/net-ssh/lib/net/ssh/test/kex.rb +0 -44
- data/vendor/gems/net-ssh/lib/net/ssh/test/local_packet.rb +0 -51
- data/vendor/gems/net-ssh/lib/net/ssh/test/packet.rb +0 -81
- data/vendor/gems/net-ssh/lib/net/ssh/test/remote_packet.rb +0 -38
- data/vendor/gems/net-ssh/lib/net/ssh/test/script.rb +0 -157
- data/vendor/gems/net-ssh/lib/net/ssh/test/socket.rb +0 -59
- data/vendor/gems/net-ssh/lib/net/ssh/test.rb +0 -89
- data/vendor/gems/net-ssh/lib/net/ssh/transport/algorithms.rb +0 -384
- data/vendor/gems/net-ssh/lib/net/ssh/transport/cipher_factory.rb +0 -80
- data/vendor/gems/net-ssh/lib/net/ssh/transport/constants.rb +0 -30
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/abstract.rb +0 -78
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/md5.rb +0 -12
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/md5_96.rb +0 -11
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/none.rb +0 -15
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/sha1.rb +0 -13
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/sha1_96.rb +0 -11
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac.rb +0 -31
- data/vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb +0 -55
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +0 -208
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -77
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex.rb +0 -13
- data/vendor/gems/net-ssh/lib/net/ssh/transport/openssl.rb +0 -128
- data/vendor/gems/net-ssh/lib/net/ssh/transport/packet_stream.rb +0 -230
- data/vendor/gems/net-ssh/lib/net/ssh/transport/server_version.rb +0 -60
- data/vendor/gems/net-ssh/lib/net/ssh/transport/session.rb +0 -276
- data/vendor/gems/net-ssh/lib/net/ssh/transport/state.rb +0 -201
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/lenient.rb +0 -30
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/null.rb +0 -12
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/strict.rb +0 -53
- data/vendor/gems/net-ssh/lib/net/ssh/version.rb +0 -62
- data/vendor/gems/net-ssh/lib/net/ssh.rb +0 -215
- data/vendor/gems/net-ssh/net-ssh.gemspec +0 -33
- data/vendor/gems/net-ssh/setup.rb +0 -1585
- data/vendor/gems/net-ssh/test/authentication/methods/common.rb +0 -28
- data/vendor/gems/net-ssh/test/authentication/methods/test_abstract.rb +0 -51
- data/vendor/gems/net-ssh/test/authentication/methods/test_hostbased.rb +0 -114
- data/vendor/gems/net-ssh/test/authentication/methods/test_keyboard_interactive.rb +0 -98
- data/vendor/gems/net-ssh/test/authentication/methods/test_password.rb +0 -50
- data/vendor/gems/net-ssh/test/authentication/methods/test_publickey.rb +0 -127
- data/vendor/gems/net-ssh/test/authentication/test_agent.rb +0 -205
- data/vendor/gems/net-ssh/test/authentication/test_key_manager.rb +0 -105
- data/vendor/gems/net-ssh/test/authentication/test_session.rb +0 -93
- data/vendor/gems/net-ssh/test/common.rb +0 -106
- data/vendor/gems/net-ssh/test/configs/eqsign +0 -3
- data/vendor/gems/net-ssh/test/configs/exact_match +0 -8
- data/vendor/gems/net-ssh/test/configs/wild_cards +0 -14
- data/vendor/gems/net-ssh/test/connection/test_channel.rb +0 -452
- data/vendor/gems/net-ssh/test/connection/test_session.rb +0 -488
- data/vendor/gems/net-ssh/test/test_all.rb +0 -6
- data/vendor/gems/net-ssh/test/test_buffer.rb +0 -336
- data/vendor/gems/net-ssh/test/test_buffered_io.rb +0 -63
- data/vendor/gems/net-ssh/test/test_config.rb +0 -84
- data/vendor/gems/net-ssh/test/test_key_factory.rb +0 -67
- data/vendor/gems/net-ssh/test/transport/hmac/test_md5.rb +0 -39
- data/vendor/gems/net-ssh/test/transport/hmac/test_md5_96.rb +0 -25
- data/vendor/gems/net-ssh/test/transport/hmac/test_none.rb +0 -34
- data/vendor/gems/net-ssh/test/transport/hmac/test_sha1.rb +0 -34
- data/vendor/gems/net-ssh/test/transport/hmac/test_sha1_96.rb +0 -25
- data/vendor/gems/net-ssh/test/transport/kex/test_diffie_hellman_group1_sha1.rb +0 -146
- data/vendor/gems/net-ssh/test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb +0 -92
- data/vendor/gems/net-ssh/test/transport/test_algorithms.rb +0 -302
- data/vendor/gems/net-ssh/test/transport/test_cipher_factory.rb +0 -171
- data/vendor/gems/net-ssh/test/transport/test_hmac.rb +0 -34
- data/vendor/gems/net-ssh/test/transport/test_identity_cipher.rb +0 -40
- data/vendor/gems/net-ssh/test/transport/test_packet_stream.rb +0 -435
- data/vendor/gems/net-ssh/test/transport/test_server_version.rb +0 -57
- data/vendor/gems/net-ssh/test/transport/test_session.rb +0 -315
- data/vendor/gems/net-ssh/test/transport/test_state.rb +0 -173
- data/vendor/gems/parenting/History.txt +0 -4
- data/vendor/gems/parenting/Manifest.txt +0 -14
- data/vendor/gems/parenting/PostInstall.txt +0 -2
- data/vendor/gems/parenting/README.rdoc +0 -47
- data/vendor/gems/parenting/Rakefile +0 -44
- data/vendor/gems/parenting/lib/parenting/parenting.rb +0 -77
- data/vendor/gems/parenting/lib/parenting.rb +0 -10
- data/vendor/gems/parenting/parenting.gemspec +0 -39
- data/vendor/gems/parenting/script/console +0 -10
- data/vendor/gems/parenting/script/destroy +0 -14
- data/vendor/gems/parenting/script/generate +0 -14
- data/vendor/gems/parenting/test/file_to_eval.rb +0 -9
- data/vendor/gems/parenting/test/test_helper.rb +0 -5
- data/vendor/gems/parenting/test/test_parenting.rb +0 -117
- data/vendor/gems/right_aws/History.txt +0 -246
- data/vendor/gems/right_aws/Manifest.txt +0 -34
- data/vendor/gems/right_aws/README.txt +0 -166
- data/vendor/gems/right_aws/Rakefile +0 -112
- data/vendor/gems/right_aws/lib/acf/right_acf_interface.rb +0 -379
- data/vendor/gems/right_aws/lib/awsbase/benchmark_fix.rb +0 -39
- data/vendor/gems/right_aws/lib/awsbase/right_awsbase.rb +0 -797
- data/vendor/gems/right_aws/lib/awsbase/support.rb +0 -111
- data/vendor/gems/right_aws/lib/ec2/right_ec2.rb +0 -1737
- data/vendor/gems/right_aws/lib/right_aws.rb +0 -69
- data/vendor/gems/right_aws/lib/s3/right_s3.rb +0 -1094
- data/vendor/gems/right_aws/lib/s3/right_s3_interface.rb +0 -1175
- data/vendor/gems/right_aws/lib/sdb/active_sdb.rb +0 -930
- data/vendor/gems/right_aws/lib/sdb/right_sdb_interface.rb +0 -698
- data/vendor/gems/right_aws/lib/sqs/right_sqs.rb +0 -388
- data/vendor/gems/right_aws/lib/sqs/right_sqs_gen2.rb +0 -286
- data/vendor/gems/right_aws/lib/sqs/right_sqs_gen2_interface.rb +0 -444
- data/vendor/gems/right_aws/lib/sqs/right_sqs_interface.rb +0 -596
- data/vendor/gems/right_aws/test/acf/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/acf/test_right_acf.rb +0 -146
- data/vendor/gems/right_aws/test/ec2/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/ec2/test_right_ec2.rb +0 -108
- data/vendor/gems/right_aws/test/http_connection.rb +0 -87
- data/vendor/gems/right_aws/test/s3/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/s3/test_right_s3.rb +0 -419
- data/vendor/gems/right_aws/test/s3/test_right_s3_stubbed.rb +0 -95
- data/vendor/gems/right_aws/test/sdb/test_active_sdb.rb +0 -299
- data/vendor/gems/right_aws/test/sdb/test_helper.rb +0 -3
- data/vendor/gems/right_aws/test/sdb/test_right_sdb.rb +0 -247
- data/vendor/gems/right_aws/test/sqs/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/sqs/test_right_sqs.rb +0 -291
- data/vendor/gems/right_aws/test/sqs/test_right_sqs_gen2.rb +0 -209
- data/vendor/gems/right_aws/test/test_credentials.rb +0 -37
- data/vendor/gems/right_aws/test/ts_right_aws.rb +0 -14
- data/vendor/gems/right_http_connection/History.txt +0 -59
- data/vendor/gems/right_http_connection/Manifest.txt +0 -7
- data/vendor/gems/right_http_connection/README.txt +0 -54
- data/vendor/gems/right_http_connection/Rakefile +0 -103
- data/vendor/gems/right_http_connection/lib/net_fix.rb +0 -160
- data/vendor/gems/right_http_connection/lib/right_http_connection.rb +0 -442
- data/vendor/gems/right_http_connection/right_http_connection.gemspec +0 -31
- data/vendor/gems/right_http_connection/setup.rb +0 -1585
- data/vendor/gems/shoulda/CONTRIBUTION_GUIDELINES.rdoc +0 -10
- data/vendor/gems/shoulda/MIT-LICENSE +0 -22
- data/vendor/gems/shoulda/README.rdoc +0 -171
- data/vendor/gems/shoulda/Rakefile +0 -72
- data/vendor/gems/shoulda/bin/convert_to_should_syntax +0 -42
- data/vendor/gems/shoulda/init.rb +0 -1
- data/vendor/gems/shoulda/lib/shoulda/action_controller/macros.rb +0 -240
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/assign_to_matcher.rb +0 -109
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/filter_param_matcher.rb +0 -57
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb +0 -81
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb +0 -74
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/respond_with_matcher.rb +0 -81
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/route_matcher.rb +0 -93
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/set_session_matcher.rb +0 -87
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb +0 -85
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers.rb +0 -37
- data/vendor/gems/shoulda/lib/shoulda/action_controller.rb +0 -26
- data/vendor/gems/shoulda/lib/shoulda/action_mailer/assertions.rb +0 -38
- data/vendor/gems/shoulda/lib/shoulda/action_mailer.rb +0 -10
- data/vendor/gems/shoulda/lib/shoulda/action_view/macros.rb +0 -61
- data/vendor/gems/shoulda/lib/shoulda/action_view.rb +0 -10
- data/vendor/gems/shoulda/lib/shoulda/active_record/assertions.rb +0 -69
- data/vendor/gems/shoulda/lib/shoulda/active_record/helpers.rb +0 -27
- data/vendor/gems/shoulda/lib/shoulda/active_record/macros.rb +0 -512
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb +0 -83
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/allow_value_matcher.rb +0 -102
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/association_matcher.rb +0 -226
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb +0 -87
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb +0 -141
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_db_column_matcher.rb +0 -169
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_db_index_matcher.rb +0 -112
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb +0 -128
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb +0 -59
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb +0 -41
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_format_of_matcher.rb +0 -67
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb +0 -39
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb +0 -60
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb +0 -148
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validation_matcher.rb +0 -57
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb +0 -43
- data/vendor/gems/shoulda/lib/shoulda/active_record.rb +0 -16
- data/vendor/gems/shoulda/lib/shoulda/assertions.rb +0 -71
- data/vendor/gems/shoulda/lib/shoulda/autoload_macros.rb +0 -46
- data/vendor/gems/shoulda/lib/shoulda/context.rb +0 -402
- data/vendor/gems/shoulda/lib/shoulda/helpers.rb +0 -8
- data/vendor/gems/shoulda/lib/shoulda/macros.rb +0 -133
- data/vendor/gems/shoulda/lib/shoulda/private_helpers.rb +0 -13
- data/vendor/gems/shoulda/lib/shoulda/proc_extensions.rb +0 -14
- data/vendor/gems/shoulda/lib/shoulda/rails.rb +0 -13
- data/vendor/gems/shoulda/lib/shoulda/rspec.rb +0 -11
- data/vendor/gems/shoulda/lib/shoulda/tasks/list_tests.rake +0 -29
- data/vendor/gems/shoulda/lib/shoulda/tasks/yaml_to_shoulda.rake +0 -28
- data/vendor/gems/shoulda/lib/shoulda/tasks.rb +0 -3
- data/vendor/gems/shoulda/lib/shoulda/test_unit.rb +0 -22
- data/vendor/gems/shoulda/lib/shoulda.rb +0 -9
- data/vendor/gems/shoulda/rails/init.rb +0 -7
- data/vendor/gems/shoulda/shoulda.gemspec +0 -31
- data/vendor/gems/shoulda/tasks/shoulda.rake +0 -1
- data/vendor/gems/shoulda/test/README +0 -36
- data/vendor/gems/shoulda/test/fail_macros.rb +0 -39
- data/vendor/gems/shoulda/test/fixtures/addresses.yml +0 -3
- data/vendor/gems/shoulda/test/fixtures/friendships.yml +0 -0
- data/vendor/gems/shoulda/test/fixtures/posts.yml +0 -5
- 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 +0 -9
- data/vendor/gems/shoulda/test/fixtures/users.yml +0 -6
- data/vendor/gems/shoulda/test/functional/posts_controller_test.rb +0 -121
- data/vendor/gems/shoulda/test/functional/users_controller_test.rb +0 -19
- data/vendor/gems/shoulda/test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb +0 -68
- data/vendor/gems/shoulda/test/matchers/active_record/allow_value_matcher_test.rb +0 -64
- data/vendor/gems/shoulda/test/matchers/active_record/association_matcher_test.rb +0 -263
- data/vendor/gems/shoulda/test/matchers/active_record/ensure_inclusion_of_matcher_test.rb +0 -80
- data/vendor/gems/shoulda/test/matchers/active_record/ensure_length_of_matcher_test.rb +0 -158
- data/vendor/gems/shoulda/test/matchers/active_record/have_db_column_matcher_test.rb +0 -169
- data/vendor/gems/shoulda/test/matchers/active_record/have_db_index_matcher_test.rb +0 -91
- data/vendor/gems/shoulda/test/matchers/active_record/have_named_scope_matcher_test.rb +0 -65
- data/vendor/gems/shoulda/test/matchers/active_record/have_readonly_attributes_matcher_test.rb +0 -29
- data/vendor/gems/shoulda/test/matchers/active_record/validate_acceptance_of_matcher_test.rb +0 -44
- data/vendor/gems/shoulda/test/matchers/active_record/validate_format_of_matcher_test.rb +0 -39
- data/vendor/gems/shoulda/test/matchers/active_record/validate_numericality_of_matcher_test.rb +0 -52
- data/vendor/gems/shoulda/test/matchers/active_record/validate_presence_of_matcher_test.rb +0 -86
- data/vendor/gems/shoulda/test/matchers/active_record/validate_uniqueness_of_matcher_test.rb +0 -147
- data/vendor/gems/shoulda/test/matchers/controller/assign_to_matcher_test.rb +0 -35
- data/vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb +0 -32
- data/vendor/gems/shoulda/test/matchers/controller/render_with_layout_matcher_test.rb +0 -33
- data/vendor/gems/shoulda/test/matchers/controller/respond_with_content_type_matcher_test.rb +0 -32
- data/vendor/gems/shoulda/test/matchers/controller/respond_with_matcher_test.rb +0 -106
- data/vendor/gems/shoulda/test/matchers/controller/route_matcher_test.rb +0 -58
- data/vendor/gems/shoulda/test/matchers/controller/set_session_matcher_test.rb +0 -38
- data/vendor/gems/shoulda/test/matchers/controller/set_the_flash_matcher.rb +0 -41
- data/vendor/gems/shoulda/test/model_builder.rb +0 -106
- data/vendor/gems/shoulda/test/other/autoload_macro_test.rb +0 -18
- data/vendor/gems/shoulda/test/other/context_test.rb +0 -189
- data/vendor/gems/shoulda/test/other/convert_to_should_syntax_test.rb +0 -63
- data/vendor/gems/shoulda/test/other/helpers_test.rb +0 -340
- data/vendor/gems/shoulda/test/other/private_helpers_test.rb +0 -32
- data/vendor/gems/shoulda/test/other/should_test.rb +0 -271
- data/vendor/gems/shoulda/test/rails_root/app/controllers/application_controller.rb +0 -25
- data/vendor/gems/shoulda/test/rails_root/app/controllers/posts_controller.rb +0 -87
- data/vendor/gems/shoulda/test/rails_root/app/controllers/users_controller.rb +0 -84
- data/vendor/gems/shoulda/test/rails_root/app/helpers/application_helper.rb +0 -3
- data/vendor/gems/shoulda/test/rails_root/app/helpers/posts_helper.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/helpers/users_helper.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/models/address.rb +0 -7
- data/vendor/gems/shoulda/test/rails_root/app/models/flea.rb +0 -3
- data/vendor/gems/shoulda/test/rails_root/app/models/friendship.rb +0 -4
- data/vendor/gems/shoulda/test/rails_root/app/models/pets/cat.rb +0 -7
- data/vendor/gems/shoulda/test/rails_root/app/models/pets/dog.rb +0 -10
- data/vendor/gems/shoulda/test/rails_root/app/models/post.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/app/models/product.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/app/models/profile.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/models/registration.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/models/tag.rb +0 -8
- data/vendor/gems/shoulda/test/rails_root/app/models/tagging.rb +0 -4
- data/vendor/gems/shoulda/test/rails_root/app/models/treat.rb +0 -3
- data/vendor/gems/shoulda/test/rails_root/app/models/user.rb +0 -32
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/posts.rhtml +0 -19
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/users.rhtml +0 -17
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/wide.html.erb +0 -1
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/edit.rhtml +0 -27
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/index.rhtml +0 -25
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/new.rhtml +0 -26
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/show.rhtml +0 -18
- data/vendor/gems/shoulda/test/rails_root/app/views/users/edit.rhtml +0 -22
- data/vendor/gems/shoulda/test/rails_root/app/views/users/index.rhtml +0 -22
- data/vendor/gems/shoulda/test/rails_root/app/views/users/new.rhtml +0 -21
- data/vendor/gems/shoulda/test/rails_root/app/views/users/show.rhtml +0 -13
- data/vendor/gems/shoulda/test/rails_root/config/boot.rb +0 -110
- data/vendor/gems/shoulda/test/rails_root/config/database.yml +0 -4
- data/vendor/gems/shoulda/test/rails_root/config/environment.rb +0 -18
- 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 +0 -15
- data/vendor/gems/shoulda/test/rails_root/config/initializers/shoulda.rb +0 -8
- data/vendor/gems/shoulda/test/rails_root/config/routes.rb +0 -6
- data/vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb +0 -19
- data/vendor/gems/shoulda/test/rails_root/db/migrate/002_create_posts.rb +0 -13
- data/vendor/gems/shoulda/test/rails_root/db/migrate/003_create_taggings.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/004_create_tags.rb +0 -11
- data/vendor/gems/shoulda/test/rails_root/db/migrate/005_create_dogs.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/006_create_addresses.rb +0 -14
- data/vendor/gems/shoulda/test/rails_root/db/migrate/007_create_fleas.rb +0 -11
- data/vendor/gems/shoulda/test/rails_root/db/migrate/008_create_dogs_fleas.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/009_create_products.rb +0 -17
- data/vendor/gems/shoulda/test/rails_root/db/migrate/010_create_friendships.rb +0 -14
- data/vendor/gems/shoulda/test/rails_root/db/migrate/011_create_treats.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090506203502_create_profiles.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090506203536_create_registrations.rb +0 -14
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090513104502_create_cats.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/schema.rb +0 -0
- data/vendor/gems/shoulda/test/rails_root/public/404.html +0 -30
- data/vendor/gems/shoulda/test/rails_root/public/422.html +0 -30
- data/vendor/gems/shoulda/test/rails_root/public/500.html +0 -30
- data/vendor/gems/shoulda/test/rails_root/script/console +0 -3
- data/vendor/gems/shoulda/test/rails_root/script/generate +0 -3
- data/vendor/gems/shoulda/test/rails_root/test/shoulda_macros/custom_macro.rb +0 -6
- data/vendor/gems/shoulda/test/rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +0 -6
- data/vendor/gems/shoulda/test/rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +0 -6
- data/vendor/gems/shoulda/test/rspec_test.rb +0 -207
- data/vendor/gems/shoulda/test/test_helper.rb +0 -28
- data/vendor/gems/shoulda/test/unit/address_test.rb +0 -10
- data/vendor/gems/shoulda/test/unit/cat_test.rb +0 -7
- data/vendor/gems/shoulda/test/unit/dog_test.rb +0 -9
- data/vendor/gems/shoulda/test/unit/flea_test.rb +0 -6
- data/vendor/gems/shoulda/test/unit/friendship_test.rb +0 -6
- data/vendor/gems/shoulda/test/unit/post_test.rb +0 -19
- data/vendor/gems/shoulda/test/unit/product_test.rb +0 -23
- data/vendor/gems/shoulda/test/unit/tag_test.rb +0 -15
- data/vendor/gems/shoulda/test/unit/tagging_test.rb +0 -6
- data/vendor/gems/shoulda/test/unit/user_test.rb +0 -80
- data/vendor/gems/thrift/CHANGELOG +0 -1
- data/vendor/gems/thrift/Makefile.am +0 -47
- data/vendor/gems/thrift/Manifest +0 -81
- data/vendor/gems/thrift/README +0 -43
- data/vendor/gems/thrift/Rakefile +0 -104
- data/vendor/gems/thrift/benchmark/Benchmark.thrift +0 -24
- data/vendor/gems/thrift/benchmark/benchmark.rb +0 -271
- data/vendor/gems/thrift/benchmark/client.rb +0 -74
- data/vendor/gems/thrift/benchmark/server.rb +0 -82
- data/vendor/gems/thrift/benchmark/thin_server.rb +0 -44
- data/vendor/gems/thrift/ext/binary_protocol_accelerated.c +0 -474
- data/vendor/gems/thrift/ext/binary_protocol_accelerated.h +0 -20
- data/vendor/gems/thrift/ext/compact_protocol.c +0 -665
- data/vendor/gems/thrift/ext/compact_protocol.h +0 -20
- data/vendor/gems/thrift/ext/constants.h +0 -95
- data/vendor/gems/thrift/ext/extconf.rb +0 -26
- data/vendor/gems/thrift/ext/macros.h +0 -41
- data/vendor/gems/thrift/ext/memory_buffer.c +0 -76
- data/vendor/gems/thrift/ext/memory_buffer.h +0 -20
- data/vendor/gems/thrift/ext/protocol.c +0 -185
- data/vendor/gems/thrift/ext/protocol.h +0 -20
- data/vendor/gems/thrift/ext/struct.c +0 -606
- data/vendor/gems/thrift/ext/struct.h +0 -67
- data/vendor/gems/thrift/ext/thrift_native.c +0 -194
- data/vendor/gems/thrift/lib/thrift/client.rb +0 -62
- data/vendor/gems/thrift/lib/thrift/core_ext/fixnum.rb +0 -29
- data/vendor/gems/thrift/lib/thrift/core_ext.rb +0 -23
- data/vendor/gems/thrift/lib/thrift/exceptions.rb +0 -82
- data/vendor/gems/thrift/lib/thrift/processor.rb +0 -57
- data/vendor/gems/thrift/lib/thrift/protocol/base_protocol.rb +0 -290
- data/vendor/gems/thrift/lib/thrift/protocol/binary_protocol.rb +0 -225
- data/vendor/gems/thrift/lib/thrift/protocol/binary_protocol_accelerated.rb +0 -35
- data/vendor/gems/thrift/lib/thrift/protocol/compact_protocol.rb +0 -422
- data/vendor/gems/thrift/lib/thrift/serializer/deserializer.rb +0 -33
- data/vendor/gems/thrift/lib/thrift/serializer/serializer.rb +0 -34
- data/vendor/gems/thrift/lib/thrift/server/base_server.rb +0 -31
- data/vendor/gems/thrift/lib/thrift/server/mongrel_http_server.rb +0 -58
- data/vendor/gems/thrift/lib/thrift/server/nonblocking_server.rb +0 -296
- data/vendor/gems/thrift/lib/thrift/server/simple_server.rb +0 -43
- data/vendor/gems/thrift/lib/thrift/server/thread_pool_server.rb +0 -75
- data/vendor/gems/thrift/lib/thrift/server/threaded_server.rb +0 -47
- data/vendor/gems/thrift/lib/thrift/struct.rb +0 -298
- data/vendor/gems/thrift/lib/thrift/thrift_native.rb +0 -24
- data/vendor/gems/thrift/lib/thrift/transport/base_server_transport.rb +0 -37
- data/vendor/gems/thrift/lib/thrift/transport/base_transport.rb +0 -70
- data/vendor/gems/thrift/lib/thrift/transport/buffered_transport.rb +0 -77
- data/vendor/gems/thrift/lib/thrift/transport/framed_transport.rb +0 -90
- data/vendor/gems/thrift/lib/thrift/transport/http_client_transport.rb +0 -45
- data/vendor/gems/thrift/lib/thrift/transport/io_stream_transport.rb +0 -39
- data/vendor/gems/thrift/lib/thrift/transport/memory_buffer_transport.rb +0 -96
- data/vendor/gems/thrift/lib/thrift/transport/server_socket.rb +0 -63
- data/vendor/gems/thrift/lib/thrift/transport/socket.rb +0 -136
- data/vendor/gems/thrift/lib/thrift/transport/unix_server_socket.rb +0 -60
- data/vendor/gems/thrift/lib/thrift/transport/unix_socket.rb +0 -40
- data/vendor/gems/thrift/lib/thrift/types.rb +0 -101
- data/vendor/gems/thrift/lib/thrift.rb +0 -59
- data/vendor/gems/thrift/script/proto_benchmark.rb +0 -121
- data/vendor/gems/thrift/script/read_struct.rb +0 -43
- data/vendor/gems/thrift/script/write_struct.rb +0 -30
- data/vendor/gems/thrift/setup.rb +0 -1585
- data/vendor/gems/thrift/spec/ThriftSpec.thrift +0 -84
- data/vendor/gems/thrift/spec/base_protocol_spec.rb +0 -160
- data/vendor/gems/thrift/spec/base_transport_spec.rb +0 -351
- data/vendor/gems/thrift/spec/binary_protocol_accelerated_spec.rb +0 -41
- data/vendor/gems/thrift/spec/binary_protocol_spec.rb +0 -63
- data/vendor/gems/thrift/spec/binary_protocol_spec_shared.rb +0 -375
- data/vendor/gems/thrift/spec/client_spec.rb +0 -100
- data/vendor/gems/thrift/spec/compact_protocol_spec.rb +0 -117
- data/vendor/gems/thrift/spec/exception_spec.rb +0 -142
- data/vendor/gems/thrift/spec/http_client_spec.rb +0 -49
- data/vendor/gems/thrift/spec/mongrel_http_server_spec.rb +0 -117
- data/vendor/gems/thrift/spec/nonblocking_server_spec.rb +0 -265
- data/vendor/gems/thrift/spec/processor_spec.rb +0 -83
- data/vendor/gems/thrift/spec/serializer_spec.rb +0 -69
- data/vendor/gems/thrift/spec/server_socket_spec.rb +0 -80
- data/vendor/gems/thrift/spec/server_spec.rb +0 -160
- data/vendor/gems/thrift/spec/socket_spec.rb +0 -61
- data/vendor/gems/thrift/spec/socket_spec_shared.rb +0 -104
- data/vendor/gems/thrift/spec/spec_helper.rb +0 -60
- data/vendor/gems/thrift/spec/struct_spec.rb +0 -252
- data/vendor/gems/thrift/spec/types_spec.rb +0 -116
- data/vendor/gems/thrift/spec/unix_socket_spec.rb +0 -108
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/a2dismod.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/a2dissite.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/a2ensite.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/port_apache.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/ports.conf.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/web_app.conf.erb +0 -0
- /data/{lib/proto/gen-py/__init__.py → examples/chef_cloud/chef-repo/cookbooks/chef/recipes/default.rb} +0 -0
- /data/{vendor/gems/context/PostInstall.txt → lib/cloud_providers/default/helpers/base_helper.rb} +0 -0
- /data/vendor/gems/{colors → searchable_paths}/LICENSE +0 -0
|
@@ -1,1203 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
* or more contributor license agreements. See the NOTICE file
|
|
4
|
-
* distributed with this work for additional information
|
|
5
|
-
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
* to you under the Apache License, Version 2.0 (the
|
|
7
|
-
* "License"); you may not use this file except in compliance
|
|
8
|
-
* with the License. You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing,
|
|
13
|
-
* software distributed under the License is distributed on an
|
|
14
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
* KIND, either express or implied. See the License for the
|
|
16
|
-
* specific language governing permissions and limitations
|
|
17
|
-
* under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
#include <Python.h>
|
|
21
|
-
#include "cStringIO.h"
|
|
22
|
-
#include <stdbool.h>
|
|
23
|
-
#include <stdint.h>
|
|
24
|
-
#include <netinet/in.h>
|
|
25
|
-
|
|
26
|
-
/* Fix endianness issues on Solaris */
|
|
27
|
-
#if defined (__SVR4) && defined (__sun)
|
|
28
|
-
#if defined(__i386) && !defined(__i386__)
|
|
29
|
-
#define __i386__
|
|
30
|
-
#endif
|
|
31
|
-
|
|
32
|
-
#ifndef BIG_ENDIAN
|
|
33
|
-
#define BIG_ENDIAN (4321)
|
|
34
|
-
#endif
|
|
35
|
-
#ifndef LITTLE_ENDIAN
|
|
36
|
-
#define LITTLE_ENDIAN (1234)
|
|
37
|
-
#endif
|
|
38
|
-
|
|
39
|
-
/* I386 is LE, even on Solaris */
|
|
40
|
-
#if !defined(BYTE_ORDER) && defined(__i386__)
|
|
41
|
-
#define BYTE_ORDER LITTLE_ENDIAN
|
|
42
|
-
#endif
|
|
43
|
-
#endif
|
|
44
|
-
|
|
45
|
-
// TODO(dreiss): defval appears to be unused. Look into removing it.
|
|
46
|
-
// TODO(dreiss): Make parse_spec_args recursive, and cache the output
|
|
47
|
-
// permanently in the object. (Malloc and orphan.)
|
|
48
|
-
// TODO(dreiss): Why do we need cStringIO for reading, why not just char*?
|
|
49
|
-
// Can cStringIO let us work with a BufferedTransport?
|
|
50
|
-
// TODO(dreiss): Don't ignore the rv from cwrite (maybe).
|
|
51
|
-
|
|
52
|
-
/* ====== BEGIN UTILITIES ====== */
|
|
53
|
-
|
|
54
|
-
#define INIT_OUTBUF_SIZE 128
|
|
55
|
-
|
|
56
|
-
// Stolen out of TProtocol.h.
|
|
57
|
-
// It would be a huge pain to have both get this from one place.
|
|
58
|
-
typedef enum TType {
|
|
59
|
-
T_STOP = 0,
|
|
60
|
-
T_VOID = 1,
|
|
61
|
-
T_BOOL = 2,
|
|
62
|
-
T_BYTE = 3,
|
|
63
|
-
T_I08 = 3,
|
|
64
|
-
T_I16 = 6,
|
|
65
|
-
T_I32 = 8,
|
|
66
|
-
T_U64 = 9,
|
|
67
|
-
T_I64 = 10,
|
|
68
|
-
T_DOUBLE = 4,
|
|
69
|
-
T_STRING = 11,
|
|
70
|
-
T_UTF7 = 11,
|
|
71
|
-
T_STRUCT = 12,
|
|
72
|
-
T_MAP = 13,
|
|
73
|
-
T_SET = 14,
|
|
74
|
-
T_LIST = 15,
|
|
75
|
-
T_UTF8 = 16,
|
|
76
|
-
T_UTF16 = 17
|
|
77
|
-
} TType;
|
|
78
|
-
|
|
79
|
-
#ifndef __BYTE_ORDER
|
|
80
|
-
# if defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
|
|
81
|
-
# define __BYTE_ORDER BYTE_ORDER
|
|
82
|
-
# define __LITTLE_ENDIAN LITTLE_ENDIAN
|
|
83
|
-
# define __BIG_ENDIAN BIG_ENDIAN
|
|
84
|
-
# else
|
|
85
|
-
# error "Cannot determine endianness"
|
|
86
|
-
# endif
|
|
87
|
-
#endif
|
|
88
|
-
|
|
89
|
-
// Same comment as the enum. Sorry.
|
|
90
|
-
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
91
|
-
# define ntohll(n) (n)
|
|
92
|
-
# define htonll(n) (n)
|
|
93
|
-
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
|
94
|
-
# if defined(__GNUC__) && defined(__GLIBC__)
|
|
95
|
-
# include <byteswap.h>
|
|
96
|
-
# define ntohll(n) bswap_64(n)
|
|
97
|
-
# define htonll(n) bswap_64(n)
|
|
98
|
-
# else /* GNUC & GLIBC */
|
|
99
|
-
# define ntohll(n) ( (((unsigned long long)ntohl(n)) << 32) + ntohl(n >> 32) )
|
|
100
|
-
# define htonll(n) ( (((unsigned long long)htonl(n)) << 32) + htonl(n >> 32) )
|
|
101
|
-
# endif /* GNUC & GLIBC */
|
|
102
|
-
#else /* __BYTE_ORDER */
|
|
103
|
-
# error "Can't define htonll or ntohll!"
|
|
104
|
-
#endif
|
|
105
|
-
|
|
106
|
-
// Doing a benchmark shows that interning actually makes a difference, amazingly.
|
|
107
|
-
#define INTERN_STRING(value) _intern_ ## value
|
|
108
|
-
|
|
109
|
-
#define INT_CONV_ERROR_OCCURRED(v) ( ((v) == -1) && PyErr_Occurred() )
|
|
110
|
-
#define CHECK_RANGE(v, min, max) ( ((v) <= (max)) && ((v) >= (min)) )
|
|
111
|
-
|
|
112
|
-
// Py_ssize_t was not defined before Python 2.5
|
|
113
|
-
#if (PY_VERSION_HEX < 0x02050000)
|
|
114
|
-
typedef int Py_ssize_t;
|
|
115
|
-
#endif
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* A cache of the spec_args for a set or list,
|
|
119
|
-
* so we don't have to keep calling PyTuple_GET_ITEM.
|
|
120
|
-
*/
|
|
121
|
-
typedef struct {
|
|
122
|
-
TType element_type;
|
|
123
|
-
PyObject* typeargs;
|
|
124
|
-
} SetListTypeArgs;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* A cache of the spec_args for a map,
|
|
128
|
-
* so we don't have to keep calling PyTuple_GET_ITEM.
|
|
129
|
-
*/
|
|
130
|
-
typedef struct {
|
|
131
|
-
TType ktag;
|
|
132
|
-
TType vtag;
|
|
133
|
-
PyObject* ktypeargs;
|
|
134
|
-
PyObject* vtypeargs;
|
|
135
|
-
} MapTypeArgs;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A cache of the spec_args for a struct,
|
|
139
|
-
* so we don't have to keep calling PyTuple_GET_ITEM.
|
|
140
|
-
*/
|
|
141
|
-
typedef struct {
|
|
142
|
-
PyObject* klass;
|
|
143
|
-
PyObject* spec;
|
|
144
|
-
} StructTypeArgs;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* A cache of the item spec from a struct specification,
|
|
148
|
-
* so we don't have to keep calling PyTuple_GET_ITEM.
|
|
149
|
-
*/
|
|
150
|
-
typedef struct {
|
|
151
|
-
int tag;
|
|
152
|
-
TType type;
|
|
153
|
-
PyObject* attrname;
|
|
154
|
-
PyObject* typeargs;
|
|
155
|
-
PyObject* defval;
|
|
156
|
-
} StructItemSpec;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* A cache of the two key attributes of a CReadableTransport,
|
|
160
|
-
* so we don't have to keep calling PyObject_GetAttr.
|
|
161
|
-
*/
|
|
162
|
-
typedef struct {
|
|
163
|
-
PyObject* stringiobuf;
|
|
164
|
-
PyObject* refill_callable;
|
|
165
|
-
} DecodeBuffer;
|
|
166
|
-
|
|
167
|
-
/** Pointer to interned string to speed up attribute lookup. */
|
|
168
|
-
static PyObject* INTERN_STRING(cstringio_buf);
|
|
169
|
-
/** Pointer to interned string to speed up attribute lookup. */
|
|
170
|
-
static PyObject* INTERN_STRING(cstringio_refill);
|
|
171
|
-
|
|
172
|
-
static inline bool
|
|
173
|
-
check_ssize_t_32(Py_ssize_t len) {
|
|
174
|
-
// error from getting the int
|
|
175
|
-
if (INT_CONV_ERROR_OCCURRED(len)) {
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
if (!CHECK_RANGE(len, 0, INT32_MAX)) {
|
|
179
|
-
PyErr_SetString(PyExc_OverflowError, "string size out of range");
|
|
180
|
-
return false;
|
|
181
|
-
}
|
|
182
|
-
return true;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
static inline bool
|
|
186
|
-
parse_pyint(PyObject* o, int32_t* ret, int32_t min, int32_t max) {
|
|
187
|
-
long val = PyInt_AsLong(o);
|
|
188
|
-
|
|
189
|
-
if (INT_CONV_ERROR_OCCURRED(val)) {
|
|
190
|
-
return false;
|
|
191
|
-
}
|
|
192
|
-
if (!CHECK_RANGE(val, min, max)) {
|
|
193
|
-
PyErr_SetString(PyExc_OverflowError, "int out of range");
|
|
194
|
-
return false;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
*ret = (int32_t) val;
|
|
198
|
-
return true;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
/* --- FUNCTIONS TO PARSE STRUCT SPECIFICATOINS --- */
|
|
203
|
-
|
|
204
|
-
static bool
|
|
205
|
-
parse_set_list_args(SetListTypeArgs* dest, PyObject* typeargs) {
|
|
206
|
-
if (PyTuple_Size(typeargs) != 2) {
|
|
207
|
-
PyErr_SetString(PyExc_TypeError, "expecting tuple of size 2 for list/set type args");
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
dest->element_type = PyInt_AsLong(PyTuple_GET_ITEM(typeargs, 0));
|
|
212
|
-
if (INT_CONV_ERROR_OCCURRED(dest->element_type)) {
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
dest->typeargs = PyTuple_GET_ITEM(typeargs, 1);
|
|
217
|
-
|
|
218
|
-
return true;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
static bool
|
|
222
|
-
parse_map_args(MapTypeArgs* dest, PyObject* typeargs) {
|
|
223
|
-
if (PyTuple_Size(typeargs) != 4) {
|
|
224
|
-
PyErr_SetString(PyExc_TypeError, "expecting 4 arguments for typeargs to map");
|
|
225
|
-
return false;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
dest->ktag = PyInt_AsLong(PyTuple_GET_ITEM(typeargs, 0));
|
|
229
|
-
if (INT_CONV_ERROR_OCCURRED(dest->ktag)) {
|
|
230
|
-
return false;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
dest->vtag = PyInt_AsLong(PyTuple_GET_ITEM(typeargs, 2));
|
|
234
|
-
if (INT_CONV_ERROR_OCCURRED(dest->vtag)) {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
dest->ktypeargs = PyTuple_GET_ITEM(typeargs, 1);
|
|
239
|
-
dest->vtypeargs = PyTuple_GET_ITEM(typeargs, 3);
|
|
240
|
-
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
static bool
|
|
245
|
-
parse_struct_args(StructTypeArgs* dest, PyObject* typeargs) {
|
|
246
|
-
if (PyTuple_Size(typeargs) != 2) {
|
|
247
|
-
PyErr_SetString(PyExc_TypeError, "expecting tuple of size 2 for struct args");
|
|
248
|
-
return false;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
dest->klass = PyTuple_GET_ITEM(typeargs, 0);
|
|
252
|
-
dest->spec = PyTuple_GET_ITEM(typeargs, 1);
|
|
253
|
-
|
|
254
|
-
return true;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
static int
|
|
258
|
-
parse_struct_item_spec(StructItemSpec* dest, PyObject* spec_tuple) {
|
|
259
|
-
|
|
260
|
-
// i'd like to use ParseArgs here, but it seems to be a bottleneck.
|
|
261
|
-
if (PyTuple_Size(spec_tuple) != 5) {
|
|
262
|
-
PyErr_SetString(PyExc_TypeError, "expecting 5 arguments for spec tuple");
|
|
263
|
-
return false;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
dest->tag = PyInt_AsLong(PyTuple_GET_ITEM(spec_tuple, 0));
|
|
267
|
-
if (INT_CONV_ERROR_OCCURRED(dest->tag)) {
|
|
268
|
-
return false;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
dest->type = PyInt_AsLong(PyTuple_GET_ITEM(spec_tuple, 1));
|
|
272
|
-
if (INT_CONV_ERROR_OCCURRED(dest->type)) {
|
|
273
|
-
return false;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
dest->attrname = PyTuple_GET_ITEM(spec_tuple, 2);
|
|
277
|
-
dest->typeargs = PyTuple_GET_ITEM(spec_tuple, 3);
|
|
278
|
-
dest->defval = PyTuple_GET_ITEM(spec_tuple, 4);
|
|
279
|
-
return true;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/* ====== END UTILITIES ====== */
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
/* ====== BEGIN WRITING FUNCTIONS ====== */
|
|
286
|
-
|
|
287
|
-
/* --- LOW-LEVEL WRITING FUNCTIONS --- */
|
|
288
|
-
|
|
289
|
-
static void writeByte(PyObject* outbuf, int8_t val) {
|
|
290
|
-
int8_t net = val;
|
|
291
|
-
PycStringIO->cwrite(outbuf, (char*)&net, sizeof(int8_t));
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
static void writeI16(PyObject* outbuf, int16_t val) {
|
|
295
|
-
int16_t net = (int16_t)htons(val);
|
|
296
|
-
PycStringIO->cwrite(outbuf, (char*)&net, sizeof(int16_t));
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
static void writeI32(PyObject* outbuf, int32_t val) {
|
|
300
|
-
int32_t net = (int32_t)htonl(val);
|
|
301
|
-
PycStringIO->cwrite(outbuf, (char*)&net, sizeof(int32_t));
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
static void writeI64(PyObject* outbuf, int64_t val) {
|
|
305
|
-
int64_t net = (int64_t)htonll(val);
|
|
306
|
-
PycStringIO->cwrite(outbuf, (char*)&net, sizeof(int64_t));
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
static void writeDouble(PyObject* outbuf, double dub) {
|
|
310
|
-
// Unfortunately, bitwise_cast doesn't work in C. Bad C!
|
|
311
|
-
union {
|
|
312
|
-
double f;
|
|
313
|
-
int64_t t;
|
|
314
|
-
} transfer;
|
|
315
|
-
transfer.f = dub;
|
|
316
|
-
writeI64(outbuf, transfer.t);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
/* --- MAIN RECURSIVE OUTPUT FUCNTION -- */
|
|
321
|
-
|
|
322
|
-
static int
|
|
323
|
-
output_val(PyObject* output, PyObject* value, TType type, PyObject* typeargs) {
|
|
324
|
-
/*
|
|
325
|
-
* Refcounting Strategy:
|
|
326
|
-
*
|
|
327
|
-
* We assume that elements of the thrift_spec tuple are not going to be
|
|
328
|
-
* mutated, so we don't ref count those at all. Other than that, we try to
|
|
329
|
-
* keep a reference to all the user-created objects while we work with them.
|
|
330
|
-
* output_val assumes that a reference is already held. The *caller* is
|
|
331
|
-
* responsible for handling references
|
|
332
|
-
*/
|
|
333
|
-
|
|
334
|
-
switch (type) {
|
|
335
|
-
|
|
336
|
-
case T_BOOL: {
|
|
337
|
-
int v = PyObject_IsTrue(value);
|
|
338
|
-
if (v == -1) {
|
|
339
|
-
return false;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
writeByte(output, (int8_t) v);
|
|
343
|
-
break;
|
|
344
|
-
}
|
|
345
|
-
case T_I08: {
|
|
346
|
-
int32_t val;
|
|
347
|
-
|
|
348
|
-
if (!parse_pyint(value, &val, INT8_MIN, INT8_MAX)) {
|
|
349
|
-
return false;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
writeByte(output, (int8_t) val);
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
case T_I16: {
|
|
356
|
-
int32_t val;
|
|
357
|
-
|
|
358
|
-
if (!parse_pyint(value, &val, INT16_MIN, INT16_MAX)) {
|
|
359
|
-
return false;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
writeI16(output, (int16_t) val);
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
case T_I32: {
|
|
366
|
-
int32_t val;
|
|
367
|
-
|
|
368
|
-
if (!parse_pyint(value, &val, INT32_MIN, INT32_MAX)) {
|
|
369
|
-
return false;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
writeI32(output, val);
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
case T_I64: {
|
|
376
|
-
int64_t nval = PyLong_AsLongLong(value);
|
|
377
|
-
|
|
378
|
-
if (INT_CONV_ERROR_OCCURRED(nval)) {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
if (!CHECK_RANGE(nval, INT64_MIN, INT64_MAX)) {
|
|
383
|
-
PyErr_SetString(PyExc_OverflowError, "int out of range");
|
|
384
|
-
return false;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
writeI64(output, nval);
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
case T_DOUBLE: {
|
|
392
|
-
double nval = PyFloat_AsDouble(value);
|
|
393
|
-
if (nval == -1.0 && PyErr_Occurred()) {
|
|
394
|
-
return false;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
writeDouble(output, nval);
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
case T_STRING: {
|
|
402
|
-
Py_ssize_t len = PyString_Size(value);
|
|
403
|
-
|
|
404
|
-
if (!check_ssize_t_32(len)) {
|
|
405
|
-
return false;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
writeI32(output, (int32_t) len);
|
|
409
|
-
PycStringIO->cwrite(output, PyString_AsString(value), (int32_t) len);
|
|
410
|
-
break;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
case T_LIST:
|
|
414
|
-
case T_SET: {
|
|
415
|
-
Py_ssize_t len;
|
|
416
|
-
SetListTypeArgs parsedargs;
|
|
417
|
-
PyObject *item;
|
|
418
|
-
PyObject *iterator;
|
|
419
|
-
|
|
420
|
-
if (!parse_set_list_args(&parsedargs, typeargs)) {
|
|
421
|
-
return false;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
len = PyObject_Length(value);
|
|
425
|
-
|
|
426
|
-
if (!check_ssize_t_32(len)) {
|
|
427
|
-
return false;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
writeByte(output, parsedargs.element_type);
|
|
431
|
-
writeI32(output, (int32_t) len);
|
|
432
|
-
|
|
433
|
-
iterator = PyObject_GetIter(value);
|
|
434
|
-
if (iterator == NULL) {
|
|
435
|
-
return false;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
while ((item = PyIter_Next(iterator))) {
|
|
439
|
-
if (!output_val(output, item, parsedargs.element_type, parsedargs.typeargs)) {
|
|
440
|
-
Py_DECREF(item);
|
|
441
|
-
Py_DECREF(iterator);
|
|
442
|
-
return false;
|
|
443
|
-
}
|
|
444
|
-
Py_DECREF(item);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
Py_DECREF(iterator);
|
|
448
|
-
|
|
449
|
-
if (PyErr_Occurred()) {
|
|
450
|
-
return false;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
break;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
case T_MAP: {
|
|
457
|
-
PyObject *k, *v;
|
|
458
|
-
Py_ssize_t pos = 0;
|
|
459
|
-
Py_ssize_t len;
|
|
460
|
-
|
|
461
|
-
MapTypeArgs parsedargs;
|
|
462
|
-
|
|
463
|
-
len = PyDict_Size(value);
|
|
464
|
-
if (!check_ssize_t_32(len)) {
|
|
465
|
-
return false;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
if (!parse_map_args(&parsedargs, typeargs)) {
|
|
469
|
-
return false;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
writeByte(output, parsedargs.ktag);
|
|
473
|
-
writeByte(output, parsedargs.vtag);
|
|
474
|
-
writeI32(output, len);
|
|
475
|
-
|
|
476
|
-
// TODO(bmaurer): should support any mapping, not just dicts
|
|
477
|
-
while (PyDict_Next(value, &pos, &k, &v)) {
|
|
478
|
-
// TODO(dreiss): Think hard about whether these INCREFs actually
|
|
479
|
-
// turn any unsafe scenarios into safe scenarios.
|
|
480
|
-
Py_INCREF(k);
|
|
481
|
-
Py_INCREF(v);
|
|
482
|
-
|
|
483
|
-
if (!output_val(output, k, parsedargs.ktag, parsedargs.ktypeargs)
|
|
484
|
-
|| !output_val(output, v, parsedargs.vtag, parsedargs.vtypeargs)) {
|
|
485
|
-
Py_DECREF(k);
|
|
486
|
-
Py_DECREF(v);
|
|
487
|
-
return false;
|
|
488
|
-
}
|
|
489
|
-
Py_DECREF(k);
|
|
490
|
-
Py_DECREF(v);
|
|
491
|
-
}
|
|
492
|
-
break;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
// TODO(dreiss): Consider breaking this out as a function
|
|
496
|
-
// the way we did for decode_struct.
|
|
497
|
-
case T_STRUCT: {
|
|
498
|
-
StructTypeArgs parsedargs;
|
|
499
|
-
Py_ssize_t nspec;
|
|
500
|
-
Py_ssize_t i;
|
|
501
|
-
|
|
502
|
-
if (!parse_struct_args(&parsedargs, typeargs)) {
|
|
503
|
-
return false;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
nspec = PyTuple_Size(parsedargs.spec);
|
|
507
|
-
|
|
508
|
-
if (nspec == -1) {
|
|
509
|
-
return false;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
for (i = 0; i < nspec; i++) {
|
|
513
|
-
StructItemSpec parsedspec;
|
|
514
|
-
PyObject* spec_tuple;
|
|
515
|
-
PyObject* instval = NULL;
|
|
516
|
-
|
|
517
|
-
spec_tuple = PyTuple_GET_ITEM(parsedargs.spec, i);
|
|
518
|
-
if (spec_tuple == Py_None) {
|
|
519
|
-
continue;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
if (!parse_struct_item_spec (&parsedspec, spec_tuple)) {
|
|
523
|
-
return false;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
instval = PyObject_GetAttr(value, parsedspec.attrname);
|
|
527
|
-
|
|
528
|
-
if (!instval) {
|
|
529
|
-
return false;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
if (instval == Py_None) {
|
|
533
|
-
Py_DECREF(instval);
|
|
534
|
-
continue;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
writeByte(output, (int8_t) parsedspec.type);
|
|
538
|
-
writeI16(output, parsedspec.tag);
|
|
539
|
-
|
|
540
|
-
if (!output_val(output, instval, parsedspec.type, parsedspec.typeargs)) {
|
|
541
|
-
Py_DECREF(instval);
|
|
542
|
-
return false;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
Py_DECREF(instval);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
writeByte(output, (int8_t)T_STOP);
|
|
549
|
-
break;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
case T_STOP:
|
|
553
|
-
case T_VOID:
|
|
554
|
-
case T_UTF16:
|
|
555
|
-
case T_UTF8:
|
|
556
|
-
case T_U64:
|
|
557
|
-
default:
|
|
558
|
-
PyErr_SetString(PyExc_TypeError, "Unexpected TType");
|
|
559
|
-
return false;
|
|
560
|
-
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
return true;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
/* --- TOP-LEVEL WRAPPER FOR OUTPUT -- */
|
|
568
|
-
|
|
569
|
-
static PyObject *
|
|
570
|
-
encode_binary(PyObject *self, PyObject *args) {
|
|
571
|
-
PyObject* enc_obj;
|
|
572
|
-
PyObject* type_args;
|
|
573
|
-
PyObject* buf;
|
|
574
|
-
PyObject* ret = NULL;
|
|
575
|
-
|
|
576
|
-
if (!PyArg_ParseTuple(args, "OO", &enc_obj, &type_args)) {
|
|
577
|
-
return NULL;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
buf = PycStringIO->NewOutput(INIT_OUTBUF_SIZE);
|
|
581
|
-
if (output_val(buf, enc_obj, T_STRUCT, type_args)) {
|
|
582
|
-
ret = PycStringIO->cgetvalue(buf);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
Py_DECREF(buf);
|
|
586
|
-
return ret;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/* ====== END WRITING FUNCTIONS ====== */
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
/* ====== BEGIN READING FUNCTIONS ====== */
|
|
593
|
-
|
|
594
|
-
/* --- LOW-LEVEL READING FUNCTIONS --- */
|
|
595
|
-
|
|
596
|
-
static void
|
|
597
|
-
free_decodebuf(DecodeBuffer* d) {
|
|
598
|
-
Py_XDECREF(d->stringiobuf);
|
|
599
|
-
Py_XDECREF(d->refill_callable);
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
static bool
|
|
603
|
-
decode_buffer_from_obj(DecodeBuffer* dest, PyObject* obj) {
|
|
604
|
-
dest->stringiobuf = PyObject_GetAttr(obj, INTERN_STRING(cstringio_buf));
|
|
605
|
-
if (!dest->stringiobuf) {
|
|
606
|
-
return false;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
if (!PycStringIO_InputCheck(dest->stringiobuf)) {
|
|
610
|
-
free_decodebuf(dest);
|
|
611
|
-
PyErr_SetString(PyExc_TypeError, "expecting stringio input");
|
|
612
|
-
return false;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
dest->refill_callable = PyObject_GetAttr(obj, INTERN_STRING(cstringio_refill));
|
|
616
|
-
|
|
617
|
-
if(!dest->refill_callable) {
|
|
618
|
-
free_decodebuf(dest);
|
|
619
|
-
return false;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
if (!PyCallable_Check(dest->refill_callable)) {
|
|
623
|
-
free_decodebuf(dest);
|
|
624
|
-
PyErr_SetString(PyExc_TypeError, "expecting callable");
|
|
625
|
-
return false;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
return true;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
static bool readBytes(DecodeBuffer* input, char** output, int len) {
|
|
632
|
-
int read;
|
|
633
|
-
|
|
634
|
-
// TODO(dreiss): Don't fear the malloc. Think about taking a copy of
|
|
635
|
-
// the partial read instead of forcing the transport
|
|
636
|
-
// to prepend it to its buffer.
|
|
637
|
-
|
|
638
|
-
read = PycStringIO->cread(input->stringiobuf, output, len);
|
|
639
|
-
|
|
640
|
-
if (read == len) {
|
|
641
|
-
return true;
|
|
642
|
-
} else if (read == -1) {
|
|
643
|
-
return false;
|
|
644
|
-
} else {
|
|
645
|
-
PyObject* newiobuf;
|
|
646
|
-
|
|
647
|
-
// using building functions as this is a rare codepath
|
|
648
|
-
newiobuf = PyObject_CallFunction(
|
|
649
|
-
input->refill_callable, "s#i", *output, read, len, NULL);
|
|
650
|
-
if (newiobuf == NULL) {
|
|
651
|
-
return false;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
// must do this *AFTER* the call so that we don't deref the io buffer
|
|
655
|
-
Py_CLEAR(input->stringiobuf);
|
|
656
|
-
input->stringiobuf = newiobuf;
|
|
657
|
-
|
|
658
|
-
read = PycStringIO->cread(input->stringiobuf, output, len);
|
|
659
|
-
|
|
660
|
-
if (read == len) {
|
|
661
|
-
return true;
|
|
662
|
-
} else if (read == -1) {
|
|
663
|
-
return false;
|
|
664
|
-
} else {
|
|
665
|
-
// TODO(dreiss): This could be a valid code path for big binary blobs.
|
|
666
|
-
PyErr_SetString(PyExc_TypeError,
|
|
667
|
-
"refill claimed to have refilled the buffer, but didn't!!");
|
|
668
|
-
return false;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
static int8_t readByte(DecodeBuffer* input) {
|
|
674
|
-
char* buf;
|
|
675
|
-
if (!readBytes(input, &buf, sizeof(int8_t))) {
|
|
676
|
-
return -1;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
return *(int8_t*) buf;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
static int16_t readI16(DecodeBuffer* input) {
|
|
683
|
-
char* buf;
|
|
684
|
-
if (!readBytes(input, &buf, sizeof(int16_t))) {
|
|
685
|
-
return -1;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
return (int16_t) ntohs(*(int16_t*) buf);
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
static int32_t readI32(DecodeBuffer* input) {
|
|
692
|
-
char* buf;
|
|
693
|
-
if (!readBytes(input, &buf, sizeof(int32_t))) {
|
|
694
|
-
return -1;
|
|
695
|
-
}
|
|
696
|
-
return (int32_t) ntohl(*(int32_t*) buf);
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
static int64_t readI64(DecodeBuffer* input) {
|
|
701
|
-
char* buf;
|
|
702
|
-
if (!readBytes(input, &buf, sizeof(int64_t))) {
|
|
703
|
-
return -1;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
return (int64_t) ntohll(*(int64_t*) buf);
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
static double readDouble(DecodeBuffer* input) {
|
|
710
|
-
union {
|
|
711
|
-
int64_t f;
|
|
712
|
-
double t;
|
|
713
|
-
} transfer;
|
|
714
|
-
|
|
715
|
-
transfer.f = readI64(input);
|
|
716
|
-
if (transfer.f == -1) {
|
|
717
|
-
return -1;
|
|
718
|
-
}
|
|
719
|
-
return transfer.t;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
static bool
|
|
723
|
-
checkTypeByte(DecodeBuffer* input, TType expected) {
|
|
724
|
-
TType got = readByte(input);
|
|
725
|
-
if (INT_CONV_ERROR_OCCURRED(got)) {
|
|
726
|
-
return false;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
if (expected != got) {
|
|
730
|
-
PyErr_SetString(PyExc_TypeError, "got wrong ttype while reading field");
|
|
731
|
-
return false;
|
|
732
|
-
}
|
|
733
|
-
return true;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
static bool
|
|
737
|
-
skip(DecodeBuffer* input, TType type) {
|
|
738
|
-
#define SKIPBYTES(n) \
|
|
739
|
-
do { \
|
|
740
|
-
if (!readBytes(input, &dummy_buf, (n))) { \
|
|
741
|
-
return false; \
|
|
742
|
-
} \
|
|
743
|
-
} while(0)
|
|
744
|
-
|
|
745
|
-
char* dummy_buf;
|
|
746
|
-
|
|
747
|
-
switch (type) {
|
|
748
|
-
|
|
749
|
-
case T_BOOL:
|
|
750
|
-
case T_I08: SKIPBYTES(1); break;
|
|
751
|
-
case T_I16: SKIPBYTES(2); break;
|
|
752
|
-
case T_I32: SKIPBYTES(4); break;
|
|
753
|
-
case T_I64:
|
|
754
|
-
case T_DOUBLE: SKIPBYTES(8); break;
|
|
755
|
-
|
|
756
|
-
case T_STRING: {
|
|
757
|
-
// TODO(dreiss): Find out if these check_ssize_t32s are really necessary.
|
|
758
|
-
int len = readI32(input);
|
|
759
|
-
if (!check_ssize_t_32(len)) {
|
|
760
|
-
return false;
|
|
761
|
-
}
|
|
762
|
-
SKIPBYTES(len);
|
|
763
|
-
break;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
case T_LIST:
|
|
767
|
-
case T_SET: {
|
|
768
|
-
TType etype;
|
|
769
|
-
int len, i;
|
|
770
|
-
|
|
771
|
-
etype = readByte(input);
|
|
772
|
-
if (etype == -1) {
|
|
773
|
-
return false;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
len = readI32(input);
|
|
777
|
-
if (!check_ssize_t_32(len)) {
|
|
778
|
-
return false;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
for (i = 0; i < len; i++) {
|
|
782
|
-
if (!skip(input, etype)) {
|
|
783
|
-
return false;
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
break;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
case T_MAP: {
|
|
790
|
-
TType ktype, vtype;
|
|
791
|
-
int len, i;
|
|
792
|
-
|
|
793
|
-
ktype = readByte(input);
|
|
794
|
-
if (ktype == -1) {
|
|
795
|
-
return false;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
vtype = readByte(input);
|
|
799
|
-
if (vtype == -1) {
|
|
800
|
-
return false;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
len = readI32(input);
|
|
804
|
-
if (!check_ssize_t_32(len)) {
|
|
805
|
-
return false;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
for (i = 0; i < len; i++) {
|
|
809
|
-
if (!(skip(input, ktype) && skip(input, vtype))) {
|
|
810
|
-
return false;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
break;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
case T_STRUCT: {
|
|
817
|
-
while (true) {
|
|
818
|
-
TType type;
|
|
819
|
-
|
|
820
|
-
type = readByte(input);
|
|
821
|
-
if (type == -1) {
|
|
822
|
-
return false;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
if (type == T_STOP)
|
|
826
|
-
break;
|
|
827
|
-
|
|
828
|
-
SKIPBYTES(2); // tag
|
|
829
|
-
if (!skip(input, type)) {
|
|
830
|
-
return false;
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
break;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
case T_STOP:
|
|
837
|
-
case T_VOID:
|
|
838
|
-
case T_UTF16:
|
|
839
|
-
case T_UTF8:
|
|
840
|
-
case T_U64:
|
|
841
|
-
default:
|
|
842
|
-
PyErr_SetString(PyExc_TypeError, "Unexpected TType");
|
|
843
|
-
return false;
|
|
844
|
-
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
return true;
|
|
848
|
-
|
|
849
|
-
#undef SKIPBYTES
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
/* --- HELPER FUNCTION FOR DECODE_VAL --- */
|
|
854
|
-
|
|
855
|
-
static PyObject*
|
|
856
|
-
decode_val(DecodeBuffer* input, TType type, PyObject* typeargs);
|
|
857
|
-
|
|
858
|
-
static bool
|
|
859
|
-
decode_struct(DecodeBuffer* input, PyObject* output, PyObject* spec_seq) {
|
|
860
|
-
int spec_seq_len = PyTuple_Size(spec_seq);
|
|
861
|
-
if (spec_seq_len == -1) {
|
|
862
|
-
return false;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
while (true) {
|
|
866
|
-
TType type;
|
|
867
|
-
int16_t tag;
|
|
868
|
-
PyObject* item_spec;
|
|
869
|
-
PyObject* fieldval = NULL;
|
|
870
|
-
StructItemSpec parsedspec;
|
|
871
|
-
|
|
872
|
-
type = readByte(input);
|
|
873
|
-
if (type == -1) {
|
|
874
|
-
return false;
|
|
875
|
-
}
|
|
876
|
-
if (type == T_STOP) {
|
|
877
|
-
break;
|
|
878
|
-
}
|
|
879
|
-
tag = readI16(input);
|
|
880
|
-
if (INT_CONV_ERROR_OCCURRED(tag)) {
|
|
881
|
-
return false;
|
|
882
|
-
}
|
|
883
|
-
if (tag >= 0 && tag < spec_seq_len) {
|
|
884
|
-
item_spec = PyTuple_GET_ITEM(spec_seq, tag);
|
|
885
|
-
} else {
|
|
886
|
-
item_spec = Py_None;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
if (item_spec == Py_None) {
|
|
890
|
-
if (!skip(input, type)) {
|
|
891
|
-
return false;
|
|
892
|
-
} else {
|
|
893
|
-
continue;
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
if (!parse_struct_item_spec(&parsedspec, item_spec)) {
|
|
898
|
-
return false;
|
|
899
|
-
}
|
|
900
|
-
if (parsedspec.type != type) {
|
|
901
|
-
if (!skip(input, type)) {
|
|
902
|
-
PyErr_SetString(PyExc_TypeError, "struct field had wrong type while reading and can't be skipped");
|
|
903
|
-
return false;
|
|
904
|
-
} else {
|
|
905
|
-
continue;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
fieldval = decode_val(input, parsedspec.type, parsedspec.typeargs);
|
|
910
|
-
if (fieldval == NULL) {
|
|
911
|
-
return false;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
if (PyObject_SetAttr(output, parsedspec.attrname, fieldval) == -1) {
|
|
915
|
-
Py_DECREF(fieldval);
|
|
916
|
-
return false;
|
|
917
|
-
}
|
|
918
|
-
Py_DECREF(fieldval);
|
|
919
|
-
}
|
|
920
|
-
return true;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
/* --- MAIN RECURSIVE INPUT FUCNTION --- */
|
|
925
|
-
|
|
926
|
-
// Returns a new reference.
|
|
927
|
-
static PyObject*
|
|
928
|
-
decode_val(DecodeBuffer* input, TType type, PyObject* typeargs) {
|
|
929
|
-
switch (type) {
|
|
930
|
-
|
|
931
|
-
case T_BOOL: {
|
|
932
|
-
int8_t v = readByte(input);
|
|
933
|
-
if (INT_CONV_ERROR_OCCURRED(v)) {
|
|
934
|
-
return NULL;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
switch (v) {
|
|
938
|
-
case 0: Py_RETURN_FALSE;
|
|
939
|
-
case 1: Py_RETURN_TRUE;
|
|
940
|
-
// Don't laugh. This is a potentially serious issue.
|
|
941
|
-
default: PyErr_SetString(PyExc_TypeError, "boolean out of range"); return NULL;
|
|
942
|
-
}
|
|
943
|
-
break;
|
|
944
|
-
}
|
|
945
|
-
case T_I08: {
|
|
946
|
-
int8_t v = readByte(input);
|
|
947
|
-
if (INT_CONV_ERROR_OCCURRED(v)) {
|
|
948
|
-
return NULL;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
return PyInt_FromLong(v);
|
|
952
|
-
}
|
|
953
|
-
case T_I16: {
|
|
954
|
-
int16_t v = readI16(input);
|
|
955
|
-
if (INT_CONV_ERROR_OCCURRED(v)) {
|
|
956
|
-
return NULL;
|
|
957
|
-
}
|
|
958
|
-
return PyInt_FromLong(v);
|
|
959
|
-
}
|
|
960
|
-
case T_I32: {
|
|
961
|
-
int32_t v = readI32(input);
|
|
962
|
-
if (INT_CONV_ERROR_OCCURRED(v)) {
|
|
963
|
-
return NULL;
|
|
964
|
-
}
|
|
965
|
-
return PyInt_FromLong(v);
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
case T_I64: {
|
|
969
|
-
int64_t v = readI64(input);
|
|
970
|
-
if (INT_CONV_ERROR_OCCURRED(v)) {
|
|
971
|
-
return NULL;
|
|
972
|
-
}
|
|
973
|
-
// TODO(dreiss): Find out if we can take this fastpath always when
|
|
974
|
-
// sizeof(long) == sizeof(long long).
|
|
975
|
-
if (CHECK_RANGE(v, LONG_MIN, LONG_MAX)) {
|
|
976
|
-
return PyInt_FromLong((long) v);
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
return PyLong_FromLongLong(v);
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
case T_DOUBLE: {
|
|
983
|
-
double v = readDouble(input);
|
|
984
|
-
if (v == -1.0 && PyErr_Occurred()) {
|
|
985
|
-
return false;
|
|
986
|
-
}
|
|
987
|
-
return PyFloat_FromDouble(v);
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
case T_STRING: {
|
|
991
|
-
Py_ssize_t len = readI32(input);
|
|
992
|
-
char* buf;
|
|
993
|
-
if (!readBytes(input, &buf, len)) {
|
|
994
|
-
return NULL;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
return PyString_FromStringAndSize(buf, len);
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
case T_LIST:
|
|
1001
|
-
case T_SET: {
|
|
1002
|
-
SetListTypeArgs parsedargs;
|
|
1003
|
-
int32_t len;
|
|
1004
|
-
PyObject* ret = NULL;
|
|
1005
|
-
int i;
|
|
1006
|
-
|
|
1007
|
-
if (!parse_set_list_args(&parsedargs, typeargs)) {
|
|
1008
|
-
return NULL;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
if (!checkTypeByte(input, parsedargs.element_type)) {
|
|
1012
|
-
return NULL;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
len = readI32(input);
|
|
1016
|
-
if (!check_ssize_t_32(len)) {
|
|
1017
|
-
return NULL;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
ret = PyList_New(len);
|
|
1021
|
-
if (!ret) {
|
|
1022
|
-
return NULL;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
for (i = 0; i < len; i++) {
|
|
1026
|
-
PyObject* item = decode_val(input, parsedargs.element_type, parsedargs.typeargs);
|
|
1027
|
-
if (!item) {
|
|
1028
|
-
Py_DECREF(ret);
|
|
1029
|
-
return NULL;
|
|
1030
|
-
}
|
|
1031
|
-
PyList_SET_ITEM(ret, i, item);
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
// TODO(dreiss): Consider biting the bullet and making two separate cases
|
|
1035
|
-
// for list and set, avoiding this post facto conversion.
|
|
1036
|
-
if (type == T_SET) {
|
|
1037
|
-
PyObject* setret;
|
|
1038
|
-
#if (PY_VERSION_HEX < 0x02050000)
|
|
1039
|
-
// hack needed for older versions
|
|
1040
|
-
setret = PyObject_CallFunctionObjArgs((PyObject*)&PySet_Type, ret, NULL);
|
|
1041
|
-
#else
|
|
1042
|
-
// official version
|
|
1043
|
-
setret = PySet_New(ret);
|
|
1044
|
-
#endif
|
|
1045
|
-
Py_DECREF(ret);
|
|
1046
|
-
return setret;
|
|
1047
|
-
}
|
|
1048
|
-
return ret;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
case T_MAP: {
|
|
1052
|
-
int32_t len;
|
|
1053
|
-
int i;
|
|
1054
|
-
MapTypeArgs parsedargs;
|
|
1055
|
-
PyObject* ret = NULL;
|
|
1056
|
-
|
|
1057
|
-
if (!parse_map_args(&parsedargs, typeargs)) {
|
|
1058
|
-
return NULL;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
if (!checkTypeByte(input, parsedargs.ktag)) {
|
|
1062
|
-
return NULL;
|
|
1063
|
-
}
|
|
1064
|
-
if (!checkTypeByte(input, parsedargs.vtag)) {
|
|
1065
|
-
return NULL;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
len = readI32(input);
|
|
1069
|
-
if (!check_ssize_t_32(len)) {
|
|
1070
|
-
return false;
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
ret = PyDict_New();
|
|
1074
|
-
if (!ret) {
|
|
1075
|
-
goto error;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
for (i = 0; i < len; i++) {
|
|
1079
|
-
PyObject* k = NULL;
|
|
1080
|
-
PyObject* v = NULL;
|
|
1081
|
-
k = decode_val(input, parsedargs.ktag, parsedargs.ktypeargs);
|
|
1082
|
-
if (k == NULL) {
|
|
1083
|
-
goto loop_error;
|
|
1084
|
-
}
|
|
1085
|
-
v = decode_val(input, parsedargs.vtag, parsedargs.vtypeargs);
|
|
1086
|
-
if (v == NULL) {
|
|
1087
|
-
goto loop_error;
|
|
1088
|
-
}
|
|
1089
|
-
if (PyDict_SetItem(ret, k, v) == -1) {
|
|
1090
|
-
goto loop_error;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
Py_DECREF(k);
|
|
1094
|
-
Py_DECREF(v);
|
|
1095
|
-
continue;
|
|
1096
|
-
|
|
1097
|
-
// Yuck! Destructors, anyone?
|
|
1098
|
-
loop_error:
|
|
1099
|
-
Py_XDECREF(k);
|
|
1100
|
-
Py_XDECREF(v);
|
|
1101
|
-
goto error;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
return ret;
|
|
1105
|
-
|
|
1106
|
-
error:
|
|
1107
|
-
Py_XDECREF(ret);
|
|
1108
|
-
return NULL;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
case T_STRUCT: {
|
|
1112
|
-
StructTypeArgs parsedargs;
|
|
1113
|
-
if (!parse_struct_args(&parsedargs, typeargs)) {
|
|
1114
|
-
return NULL;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
PyObject* ret = PyObject_CallObject(parsedargs.klass, NULL);
|
|
1118
|
-
if (!ret) {
|
|
1119
|
-
return NULL;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
if (!decode_struct(input, ret, parsedargs.spec)) {
|
|
1123
|
-
Py_DECREF(ret);
|
|
1124
|
-
return NULL;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
return ret;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
case T_STOP:
|
|
1131
|
-
case T_VOID:
|
|
1132
|
-
case T_UTF16:
|
|
1133
|
-
case T_UTF8:
|
|
1134
|
-
case T_U64:
|
|
1135
|
-
default:
|
|
1136
|
-
PyErr_SetString(PyExc_TypeError, "Unexpected TType");
|
|
1137
|
-
return NULL;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
/* --- TOP-LEVEL WRAPPER FOR INPUT -- */
|
|
1143
|
-
|
|
1144
|
-
static PyObject*
|
|
1145
|
-
decode_binary(PyObject *self, PyObject *args) {
|
|
1146
|
-
PyObject* output_obj = NULL;
|
|
1147
|
-
PyObject* transport = NULL;
|
|
1148
|
-
PyObject* typeargs = NULL;
|
|
1149
|
-
StructTypeArgs parsedargs;
|
|
1150
|
-
DecodeBuffer input = {};
|
|
1151
|
-
|
|
1152
|
-
if (!PyArg_ParseTuple(args, "OOO", &output_obj, &transport, &typeargs)) {
|
|
1153
|
-
return NULL;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
if (!parse_struct_args(&parsedargs, typeargs)) {
|
|
1157
|
-
return NULL;
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
if (!decode_buffer_from_obj(&input, transport)) {
|
|
1161
|
-
return NULL;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
if (!decode_struct(&input, output_obj, parsedargs.spec)) {
|
|
1165
|
-
free_decodebuf(&input);
|
|
1166
|
-
return NULL;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
free_decodebuf(&input);
|
|
1170
|
-
|
|
1171
|
-
Py_RETURN_NONE;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
/* ====== END READING FUNCTIONS ====== */
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
/* -- PYTHON MODULE SETUP STUFF --- */
|
|
1178
|
-
|
|
1179
|
-
static PyMethodDef ThriftFastBinaryMethods[] = {
|
|
1180
|
-
|
|
1181
|
-
{"encode_binary", encode_binary, METH_VARARGS, ""},
|
|
1182
|
-
{"decode_binary", decode_binary, METH_VARARGS, ""},
|
|
1183
|
-
|
|
1184
|
-
{NULL, NULL, 0, NULL} /* Sentinel */
|
|
1185
|
-
};
|
|
1186
|
-
|
|
1187
|
-
PyMODINIT_FUNC
|
|
1188
|
-
initfastbinary(void) {
|
|
1189
|
-
#define INIT_INTERN_STRING(value) \
|
|
1190
|
-
do { \
|
|
1191
|
-
INTERN_STRING(value) = PyString_InternFromString(#value); \
|
|
1192
|
-
if(!INTERN_STRING(value)) return; \
|
|
1193
|
-
} while(0)
|
|
1194
|
-
|
|
1195
|
-
INIT_INTERN_STRING(cstringio_buf);
|
|
1196
|
-
INIT_INTERN_STRING(cstringio_refill);
|
|
1197
|
-
#undef INIT_INTERN_STRING
|
|
1198
|
-
|
|
1199
|
-
PycString_IMPORT;
|
|
1200
|
-
if (PycStringIO == NULL) return;
|
|
1201
|
-
|
|
1202
|
-
(void) Py_InitModule("thrift.protocol.fastbinary", ThriftFastBinaryMethods);
|
|
1203
|
-
}
|