cifrado 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/.gitignore +18 -0
- data/CHANGELOG.md +44 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +247 -0
- data/RELEASE.md +10 -0
- data/Rakefile +21 -0
- data/TODO.md +6 -0
- data/bin/cifrado +7 -0
- data/cifrado.gemspec +31 -0
- data/gem-public_cert.pem +20 -0
- data/lib/cifrado.rb +48 -0
- data/lib/cifrado/cli.rb +140 -0
- data/lib/cifrado/cli/cinema.rb +81 -0
- data/lib/cifrado/cli/delete.rb +36 -0
- data/lib/cifrado/cli/download.rb +54 -0
- data/lib/cifrado/cli/jukebox.rb +94 -0
- data/lib/cifrado/cli/list.rb +64 -0
- data/lib/cifrado/cli/post.rb +10 -0
- data/lib/cifrado/cli/progressbar.rb +86 -0
- data/lib/cifrado/cli/saio.rb +11 -0
- data/lib/cifrado/cli/saio/base.rb +20 -0
- data/lib/cifrado/cli/saio/bootstrap.rb +118 -0
- data/lib/cifrado/cli/saio/destroy.rb +16 -0
- data/lib/cifrado/cli/saio/scripts/saio.sh.erb +445 -0
- data/lib/cifrado/cli/set_acl.rb +10 -0
- data/lib/cifrado/cli/setup.rb +64 -0
- data/lib/cifrado/cli/stat.rb +41 -0
- data/lib/cifrado/cli/upload.rb +269 -0
- data/lib/cifrado/config.rb +18 -0
- data/lib/cifrado/core_ext/ruby18_base64.rb +15 -0
- data/lib/cifrado/crypto_services.rb +218 -0
- data/lib/cifrado/file_splitter.rb +67 -0
- data/lib/cifrado/rate_limit.rb +23 -0
- data/lib/cifrado/streaming_downloader.rb +49 -0
- data/lib/cifrado/streaming_uploader.rb +57 -0
- data/lib/cifrado/swift_client.rb +313 -0
- data/lib/cifrado/utils.rb +59 -0
- data/lib/cifrado/version.rb +3 -0
- data/tests/cli/list_tests.rb +28 -0
- data/tests/cli/upload_multi_tests.rb +94 -0
- data/tests/cli/upload_tests.rb +167 -0
- data/tests/cli_tests.rb +2 -0
- data/tests/crypto_services_tests.rb +145 -0
- data/tests/file_splitter_tests.rb +61 -0
- data/tests/helper.rb +117 -0
- data/tests/swift_client/create_directory.rb +14 -0
- data/tests/swift_client/download_tests.rb +208 -0
- data/tests/swift_client/file_available.rb +25 -0
- data/tests/swift_client/head_tests.rb +34 -0
- data/tests/swift_client/match_tests.rb +29 -0
- data/tests/swift_client/upload_tests.rb +70 -0
- data/tests/swift_client_tests.rb +29 -0
- data/tests/utils_tests.rb +33 -0
- data/vendor/fog/.document +3 -0
- data/vendor/fog/.gitignore +23 -0
- data/vendor/fog/.irbrc +82 -0
- data/vendor/fog/.travis.yml +21 -0
- data/vendor/fog/README.cifrado +3 -0
- data/vendor/fog/README.md +156 -0
- data/vendor/fog/RELEASE.md +39 -0
- data/vendor/fog/changelog.txt +4156 -0
- data/vendor/fog/fog.gemspec +70 -0
- data/vendor/fog/lib/fog.rb +17 -0
- data/vendor/fog/lib/fog/cdn.rb +30 -0
- data/vendor/fog/lib/fog/compute.rb +127 -0
- data/vendor/fog/lib/fog/compute/models/server.rb +73 -0
- data/vendor/fog/lib/fog/core.rb +38 -0
- data/vendor/fog/lib/fog/core/attributes.rb +221 -0
- data/vendor/fog/lib/fog/core/collection.rb +145 -0
- data/vendor/fog/lib/fog/core/connection.rb +36 -0
- data/vendor/fog/lib/fog/core/credentials.rb +65 -0
- data/vendor/fog/lib/fog/core/current_machine.rb +34 -0
- data/vendor/fog/lib/fog/core/deprecated_connection_accessors.rb +41 -0
- data/vendor/fog/lib/fog/core/deprecation.rb +23 -0
- data/vendor/fog/lib/fog/core/errors.rb +108 -0
- data/vendor/fog/lib/fog/core/hmac.rb +48 -0
- data/vendor/fog/lib/fog/core/json.rb +34 -0
- data/vendor/fog/lib/fog/core/logger.rb +45 -0
- data/vendor/fog/lib/fog/core/mock.rb +92 -0
- data/vendor/fog/lib/fog/core/model.rb +79 -0
- data/vendor/fog/lib/fog/core/parser.rb +116 -0
- data/vendor/fog/lib/fog/core/provider.rb +35 -0
- data/vendor/fog/lib/fog/core/scp.rb +96 -0
- data/vendor/fog/lib/fog/core/service.rb +223 -0
- data/vendor/fog/lib/fog/core/ssh.rb +137 -0
- data/vendor/fog/lib/fog/core/time.rb +32 -0
- data/vendor/fog/lib/fog/core/timeout.rb +11 -0
- data/vendor/fog/lib/fog/core/wait_for.rb +15 -0
- data/vendor/fog/lib/fog/digitalocean.rb +9 -0
- data/vendor/fog/lib/fog/digitalocean/compute.rb +100 -0
- data/vendor/fog/lib/fog/digitalocean/examples/getting_started.md +106 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/flavor.rb +14 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/flavors.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/image.rb +15 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/images.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/region.rb +14 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/regions.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/server.rb +150 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/servers.rb +27 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb +49 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/create_ssh_key.rb +26 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/destroy_server.rb +28 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/get_server_details.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_flavors.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_images.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_regions.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_servers.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_ssh_keys.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/power_cycle_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/power_off_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/power_on_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/reboot_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/shutdown_server.rb +25 -0
- data/vendor/fog/lib/fog/dns.rb +59 -0
- data/vendor/fog/lib/fog/identity.rb +27 -0
- data/vendor/fog/lib/fog/image.rb +24 -0
- data/vendor/fog/lib/fog/local.rb +11 -0
- data/vendor/fog/lib/fog/local/models/storage/directories.rb +33 -0
- data/vendor/fog/lib/fog/local/models/storage/directory.rb +57 -0
- data/vendor/fog/lib/fog/local/models/storage/file.rb +131 -0
- data/vendor/fog/lib/fog/local/models/storage/files.rb +87 -0
- data/vendor/fog/lib/fog/local/storage.rb +103 -0
- data/vendor/fog/lib/fog/network.rb +26 -0
- data/vendor/fog/lib/fog/openstack.rb +214 -0
- data/vendor/fog/lib/fog/openstack/README.identity.md +69 -0
- data/vendor/fog/lib/fog/openstack/compute.rb +423 -0
- data/vendor/fog/lib/fog/openstack/identity.rb +299 -0
- data/vendor/fog/lib/fog/openstack/image.rb +217 -0
- data/vendor/fog/lib/fog/openstack/models/compute/address.rb +71 -0
- data/vendor/fog/lib/fog/openstack/models/compute/addresses.rb +33 -0
- data/vendor/fog/lib/fog/openstack/models/compute/flavor.rb +45 -0
- data/vendor/fog/lib/fog/openstack/models/compute/flavors.rb +28 -0
- data/vendor/fog/lib/fog/openstack/models/compute/host.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/compute/hosts.rb +32 -0
- data/vendor/fog/lib/fog/openstack/models/compute/image.rb +58 -0
- data/vendor/fog/lib/fog/openstack/models/compute/images.rb +33 -0
- data/vendor/fog/lib/fog/openstack/models/compute/key_pair.rb +60 -0
- data/vendor/fog/lib/fog/openstack/models/compute/key_pairs.rb +31 -0
- data/vendor/fog/lib/fog/openstack/models/compute/metadata.rb +68 -0
- data/vendor/fog/lib/fog/openstack/models/compute/metadatum.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/compute/network.rb +13 -0
- data/vendor/fog/lib/fog/openstack/models/compute/networks.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/compute/security_group.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/compute/security_groups.rb +27 -0
- data/vendor/fog/lib/fog/openstack/models/compute/server.rb +278 -0
- data/vendor/fog/lib/fog/openstack/models/compute/servers.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/compute/snapshot.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/compute/snapshots.rb +26 -0
- data/vendor/fog/lib/fog/openstack/models/compute/tenant.rb +24 -0
- data/vendor/fog/lib/fog/openstack/models/compute/tenants.rb +24 -0
- data/vendor/fog/lib/fog/openstack/models/compute/volume.rb +59 -0
- data/vendor/fog/lib/fog/openstack/models/compute/volumes.rb +26 -0
- data/vendor/fog/lib/fog/openstack/models/identity/ec2_credential.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/identity/ec2_credentials.rb +53 -0
- data/vendor/fog/lib/fog/openstack/models/identity/role.rb +50 -0
- data/vendor/fog/lib/fog/openstack/models/identity/roles.rb +21 -0
- data/vendor/fog/lib/fog/openstack/models/identity/tenant.rb +62 -0
- data/vendor/fog/lib/fog/openstack/models/identity/tenants.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/identity/user.rb +70 -0
- data/vendor/fog/lib/fog/openstack/models/identity/users.rb +32 -0
- data/vendor/fog/lib/fog/openstack/models/image/image.rb +91 -0
- data/vendor/fog/lib/fog/openstack/models/image/images.rb +60 -0
- data/vendor/fog/lib/fog/openstack/models/meta_parent.rb +33 -0
- data/vendor/fog/lib/fog/openstack/models/network/floating_ip.rb +52 -0
- data/vendor/fog/lib/fog/openstack/models/network/floating_ips.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/network/network.rb +47 -0
- data/vendor/fog/lib/fog/openstack/models/network/networks.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/network/port.rb +53 -0
- data/vendor/fog/lib/fog/openstack/models/network/ports.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/network/subnet.rb +56 -0
- data/vendor/fog/lib/fog/openstack/models/network/subnets.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/storage/directories.rb +39 -0
- data/vendor/fog/lib/fog/openstack/models/storage/directory.rb +50 -0
- data/vendor/fog/lib/fog/openstack/models/storage/file.rb +152 -0
- data/vendor/fog/lib/fog/openstack/models/storage/files.rb +94 -0
- data/vendor/fog/lib/fog/openstack/models/volume/volume.rb +47 -0
- data/vendor/fog/lib/fog/openstack/models/volume/volumes.rb +27 -0
- data/vendor/fog/lib/fog/openstack/network.rb +247 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/add_fixed_ip.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/allocate_address.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/associate_address.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/attach_volume.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +41 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/change_server_password.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/confirm_resize_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_flavor.rb +85 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_image.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_key_pair.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_security_group.rb +52 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_security_group_rule.rb +59 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_server.rb +131 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_volume.rb +54 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +47 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_flavor.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_image.rb +40 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_key_pair.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_metadata.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_security_group.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_server.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_snapshot.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_volume.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/detach_volume.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/disassociate_address.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_address.rb +41 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_console_output.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_flavor_details.rb +43 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_host_details.rb +74 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_image_details.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_limits.rb +93 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_metadata.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_quota.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_quota_defaults.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_security_group.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_server_details.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_server_volumes.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_snapshot_details.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_usage.rb +53 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_vnc_console.rb +40 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_volume_details.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_address_pools.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_addresses.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_all_addresses.rb +64 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_flavors.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_hosts.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_images.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_images_detail.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_metadata.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_private_addresses.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_public_addresses.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_security_groups.rb +50 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_servers.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_servers_detail.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_snapshots.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_tenants.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_usages.rb +43 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_volumes.rb +51 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/live_migrate_server.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/migrate_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/pause_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/reboot_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/release_address.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/remove_fixed_ip.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/rescue_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/reset_server_state.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/resize_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/resume_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/revert_resize_server.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/server_action.rb +18 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/server_actions.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/server_diagnostics.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/set_metadata.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/suspend_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/unpause_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/update_metadata.rb +46 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/update_quota.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/update_server.rb +35 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/add_user_to_tenant.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/check_token.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_ec2_credential.rb +58 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_role.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_tenant.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_user.rb +47 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_user_role.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_ec2_credential.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_role.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_tenant.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_user.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_user_role.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_ec2_credential.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_role.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_tenant.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_tenants_by_id.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_tenants_by_name.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_user_by_id.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_user_by_name.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_ec2_credentials.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_endpoints_for_token.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_roles.rb +36 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_tenants.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_user_global_roles.rb +22 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_users.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/remove_user_from_tenant.rb +20 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/update_tenant.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/update_user.rb +36 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/validate_token.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/image/add_member_to_image.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/image/create_image.rb +79 -0
- data/vendor/fog/lib/fog/openstack/requests/image/delete_image.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_image.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_image_by_id.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_image_members.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_shared_images.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/image/list_public_images.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/image/list_public_images_detailed.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/image/remove_member_from_image.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/image/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/image/update_image.rb +70 -0
- data/vendor/fog/lib/fog/openstack/requests/image/update_image_members.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/network/associate_floating_ip.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_floating_ip.rb +50 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_network.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_port.rb +52 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_subnet.rb +56 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_floating_ip.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_network.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_port.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_subnet.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/disassociate_floating_ip.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_floating_ip.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_network.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_port.rb +48 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_subnet.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_floating_ips.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_networks.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_ports.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_subnets.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/network/update_network.rb +41 -0
- data/vendor/fog/lib/fog/openstack/requests/network/update_port.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/network/update_subnet.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/copy_object.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/delete_container.rb +22 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/delete_object.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_container.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_containers.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_object.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_object_https_url.rb +51 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/head_container.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/head_containers.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/head_object.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/put_container.rb +22 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/put_object.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/put_object_manifest.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/create_volume.rb +54 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +47 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/delete_snapshot.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/delete_volume.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/get_snapshot_details.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/get_volume_details.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/list_snapshots.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/list_volumes.rb +55 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/storage.rb +162 -0
- data/vendor/fog/lib/fog/openstack/volume.rb +219 -0
- data/vendor/fog/lib/fog/providers.rb +2 -0
- data/vendor/fog/lib/fog/schema/data_validator.rb +154 -0
- data/vendor/fog/lib/fog/storage.rb +97 -0
- data/vendor/fog/lib/fog/version.rb +3 -0
- data/vendor/fog/lib/fog/volume.rb +25 -0
- metadata +576 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
Shindo.tests('Cifrado | SwiftClient#match') do
|
2
|
+
|
3
|
+
obj = create_bin_payload 1
|
4
|
+
|
5
|
+
tests("#match") do
|
6
|
+
|
7
|
+
response = client.upload(test_container_name, obj)
|
8
|
+
|
9
|
+
test "#{test_container_name}/#{obj} available" do
|
10
|
+
(client.match obj, test_container_name) == 1
|
11
|
+
end
|
12
|
+
|
13
|
+
test "#{test_container_name}////#{obj} available" do
|
14
|
+
(client.match "///" + obj, test_container_name) == 1
|
15
|
+
end
|
16
|
+
|
17
|
+
test "#{test_container_name}/#{obj} MD5 changed" do
|
18
|
+
File.open(obj, 'w') { |f| f.puts 'foo' }
|
19
|
+
(client.match obj, test_container_name) == 2
|
20
|
+
end
|
21
|
+
|
22
|
+
test "#{test_container_name}/#{obj} not available" do
|
23
|
+
clean_test_container
|
24
|
+
(client.match obj, test_container_name) == 0
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
Shindo.tests('Cifrado | SwiftClient#upload') do
|
2
|
+
|
3
|
+
obj = create_bin_payload 1
|
4
|
+
|
5
|
+
tests("#upload") do
|
6
|
+
|
7
|
+
tests("responds to") do
|
8
|
+
[:upload].each do |m|
|
9
|
+
test "#{m}" do
|
10
|
+
client.respond_to? m
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
raises ArgumentError, "ArgumentError when container nil" do
|
16
|
+
client.upload nil, 'foo'
|
17
|
+
end
|
18
|
+
raises ArgumentError, "ArgumentError when object nil" do
|
19
|
+
client.upload 'foo', nil
|
20
|
+
end
|
21
|
+
raises ArgumentError, "when not enough arguments" do
|
22
|
+
client.upload
|
23
|
+
end
|
24
|
+
|
25
|
+
tests "success" do
|
26
|
+
test "upload OK" do
|
27
|
+
response = client.upload('cifrado-tests', obj)
|
28
|
+
response.status == 201
|
29
|
+
end
|
30
|
+
|
31
|
+
test "correct path" do
|
32
|
+
file = create_bin_payload 1
|
33
|
+
client.upload('cifrado-tests', file)
|
34
|
+
dir = client.service.directories.get 'cifrado-tests'
|
35
|
+
!(dir.files.get file[1..-1]).nil?
|
36
|
+
end
|
37
|
+
|
38
|
+
test "custom object path" do
|
39
|
+
file = create_bin_payload 1
|
40
|
+
client.upload('cifrado-tests', file, :object_path => '/foobar')
|
41
|
+
dir = client.service.directories.get 'cifrado-tests'
|
42
|
+
!(dir.files.get 'foobar').nil?
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
tests "progress callback" do
|
47
|
+
chunks = []
|
48
|
+
cb = Proc.new do |tsize, bytes, nchunk|
|
49
|
+
chunks << bytes
|
50
|
+
end
|
51
|
+
client.upload 'cifrado-tests', obj, :progress_callback => cb
|
52
|
+
test "chunks equal File.size" do
|
53
|
+
# FIXME
|
54
|
+
# File.size should be equal to the bytes read
|
55
|
+
# but StreamUploader is buggy
|
56
|
+
File.size(obj) <= chunks.inject(:+)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
clean_test_payloads
|
62
|
+
dir = client.service.directories.get('cifrado-tests')
|
63
|
+
dir.files.each do |f|
|
64
|
+
f.destroy
|
65
|
+
end
|
66
|
+
dir.destroy
|
67
|
+
|
68
|
+
cleanup
|
69
|
+
|
70
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Shindo.tests('Cifrado | SwiftClient') do
|
2
|
+
|
3
|
+
obj = create_bin_payload 1
|
4
|
+
|
5
|
+
tests('set_acl') do
|
6
|
+
dir = test_container
|
7
|
+
response = client.set_acl '.r:*,.rlistings', test_container.key
|
8
|
+
test 'success' do
|
9
|
+
[202,201].include? response.status
|
10
|
+
end
|
11
|
+
test 'ACL present' do
|
12
|
+
response = client.service.request :method => 'GET',
|
13
|
+
:path => test_container.key
|
14
|
+
response.headers['X-Container-Read'] == '.r:*,.rlistings'
|
15
|
+
end
|
16
|
+
dir.destroy
|
17
|
+
end
|
18
|
+
|
19
|
+
tests('#encrypted_upload') do
|
20
|
+
test 'success' do
|
21
|
+
response = client.encrypted_upload('cifrado-tests', obj)
|
22
|
+
cipher = CryptoEngineAES.new client.api_key
|
23
|
+
headers = client.head(test_container_name, clean_object_name(obj))
|
24
|
+
fname = headers['X-Object-Meta-Encrypted-Name']
|
25
|
+
([202,201].include? response.status) and obj == cipher.decrypt(fname)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
include Cifrado::Utils
|
2
|
+
|
3
|
+
Shindo.tests('Cifrado | Utils') do
|
4
|
+
|
5
|
+
tests 'clean_object_name' do
|
6
|
+
test './foo/bar/stuff' do
|
7
|
+
clean_object_name('./foo/bar/stuff') == 'foo/bar/stuff'
|
8
|
+
end
|
9
|
+
test '//foo/bar/stuff' do
|
10
|
+
clean_object_name('//foo/bar/stuff') == 'foo/bar/stuff'
|
11
|
+
end
|
12
|
+
test '/foo/bar/stuff' do
|
13
|
+
clean_object_name('/foo/bar/stuff') == 'foo/bar/stuff'
|
14
|
+
end
|
15
|
+
test 'foo/bar/stuff' do
|
16
|
+
clean_object_name('foo/bar/stuff') == 'foo/bar/stuff'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
test 'encrypt_filename' do
|
21
|
+
cs = CryptoEngineAES.new passphrase
|
22
|
+
filename = "/tmp/cifrado-payload-foobaro8u2ojf98"
|
23
|
+
n = cs.encrypt filename
|
24
|
+
cs.decrypt(n) == filename and n.lines.count == 1
|
25
|
+
end
|
26
|
+
|
27
|
+
test 'decrypt_filename' do
|
28
|
+
cs = CryptoEngineAES.new passphrase
|
29
|
+
fname = 'U2FsdGVkX19Wm6CdV6LF7j7wATQjH02-jeOJTy-Rt_Qs4WCDRblLWvHkvadbuZV9OKn0Rc5_X4BOwspPSV6ZBA=='
|
30
|
+
cs.decrypt(fname) == "/tmp/cifrado-payload-foobaro8u2ojf98"
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
*~
|
2
|
+
*.gem
|
3
|
+
*.rbc
|
4
|
+
*.sw?
|
5
|
+
.rvmrc
|
6
|
+
.bundle
|
7
|
+
.DS_Store
|
8
|
+
.idea
|
9
|
+
.yardoc
|
10
|
+
/tests/.fog
|
11
|
+
bin/*
|
12
|
+
!bin/fog
|
13
|
+
.fog
|
14
|
+
coverage
|
15
|
+
doc/*
|
16
|
+
docs/_site/*
|
17
|
+
docs/about/supported_services.markdown
|
18
|
+
Gemfile.lock
|
19
|
+
yardoc
|
20
|
+
pkg
|
21
|
+
spec/credentials.yml
|
22
|
+
vendor/*
|
23
|
+
tags
|
data/vendor/fog/.irbrc
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
## This is primarily used for easier testing and development or
|
2
|
+
# usage of Fog.
|
3
|
+
#
|
4
|
+
# How to use:
|
5
|
+
# 1. Add this at the end of your `.irbrc` in your home directory.
|
6
|
+
#
|
7
|
+
# @working_directory = Dir.pwd
|
8
|
+
# @local_irbrc = File.join(@working_directory, '.irbrc')
|
9
|
+
#
|
10
|
+
# if @working_directory != ENV['HOME']
|
11
|
+
# load @local_irbrc if File.exists?(@local_irbrc)
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
# remove_instance_variable(:@working_directory)
|
15
|
+
# remove_instance_variable(:@local_irbrc)
|
16
|
+
#
|
17
|
+
# 2. Inside the Fog execute `bundle exec irb`
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'fog'
|
21
|
+
|
22
|
+
class ConnectionManager < Hash
|
23
|
+
def [](key)
|
24
|
+
$connection_manager_previous_key = key
|
25
|
+
super(key)
|
26
|
+
end
|
27
|
+
|
28
|
+
def []=(key, value)
|
29
|
+
$connection_manager_previous_key = key
|
30
|
+
super(key, value)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def connections
|
35
|
+
return @connections if @connections
|
36
|
+
@connections = ConnectionManager.new
|
37
|
+
end
|
38
|
+
|
39
|
+
def connection
|
40
|
+
connections[$connection_manager_previous_key]
|
41
|
+
end
|
42
|
+
|
43
|
+
def connect_openstack(username, password, tenant = nil, url = 'http://192.168.27.100:35357/')
|
44
|
+
parameters = {
|
45
|
+
:provider => 'openstack',
|
46
|
+
:openstack_api_key => password,
|
47
|
+
:openstack_username => username,
|
48
|
+
:openstack_auth_url => "#{url}v2.0/tokens"
|
49
|
+
}
|
50
|
+
|
51
|
+
parameters.merge!(:openstack_tenant => tenant) if tenant
|
52
|
+
|
53
|
+
key = username.to_sym
|
54
|
+
set_service(key, Fog::Identity, parameters)
|
55
|
+
set_service(key, Fog::Compute, parameters)
|
56
|
+
set_service(key, Fog::Volume, parameters)
|
57
|
+
set_service(key, Fog::Image, parameters)
|
58
|
+
end
|
59
|
+
|
60
|
+
def connect(parameters)
|
61
|
+
connections_count = connections.count
|
62
|
+
connections[connections_count] = Hash.new
|
63
|
+
|
64
|
+
set_service(connections_count, Fog::Identity, parameters)
|
65
|
+
set_service(connections_count, Fog::Compute , parameters)
|
66
|
+
set_service(connections_count, Fog::Storage , parameters)
|
67
|
+
set_service(connections_count, Fog::Volume , parameters)
|
68
|
+
set_service(connections_count, Fog::Image , parameters)
|
69
|
+
set_service(connections_count, Fog::DNS , parameters)
|
70
|
+
set_service(connections_count, Fog::CDN , parameters)
|
71
|
+
connection
|
72
|
+
end
|
73
|
+
|
74
|
+
def set_service(connections_count, type, parameters)
|
75
|
+
service_symbol = type.to_s.split('::').last.downcase.to_sym
|
76
|
+
|
77
|
+
connections[connections_count].merge!({
|
78
|
+
service_symbol => type.new(parameters)
|
79
|
+
})
|
80
|
+
rescue
|
81
|
+
# Service not available
|
82
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
rvm:
|
4
|
+
- 1.8.7
|
5
|
+
- 1.9.2
|
6
|
+
- 1.9.3
|
7
|
+
|
8
|
+
script: FOG_MOCK=true bundle exec shindont
|
9
|
+
|
10
|
+
notifications:
|
11
|
+
email: false
|
12
|
+
irc:
|
13
|
+
channels:
|
14
|
+
- "irc.freenode.org#ruby-fog"
|
15
|
+
template:
|
16
|
+
- "[#%{build_number}] %{message} %{build_url}"
|
17
|
+
- "[#%{build_number}] %{commit} on %{branch} by %{author}"
|
18
|
+
- "[#%{build_number}] %{compare_url}"
|
19
|
+
on_success: always
|
20
|
+
on_failure: always
|
21
|
+
use_notice: false
|
@@ -0,0 +1,156 @@
|
|
1
|
+
![fog](http://geemus.s3.amazonaws.com/fog.png)
|
2
|
+
|
3
|
+
fog is the Ruby cloud services library, top to bottom:
|
4
|
+
|
5
|
+
* Collections provide a simplified interface, making clouds easier to work with and switch between.
|
6
|
+
* Requests allow power users to get the most out of the features of each individual cloud.
|
7
|
+
* Mocks make testing and integrating a breeze.
|
8
|
+
|
9
|
+
[![Build Status](https://secure.travis-ci.org/fog/fog.png?branch=master)](http://travis-ci.org/fog/fog)
|
10
|
+
[![Gem Version](https://fury-badge.herokuapp.com/rb/fog.png)](http://badge.fury.io/rb/fog)
|
11
|
+
[![Dependency Status](https://gemnasium.com/fog/fog.png)](https://gemnasium.com/fog/fog)
|
12
|
+
[![Code Climate](https://codeclimate.com/github/fog/fog.png)](https://codeclimate.com/github/fog/fog)
|
13
|
+
|
14
|
+
## Getting Started
|
15
|
+
|
16
|
+
sudo gem install fog
|
17
|
+
|
18
|
+
Now type `fog` to try stuff, confident that fog will let you know what to do.
|
19
|
+
Here is an example of wading through server creation for Amazon Elastic Compute Cloud:
|
20
|
+
|
21
|
+
>> server = Compute[:aws].servers.create
|
22
|
+
ArgumentError: image_id is required for this operation
|
23
|
+
|
24
|
+
>> server = Compute[:aws].servers.create(:image_id => 'ami-5ee70037')
|
25
|
+
<Fog::AWS::EC2::Server [...]>
|
26
|
+
|
27
|
+
>> server.destroy # cleanup after yourself or regret it, trust me
|
28
|
+
true
|
29
|
+
|
30
|
+
## Collections
|
31
|
+
|
32
|
+
A high level interface to each cloud is provided through collections, such as `images` and `servers`.
|
33
|
+
You can see a list of available collections by calling `collections` on the connection object.
|
34
|
+
You can try it out using the `fog` command:
|
35
|
+
|
36
|
+
>> Compute[:aws].collections
|
37
|
+
[:addresses, :directories, ..., :volumes, :zones]
|
38
|
+
|
39
|
+
Some collections are available across multiple providers:
|
40
|
+
|
41
|
+
* compute providers have `flavors`, `images` and `servers`
|
42
|
+
* dns providers have `zones` and `records`
|
43
|
+
* storage providers have `directories` and `files`
|
44
|
+
|
45
|
+
Collections share basic CRUD type operations, such as:
|
46
|
+
|
47
|
+
* `all` - fetch every object of that type from the provider.
|
48
|
+
* `create` - initialize a new record locally and a remote resource with the provider.
|
49
|
+
* `get` - fetch a single object by it's identity from the provider.
|
50
|
+
* `new` - initialize a new record locally, but do not create a remote resource with the provider.
|
51
|
+
|
52
|
+
As an example, we'll try initializing and persisting a Rackspace Cloud server:
|
53
|
+
|
54
|
+
require 'fog'
|
55
|
+
|
56
|
+
compute = Fog::Compute.new(
|
57
|
+
:provider => 'Rackspace',
|
58
|
+
:rackspace_api_key => key,
|
59
|
+
:rackspace_username => username
|
60
|
+
)
|
61
|
+
|
62
|
+
# boot a gentoo server (flavor 1 = 256, image 3 = gentoo 2008.0)
|
63
|
+
server = compute.servers.create(:flavor_id => 1, :image_id => 3, :name => 'my_server')
|
64
|
+
server.wait_for { ready? } # give server time to boot
|
65
|
+
|
66
|
+
# DO STUFF
|
67
|
+
|
68
|
+
server.destroy # cleanup after yourself or regret it, trust me
|
69
|
+
|
70
|
+
## Models
|
71
|
+
|
72
|
+
Many of the collection methods return individual objects, which also provide common methods:
|
73
|
+
|
74
|
+
* `destroy` - will destroy the persisted object from the provider
|
75
|
+
* `save` - persist the object to the provider
|
76
|
+
* `wait_for` - takes a block and waits for either the block to return true for the object or for a timeout (defaults to 10 minutes)
|
77
|
+
|
78
|
+
## Mocks
|
79
|
+
|
80
|
+
As you might imagine, testing code using Fog can be slow and expensive, constantly turning on and and shutting down instances.
|
81
|
+
Mocking allows skipping this overhead by providing an in memory representation resources as you make requests.
|
82
|
+
Enabling mocking easy to use, before you run other commands, simply run:
|
83
|
+
|
84
|
+
Fog.mock!
|
85
|
+
|
86
|
+
Then proceed as usual, if you run into unimplemented mocks, fog will raise an error and as always contributions are welcome!
|
87
|
+
|
88
|
+
## Requests
|
89
|
+
|
90
|
+
Requests allow you to dive deeper when the models just can't cut it.
|
91
|
+
You can see a list of available requests by calling `#requests` on the connection object.
|
92
|
+
|
93
|
+
For instance, ec2 provides methods related to reserved instances that don't have any models (yet). Here is how you can lookup your reserved instances:
|
94
|
+
|
95
|
+
$ fog
|
96
|
+
>> Compute[:aws].describe_reserved_instances
|
97
|
+
#<Excon::Response [...]>
|
98
|
+
|
99
|
+
It will return an [excon](http://github.com/geemus/excon) response, which has `body`, `headers` and `status`. Both return nice hashes.
|
100
|
+
|
101
|
+
## Go forth and conquer
|
102
|
+
|
103
|
+
Play around and use the console to explore or check out [fog.io](http://fog.io) for more details and examples.
|
104
|
+
Once you are ready to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.
|
105
|
+
|
106
|
+
# create a compute connection
|
107
|
+
compute = Fog::Compute.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)
|
108
|
+
# compute operations go here
|
109
|
+
|
110
|
+
# create a storage connection
|
111
|
+
storage = Fog::Storage.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)
|
112
|
+
# storage operations go here
|
113
|
+
|
114
|
+
geemus says: "That should give you everything you need to get started, but let me know if there is anything I can do to help!"
|
115
|
+
|
116
|
+
## Contributing
|
117
|
+
|
118
|
+
* Find something you would like to work on.
|
119
|
+
* Look for anything you can help with in the [issue tracker](https://github.com/fog/fog/issues).
|
120
|
+
* Look at the [code quality metrics](https://codeclimate.com/github/fog/fog) for anything you can help clean up.
|
121
|
+
* Or anything else!
|
122
|
+
* Fork the project and do your work in a topic branch.
|
123
|
+
* Make sure your changes will work on both Ruby 1.8.7 and Ruby 1.9
|
124
|
+
* Add a config at `tests/.fog` for the component you want to test.
|
125
|
+
* Add shindo tests to prove your code works and run all the tests using `bundle exec rake`.
|
126
|
+
* Rebase your branch against `fog/fog` to make sure everything is up to date.
|
127
|
+
* Commit your changes and send a pull request.
|
128
|
+
|
129
|
+
## Additional Resources
|
130
|
+
|
131
|
+
[fog.io](http://fog.io)
|
132
|
+
|
133
|
+
## Copyright
|
134
|
+
|
135
|
+
(The MIT License)
|
136
|
+
|
137
|
+
Copyright (c) 2013 [geemus (Wesley Beary)](http://github.com/geemus)
|
138
|
+
|
139
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
140
|
+
a copy of this software and associated documentation files (the
|
141
|
+
"Software"), to deal in the Software without restriction, including
|
142
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
143
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
144
|
+
permit persons to whom the Software is furnished to do so, subject to
|
145
|
+
the following conditions:
|
146
|
+
|
147
|
+
The above copyright notice and this permission notice shall be
|
148
|
+
included in all copies or substantial portions of the Software.
|
149
|
+
|
150
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
151
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
152
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
153
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
154
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
155
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
156
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|