fog-maestrodev 1.7.0.20121114190951 → 1.8.0.20130109172219
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -2
- data/README.md +48 -37
- data/RELEASE.md +39 -0
- data/Rakefile +48 -312
- data/bin/fog +4 -0
- data/changelog.txt +153 -0
- data/docs/storage/aws.markdown +21 -0
- data/fog.gemspec +3 -3
- data/lib/fog.rb +0 -5
- data/lib/fog/atmos/models/storage/directories.rb +2 -2
- data/lib/fog/atmos/models/storage/directory.rb +11 -11
- data/lib/fog/atmos/models/storage/file.rb +8 -8
- data/lib/fog/atmos/models/storage/files.rb +3 -3
- data/lib/fog/aws.rb +1 -0
- data/lib/fog/aws/auto_scaling.rb +1 -1
- data/lib/fog/aws/cloud_watch.rb +1 -1
- data/lib/fog/aws/compute.rb +4 -2
- data/lib/fog/aws/dynamodb.rb +30 -64
- data/lib/fog/aws/elb.rb +1 -1
- data/lib/fog/aws/glacier.rb +1 -1
- data/lib/fog/aws/iam.rb +1 -0
- data/lib/fog/aws/models/auto_scaling/activities.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/activity.rb +1 -1
- data/lib/fog/aws/models/auto_scaling/configuration.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/configurations.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/group.rb +13 -13
- data/lib/fog/aws/models/auto_scaling/groups.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/instance.rb +5 -5
- data/lib/fog/aws/models/auto_scaling/instances.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/policies.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/policy.rb +2 -2
- data/lib/fog/aws/models/beanstalk/application.rb +7 -7
- data/lib/fog/aws/models/beanstalk/applications.rb +2 -2
- data/lib/fog/aws/models/beanstalk/environment.rb +10 -10
- data/lib/fog/aws/models/beanstalk/environments.rb +2 -2
- data/lib/fog/aws/models/beanstalk/events.rb +1 -1
- data/lib/fog/aws/models/beanstalk/template.rb +5 -5
- data/lib/fog/aws/models/beanstalk/templates.rb +3 -3
- data/lib/fog/aws/models/beanstalk/version.rb +6 -6
- data/lib/fog/aws/models/beanstalk/versions.rb +2 -2
- data/lib/fog/aws/models/cdn/distribution.rb +4 -4
- data/lib/fog/aws/models/cdn/distributions.rb +2 -2
- data/lib/fog/aws/models/cdn/invalidation.rb +2 -2
- data/lib/fog/aws/models/cdn/invalidations.rb +2 -2
- data/lib/fog/aws/models/cdn/streaming_distribution.rb +3 -3
- data/lib/fog/aws/models/cdn/streaming_distributions.rb +2 -2
- data/lib/fog/aws/models/cloud_watch/alarm.rb +2 -2
- data/lib/fog/aws/models/cloud_watch/alarm_data.rb +9 -9
- data/lib/fog/aws/models/cloud_watch/alarm_datum.rb +3 -3
- data/lib/fog/aws/models/cloud_watch/alarm_histories.rb +1 -1
- data/lib/fog/aws/models/cloud_watch/alarms.rb +7 -7
- data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +2 -2
- data/lib/fog/aws/models/cloud_watch/metric_statistics.rb +3 -3
- data/lib/fog/aws/models/cloud_watch/metrics.rb +27 -7
- data/lib/fog/aws/models/compute/address.rb +9 -9
- data/lib/fog/aws/models/compute/addresses.rb +2 -2
- data/lib/fog/aws/models/compute/dhcp_option.rb +3 -3
- data/lib/fog/aws/models/compute/dhcp_options.rb +2 -2
- data/lib/fog/aws/models/compute/flavors.rb +1 -1
- data/lib/fog/aws/models/compute/image.rb +2 -2
- data/lib/fog/aws/models/compute/images.rb +5 -5
- data/lib/fog/aws/models/compute/internet_gateway.rb +4 -4
- data/lib/fog/aws/models/compute/internet_gateways.rb +2 -2
- data/lib/fog/aws/models/compute/key_pair.rb +4 -4
- data/lib/fog/aws/models/compute/key_pairs.rb +2 -2
- data/lib/fog/aws/models/compute/network_interface.rb +3 -3
- data/lib/fog/aws/models/compute/network_interfaces.rb +2 -2
- data/lib/fog/aws/models/compute/security_group.rb +7 -7
- data/lib/fog/aws/models/compute/security_groups.rb +3 -3
- data/lib/fog/aws/models/compute/server.rb +22 -16
- data/lib/fog/aws/models/compute/servers.rb +6 -6
- data/lib/fog/aws/models/compute/snapshot.rb +4 -4
- data/lib/fog/aws/models/compute/snapshots.rb +3 -3
- data/lib/fog/aws/models/compute/spot_request.rb +18 -8
- data/lib/fog/aws/models/compute/spot_requests.rb +11 -11
- data/lib/fog/aws/models/compute/subnet.rb +3 -3
- data/lib/fog/aws/models/compute/subnets.rb +2 -2
- data/lib/fog/aws/models/compute/tag.rb +2 -2
- data/lib/fog/aws/models/compute/tags.rb +3 -3
- data/lib/fog/aws/models/compute/volume.rb +12 -13
- data/lib/fog/aws/models/compute/volumes.rb +2 -2
- data/lib/fog/aws/models/compute/vpc.rb +2 -2
- data/lib/fog/aws/models/compute/vpcs.rb +2 -2
- data/lib/fog/aws/models/dns/record.rb +4 -4
- data/lib/fog/aws/models/dns/records.rb +3 -3
- data/lib/fog/aws/models/dns/zone.rb +3 -3
- data/lib/fog/aws/models/dns/zones.rb +2 -2
- data/lib/fog/aws/models/elasticache/cluster.rb +2 -2
- data/lib/fog/aws/models/elasticache/clusters.rb +2 -2
- data/lib/fog/aws/models/elasticache/parameter_group.rb +2 -2
- data/lib/fog/aws/models/elasticache/parameter_groups.rb +2 -2
- data/lib/fog/aws/models/elasticache/security_group.rb +4 -4
- data/lib/fog/aws/models/elasticache/security_groups.rb +2 -2
- data/lib/fog/aws/models/elb/listener.rb +2 -2
- data/lib/fog/aws/models/elb/load_balancer.rb +19 -19
- data/lib/fog/aws/models/elb/load_balancers.rb +2 -2
- data/lib/fog/aws/models/elb/policy.rb +3 -3
- data/lib/fog/aws/models/glacier/archive.rb +7 -7
- data/lib/fog/aws/models/glacier/job.rb +2 -2
- data/lib/fog/aws/models/glacier/jobs.rb +3 -3
- data/lib/fog/aws/models/glacier/vault.rb +7 -7
- data/lib/fog/aws/models/glacier/vaults.rb +2 -2
- data/lib/fog/aws/models/iam/access_key.rb +8 -8
- data/lib/fog/aws/models/iam/access_keys.rb +7 -7
- data/lib/fog/aws/models/iam/policies.rb +10 -10
- data/lib/fog/aws/models/iam/policy.rb +8 -8
- data/lib/fog/aws/models/iam/user.rb +10 -10
- data/lib/fog/aws/models/iam/users.rb +2 -2
- data/lib/fog/aws/models/rds/parameter.rb +2 -2
- data/lib/fog/aws/models/rds/parameter_group.rb +10 -10
- data/lib/fog/aws/models/rds/parameter_groups.rb +3 -3
- data/lib/fog/aws/models/rds/parameters.rb +2 -2
- data/lib/fog/aws/models/rds/security_group.rb +4 -4
- data/lib/fog/aws/models/rds/security_groups.rb +2 -2
- data/lib/fog/aws/models/rds/server.rb +10 -10
- data/lib/fog/aws/models/rds/servers.rb +3 -3
- data/lib/fog/aws/models/rds/snapshot.rb +3 -3
- data/lib/fog/aws/models/rds/snapshots.rb +3 -3
- data/lib/fog/aws/models/rds/subnet_groups.rb +2 -2
- data/lib/fog/aws/models/storage/directories.rb +2 -2
- data/lib/fog/aws/models/storage/directory.rb +13 -13
- data/lib/fog/aws/models/storage/file.rb +106 -14
- data/lib/fog/aws/models/storage/files.rb +5 -5
- data/lib/fog/aws/models/storage/version.rb +2 -2
- data/lib/fog/aws/models/storage/versions.rb +3 -3
- data/lib/fog/aws/parsers/compute/copy_snapshot.rb +22 -0
- data/lib/fog/aws/parsers/compute/describe_instances.rb +3 -1
- data/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb +1 -1
- data/lib/fog/aws/parsers/compute/spot_instance_requests.rb +5 -3
- data/lib/fog/aws/parsers/storage/cors_configuration.rb +41 -0
- data/lib/fog/aws/parsers/storage/delete_multiple_objects.rb +50 -0
- data/lib/fog/aws/rds.rb +2 -2
- data/lib/fog/aws/requests/auto_scaling/resume_processes.rb +10 -1
- data/lib/fog/aws/requests/auto_scaling/suspend_processes.rb +7 -2
- data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +27 -0
- data/lib/fog/aws/requests/compute/copy_snapshot.rb +58 -0
- data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
- data/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb +11 -8
- data/lib/fog/aws/requests/compute/modify_volume_attribute.rb +51 -0
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +1 -0
- data/lib/fog/aws/requests/storage/abort_multipart_upload.rb +5 -7
- data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +12 -16
- data/lib/fog/aws/requests/storage/copy_object.rb +19 -20
- data/lib/fog/aws/requests/storage/cors_utils.rb +41 -0
- data/lib/fog/aws/requests/storage/delete_bucket.rb +4 -7
- data/lib/fog/aws/requests/storage/delete_bucket_cors.rb +29 -0
- data/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +4 -7
- data/lib/fog/aws/requests/storage/delete_bucket_policy.rb +5 -8
- data/lib/fog/aws/requests/storage/delete_bucket_website.rb +4 -7
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +167 -0
- data/lib/fog/aws/requests/storage/delete_object.rb +5 -8
- data/lib/fog/aws/requests/storage/get_bucket.rb +25 -28
- data/lib/fog/aws/requests/storage/get_bucket_acl.rb +15 -18
- data/lib/fog/aws/requests/storage/get_bucket_cors.rb +65 -0
- data/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +9 -12
- data/lib/fog/aws/requests/storage/get_bucket_location.rb +5 -8
- data/lib/fog/aws/requests/storage/get_bucket_logging.rb +15 -18
- data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +37 -43
- data/lib/fog/aws/requests/storage/get_bucket_policy.rb +4 -7
- data/lib/fog/aws/requests/storage/get_bucket_versioning.rb +6 -9
- data/lib/fog/aws/requests/storage/get_bucket_website.rb +9 -11
- data/lib/fog/aws/requests/storage/get_object.rb +17 -20
- data/lib/fog/aws/requests/storage/get_object_acl.rb +18 -21
- data/lib/fog/aws/requests/storage/get_object_http_url.rb +6 -9
- data/lib/fog/aws/requests/storage/get_object_https_url.rb +6 -9
- data/lib/fog/aws/requests/storage/get_object_torrent.rb +15 -18
- data/lib/fog/aws/requests/storage/get_object_url.rb +7 -10
- data/lib/fog/aws/requests/storage/get_request_payment.rb +5 -8
- data/lib/fog/aws/requests/storage/get_service.rb +9 -11
- data/lib/fog/aws/requests/storage/head_object.rb +21 -21
- data/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +18 -19
- data/lib/fog/aws/requests/storage/put_bucket_cors.rb +51 -0
- data/lib/fog/aws/signaturev4.rb +1 -1
- data/lib/fog/aws/sqs.rb +1 -1
- data/lib/fog/aws/storage.rb +10 -1
- data/lib/fog/bluebox/models/compute/flavors.rb +2 -2
- data/lib/fog/bluebox/models/compute/image.rb +8 -8
- data/lib/fog/bluebox/models/compute/images.rb +2 -2
- data/lib/fog/bluebox/models/compute/locations.rb +2 -2
- data/lib/fog/bluebox/models/compute/server.rb +10 -10
- data/lib/fog/bluebox/models/compute/servers.rb +2 -2
- data/lib/fog/bluebox/models/dns/record.rb +3 -3
- data/lib/fog/bluebox/models/dns/records.rb +2 -2
- data/lib/fog/bluebox/models/dns/zone.rb +3 -3
- data/lib/fog/bluebox/models/dns/zones.rb +2 -2
- data/lib/fog/bluebox/requests/compute/create_block.rb +3 -5
- data/lib/fog/brightbox/compute.rb +284 -82
- data/lib/fog/brightbox/models/compute/account.rb +9 -3
- data/lib/fog/brightbox/models/compute/accounts.rb +3 -3
- data/lib/fog/brightbox/models/compute/api_client.rb +4 -4
- data/lib/fog/brightbox/models/compute/api_clients.rb +2 -2
- data/lib/fog/brightbox/models/compute/application.rb +2 -2
- data/lib/fog/brightbox/models/compute/applications.rb +3 -3
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +4 -3
- data/lib/fog/brightbox/models/compute/cloud_ips.rb +4 -4
- data/lib/fog/brightbox/models/compute/firewall_policies.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +5 -5
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_rules.rb +2 -2
- data/lib/fog/brightbox/models/compute/flavors.rb +3 -3
- data/lib/fog/brightbox/models/compute/image.rb +3 -3
- data/lib/fog/brightbox/models/compute/images.rb +2 -2
- data/lib/fog/brightbox/models/compute/load_balancer.rb +3 -3
- data/lib/fog/brightbox/models/compute/load_balancers.rb +2 -2
- data/lib/fog/brightbox/models/compute/server.rb +25 -18
- data/lib/fog/brightbox/models/compute/server_group.rb +6 -6
- data/lib/fog/brightbox/models/compute/server_groups.rb +3 -3
- data/lib/fog/brightbox/models/compute/servers.rb +35 -3
- data/lib/fog/brightbox/models/compute/user.rb +1 -1
- data/lib/fog/brightbox/models/compute/users.rb +3 -3
- data/lib/fog/brightbox/models/compute/zones.rb +3 -3
- data/lib/fog/brightbox/oauth2.rb +164 -0
- data/lib/fog/brightbox/requests/compute/activate_console_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +10 -12
- data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +12 -3
- data/lib/fog/brightbox/requests/compute/create_api_client.rb +12 -3
- data/lib/fog/brightbox/requests/compute/create_application.rb +12 -3
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +12 -2
- data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +14 -3
- data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +18 -3
- data/lib/fog/brightbox/requests/compute/create_image.rb +19 -3
- data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +15 -3
- data/lib/fog/brightbox/requests/compute/create_server.rb +18 -3
- data/lib/fog/brightbox/requests/compute/create_server_group.rb +12 -3
- data/lib/fog/brightbox/requests/compute/destroy_api_client.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_application.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_cloud_ip.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_firewall_policy.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_firewall_rule.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_image.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_load_balancer.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_server_group.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_account.rb +8 -16
- data/lib/fog/brightbox/requests/compute/get_api_client.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_application.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +2 -4
- data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_image.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_interface.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +2 -6
- data/lib/fog/brightbox/requests/compute/get_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_server_group.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_server_type.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_user.rb +8 -16
- data/lib/fog/brightbox/requests/compute/get_zone.rb +10 -3
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +7 -3
- data/lib/fog/brightbox/requests/compute/list_api_clients.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_applications.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_images.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_server_groups.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_server_types.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_servers.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_users.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_zones.rb +9 -3
- data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +12 -3
- data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +11 -13
- data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +12 -3
- data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +10 -11
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +22 -3
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +18 -0
- data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +14 -2
- data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +10 -3
- data/lib/fog/brightbox/requests/compute/shutdown_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/snapshot_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/start_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/stop_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +10 -3
- data/lib/fog/brightbox/requests/compute/update_account.rb +33 -35
- data/lib/fog/brightbox/requests/compute/update_api_client.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_application.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +14 -3
- data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +17 -2
- data/lib/fog/brightbox/requests/compute/update_image.rb +18 -3
- data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +16 -3
- data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +13 -20
- data/lib/fog/brightbox/requests/compute/update_server.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_server_group.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_user.rb +16 -3
- data/lib/fog/clodo/models/compute/images.rb +2 -2
- data/lib/fog/clodo/models/compute/server.rb +7 -7
- data/lib/fog/clodo/models/compute/servers.rb +2 -2
- data/lib/fog/cloudstack/models/compute/flavors.rb +2 -2
- data/lib/fog/cloudstack/models/compute/image.rb +2 -2
- data/lib/fog/cloudstack/models/compute/images.rb +2 -2
- data/lib/fog/cloudstack/models/compute/job.rb +2 -2
- data/lib/fog/cloudstack/models/compute/jobs.rb +2 -2
- data/lib/fog/cloudstack/models/compute/security_group.rb +3 -3
- data/lib/fog/cloudstack/models/compute/security_group_rule.rb +5 -5
- data/lib/fog/cloudstack/models/compute/security_group_rules.rb +1 -1
- data/lib/fog/cloudstack/models/compute/security_groups.rb +2 -2
- data/lib/fog/cloudstack/models/compute/server.rb +14 -12
- data/lib/fog/cloudstack/models/compute/servers.rb +2 -2
- data/lib/fog/cloudstack/models/compute/volume.rb +8 -8
- data/lib/fog/cloudstack/models/compute/volumes.rb +2 -2
- data/lib/fog/cloudstack/models/compute/zone.rb +1 -1
- data/lib/fog/cloudstack/models/compute/zones.rb +2 -2
- data/lib/fog/compute.rb +2 -1
- data/lib/fog/core.rb +1 -0
- data/lib/fog/core/attributes.rb +19 -2
- data/lib/fog/core/collection.rb +17 -6
- data/lib/fog/core/connection.rb +1 -0
- data/lib/fog/core/deprecated_connection_accessors.rb +41 -0
- data/lib/fog/core/errors.rb +2 -0
- data/lib/fog/core/json.rb +4 -16
- data/lib/fog/core/model.rb +11 -1
- data/lib/fog/core/service.rb +1 -1
- data/lib/fog/core/wait_for.rb +1 -1
- data/lib/fog/dnsimple/models/dns/record.rb +4 -4
- data/lib/fog/dnsimple/models/dns/records.rb +2 -2
- data/lib/fog/dnsimple/models/dns/zone.rb +3 -3
- data/lib/fog/dnsimple/models/dns/zones.rb +2 -2
- data/lib/fog/dnsmadeeasy/models/dns/record.rb +5 -5
- data/lib/fog/dnsmadeeasy/models/dns/records.rb +2 -2
- data/lib/fog/dnsmadeeasy/models/dns/zone.rb +3 -3
- data/lib/fog/dnsmadeeasy/models/dns/zones.rb +2 -2
- data/lib/fog/dynect/models/dns/record.rb +3 -3
- data/lib/fog/dynect/models/dns/records.rb +2 -2
- data/lib/fog/dynect/models/dns/zone.rb +4 -4
- data/lib/fog/dynect/models/dns/zones.rb +2 -2
- data/lib/fog/ecloud.rb +19 -5
- data/lib/fog/ecloud/compute.rb +663 -351
- data/lib/fog/ecloud/generate_collection.rb +3 -3
- data/lib/fog/ecloud/models/compute/admin_organization.rb +14 -10
- data/lib/fog/ecloud/models/compute/admin_organizations.rb +1 -6
- data/lib/fog/ecloud/models/compute/api_keys.rb +2 -2
- data/lib/fog/ecloud/models/compute/association.rb +3 -3
- data/lib/fog/ecloud/models/compute/associations.rb +2 -2
- data/lib/fog/ecloud/models/compute/authentication_levels.rb +2 -2
- data/lib/fog/ecloud/models/compute/backup_internet_service.rb +7 -7
- data/lib/fog/ecloud/models/compute/backup_internet_services.rb +3 -3
- data/lib/fog/ecloud/models/compute/catalog.rb +2 -2
- data/lib/fog/ecloud/models/compute/catalog_configurations.rb +2 -2
- data/lib/fog/ecloud/models/compute/catalog_item.rb +1 -1
- data/lib/fog/ecloud/models/compute/compute_pool.rb +27 -15
- data/lib/fog/ecloud/models/compute/compute_pools.rb +2 -2
- data/lib/fog/ecloud/models/compute/cpu_usage_detail_summary.rb +2 -2
- data/lib/fog/ecloud/models/compute/detached_disk.rb +27 -0
- data/lib/fog/ecloud/models/compute/detached_disks.rb +31 -0
- data/lib/fog/ecloud/models/compute/environment.rb +27 -20
- data/lib/fog/ecloud/models/compute/environments.rb +2 -2
- data/lib/fog/ecloud/models/compute/firewall_acl.rb +1 -1
- data/lib/fog/ecloud/models/compute/firewall_acls.rb +2 -2
- data/lib/fog/ecloud/models/compute/group.rb +8 -6
- data/lib/fog/ecloud/models/compute/groups.rb +17 -6
- data/lib/fog/ecloud/models/compute/guest_processes.rb +2 -2
- data/lib/fog/ecloud/models/compute/hardware_configuration.rb +4 -4
- data/lib/fog/ecloud/models/compute/hardware_configurations.rb +2 -2
- data/lib/fog/ecloud/models/compute/internet_service.rb +35 -29
- data/lib/fog/ecloud/models/compute/internet_services.rb +11 -8
- data/lib/fog/ecloud/models/compute/ip_address.rb +17 -3
- data/lib/fog/ecloud/models/compute/ip_addresses.rb +7 -2
- data/lib/fog/ecloud/models/compute/layout.rb +1 -1
- data/lib/fog/ecloud/models/compute/layouts.rb +2 -2
- data/lib/fog/ecloud/models/compute/location.rb +1 -1
- data/lib/fog/ecloud/models/compute/locations.rb +2 -2
- data/lib/fog/ecloud/models/compute/login_banners.rb +2 -2
- data/lib/fog/ecloud/models/compute/memory_usage_detail_summary.rb +2 -2
- data/lib/fog/ecloud/models/compute/monitor.rb +4 -4
- data/lib/fog/ecloud/models/compute/monitors.rb +2 -2
- data/lib/fog/ecloud/models/compute/network.rb +22 -12
- data/lib/fog/ecloud/models/compute/networks.rb +9 -5
- data/lib/fog/ecloud/models/compute/node.rb +12 -6
- data/lib/fog/ecloud/models/compute/nodes.rb +7 -4
- data/lib/fog/ecloud/models/compute/operating_system_families.rb +2 -2
- data/lib/fog/ecloud/models/compute/operating_system_family.rb +1 -1
- data/lib/fog/ecloud/models/compute/operating_systems.rb +1 -1
- data/lib/fog/ecloud/models/compute/organization.rb +17 -17
- data/lib/fog/ecloud/models/compute/organizations.rb +3 -3
- data/lib/fog/ecloud/models/compute/password_complexity_rules.rb +2 -2
- data/lib/fog/ecloud/models/compute/physical_devices.rb +2 -2
- data/lib/fog/ecloud/models/compute/public_ip.rb +2 -2
- data/lib/fog/ecloud/models/compute/public_ips.rb +8 -5
- data/lib/fog/ecloud/models/compute/rnat.rb +2 -2
- data/lib/fog/ecloud/models/compute/rnats.rb +2 -2
- data/lib/fog/ecloud/models/compute/roles.rb +2 -2
- data/lib/fog/ecloud/models/compute/row.rb +10 -7
- data/lib/fog/ecloud/models/compute/rows.rb +9 -6
- data/lib/fog/ecloud/models/compute/server.rb +139 -93
- data/lib/fog/ecloud/models/compute/server_configuration_options.rb +2 -2
- data/lib/fog/ecloud/models/compute/servers.rb +18 -15
- data/lib/fog/ecloud/models/compute/ssh_key.rb +1 -1
- data/lib/fog/ecloud/models/compute/ssh_keys.rb +2 -2
- data/lib/fog/ecloud/models/compute/storage_usage_detail_summary.rb +2 -2
- data/lib/fog/ecloud/models/compute/support_tickets.rb +2 -2
- data/lib/fog/ecloud/models/compute/tags.rb +2 -2
- data/lib/fog/ecloud/models/compute/task.rb +3 -0
- data/lib/fog/ecloud/models/compute/tasks.rb +3 -3
- data/lib/fog/ecloud/models/compute/template.rb +8 -9
- data/lib/fog/ecloud/models/compute/templates.rb +2 -2
- data/lib/fog/ecloud/models/compute/trusted_network_group.rb +5 -5
- data/lib/fog/ecloud/models/compute/trusted_network_groups.rb +2 -2
- data/lib/fog/ecloud/models/compute/user.rb +2 -2
- data/lib/fog/ecloud/models/compute/users.rb +2 -2
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +32 -0
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ips.rb +27 -0
- data/lib/fog/ecloud/requests/compute/admin_edit_authentication_levels.rb +1 -2
- data/lib/fog/ecloud/requests/compute/get_admin_organization.rb +14 -0
- data/lib/fog/ecloud/requests/compute/get_compute_pool.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_compute_pools.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_detached_disk.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_detached_disks.rb +33 -0
- data/lib/fog/ecloud/requests/compute/get_environment.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_group.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_groups.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_hardware_configuration.rb +19 -0
- data/lib/fog/ecloud/requests/compute/get_hardware_configurations.rb +4 -0
- data/lib/fog/ecloud/requests/compute/get_internet_service.rb +12 -0
- data/lib/fog/ecloud/requests/compute/get_internet_services.rb +8 -0
- data/lib/fog/ecloud/requests/compute/get_ip_address.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_layout.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_layouts.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_network.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_networks.rb +20 -0
- data/lib/fog/ecloud/requests/compute/get_node.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_nodes.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system.rb +14 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system_families.rb +20 -0
- data/lib/fog/ecloud/requests/compute/get_organization.rb +14 -0
- data/lib/fog/ecloud/requests/compute/get_organizations.rb +14 -2
- data/lib/fog/ecloud/requests/compute/get_public_ip.rb +11 -1
- data/lib/fog/ecloud/requests/compute/get_public_ips.rb +22 -0
- data/lib/fog/ecloud/requests/compute/get_row.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_rows.rb +2 -1
- data/lib/fog/ecloud/requests/compute/get_server.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_servers.rb +32 -1
- data/lib/fog/ecloud/requests/compute/get_ssh_key.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_ssh_keys.rb +20 -0
- data/lib/fog/ecloud/requests/compute/get_task.rb +4 -2
- data/lib/fog/ecloud/requests/compute/get_template.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_templates.rb +38 -0
- data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +44 -0
- data/lib/fog/ecloud/requests/compute/groups_delete.rb +16 -1
- data/lib/fog/ecloud/requests/compute/internet_service_create.rb +36 -1
- data/lib/fog/ecloud/requests/compute/internet_service_delete.rb +23 -0
- data/lib/fog/ecloud/requests/compute/node_service_create.rb +49 -1
- data/lib/fog/ecloud/requests/compute/node_service_delete.rb +24 -0
- data/lib/fog/ecloud/requests/compute/rows_delete.rb +11 -1
- data/lib/fog/ecloud/requests/compute/virtual_machine_attach_disk.rb +62 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +136 -16
- data/lib/fog/ecloud/requests/compute/virtual_machine_delete.rb +36 -1
- data/lib/fog/ecloud/requests/compute/virtual_machine_detach_disk.rb +71 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_assigned_ips.rb +82 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_hardware_configuration.rb +27 -3
- data/lib/fog/ecloud/requests/compute/virtual_machine_import.rb +120 -6
- data/lib/fog/glesys/models/compute/ip.rb +7 -7
- data/lib/fog/glesys/models/compute/ips.rb +7 -7
- data/lib/fog/glesys/models/compute/server.rb +6 -6
- data/lib/fog/glesys/models/compute/servers.rb +4 -4
- data/lib/fog/glesys/models/compute/template.rb +1 -1
- data/lib/fog/glesys/models/compute/templates.rb +2 -2
- data/lib/fog/go_grid/models/compute/image.rb +3 -3
- data/lib/fog/go_grid/models/compute/images.rb +2 -2
- data/lib/fog/go_grid/models/compute/password.rb +5 -5
- data/lib/fog/go_grid/models/compute/passwords.rb +3 -3
- data/lib/fog/go_grid/models/compute/server.rb +4 -4
- data/lib/fog/go_grid/models/compute/servers.rb +2 -2
- data/lib/fog/google/models/storage/directories.rb +2 -2
- data/lib/fog/google/models/storage/directory.rb +4 -4
- data/lib/fog/google/models/storage/file.rb +5 -5
- data/lib/fog/google/models/storage/files.rb +4 -4
- data/lib/fog/google/storage.rb +13 -2
- data/lib/fog/hp.rb +6 -3
- data/lib/fog/hp/models/compute/address.rb +8 -8
- data/lib/fog/hp/models/compute/addresses.rb +2 -2
- data/lib/fog/hp/models/compute/flavors.rb +2 -2
- data/lib/fog/hp/models/compute/image.rb +2 -2
- data/lib/fog/hp/models/compute/images.rb +2 -2
- data/lib/fog/hp/models/compute/key_pair.rb +3 -3
- data/lib/fog/hp/models/compute/key_pairs.rb +2 -2
- data/lib/fog/hp/models/compute/security_group.rb +4 -4
- data/lib/fog/hp/models/compute/security_groups.rb +3 -3
- data/lib/fog/hp/models/compute/server.rb +15 -15
- data/lib/fog/hp/models/compute/servers.rb +2 -2
- data/lib/fog/hp/models/storage/directories.rb +3 -3
- data/lib/fog/hp/models/storage/directory.rb +18 -18
- data/lib/fog/hp/models/storage/file.rb +4 -4
- data/lib/fog/hp/models/storage/files.rb +2 -2
- data/lib/fog/ibm/models/compute/address.rb +2 -2
- data/lib/fog/ibm/models/compute/addresses.rb +2 -2
- data/lib/fog/ibm/models/compute/image.rb +3 -3
- data/lib/fog/ibm/models/compute/images.rb +2 -2
- data/lib/fog/ibm/models/compute/key.rb +2 -2
- data/lib/fog/ibm/models/compute/keys.rb +3 -3
- data/lib/fog/ibm/models/compute/locations.rb +2 -2
- data/lib/fog/ibm/models/compute/server.rb +12 -12
- data/lib/fog/ibm/models/compute/servers.rb +2 -2
- data/lib/fog/ibm/models/compute/vlans.rb +2 -2
- data/lib/fog/ibm/models/storage/offerings.rb +1 -1
- data/lib/fog/ibm/models/storage/volume.rb +5 -5
- data/lib/fog/ibm/models/storage/volumes.rb +2 -2
- data/lib/fog/joyent/models/compute/flavors.rb +2 -2
- data/lib/fog/joyent/models/compute/images.rb +2 -2
- data/lib/fog/joyent/models/compute/key.rb +1 -1
- data/lib/fog/joyent/models/compute/keys.rb +3 -3
- data/lib/fog/joyent/models/compute/server.rb +13 -13
- data/lib/fog/joyent/models/compute/servers.rb +3 -3
- data/lib/fog/joyent/models/compute/snapshot.rb +4 -4
- data/lib/fog/joyent/models/compute/snapshots.rb +3 -3
- data/lib/fog/libvirt/compute.rb +6 -1
- data/lib/fog/libvirt/models/compute/interface.rb +1 -1
- data/lib/fog/libvirt/models/compute/interfaces.rb +1 -1
- data/lib/fog/libvirt/models/compute/network.rb +1 -1
- data/lib/fog/libvirt/models/compute/networks.rb +1 -1
- data/lib/fog/libvirt/models/compute/nic.rb +2 -2
- data/lib/fog/libvirt/models/compute/nodes.rb +1 -1
- data/lib/fog/libvirt/models/compute/pool.rb +7 -7
- data/lib/fog/libvirt/models/compute/pools.rb +1 -1
- data/lib/fog/libvirt/models/compute/server.rb +29 -28
- data/lib/fog/libvirt/models/compute/servers.rb +2 -2
- data/lib/fog/libvirt/models/compute/volume.rb +5 -5
- data/lib/fog/libvirt/models/compute/volumes.rb +1 -1
- data/lib/fog/libvirt/requests/compute/list_domains.rb +2 -2
- data/lib/fog/linode/models/compute/data_centers.rb +2 -2
- data/lib/fog/linode/models/compute/disk.rb +7 -7
- data/lib/fog/linode/models/compute/disks.rb +2 -2
- data/lib/fog/linode/models/compute/flavors.rb +2 -2
- data/lib/fog/linode/models/compute/images.rb +2 -2
- data/lib/fog/linode/models/compute/ip.rb +3 -3
- data/lib/fog/linode/models/compute/ips.rb +2 -2
- data/lib/fog/linode/models/compute/kernels.rb +2 -2
- data/lib/fog/linode/models/compute/server.rb +13 -13
- data/lib/fog/linode/models/compute/servers.rb +2 -2
- data/lib/fog/linode/models/compute/stack_scripts.rb +3 -3
- data/lib/fog/linode/models/dns/record.rb +6 -6
- data/lib/fog/linode/models/dns/records.rb +2 -2
- data/lib/fog/linode/models/dns/zone.rb +6 -6
- data/lib/fog/linode/models/dns/zones.rb +2 -2
- data/lib/fog/local/models/storage/directories.rb +3 -3
- data/lib/fog/local/models/storage/directory.rb +2 -2
- data/lib/fog/local/models/storage/file.rb +6 -6
- data/lib/fog/local/models/storage/files.rb +2 -2
- data/lib/fog/ninefold/models/compute/address.rb +5 -5
- data/lib/fog/ninefold/models/compute/addresses.rb +2 -2
- data/lib/fog/ninefold/models/compute/flavors.rb +2 -2
- data/lib/fog/ninefold/models/compute/images.rb +2 -2
- data/lib/fog/ninefold/models/compute/ip_forwarding_rule.rb +3 -3
- data/lib/fog/ninefold/models/compute/ip_forwarding_rules.rb +2 -2
- data/lib/fog/ninefold/models/compute/server.rb +9 -9
- data/lib/fog/ninefold/models/compute/servers.rb +2 -2
- data/lib/fog/openstack.rb +89 -65
- data/lib/fog/openstack/README.identity.md +69 -0
- data/lib/fog/openstack/compute.rb +71 -41
- data/lib/fog/openstack/identity.rb +43 -22
- data/lib/fog/openstack/image.rb +11 -5
- data/lib/fog/openstack/models/compute/address.rb +8 -8
- data/lib/fog/openstack/models/compute/addresses.rb +3 -3
- data/lib/fog/openstack/models/compute/flavor.rb +9 -4
- data/lib/fog/openstack/models/compute/flavors.rb +2 -2
- data/lib/fog/openstack/models/compute/host.rb +3 -2
- data/lib/fog/openstack/models/compute/hosts.rb +2 -2
- data/lib/fog/openstack/models/compute/image.rb +4 -3
- data/lib/fog/openstack/models/compute/images.rb +2 -2
- data/lib/fog/openstack/models/compute/key_pair.rb +3 -3
- data/lib/fog/openstack/models/compute/key_pairs.rb +1 -1
- data/lib/fog/openstack/models/compute/metadata.rb +4 -4
- data/lib/fog/openstack/models/compute/metadatum.rb +2 -2
- data/lib/fog/openstack/models/compute/security_group.rb +5 -5
- data/lib/fog/openstack/models/compute/security_groups.rb +2 -2
- data/lib/fog/openstack/models/compute/server.rb +41 -27
- data/lib/fog/openstack/models/compute/servers.rb +2 -2
- data/lib/fog/openstack/models/compute/snapshot.rb +4 -3
- data/lib/fog/openstack/models/compute/snapshots.rb +2 -2
- data/lib/fog/openstack/models/compute/tenant.rb +1 -1
- data/lib/fog/openstack/models/compute/tenants.rb +7 -3
- data/lib/fog/openstack/models/compute/volume.rb +6 -5
- data/lib/fog/openstack/models/compute/volumes.rb +2 -2
- data/lib/fog/openstack/models/identity/ec2_credential.rb +44 -0
- data/lib/fog/openstack/models/identity/ec2_credentials.rb +53 -0
- data/lib/fog/openstack/models/identity/role.rb +4 -4
- data/lib/fog/openstack/models/identity/roles.rb +2 -2
- data/lib/fog/openstack/models/identity/tenant.rb +7 -7
- data/lib/fog/openstack/models/identity/tenants.rb +3 -3
- data/lib/fog/openstack/models/identity/user.rb +12 -6
- data/lib/fog/openstack/models/identity/users.rb +4 -5
- data/lib/fog/openstack/models/image/image.rb +10 -9
- data/lib/fog/openstack/models/image/images.rb +6 -6
- data/lib/fog/openstack/models/network/network.rb +6 -5
- data/lib/fog/openstack/models/network/networks.rb +3 -3
- data/lib/fog/openstack/models/network/port.rb +6 -5
- data/lib/fog/openstack/models/network/ports.rb +3 -3
- data/lib/fog/openstack/models/network/subnet.rb +6 -5
- data/lib/fog/openstack/models/network/subnets.rb +3 -3
- data/lib/fog/openstack/models/volume/volume.rb +4 -3
- data/lib/fog/openstack/models/volume/volumes.rb +2 -2
- data/lib/fog/openstack/network.rb +5 -3
- data/lib/fog/openstack/requests/compute/create_flavor.rb +4 -1
- data/lib/fog/openstack/requests/compute/create_security_group.rb +3 -2
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -0
- data/lib/fog/openstack/requests/compute/create_server.rb +54 -7
- data/lib/fog/openstack/requests/compute/delete_security_group.rb +2 -0
- data/lib/fog/openstack/requests/compute/get_limits.rb +93 -0
- data/lib/fog/openstack/requests/compute/list_security_groups.rb +17 -41
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -0
- data/lib/fog/openstack/requests/compute/release_address.rb +13 -1
- data/lib/fog/openstack/requests/compute/reset_server_state.rb +24 -0
- data/lib/fog/openstack/requests/identity/add_user_to_tenant.rb +7 -2
- data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +58 -0
- data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_tenant.rb +1 -3
- data/lib/fog/openstack/requests/identity/delete_ec2_credential.rb +44 -0
- data/lib/fog/openstack/requests/identity/get_ec2_credential.rb +49 -0
- data/lib/fog/openstack/requests/identity/get_user_by_name.rb +8 -0
- data/lib/fog/openstack/requests/identity/list_ec2_credentials.rb +44 -0
- data/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +7 -1
- data/lib/fog/openstack/requests/identity/list_users.rb +10 -1
- data/lib/fog/openstack/requests/identity/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/identity/update_tenant.rb +1 -3
- data/lib/fog/openstack/requests/image/create_image.rb +3 -1
- data/lib/fog/openstack/volume.rb +6 -3
- data/lib/fog/ovirt/models/compute/cluster.rb +1 -1
- data/lib/fog/ovirt/models/compute/clusters.rb +2 -2
- data/lib/fog/ovirt/models/compute/interfaces.rb +3 -3
- data/lib/fog/ovirt/models/compute/server.rb +15 -15
- data/lib/fog/ovirt/models/compute/servers.rb +2 -2
- data/lib/fog/ovirt/models/compute/template.rb +5 -5
- data/lib/fog/ovirt/models/compute/templates.rb +2 -2
- data/lib/fog/ovirt/models/compute/volumes.rb +3 -3
- data/lib/fog/rackspace.rb +20 -11
- data/lib/fog/rackspace/block_storage.rb +1 -0
- data/lib/fog/rackspace/compute_v2.rb +10 -0
- data/lib/fog/rackspace/load_balancers.rb +2 -0
- data/lib/fog/rackspace/models/block_storage/snapshot.rb +3 -2
- data/lib/fog/rackspace/models/block_storage/snapshots.rb +2 -2
- data/lib/fog/rackspace/models/block_storage/volume.rb +9 -3
- data/lib/fog/rackspace/models/block_storage/volume_types.rb +3 -3
- data/lib/fog/rackspace/models/block_storage/volumes.rb +2 -2
- data/lib/fog/rackspace/models/compute/flavors.rb +2 -2
- data/lib/fog/rackspace/models/compute/image.rb +3 -3
- data/lib/fog/rackspace/models/compute/images.rb +2 -2
- data/lib/fog/rackspace/models/compute/server.rb +7 -7
- data/lib/fog/rackspace/models/compute/servers.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/attachment.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/attachments.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/flavors.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/image.rb +9 -0
- data/lib/fog/rackspace/models/compute_v2/images.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/server.rb +47 -14
- data/lib/fog/rackspace/models/compute_v2/servers.rb +10 -2
- data/lib/fog/rackspace/models/databases/database.rb +2 -2
- data/lib/fog/rackspace/models/databases/databases.rb +1 -1
- data/lib/fog/rackspace/models/databases/flavors.rb +2 -2
- data/lib/fog/rackspace/models/databases/instance.rb +10 -10
- data/lib/fog/rackspace/models/databases/instances.rb +2 -2
- data/lib/fog/rackspace/models/databases/user.rb +2 -2
- data/lib/fog/rackspace/models/databases/users.rb +1 -1
- data/lib/fog/rackspace/models/dns/callback.rb +1 -1
- data/lib/fog/rackspace/models/dns/record.rb +23 -5
- data/lib/fog/rackspace/models/dns/records.rb +2 -2
- data/lib/fog/rackspace/models/dns/zone.rb +5 -5
- data/lib/fog/rackspace/models/dns/zones.rb +2 -2
- data/lib/fog/rackspace/models/identity/credentials.rb +1 -1
- data/lib/fog/rackspace/models/identity/roles.rb +1 -1
- data/lib/fog/rackspace/models/identity/tenants.rb +1 -1
- data/lib/fog/rackspace/models/identity/user.rb +6 -6
- data/lib/fog/rackspace/models/identity/users.rb +3 -3
- data/lib/fog/rackspace/models/load_balancers/access_rule.rb +4 -4
- data/lib/fog/rackspace/models/load_balancers/access_rules.rb +1 -1
- data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +45 -27
- data/lib/fog/rackspace/models/load_balancers/load_balancers.rb +2 -2
- data/lib/fog/rackspace/models/load_balancers/node.rb +4 -4
- data/lib/fog/rackspace/models/load_balancers/nodes.rb +2 -2
- data/lib/fog/rackspace/models/load_balancers/virtual_ip.rb +3 -3
- data/lib/fog/rackspace/models/load_balancers/virtual_ips.rb +1 -1
- data/lib/fog/rackspace/models/storage/directories.rb +2 -2
- data/lib/fog/rackspace/models/storage/directory.rb +12 -12
- data/lib/fog/rackspace/models/storage/file.rb +71 -5
- data/lib/fog/rackspace/models/storage/files.rb +2 -2
- data/lib/fog/rackspace/requests/compute_v2/create_image.rb +41 -0
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +3 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +31 -0
- data/lib/fog/rackspace/requests/compute_v2/list_addresses.rb +34 -0
- data/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb +36 -0
- data/lib/fog/rackspace/requests/dns/add_records.rb +5 -1
- data/lib/fog/rackspace/requests/load_balancers/get_content_caching.rb +15 -0
- data/lib/fog/rackspace/requests/load_balancers/set_content_caching.rb +21 -0
- data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +1 -1
- data/lib/fog/serverlove/models/compute/image.rb +11 -11
- data/lib/fog/serverlove/models/compute/images.rb +2 -2
- data/lib/fog/serverlove/models/compute/server.rb +10 -10
- data/lib/fog/serverlove/models/compute/servers.rb +2 -2
- data/lib/fog/storm_on_demand/models/compute/balancer.rb +7 -7
- data/lib/fog/storm_on_demand/models/compute/balancers.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/configs.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/images.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/private_ips.rb +2 -2
- data/lib/fog/storm_on_demand/models/compute/server.rb +5 -5
- data/lib/fog/storm_on_demand/models/compute/servers.rb +2 -2
- data/lib/fog/storm_on_demand/models/compute/stats.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/templates.rb +1 -1
- data/lib/fog/terremark/models/shared/address.rb +1 -1
- data/lib/fog/terremark/models/shared/addresses.rb +5 -5
- data/lib/fog/terremark/models/shared/images.rb +5 -5
- data/lib/fog/terremark/models/shared/internetservice.rb +6 -6
- data/lib/fog/terremark/models/shared/internetservices.rb +5 -5
- data/lib/fog/terremark/models/shared/network.rb +1 -1
- data/lib/fog/terremark/models/shared/networks.rb +6 -6
- data/lib/fog/terremark/models/shared/nodeservice.rb +3 -3
- data/lib/fog/terremark/models/shared/nodeservices.rb +4 -4
- data/lib/fog/terremark/models/shared/server.rb +17 -17
- data/lib/fog/terremark/models/shared/servers.rb +6 -6
- data/lib/fog/terremark/models/shared/task.rb +4 -4
- data/lib/fog/terremark/models/shared/tasks.rb +5 -5
- data/lib/fog/terremark/models/shared/vdc.rb +4 -4
- data/lib/fog/terremark/models/shared/vdcs.rb +5 -5
- data/lib/fog/terremark/parser.rb +1 -1
- data/lib/fog/terremark/shared.rb +1 -1
- data/lib/fog/vcloud/compute.rb +4 -4
- data/lib/fog/vcloud/models/compute/catalog.rb +1 -1
- data/lib/fog/vcloud/models/compute/catalog_item.rb +1 -1
- data/lib/fog/vcloud/models/compute/catalog_items.rb +4 -4
- data/lib/fog/vcloud/models/compute/catalogs.rb +3 -3
- data/lib/fog/vcloud/models/compute/ip.rb +1 -1
- data/lib/fog/vcloud/models/compute/ips.rb +3 -3
- data/lib/fog/vcloud/models/compute/network.rb +1 -1
- data/lib/fog/vcloud/models/compute/networks.rb +6 -6
- data/lib/fog/vcloud/models/compute/organization.rb +4 -4
- data/lib/fog/vcloud/models/compute/organizations.rb +4 -4
- data/lib/fog/vcloud/models/compute/server.rb +13 -13
- data/lib/fog/vcloud/models/compute/servers.rb +4 -4
- data/lib/fog/vcloud/models/compute/tasks.rb +3 -3
- data/lib/fog/vcloud/models/compute/vapp.rb +2 -2
- data/lib/fog/vcloud/models/compute/vapps.rb +2 -2
- data/lib/fog/vcloud/models/compute/vdc.rb +2 -2
- data/lib/fog/vcloud/models/compute/vdcs.rb +3 -3
- data/lib/fog/version.rb +3 -0
- data/lib/fog/virtual_box/compute.rb +11 -5
- data/lib/fog/virtual_box/models/compute/medium.rb +2 -2
- data/lib/fog/virtual_box/models/compute/mediums.rb +4 -4
- data/lib/fog/virtual_box/models/compute/nat_engine.rb +2 -2
- data/lib/fog/virtual_box/models/compute/network_adapter.rb +1 -1
- data/lib/fog/virtual_box/models/compute/network_adapters.rb +1 -1
- data/lib/fog/virtual_box/models/compute/server.rb +5 -5
- data/lib/fog/virtual_box/models/compute/servers.rb +2 -2
- data/lib/fog/vmfusion/compute.rb +6 -1
- data/lib/fog/vmfusion/models/compute/server.rb +1 -1
- data/lib/fog/voxel/models/compute/images.rb +2 -2
- data/lib/fog/voxel/models/compute/server.rb +6 -6
- data/lib/fog/voxel/models/compute/servers.rb +2 -2
- data/lib/fog/vsphere/compute.rb +78 -9
- data/lib/fog/vsphere/models/compute/cluster.rb +31 -0
- data/lib/fog/vsphere/models/compute/clusters.rb +26 -0
- data/lib/fog/vsphere/models/compute/datacenter.rb +39 -0
- data/lib/fog/vsphere/models/compute/datacenters.rb +23 -0
- data/lib/fog/vsphere/models/compute/datastore.rb +24 -0
- data/lib/fog/vsphere/models/compute/datastores.rb +25 -0
- data/lib/fog/vsphere/models/compute/folder.rb +28 -0
- data/lib/fog/vsphere/models/compute/folders.rb +27 -0
- data/lib/fog/vsphere/models/compute/interface.rb +39 -0
- data/lib/fog/vsphere/models/compute/interfaces.rb +33 -0
- data/lib/fog/vsphere/models/compute/network.rb +21 -0
- data/lib/fog/vsphere/models/compute/networks.rb +25 -0
- data/lib/fog/vsphere/models/compute/resource_pool.rb +23 -0
- data/lib/fog/vsphere/models/compute/resource_pools.rb +26 -0
- data/lib/fog/vsphere/models/compute/server.rb +106 -29
- data/lib/fog/vsphere/models/compute/servers.rb +16 -20
- data/lib/fog/vsphere/models/compute/template.rb +13 -0
- data/lib/fog/vsphere/models/compute/templates.rb +23 -0
- data/lib/fog/vsphere/models/compute/volume.rb +45 -0
- data/lib/fog/vsphere/models/compute/volumes.rb +33 -0
- data/lib/fog/vsphere/requests/compute/create_folder.rb +22 -0
- data/lib/fog/vsphere/requests/compute/create_vm.rb +114 -0
- data/lib/fog/vsphere/requests/compute/get_cluster.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_datacenter.rb +29 -0
- data/lib/fog/vsphere/requests/compute/get_datastore.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_folder.rb +73 -0
- data/lib/fog/vsphere/requests/compute/get_network.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +26 -0
- data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +62 -0
- data/lib/fog/vsphere/requests/compute/list_clusters.rb +37 -0
- data/lib/fog/vsphere/requests/compute/list_datacenters.rb +34 -0
- data/lib/fog/vsphere/requests/compute/list_datastores.rb +40 -0
- data/lib/fog/vsphere/requests/compute/list_folders.rb +45 -0
- data/lib/fog/vsphere/requests/compute/list_networks.rb +38 -0
- data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +39 -0
- data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -166
- data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +52 -0
- data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +51 -0
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +134 -67
- data/lib/fog/vsphere/requests/compute/vm_destroy.rb +1 -8
- data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +1 -2
- data/lib/fog/xenserver.rb +26 -2
- data/lib/fog/xenserver/compute.rb +8 -0
- data/lib/fog/xenserver/examples/README.md +11 -0
- data/lib/fog/xenserver/examples/chage_default_storage_repository.md +99 -0
- data/lib/fog/xenserver/examples/creating_servers.md +168 -0
- data/lib/fog/xenserver/examples/getting_started.md +163 -0
- data/lib/fog/xenserver/examples/storage_repositories.md +94 -0
- data/lib/fog/xenserver/models/compute/host.rb +75 -8
- data/lib/fog/xenserver/models/compute/host_metrics.rb +29 -0
- data/lib/fog/xenserver/models/compute/hosts.rb +8 -8
- data/lib/fog/xenserver/models/compute/network.rb +11 -11
- data/lib/fog/xenserver/models/compute/networks.rb +3 -3
- data/lib/fog/xenserver/models/compute/pbd.rb +11 -6
- data/lib/fog/xenserver/models/compute/pbds.rb +3 -3
- data/lib/fog/xenserver/models/compute/pif.rb +9 -9
- data/lib/fog/xenserver/models/compute/pifs.rb +3 -3
- data/lib/fog/xenserver/models/compute/pool.rb +30 -8
- data/lib/fog/xenserver/models/compute/pools.rb +3 -3
- data/lib/fog/xenserver/models/compute/server.rb +29 -29
- data/lib/fog/xenserver/models/compute/servers.rb +8 -8
- data/lib/fog/xenserver/models/compute/storage_repositories.rb +2 -2
- data/lib/fog/xenserver/models/compute/storage_repository.rb +52 -9
- data/lib/fog/xenserver/models/compute/vbd.rb +16 -16
- data/lib/fog/xenserver/models/compute/vbds.rb +3 -3
- data/lib/fog/xenserver/models/compute/vdi.rb +17 -17
- data/lib/fog/xenserver/models/compute/vdis.rb +3 -3
- data/lib/fog/xenserver/models/compute/vif.rb +10 -10
- data/lib/fog/xenserver/models/compute/vifs.rb +3 -3
- data/lib/fog/xenserver/requests/compute/create_sr.rb +72 -0
- data/lib/fog/xenserver/requests/compute/destroy_sr.rb +30 -0
- data/lib/fog/xenserver/requests/compute/disable_host.rb +29 -0
- data/lib/fog/xenserver/requests/compute/enable_host.rb +28 -0
- data/lib/fog/xenserver/requests/compute/reboot_host.rb +23 -0
- data/lib/fog/xenserver/requests/compute/shutdown_host.rb +23 -0
- data/lib/fog/xenserver/requests/compute/unplug_pbd.rb +25 -0
- data/lib/fog/zerigo/models/dns/record.rb +4 -4
- data/lib/fog/zerigo/models/dns/records.rb +2 -2
- data/lib/fog/zerigo/models/dns/zone.rb +6 -6
- data/lib/fog/zerigo/models/dns/zones.rb +2 -2
- data/lib/tasks/changelog_task.rb +98 -0
- data/lib/tasks/test_task.rb +46 -0
- data/tests/aws/models/cloud_watch/metrics_tests.rb +16 -1
- data/tests/aws/models/iam/users_tests.rb +16 -2
- data/tests/aws/requests/auto_scaling/model_tests.rb +1 -3
- data/tests/aws/requests/auto_scaling/notification_configuration_tests.rb +1 -0
- data/tests/aws/requests/auto_scaling/tag_tests.rb +1 -0
- data/tests/aws/requests/compute/instance_tests.rb +2 -0
- data/tests/aws/requests/compute/snapshot_tests.rb +19 -0
- data/tests/aws/requests/compute/spot_instance_tests.rb +4 -2
- data/tests/aws/requests/compute/volume_tests.rb +8 -0
- data/tests/aws/requests/storage/bucket_tests.rb +14 -0
- data/tests/aws/requests/storage/cors_utils_tests.rb +108 -0
- data/tests/aws/requests/storage/object_tests.rb +18 -1
- data/tests/aws/requests/storage/versioning_tests.rb +70 -0
- data/tests/brightbox/compute_tests.rb +96 -4
- data/tests/brightbox/models/compute/account_tests.rb +17 -0
- data/tests/brightbox/models/compute/server_tests.rb +21 -0
- data/tests/brightbox/oauth2_tests.rb +103 -0
- data/tests/brightbox/requests/compute/account_tests.rb +9 -2
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +33 -0
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +43 -0
- data/tests/brightbox/requests/compute/helper.rb +33 -30
- data/tests/brightbox/requests/compute/interface_tests.rb +18 -4
- data/tests/compute/helper.rb +28 -6
- data/tests/compute/models/flavors_tests.rb +4 -2
- data/tests/compute/models/server_tests.rb +5 -1
- data/tests/compute/models/servers_tests.rb +5 -2
- data/tests/core/wait_for_tests.rb +13 -0
- data/tests/dns/models/record_tests.rb +17 -3
- data/tests/ecloud/compute/models/admin_organization_tests.rb +16 -0
- data/tests/ecloud/compute/models/compute_pool_tests.rb +17 -0
- data/tests/ecloud/compute/models/detached_disk_tests.rb +26 -0
- data/tests/ecloud/compute/models/environment_tests.rb +23 -0
- data/tests/ecloud/compute/models/internet_service_tests.rb +28 -0
- data/tests/ecloud/compute/models/ip_address_tests.rb +19 -0
- data/tests/ecloud/compute/models/network_tests.rb +17 -0
- data/tests/ecloud/compute/models/operating_system_families_tests.rb +13 -0
- data/tests/ecloud/compute/models/operating_system_tests.rb +22 -0
- data/tests/ecloud/compute/models/organization_tests.rb +21 -0
- data/tests/ecloud/compute/models/public_ip_tests.rb +19 -0
- data/tests/ecloud/compute/models/server_tests.rb +143 -0
- data/tests/ecloud/compute/models/ssh_key_tests.rb +19 -0
- data/tests/ecloud/compute/models/template_tests.rb +20 -0
- data/tests/openstack/authenticate_tests.rb +142 -0
- data/tests/openstack/models/compute/server_tests.rb +45 -0
- data/tests/openstack/models/identity/ec2_credential_tests.rb +41 -0
- data/tests/openstack/models/identity/ec2_credentials_tests.rb +58 -0
- data/tests/openstack/models/identity/tenant_tests.rb +6 -0
- data/tests/openstack/requests/compute/address_tests.rb +20 -19
- data/tests/openstack/requests/compute/flavor_tests.rb +4 -2
- data/tests/openstack/requests/compute/helper.rb +20 -0
- data/tests/openstack/requests/compute/limit_tests.rb +60 -0
- data/tests/openstack/requests/compute/quota_tests.rb +18 -3
- data/tests/openstack/requests/compute/security_group_tests.rb +11 -3
- data/tests/openstack/requests/compute/server_tests.rb +29 -14
- data/tests/openstack/requests/identity/ec2_credentials_tests.rb +41 -0
- data/tests/openstack/requests/identity/role_tests.rb +0 -1
- data/tests/openstack/requests/identity/user_tests.rb +8 -0
- data/tests/rackspace/models/block_storage/snapshot_tests.rb +18 -11
- data/tests/rackspace/models/block_storage/volume_tests.rb +13 -7
- data/tests/rackspace/models/compute_v2/image_tests.rb +28 -0
- data/tests/rackspace/models/compute_v2/server_tests.rb +15 -0
- data/tests/rackspace/models/compute_v2/servers_tests.rb +6 -0
- data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +17 -0
- data/tests/rackspace/models/storage/file_tests.rb +178 -0
- data/tests/rackspace/requests/compute/address_tests.rb +11 -9
- data/tests/rackspace/requests/compute/flavor_tests.rb +6 -5
- data/tests/rackspace/requests/compute/image_tests.rb +12 -10
- data/tests/rackspace/requests/compute/resize_tests.rb +8 -6
- data/tests/rackspace/requests/compute/server_tests.rb +19 -17
- data/tests/rackspace/requests/compute_v2/address_tests.rb +43 -0
- data/tests/rackspace/requests/compute_v2/image_tests.rb +38 -10
- data/tests/rackspace/requests/dns/helper.rb +12 -26
- data/tests/rackspace/requests/dns/records_tests.rb +2 -2
- data/tests/rackspace/requests/load_balancers/content_caching_tests.rb +25 -0
- data/tests/rackspace/requests/load_balancers/helper.rb +5 -1
- data/tests/vsphere/compute_tests.rb +3 -3
- data/tests/vsphere/models/compute/server_tests.rb +1 -2
- data/tests/vsphere/requests/compute/list_virtual_machines_tests.rb +5 -13
- data/tests/vsphere/requests/compute/vm_clone_tests.rb +6 -4
- data/tests/xenserver/models/compute/host_metrics_tests.rb +48 -0
- data/tests/xenserver/models/compute/host_tests.rb +20 -1
- data/tests/xenserver/models/compute/pbd_tests.rb +33 -1
- data/tests/xenserver/models/compute/pool_tests.rb +7 -1
- data/tests/xenserver/models/compute/storage_repository_tests.rb +52 -1
- data/tests/xenserver/requests/compute/create_sr_tests.rb +54 -0
- data/tests/xenserver/requests/compute/destroy_sr_tests.rb +46 -0
- data/tests/xenserver/requests/compute/disable_host_tests.rb +16 -0
- data/tests/xenserver/requests/compute/enable_host_tests.rb +16 -0
- data/tests/xenserver/requests/compute/unplug_pbd_tests.rb +48 -0
- metadata +312 -89
- data/docs/_config.yml +0 -39
- data/docs/_layouts/default.html +0 -111
- data/docs/about/contributing.markdown +0 -228
- data/docs/about/getting_started.markdown +0 -108
- data/docs/about/press.markdown +0 -52
- data/docs/about/structure.markdown +0 -78
- data/docs/about/users.markdown +0 -34
- data/docs/cdn/index.markdown +0 -148
- data/docs/compute/index.markdown +0 -122
- data/docs/dns/index.markdown +0 -79
- data/docs/index.markdown +0 -88
- data/docs/public/crossdomain.xml +0 -25
- data/docs/public/css/fog.css +0 -142
- data/docs/public/css/handheld.css +0 -8
- data/docs/public/css/style.css +0 -129
- data/docs/public/images/.gitignore +0 -3
- data/docs/public/images/engineyard.png +0 -0
- data/docs/public/images/fog.png +0 -0
- data/docs/public/js/libs/dd_belatedpng.js +0 -289
- data/docs/public/js/libs/dd_belatedpng.min.js +0 -13
- data/docs/public/js/libs/jquery-1.4.2.js +0 -6240
- data/docs/public/js/libs/jquery-1.4.2.min.js +0 -154
- data/docs/public/js/libs/modernizr-1.6.js +0 -892
- data/docs/public/js/libs/modernizr-1.6.min.js +0 -30
- data/docs/public/js/mylibs/.gitignore +0 -3
- data/docs/public/js/plugins.js +0 -34
- data/docs/public/js/profiling/config.js +0 -59
- data/docs/public/js/profiling/yahoo-profiling.css +0 -7
- data/docs/public/js/profiling/yahoo-profiling.js +0 -1028
- data/docs/public/js/profiling/yahoo-profiling.min.js +0 -39
- data/docs/public/js/script.js +0 -26
- data/docs/public/robots.txt +0 -5
- data/docs/storage/index.markdown +0 -204
- data/lib/fog/ecloud/requests/compute/get_admin_organizations.rb +0 -11
- data/lib/fog/ecloud/requests/compute/get_ip_addresses.rb +0 -11
- data/lib/fog/ecloud/requests/compute/get_operating_system_family.rb +0 -11
- data/lib/fog/ecloud/requests/compute/virtual_machine_add_ip.rb +0 -40
- data/lib/fog/vsphere/requests/compute/datacenters.rb +0 -34
- data/lib/fog/vsphere/requests/compute/find_vm_by_ref.rb +0 -41
- data/lib/fog/vsphere/requests/compute/vm_create.rb +0 -97
- data/tests/vsphere/requests/compute/find_vm_by_ref_tests.rb +0 -26
- data/tests/vsphere/requests/compute/vm_create_tests.rb +0 -20
@@ -1,30 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Modernizr v1.6
|
3
|
-
* http://www.modernizr.com
|
4
|
-
*
|
5
|
-
* Developed by:
|
6
|
-
* - Faruk Ates http://farukat.es/
|
7
|
-
* - Paul Irish http://paulirish.com/
|
8
|
-
*
|
9
|
-
* Copyright (c) 2009-2010
|
10
|
-
* Dual-licensed under the BSD or MIT licenses.
|
11
|
-
* http://www.modernizr.com/license/
|
12
|
-
*/
|
13
|
-
window.Modernizr=function(i,e,u){function s(a,b){return(""+a).indexOf(b)!==-1}function D(a,b){for(var c in a)if(j[a[c]]!==u&&(!b||b(a[c],E)))return true}function n(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);c=(a+" "+F.join(c+" ")+c).split(" ");return!!D(c,b)}function S(){f.input=function(a){for(var b=0,c=a.length;b<c;b++)L[a[b]]=!!(a[b]in h);return L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));f.inputtypes=function(a){for(var b=0,c,k=a.length;b<
|
14
|
-
k;b++){h.setAttribute("type",a[b]);if(c=h.type!=="text"){h.value=M;if(/^range$/.test(h.type)&&h.style.WebkitAppearance!==u){l.appendChild(h);c=e.defaultView;c=c.getComputedStyle&&c.getComputedStyle(h,null).WebkitAppearance!=="textfield"&&h.offsetHeight!==0;l.removeChild(h)}else/^(search|tel)$/.test(h.type)||(c=/^(url|email)$/.test(h.type)?h.checkValidity&&h.checkValidity()===false:h.value!=M)}N[a[b]]=!!c}return N}("search tel url email datetime date month week time datetime-local number range color".split(" "))}
|
15
|
-
var f={},l=e.documentElement,E=e.createElement("modernizr"),j=E.style,h=e.createElement("input"),M=":)",O=Object.prototype.toString,q=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),F="Webkit Moz O ms Khtml".split(" "),v={svg:"http://www.w3.org/2000/svg"},d={},N={},L={},P=[],w,Q=function(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent=a+"{#modernizr{height:3px}}";(e.head||e.getElementsByTagName("head")[0]).appendChild(b);c.id="modernizr";l.appendChild(c);a=c.offsetHeight===
|
16
|
-
3;b.parentNode.removeChild(b);c.parentNode.removeChild(c);return!!a},o=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(b,c){c=c||document.createElement(a[b]||"div");b="on"+b;var k=b in c;if(!k){c.setAttribute||(c=document.createElement("div"));if(c.setAttribute&&c.removeAttribute){c.setAttribute(b,"");k=typeof c[b]=="function";if(typeof c[b]!="undefined")c[b]=u;c.removeAttribute(b)}}return k}}(),G={}.hasOwnProperty,R;R=
|
17
|
-
typeof G!=="undefined"&&typeof G.call!=="undefined"?function(a,b){return G.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};d.flexbox=function(){var a=e.createElement("div"),b=e.createElement("div");(function(k,g,r,x){g+=":";k.style.cssText=(g+q.join(r+";"+g)).slice(0,-g.length)+(x||"")})(a,"display","box","width:42px;padding:0;");b.style.cssText=q.join("box-flex:1;")+"width:10px;";a.appendChild(b);l.appendChild(a);var c=b.offsetWidth===42;a.removeChild(b);
|
18
|
-
l.removeChild(a);return c};d.canvas=function(){var a=e.createElement("canvas");return!!(a.getContext&&a.getContext("2d"))};d.canvastext=function(){return!!(f.canvas&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.webgl=function(){var a=e.createElement("canvas");try{if(a.getContext("webgl"))return true}catch(b){}try{if(a.getContext("experimental-webgl"))return true}catch(c){}return false};d.touch=function(){return"ontouchstart"in i||Q("@media ("+q.join("touch-enabled),(")+
|
19
|
-
"modernizr)")};d.geolocation=function(){return!!navigator.geolocation};d.postmessage=function(){return!!i.postMessage};d.websqldatabase=function(){return!!i.openDatabase};d.indexedDB=function(){for(var a=-1,b=F.length;++a<b;){var c=F[a].toLowerCase();if(i[c+"_indexedDB"]||i[c+"IndexedDB"])return true}return false};d.hashchange=function(){return o("hashchange",i)&&(document.documentMode===u||document.documentMode>7)};d.history=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return o("drag")&&
|
20
|
-
o("dragstart")&&o("dragenter")&&o("dragover")&&o("dragleave")&&o("dragend")&&o("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){j.cssText="background-color:rgba(150,255,150,.5)";return s(j.backgroundColor,"rgba")};d.hsla=function(){j.cssText="background-color:hsla(120,40%,100%,.5)";return s(j.backgroundColor,"rgba")||s(j.backgroundColor,"hsla")};d.multiplebgs=function(){j.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(j.background)};d.backgroundsize=
|
21
|
-
function(){return n("backgroundSize")};d.borderimage=function(){return n("borderImage")};d.borderradius=function(){return n("borderRadius","",function(a){return s(a,"orderRadius")})};d.boxshadow=function(){return n("boxShadow")};d.textshadow=function(){return e.createElement("div").style.textShadow===""};d.opacity=function(){var a=q.join("opacity:.5;")+"";j.cssText=a;return s(j.opacity,"0.5")};d.cssanimations=function(){return n("animationName")};d.csscolumns=function(){return n("columnCount")};d.cssgradients=
|
22
|
-
function(){var a=("background-image:"+q.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+q.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);j.cssText=a;return s(j.backgroundImage,"gradient")};d.cssreflections=function(){return n("boxReflect")};d.csstransforms=function(){return!!D(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!D(["perspectiveProperty","WebkitPerspective",
|
23
|
-
"MozPerspective","OPerspective","msPerspective"]);if(a)a=Q("@media ("+q.join("transform-3d),(")+"modernizr)");return a};d.csstransitions=function(){return n("transitionProperty")};d.fontface=function(){var a,b=e.head||e.getElementsByTagName("head")[0]||l,c=e.createElement("style"),k=e.implementation||{hasFeature:function(){return false}};c.type="text/css";b.insertBefore(c,b.firstChild);a=c.sheet||c.styleSheet;b=k.hasFeature("CSS2","")?function(g){if(!(a&&g))return false;var r=false;try{a.insertRule(g,
|
24
|
-
0);r=!/unknown/i.test(a.cssRules[0].cssText);a.deleteRule(a.cssRules.length-1)}catch(x){}return r}:function(g){if(!(a&&g))return false;a.cssText=g;return a.cssText.length!==0&&!/unknown/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(g.split(" ")[0])===0};f._fontfaceready=function(g){g(f.fontface)};return b('@font-face { font-family: "font"; src: "font.ttf"; }')};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');
|
25
|
-
b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"')||a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localstorage=function(){try{return"localStorage"in
|
26
|
-
i&&i.localStorage!==null}catch(a){return false}};d.sessionstorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webWorkers=function(){return!!i.Worker};d.applicationcache=function(){return!!i.applicationCache};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS(v.svg,"svg").createSVGRect};d.inlinesvg=function(){var a=document.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==v.svg};d.smil=function(){return!!e.createElementNS&&
|
27
|
-
/SVG/.test(O.call(e.createElementNS(v.svg,"animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(O.call(e.createElementNS(v.svg,"clipPath")))};for(var H in d)if(R(d,H)){w=H.toLowerCase();f[w]=d[H]();P.push((f[w]?"":"no-")+w)}f.input||S();f.crosswindowmessaging=f.postmessage;f.historymanagement=f.history;f.addTest=function(a,b){a=a.toLowerCase();if(!f[a]){b=!!b();l.className+=" "+(b?"":"no-")+a;f[a]=b;return f}};j.cssText="";E=h=null;i.attachEvent&&function(){var a=e.createElement("div");
|
28
|
-
a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function c(p){for(var m=-1;++m<r;)p.createElement(g[m])}function k(p,m){for(var I=p.length,t=-1,y,J=[];++t<I;){y=p[t];m=y.media||m;J.push(k(y.imports,m));J.push(y.cssText)}return J.join("")}var g="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),r=g.length,x=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)",
|
29
|
-
"gi"),T=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),z=b.createDocumentFragment(),A=b.documentElement,K=A.firstChild,B=b.createElement("style"),C=b.createElement("body");B.media="all";c(b);c(z);a.attachEvent("onbeforeprint",function(){for(var p=-1;++p<r;)for(var m=b.getElementsByTagName(g[p]),I=m.length,t=-1;++t<I;)if(m[t].className.indexOf("iepp_")<0)m[t].className+=" iepp_"+
|
30
|
-
g[p];K.insertBefore(B,K.firstChild);B.styleSheet.cssText=k(b.styleSheets,"all").replace(T,".iepp_$1");z.appendChild(b.body);A.appendChild(C);C.innerHTML=z.firstChild.innerHTML.replace(x,"<$1bdo")});a.attachEvent("onafterprint",function(){C.innerHTML="";A.removeChild(C);K.removeChild(B);A.appendChild(z.firstChild)})}(this,document);f._enableHTML5=true;f._version="1.6";l.className=l.className.replace(/\bno-js\b/,"")+" js";l.className+=" "+P.join(" ");return f}(this,this.document);
|
data/docs/public/js/plugins.js
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
|
2
|
-
(function($){
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
})(this.jQuery);
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
window.log = function(){
|
20
|
-
log.history = log.history || [];
|
21
|
-
log.history.push(arguments);
|
22
|
-
if(this.console){
|
23
|
-
console.log( Array.prototype.slice.call(arguments) );
|
24
|
-
}
|
25
|
-
};
|
26
|
-
(function(doc){
|
27
|
-
var write = doc.write;
|
28
|
-
doc.write = function(q){
|
29
|
-
log('document.write(): ',arguments);
|
30
|
-
if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);
|
31
|
-
};
|
32
|
-
})(document);
|
33
|
-
|
34
|
-
|
@@ -1,59 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
// call PROFILE.show() to show the profileViewer
|
4
|
-
|
5
|
-
var PROFILE = {
|
6
|
-
|
7
|
-
init : function(bool) {
|
8
|
-
|
9
|
-
// define what objects, constructors and functions you want to profile
|
10
|
-
// documentation here: http://developer.yahoo.com/yui/profiler/
|
11
|
-
|
12
|
-
YAHOO.tool.Profiler.registerObject("jQuery", jQuery, true);
|
13
|
-
|
14
|
-
// the following would profile all methods within constructor's prototype
|
15
|
-
// YAHOO.tool.Profiler.registerConstructor("Person");
|
16
|
-
|
17
|
-
// the following would profile the global function sayHi
|
18
|
-
// YAHOO.tool.Profiler.registerFunction("sayHi", window);
|
19
|
-
|
20
|
-
// if true is passed into init(), F9 will bring up the profiler
|
21
|
-
if (bool){
|
22
|
-
$(document).keyup(function(e){
|
23
|
-
if (e.keyCode === 120){
|
24
|
-
PROFILE.show();
|
25
|
-
$(document).unbind('keyup',arguments.callee);
|
26
|
-
}
|
27
|
-
})
|
28
|
-
}
|
29
|
-
},
|
30
|
-
|
31
|
-
//When the showProfile button is clicked, use YUI Loader to get all required
|
32
|
-
//dependencies and then show the profile:
|
33
|
-
show : function() {
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
var s = document.createElement('link');
|
38
|
-
s.setAttribute('rel','stylesheet');
|
39
|
-
s.setAttribute('type','text/css');
|
40
|
-
s.setAttribute('href','js/profiling/yahoo-profiling.css');
|
41
|
-
document.body.appendChild(s);
|
42
|
-
|
43
|
-
YAHOO.util.Dom.addClass(document.body, 'yui-skin-sam');
|
44
|
-
|
45
|
-
//instantiate ProfilerViewer with desired options:
|
46
|
-
var pv = new YAHOO.widget.ProfilerViewer("", {
|
47
|
-
visible: true, //expand the viewer mmediately after instantiation
|
48
|
-
showChart: true,
|
49
|
-
// base:"../../build/",
|
50
|
-
swfUrl: "js/profiling/charts.swf"
|
51
|
-
});
|
52
|
-
|
53
|
-
}
|
54
|
-
|
55
|
-
};
|
56
|
-
|
57
|
-
// check some global debug variable to see if we should be profiling..
|
58
|
-
if (true) { PROFILE.init(true) }
|
59
|
-
|
@@ -1,7 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
|
3
|
-
Code licensed under the BSD License:
|
4
|
-
http://developer.yahoo.net/yui/license.txt
|
5
|
-
version: 2.7.0
|
6
|
-
*/
|
7
|
-
.yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;}
|
@@ -1,1028 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
|
3
|
-
Code licensed under the BSD License:
|
4
|
-
http://developer.yahoo.net/yui/license.txt
|
5
|
-
version: 2.7.0
|
6
|
-
*/
|
7
|
-
/**
|
8
|
-
* The YAHOO object is the single global object used by YUI Library. It
|
9
|
-
* contains utility function for setting up namespaces, inheritance, and
|
10
|
-
* logging. YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
|
11
|
-
* created automatically for and used by the library.
|
12
|
-
* @module yahoo
|
13
|
-
* @title YAHOO Global
|
14
|
-
*/
|
15
|
-
|
16
|
-
/**
|
17
|
-
* YAHOO_config is not included as part of the library. Instead it is an
|
18
|
-
* object that can be defined by the implementer immediately before
|
19
|
-
* including the YUI library. The properties included in this object
|
20
|
-
* will be used to configure global properties needed as soon as the
|
21
|
-
* library begins to load.
|
22
|
-
* @class YAHOO_config
|
23
|
-
* @static
|
24
|
-
*/
|
25
|
-
|
26
|
-
/**
|
27
|
-
* A reference to a function that will be executed every time a YAHOO module
|
28
|
-
* is loaded. As parameter, this function will receive the version
|
29
|
-
* information for the module. See <a href="YAHOO.env.html#getVersion">
|
30
|
-
* YAHOO.env.getVersion</a> for the description of the version data structure.
|
31
|
-
* @property listener
|
32
|
-
* @type Function
|
33
|
-
* @static
|
34
|
-
* @default undefined
|
35
|
-
*/
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Set to true if the library will be dynamically loaded after window.onload.
|
39
|
-
* Defaults to false
|
40
|
-
* @property injecting
|
41
|
-
* @type boolean
|
42
|
-
* @static
|
43
|
-
* @default undefined
|
44
|
-
*/
|
45
|
-
|
46
|
-
/**
|
47
|
-
* Instructs the yuiloader component to dynamically load yui components and
|
48
|
-
* their dependencies. See the yuiloader documentation for more information
|
49
|
-
* about dynamic loading
|
50
|
-
* @property load
|
51
|
-
* @static
|
52
|
-
* @default undefined
|
53
|
-
* @see yuiloader
|
54
|
-
*/
|
55
|
-
|
56
|
-
/**
|
57
|
-
* Forces the use of the supplied locale where applicable in the library
|
58
|
-
* @property locale
|
59
|
-
* @type string
|
60
|
-
* @static
|
61
|
-
* @default undefined
|
62
|
-
*/
|
63
|
-
|
64
|
-
if (typeof YAHOO == "undefined" || !YAHOO) {
|
65
|
-
/**
|
66
|
-
* The YAHOO global namespace object. If YAHOO is already defined, the
|
67
|
-
* existing YAHOO object will not be overwritten so that defined
|
68
|
-
* namespaces are preserved.
|
69
|
-
* @class YAHOO
|
70
|
-
* @static
|
71
|
-
*/
|
72
|
-
var YAHOO = {};
|
73
|
-
}
|
74
|
-
|
75
|
-
/**
|
76
|
-
* Returns the namespace specified and creates it if it doesn't exist
|
77
|
-
* <pre>
|
78
|
-
* YAHOO.namespace("property.package");
|
79
|
-
* YAHOO.namespace("YAHOO.property.package");
|
80
|
-
* </pre>
|
81
|
-
* Either of the above would create YAHOO.property, then
|
82
|
-
* YAHOO.property.package
|
83
|
-
*
|
84
|
-
* Be careful when naming packages. Reserved words may work in some browsers
|
85
|
-
* and not others. For instance, the following will fail in Safari:
|
86
|
-
* <pre>
|
87
|
-
* YAHOO.namespace("really.long.nested.namespace");
|
88
|
-
* </pre>
|
89
|
-
* This fails because "long" is a future reserved word in ECMAScript
|
90
|
-
*
|
91
|
-
* For implementation code that uses YUI, do not create your components
|
92
|
-
* in the namespaces created by the library. defined by YUI -- create
|
93
|
-
* your own (YAHOO.util, YAHOO.widget, YAHOO.lang, YAHOO.env)
|
94
|
-
*
|
95
|
-
* @method namespace
|
96
|
-
* @static
|
97
|
-
* @param {String*} arguments 1-n namespaces to create
|
98
|
-
* @return {Object} A reference to the last namespace object created
|
99
|
-
*/
|
100
|
-
YAHOO.namespace = function() {
|
101
|
-
var a=arguments, o=null, i, j, d;
|
102
|
-
for (i=0; i<a.length; i=i+1) {
|
103
|
-
d=(""+a[i]).split(".");
|
104
|
-
o=YAHOO;
|
105
|
-
|
106
|
-
// YAHOO is implied, so it is ignored if it is included
|
107
|
-
for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; j=j+1) {
|
108
|
-
o[d[j]]=o[d[j]] || {};
|
109
|
-
o=o[d[j]];
|
110
|
-
}
|
111
|
-
}
|
112
|
-
|
113
|
-
return o;
|
114
|
-
};
|
115
|
-
|
116
|
-
/**
|
117
|
-
* Uses YAHOO.widget.Logger to output a log message, if the widget is
|
118
|
-
* available.
|
119
|
-
*
|
120
|
-
* @method log
|
121
|
-
* @static
|
122
|
-
* @param {String} msg The message to log.
|
123
|
-
* @param {String} cat The log category for the message. Default
|
124
|
-
* categories are "info", "warn", "error", time".
|
125
|
-
* Custom categories can be used as well. (opt)
|
126
|
-
* @param {String} src The source of the the message (opt)
|
127
|
-
* @return {Boolean} True if the log operation was successful.
|
128
|
-
*/
|
129
|
-
YAHOO.log = function(msg, cat, src) {
|
130
|
-
var l=YAHOO.widget.Logger;
|
131
|
-
if(l && l.log) {
|
132
|
-
return l.log(msg, cat, src);
|
133
|
-
} else {
|
134
|
-
return false;
|
135
|
-
}
|
136
|
-
};
|
137
|
-
|
138
|
-
/**
|
139
|
-
* Registers a module with the YAHOO object
|
140
|
-
* @method register
|
141
|
-
* @static
|
142
|
-
* @param {String} name the name of the module (event, slider, etc)
|
143
|
-
* @param {Function} mainClass a reference to class in the module. This
|
144
|
-
* class will be tagged with the version info
|
145
|
-
* so that it will be possible to identify the
|
146
|
-
* version that is in use when multiple versions
|
147
|
-
* have loaded
|
148
|
-
* @param {Object} data metadata object for the module. Currently it
|
149
|
-
* is expected to contain a "version" property
|
150
|
-
* and a "build" property at minimum.
|
151
|
-
*/
|
152
|
-
YAHOO.register = function(name, mainClass, data) {
|
153
|
-
var mods = YAHOO.env.modules, m, v, b, ls, i;
|
154
|
-
|
155
|
-
if (!mods[name]) {
|
156
|
-
mods[name] = {
|
157
|
-
versions:[],
|
158
|
-
builds:[]
|
159
|
-
};
|
160
|
-
}
|
161
|
-
|
162
|
-
m = mods[name];
|
163
|
-
v = data.version;
|
164
|
-
b = data.build;
|
165
|
-
ls = YAHOO.env.listeners;
|
166
|
-
|
167
|
-
m.name = name;
|
168
|
-
m.version = v;
|
169
|
-
m.build = b;
|
170
|
-
m.versions.push(v);
|
171
|
-
m.builds.push(b);
|
172
|
-
m.mainClass = mainClass;
|
173
|
-
|
174
|
-
// fire the module load listeners
|
175
|
-
for (i=0;i<ls.length;i=i+1) {
|
176
|
-
ls[i](m);
|
177
|
-
}
|
178
|
-
// label the main class
|
179
|
-
if (mainClass) {
|
180
|
-
mainClass.VERSION = v;
|
181
|
-
mainClass.BUILD = b;
|
182
|
-
} else {
|
183
|
-
YAHOO.log("mainClass is undefined for module " + name, "warn");
|
184
|
-
}
|
185
|
-
};
|
186
|
-
|
187
|
-
/**
|
188
|
-
* YAHOO.env is used to keep track of what is known about the YUI library and
|
189
|
-
* the browsing environment
|
190
|
-
* @class YAHOO.env
|
191
|
-
* @static
|
192
|
-
*/
|
193
|
-
YAHOO.env = YAHOO.env || {
|
194
|
-
|
195
|
-
/**
|
196
|
-
* Keeps the version info for all YUI modules that have reported themselves
|
197
|
-
* @property modules
|
198
|
-
* @type Object[]
|
199
|
-
*/
|
200
|
-
modules: [],
|
201
|
-
|
202
|
-
/**
|
203
|
-
* List of functions that should be executed every time a YUI module
|
204
|
-
* reports itself.
|
205
|
-
* @property listeners
|
206
|
-
* @type Function[]
|
207
|
-
*/
|
208
|
-
listeners: []
|
209
|
-
};
|
210
|
-
|
211
|
-
/**
|
212
|
-
* Returns the version data for the specified module:
|
213
|
-
* <dl>
|
214
|
-
* <dt>name:</dt> <dd>The name of the module</dd>
|
215
|
-
* <dt>version:</dt> <dd>The version in use</dd>
|
216
|
-
* <dt>build:</dt> <dd>The build number in use</dd>
|
217
|
-
* <dt>versions:</dt> <dd>All versions that were registered</dd>
|
218
|
-
* <dt>builds:</dt> <dd>All builds that were registered.</dd>
|
219
|
-
* <dt>mainClass:</dt> <dd>An object that was was stamped with the
|
220
|
-
* current version and build. If
|
221
|
-
* mainClass.VERSION != version or mainClass.BUILD != build,
|
222
|
-
* multiple versions of pieces of the library have been
|
223
|
-
* loaded, potentially causing issues.</dd>
|
224
|
-
* </dl>
|
225
|
-
*
|
226
|
-
* @method getVersion
|
227
|
-
* @static
|
228
|
-
* @param {String} name the name of the module (event, slider, etc)
|
229
|
-
* @return {Object} The version info
|
230
|
-
*/
|
231
|
-
YAHOO.env.getVersion = function(name) {
|
232
|
-
return YAHOO.env.modules[name] || null;
|
233
|
-
};
|
234
|
-
|
235
|
-
/**
|
236
|
-
* Do not fork for a browser if it can be avoided. Use feature detection when
|
237
|
-
* you can. Use the user agent as a last resort. YAHOO.env.ua stores a version
|
238
|
-
* number for the browser engine, 0 otherwise. This value may or may not map
|
239
|
-
* to the version number of the browser using the engine. The value is
|
240
|
-
* presented as a float so that it can easily be used for boolean evaluation
|
241
|
-
* as well as for looking for a particular range of versions. Because of this,
|
242
|
-
* some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9
|
243
|
-
* reports 1.8).
|
244
|
-
* @class YAHOO.env.ua
|
245
|
-
* @static
|
246
|
-
*/
|
247
|
-
YAHOO.env.ua = function() {
|
248
|
-
var o={
|
249
|
-
|
250
|
-
/**
|
251
|
-
* Internet Explorer version number or 0. Example: 6
|
252
|
-
* @property ie
|
253
|
-
* @type float
|
254
|
-
*/
|
255
|
-
ie:0,
|
256
|
-
|
257
|
-
/**
|
258
|
-
* Opera version number or 0. Example: 9.2
|
259
|
-
* @property opera
|
260
|
-
* @type float
|
261
|
-
*/
|
262
|
-
opera:0,
|
263
|
-
|
264
|
-
/**
|
265
|
-
* Gecko engine revision number. Will evaluate to 1 if Gecko
|
266
|
-
* is detected but the revision could not be found. Other browsers
|
267
|
-
* will be 0. Example: 1.8
|
268
|
-
* <pre>
|
269
|
-
* Firefox 1.0.0.4: 1.7.8 <-- Reports 1.7
|
270
|
-
* Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
|
271
|
-
* Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
|
272
|
-
* Firefox 3 alpha: 1.9a4 <-- Reports 1.9
|
273
|
-
* </pre>
|
274
|
-
* @property gecko
|
275
|
-
* @type float
|
276
|
-
*/
|
277
|
-
gecko:0,
|
278
|
-
|
279
|
-
/**
|
280
|
-
* AppleWebKit version. KHTML browsers that are not WebKit browsers
|
281
|
-
* will evaluate to 1, other browsers 0. Example: 418.9.1
|
282
|
-
* <pre>
|
283
|
-
* Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the
|
284
|
-
* latest available for Mac OSX 10.3.
|
285
|
-
* Safari 2.0.2: 416 <-- hasOwnProperty introduced
|
286
|
-
* Safari 2.0.4: 418 <-- preventDefault fixed
|
287
|
-
* Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
|
288
|
-
* different versions of webkit
|
289
|
-
* Safari 2.0.4 (419.3): 419 <-- Tiger installations that have been
|
290
|
-
* updated, but not updated
|
291
|
-
* to the latest patch.
|
292
|
-
* Webkit 212 nightly: 522+ <-- Safari 3.0 precursor (with native SVG
|
293
|
-
* and many major issues fixed).
|
294
|
-
* 3.x yahoo.com, flickr:422 <-- Safari 3.x hacks the user agent
|
295
|
-
* string when hitting yahoo.com and
|
296
|
-
* flickr.com.
|
297
|
-
* Safari 3.0.4 (523.12):523.12 <-- First Tiger release - automatic update
|
298
|
-
* from 2.x via the 10.4.11 OS patch
|
299
|
-
* Webkit nightly 1/2008:525+ <-- Supports DOMContentLoaded event.
|
300
|
-
* yahoo.com user agent hack removed.
|
301
|
-
*
|
302
|
-
* </pre>
|
303
|
-
* http://developer.apple.com/internet/safari/uamatrix.html
|
304
|
-
* @property webkit
|
305
|
-
* @type float
|
306
|
-
*/
|
307
|
-
webkit: 0,
|
308
|
-
|
309
|
-
/**
|
310
|
-
* The mobile property will be set to a string containing any relevant
|
311
|
-
* user agent information when a modern mobile browser is detected.
|
312
|
-
* Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
|
313
|
-
* devices with the WebKit-based browser, and Opera Mini.
|
314
|
-
* @property mobile
|
315
|
-
* @type string
|
316
|
-
*/
|
317
|
-
mobile: null,
|
318
|
-
|
319
|
-
/**
|
320
|
-
* Adobe AIR version number or 0. Only populated if webkit is detected.
|
321
|
-
* Example: 1.0
|
322
|
-
* @property air
|
323
|
-
* @type float
|
324
|
-
*/
|
325
|
-
air: 0,
|
326
|
-
|
327
|
-
/**
|
328
|
-
* Google Caja version number or 0.
|
329
|
-
* @property caja
|
330
|
-
* @type float
|
331
|
-
*/
|
332
|
-
caja: 0
|
333
|
-
|
334
|
-
},
|
335
|
-
|
336
|
-
ua = navigator.userAgent,
|
337
|
-
|
338
|
-
m;
|
339
|
-
|
340
|
-
// Modern KHTML browsers should qualify as Safari X-Grade
|
341
|
-
if ((/KHTML/).test(ua)) {
|
342
|
-
o.webkit=1;
|
343
|
-
}
|
344
|
-
// Modern WebKit browsers are at least X-Grade
|
345
|
-
m=ua.match(/AppleWebKit\/([^\s]*)/);
|
346
|
-
if (m&&m[1]) {
|
347
|
-
o.webkit=parseFloat(m[1]);
|
348
|
-
|
349
|
-
// Mobile browser check
|
350
|
-
if (/ Mobile\//.test(ua)) {
|
351
|
-
o.mobile = "Apple"; // iPhone or iPod Touch
|
352
|
-
} else {
|
353
|
-
m=ua.match(/NokiaN[^\/]*/);
|
354
|
-
if (m) {
|
355
|
-
o.mobile = m[0]; // Nokia N-series, ex: NokiaN95
|
356
|
-
}
|
357
|
-
}
|
358
|
-
|
359
|
-
m=ua.match(/AdobeAIR\/([^\s]*)/);
|
360
|
-
if (m) {
|
361
|
-
o.air = m[0]; // Adobe AIR 1.0 or better
|
362
|
-
}
|
363
|
-
|
364
|
-
}
|
365
|
-
|
366
|
-
if (!o.webkit) { // not webkit
|
367
|
-
// @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr)
|
368
|
-
m=ua.match(/Opera[\s\/]([^\s]*)/);
|
369
|
-
if (m&&m[1]) {
|
370
|
-
o.opera=parseFloat(m[1]);
|
371
|
-
m=ua.match(/Opera Mini[^;]*/);
|
372
|
-
if (m) {
|
373
|
-
o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
|
374
|
-
}
|
375
|
-
} else { // not opera or webkit
|
376
|
-
m=ua.match(/MSIE\s([^;]*)/);
|
377
|
-
if (m&&m[1]) {
|
378
|
-
o.ie=parseFloat(m[1]);
|
379
|
-
} else { // not opera, webkit, or ie
|
380
|
-
m=ua.match(/Gecko\/([^\s]*)/);
|
381
|
-
if (m) {
|
382
|
-
o.gecko=1; // Gecko detected, look for revision
|
383
|
-
m=ua.match(/rv:([^\s\)]*)/);
|
384
|
-
if (m&&m[1]) {
|
385
|
-
o.gecko=parseFloat(m[1]);
|
386
|
-
}
|
387
|
-
}
|
388
|
-
}
|
389
|
-
}
|
390
|
-
}
|
391
|
-
|
392
|
-
m=ua.match(/Caja\/([^\s]*)/);
|
393
|
-
if (m&&m[1]) {
|
394
|
-
o.caja=parseFloat(m[1]);
|
395
|
-
}
|
396
|
-
|
397
|
-
return o;
|
398
|
-
}();
|
399
|
-
|
400
|
-
/*
|
401
|
-
* Initializes the global by creating the default namespaces and applying
|
402
|
-
* any new configuration information that is detected. This is the setup
|
403
|
-
* for env.
|
404
|
-
* @method init
|
405
|
-
* @static
|
406
|
-
* @private
|
407
|
-
*/
|
408
|
-
(function() {
|
409
|
-
YAHOO.namespace("util", "widget", "example");
|
410
|
-
/*global YAHOO_config*/
|
411
|
-
if ("undefined" !== typeof YAHOO_config) {
|
412
|
-
var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;
|
413
|
-
if (l) {
|
414
|
-
// if YAHOO is loaded multiple times we need to check to see if
|
415
|
-
// this is a new config object. If it is, add the new component
|
416
|
-
// load listener to the stack
|
417
|
-
for (i=0;i<ls.length;i=i+1) {
|
418
|
-
if (ls[i]==l) {
|
419
|
-
unique=false;
|
420
|
-
break;
|
421
|
-
}
|
422
|
-
}
|
423
|
-
if (unique) {
|
424
|
-
ls.push(l);
|
425
|
-
}
|
426
|
-
}
|
427
|
-
}
|
428
|
-
})();
|
429
|
-
/**
|
430
|
-
* Provides the language utilites and extensions used by the library
|
431
|
-
* @class YAHOO.lang
|
432
|
-
*/
|
433
|
-
YAHOO.lang = YAHOO.lang || {};
|
434
|
-
|
435
|
-
(function() {
|
436
|
-
|
437
|
-
|
438
|
-
var L = YAHOO.lang,
|
439
|
-
|
440
|
-
ARRAY_TOSTRING = '[object Array]',
|
441
|
-
FUNCTION_TOSTRING = '[object Function]',
|
442
|
-
OP = Object.prototype,
|
443
|
-
|
444
|
-
// ADD = ["toString", "valueOf", "hasOwnProperty"],
|
445
|
-
ADD = ["toString", "valueOf"],
|
446
|
-
|
447
|
-
OB = {
|
448
|
-
|
449
|
-
/**
|
450
|
-
* Determines wheather or not the provided object is an array.
|
451
|
-
* @method isArray
|
452
|
-
* @param {any} o The object being testing
|
453
|
-
* @return {boolean} the result
|
454
|
-
*/
|
455
|
-
isArray: function(o) {
|
456
|
-
return OP.toString.apply(o) === ARRAY_TOSTRING;
|
457
|
-
},
|
458
|
-
|
459
|
-
/**
|
460
|
-
* Determines whether or not the provided object is a boolean
|
461
|
-
* @method isBoolean
|
462
|
-
* @param {any} o The object being testing
|
463
|
-
* @return {boolean} the result
|
464
|
-
*/
|
465
|
-
isBoolean: function(o) {
|
466
|
-
return typeof o === 'boolean';
|
467
|
-
},
|
468
|
-
|
469
|
-
/**
|
470
|
-
* Determines whether or not the provided object is a function.
|
471
|
-
* Note: Internet Explorer thinks certain functions are objects:
|
472
|
-
*
|
473
|
-
* var obj = document.createElement("object");
|
474
|
-
* YAHOO.lang.isFunction(obj.getAttribute) // reports false in IE
|
475
|
-
*
|
476
|
-
* var input = document.createElement("input"); // append to body
|
477
|
-
* YAHOO.lang.isFunction(input.focus) // reports false in IE
|
478
|
-
*
|
479
|
-
* You will have to implement additional tests if these functions
|
480
|
-
* matter to you.
|
481
|
-
*
|
482
|
-
* @method isFunction
|
483
|
-
* @param {any} o The object being testing
|
484
|
-
* @return {boolean} the result
|
485
|
-
*/
|
486
|
-
isFunction: function(o) {
|
487
|
-
return OP.toString.apply(o) === FUNCTION_TOSTRING;
|
488
|
-
},
|
489
|
-
|
490
|
-
/**
|
491
|
-
* Determines whether or not the provided object is null
|
492
|
-
* @method isNull
|
493
|
-
* @param {any} o The object being testing
|
494
|
-
* @return {boolean} the result
|
495
|
-
*/
|
496
|
-
isNull: function(o) {
|
497
|
-
return o === null;
|
498
|
-
},
|
499
|
-
|
500
|
-
/**
|
501
|
-
* Determines whether or not the provided object is a legal number
|
502
|
-
* @method isNumber
|
503
|
-
* @param {any} o The object being testing
|
504
|
-
* @return {boolean} the result
|
505
|
-
*/
|
506
|
-
isNumber: function(o) {
|
507
|
-
return typeof o === 'number' && isFinite(o);
|
508
|
-
},
|
509
|
-
|
510
|
-
/**
|
511
|
-
* Determines whether or not the provided object is of type object
|
512
|
-
* or function
|
513
|
-
* @method isObject
|
514
|
-
* @param {any} o The object being testing
|
515
|
-
* @return {boolean} the result
|
516
|
-
*/
|
517
|
-
isObject: function(o) {
|
518
|
-
return (o && (typeof o === 'object' || L.isFunction(o))) || false;
|
519
|
-
},
|
520
|
-
|
521
|
-
/**
|
522
|
-
* Determines whether or not the provided object is a string
|
523
|
-
* @method isString
|
524
|
-
* @param {any} o The object being testing
|
525
|
-
* @return {boolean} the result
|
526
|
-
*/
|
527
|
-
isString: function(o) {
|
528
|
-
return typeof o === 'string';
|
529
|
-
},
|
530
|
-
|
531
|
-
/**
|
532
|
-
* Determines whether or not the provided object is undefined
|
533
|
-
* @method isUndefined
|
534
|
-
* @param {any} o The object being testing
|
535
|
-
* @return {boolean} the result
|
536
|
-
*/
|
537
|
-
isUndefined: function(o) {
|
538
|
-
return typeof o === 'undefined';
|
539
|
-
},
|
540
|
-
|
541
|
-
|
542
|
-
/**
|
543
|
-
* IE will not enumerate native functions in a derived object even if the
|
544
|
-
* function was overridden. This is a workaround for specific functions
|
545
|
-
* we care about on the Object prototype.
|
546
|
-
* @property _IEEnumFix
|
547
|
-
* @param {Function} r the object to receive the augmentation
|
548
|
-
* @param {Function} s the object that supplies the properties to augment
|
549
|
-
* @static
|
550
|
-
* @private
|
551
|
-
*/
|
552
|
-
_IEEnumFix: (YAHOO.env.ua.ie) ? function(r, s) {
|
553
|
-
var i, fname, f;
|
554
|
-
for (i=0;i<ADD.length;i=i+1) {
|
555
|
-
|
556
|
-
fname = ADD[i];
|
557
|
-
f = s[fname];
|
558
|
-
|
559
|
-
if (L.isFunction(f) && f!=OP[fname]) {
|
560
|
-
r[fname]=f;
|
561
|
-
}
|
562
|
-
}
|
563
|
-
} : function(){},
|
564
|
-
|
565
|
-
/**
|
566
|
-
* Utility to set up the prototype, constructor and superclass properties to
|
567
|
-
* support an inheritance strategy that can chain constructors and methods.
|
568
|
-
* Static members will not be inherited.
|
569
|
-
*
|
570
|
-
* @method extend
|
571
|
-
* @static
|
572
|
-
* @param {Function} subc the object to modify
|
573
|
-
* @param {Function} superc the object to inherit
|
574
|
-
* @param {Object} overrides additional properties/methods to add to the
|
575
|
-
* subclass prototype. These will override the
|
576
|
-
* matching items obtained from the superclass
|
577
|
-
* if present.
|
578
|
-
*/
|
579
|
-
extend: function(subc, superc, overrides) {
|
580
|
-
if (!superc||!subc) {
|
581
|
-
throw new Error("extend failed, please check that " +
|
582
|
-
"all dependencies are included.");
|
583
|
-
}
|
584
|
-
var F = function() {}, i;
|
585
|
-
F.prototype=superc.prototype;
|
586
|
-
subc.prototype=new F();
|
587
|
-
subc.prototype.constructor=subc;
|
588
|
-
subc.superclass=superc.prototype;
|
589
|
-
if (superc.prototype.constructor == OP.constructor) {
|
590
|
-
superc.prototype.constructor=superc;
|
591
|
-
}
|
592
|
-
|
593
|
-
if (overrides) {
|
594
|
-
for (i in overrides) {
|
595
|
-
if (L.hasOwnProperty(overrides, i)) {
|
596
|
-
subc.prototype[i]=overrides[i];
|
597
|
-
}
|
598
|
-
}
|
599
|
-
|
600
|
-
L._IEEnumFix(subc.prototype, overrides);
|
601
|
-
}
|
602
|
-
},
|
603
|
-
|
604
|
-
/**
|
605
|
-
* Applies all properties in the supplier to the receiver if the
|
606
|
-
* receiver does not have these properties yet. Optionally, one or
|
607
|
-
* more methods/properties can be specified (as additional
|
608
|
-
* parameters). This option will overwrite the property if receiver
|
609
|
-
* has it already. If true is passed as the third parameter, all
|
610
|
-
* properties will be applied and _will_ overwrite properties in
|
611
|
-
* the receiver.
|
612
|
-
*
|
613
|
-
* @method augmentObject
|
614
|
-
* @static
|
615
|
-
* @since 2.3.0
|
616
|
-
* @param {Function} r the object to receive the augmentation
|
617
|
-
* @param {Function} s the object that supplies the properties to augment
|
618
|
-
* @param {String*|boolean} arguments zero or more properties methods
|
619
|
-
* to augment the receiver with. If none specified, everything
|
620
|
-
* in the supplier will be used unless it would
|
621
|
-
* overwrite an existing property in the receiver. If true
|
622
|
-
* is specified as the third parameter, all properties will
|
623
|
-
* be applied and will overwrite an existing property in
|
624
|
-
* the receiver
|
625
|
-
*/
|
626
|
-
augmentObject: function(r, s) {
|
627
|
-
if (!s||!r) {
|
628
|
-
throw new Error("Absorb failed, verify dependencies.");
|
629
|
-
}
|
630
|
-
var a=arguments, i, p, overrideList=a[2];
|
631
|
-
if (overrideList && overrideList!==true) { // only absorb the specified properties
|
632
|
-
for (i=2; i<a.length; i=i+1) {
|
633
|
-
r[a[i]] = s[a[i]];
|
634
|
-
}
|
635
|
-
} else { // take everything, overwriting only if the third parameter is true
|
636
|
-
for (p in s) {
|
637
|
-
if (overrideList || !(p in r)) {
|
638
|
-
r[p] = s[p];
|
639
|
-
}
|
640
|
-
}
|
641
|
-
|
642
|
-
L._IEEnumFix(r, s);
|
643
|
-
}
|
644
|
-
},
|
645
|
-
|
646
|
-
/**
|
647
|
-
* Same as YAHOO.lang.augmentObject, except it only applies prototype properties
|
648
|
-
* @see YAHOO.lang.augmentObject
|
649
|
-
* @method augmentProto
|
650
|
-
* @static
|
651
|
-
* @param {Function} r the object to receive the augmentation
|
652
|
-
* @param {Function} s the object that supplies the properties to augment
|
653
|
-
* @param {String*|boolean} arguments zero or more properties methods
|
654
|
-
* to augment the receiver with. If none specified, everything
|
655
|
-
* in the supplier will be used unless it would overwrite an existing
|
656
|
-
* property in the receiver. if true is specified as the third
|
657
|
-
* parameter, all properties will be applied and will overwrite an
|
658
|
-
* existing property in the receiver
|
659
|
-
*/
|
660
|
-
augmentProto: function(r, s) {
|
661
|
-
if (!s||!r) {
|
662
|
-
throw new Error("Augment failed, verify dependencies.");
|
663
|
-
}
|
664
|
-
//var a=[].concat(arguments);
|
665
|
-
var a=[r.prototype,s.prototype], i;
|
666
|
-
for (i=2;i<arguments.length;i=i+1) {
|
667
|
-
a.push(arguments[i]);
|
668
|
-
}
|
669
|
-
L.augmentObject.apply(this, a);
|
670
|
-
},
|
671
|
-
|
672
|
-
|
673
|
-
/**
|
674
|
-
* Returns a simple string representation of the object or array.
|
675
|
-
* Other types of objects will be returned unprocessed. Arrays
|
676
|
-
* are expected to be indexed. Use object notation for
|
677
|
-
* associative arrays.
|
678
|
-
* @method dump
|
679
|
-
* @since 2.3.0
|
680
|
-
* @param o {Object} The object to dump
|
681
|
-
* @param d {int} How deep to recurse child objects, default 3
|
682
|
-
* @return {String} the dump result
|
683
|
-
*/
|
684
|
-
dump: function(o, d) {
|
685
|
-
var i,len,s=[],OBJ="{...}",FUN="f(){...}",
|
686
|
-
COMMA=', ', ARROW=' => ';
|
687
|
-
|
688
|
-
// Cast non-objects to string
|
689
|
-
// Skip dates because the std toString is what we want
|
690
|
-
// Skip HTMLElement-like objects because trying to dump
|
691
|
-
// an element will cause an unhandled exception in FF 2.x
|
692
|
-
if (!L.isObject(o)) {
|
693
|
-
return o + "";
|
694
|
-
} else if (o instanceof Date || ("nodeType" in o && "tagName" in o)) {
|
695
|
-
return o;
|
696
|
-
} else if (L.isFunction(o)) {
|
697
|
-
return FUN;
|
698
|
-
}
|
699
|
-
|
700
|
-
// dig into child objects the depth specifed. Default 3
|
701
|
-
d = (L.isNumber(d)) ? d : 3;
|
702
|
-
|
703
|
-
// arrays [1, 2, 3]
|
704
|
-
if (L.isArray(o)) {
|
705
|
-
s.push("[");
|
706
|
-
for (i=0,len=o.length;i<len;i=i+1) {
|
707
|
-
if (L.isObject(o[i])) {
|
708
|
-
s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
|
709
|
-
} else {
|
710
|
-
s.push(o[i]);
|
711
|
-
}
|
712
|
-
s.push(COMMA);
|
713
|
-
}
|
714
|
-
if (s.length > 1) {
|
715
|
-
s.pop();
|
716
|
-
}
|
717
|
-
s.push("]");
|
718
|
-
// objects {k1 => v1, k2 => v2}
|
719
|
-
} else {
|
720
|
-
s.push("{");
|
721
|
-
for (i in o) {
|
722
|
-
if (L.hasOwnProperty(o, i)) {
|
723
|
-
s.push(i + ARROW);
|
724
|
-
if (L.isObject(o[i])) {
|
725
|
-
s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
|
726
|
-
} else {
|
727
|
-
s.push(o[i]);
|
728
|
-
}
|
729
|
-
s.push(COMMA);
|
730
|
-
}
|
731
|
-
}
|
732
|
-
if (s.length > 1) {
|
733
|
-
s.pop();
|
734
|
-
}
|
735
|
-
s.push("}");
|
736
|
-
}
|
737
|
-
|
738
|
-
return s.join("");
|
739
|
-
},
|
740
|
-
|
741
|
-
/**
|
742
|
-
* Does variable substitution on a string. It scans through the string
|
743
|
-
* looking for expressions enclosed in { } braces. If an expression
|
744
|
-
* is found, it is used a key on the object. If there is a space in
|
745
|
-
* the key, the first word is used for the key and the rest is provided
|
746
|
-
* to an optional function to be used to programatically determine the
|
747
|
-
* value (the extra information might be used for this decision). If
|
748
|
-
* the value for the key in the object, or what is returned from the
|
749
|
-
* function has a string value, number value, or object value, it is
|
750
|
-
* substituted for the bracket expression and it repeats. If this
|
751
|
-
* value is an object, it uses the Object's toString() if this has
|
752
|
-
* been overridden, otherwise it does a shallow dump of the key/value
|
753
|
-
* pairs.
|
754
|
-
* @method substitute
|
755
|
-
* @since 2.3.0
|
756
|
-
* @param s {String} The string that will be modified.
|
757
|
-
* @param o {Object} An object containing the replacement values
|
758
|
-
* @param f {Function} An optional function that can be used to
|
759
|
-
* process each match. It receives the key,
|
760
|
-
* value, and any extra metadata included with
|
761
|
-
* the key inside of the braces.
|
762
|
-
* @return {String} the substituted string
|
763
|
-
*/
|
764
|
-
substitute: function (s, o, f) {
|
765
|
-
var i, j, k, key, v, meta, saved=[], token,
|
766
|
-
DUMP='dump', SPACE=' ', LBRACE='{', RBRACE='}',
|
767
|
-
dump;
|
768
|
-
|
769
|
-
|
770
|
-
for (;;) {
|
771
|
-
i = s.lastIndexOf(LBRACE);
|
772
|
-
if (i < 0) {
|
773
|
-
break;
|
774
|
-
}
|
775
|
-
j = s.indexOf(RBRACE, i);
|
776
|
-
if (i + 1 >= j) {
|
777
|
-
break;
|
778
|
-
}
|
779
|
-
|
780
|
-
//Extract key and meta info
|
781
|
-
token = s.substring(i + 1, j);
|
782
|
-
key = token;
|
783
|
-
meta = null;
|
784
|
-
k = key.indexOf(SPACE);
|
785
|
-
if (k > -1) {
|
786
|
-
meta = key.substring(k + 1);
|
787
|
-
key = key.substring(0, k);
|
788
|
-
}
|
789
|
-
|
790
|
-
// lookup the value
|
791
|
-
v = o[key];
|
792
|
-
|
793
|
-
// if a substitution function was provided, execute it
|
794
|
-
if (f) {
|
795
|
-
v = f(key, v, meta);
|
796
|
-
}
|
797
|
-
|
798
|
-
if (L.isObject(v)) {
|
799
|
-
if (L.isArray(v)) {
|
800
|
-
v = L.dump(v, parseInt(meta, 10));
|
801
|
-
} else {
|
802
|
-
meta = meta || "";
|
803
|
-
|
804
|
-
// look for the keyword 'dump', if found force obj dump
|
805
|
-
dump = meta.indexOf(DUMP);
|
806
|
-
if (dump > -1) {
|
807
|
-
meta = meta.substring(4);
|
808
|
-
}
|
809
|
-
|
810
|
-
// use the toString if it is not the Object toString
|
811
|
-
// and the 'dump' meta info was not found
|
812
|
-
if (v.toString===OP.toString || dump>-1) {
|
813
|
-
v = L.dump(v, parseInt(meta, 10));
|
814
|
-
} else {
|
815
|
-
v = v.toString();
|
816
|
-
}
|
817
|
-
}
|
818
|
-
} else if (!L.isString(v) && !L.isNumber(v)) {
|
819
|
-
// This {block} has no replace string. Save it for later.
|
820
|
-
v = "~-" + saved.length + "-~";
|
821
|
-
saved[saved.length] = token;
|
822
|
-
|
823
|
-
// break;
|
824
|
-
}
|
825
|
-
|
826
|
-
s = s.substring(0, i) + v + s.substring(j + 1);
|
827
|
-
|
828
|
-
|
829
|
-
}
|
830
|
-
|
831
|
-
// restore saved {block}s
|
832
|
-
for (i=saved.length-1; i>=0; i=i-1) {
|
833
|
-
s = s.replace(new RegExp("~-" + i + "-~"), "{" + saved[i] + "}", "g");
|
834
|
-
}
|
835
|
-
|
836
|
-
return s;
|
837
|
-
},
|
838
|
-
|
839
|
-
|
840
|
-
/**
|
841
|
-
* Returns a string without any leading or trailing whitespace. If
|
842
|
-
* the input is not a string, the input will be returned untouched.
|
843
|
-
* @method trim
|
844
|
-
* @since 2.3.0
|
845
|
-
* @param s {string} the string to trim
|
846
|
-
* @return {string} the trimmed string
|
847
|
-
*/
|
848
|
-
trim: function(s){
|
849
|
-
try {
|
850
|
-
return s.replace(/^\s+|\s+$/g, "");
|
851
|
-
} catch(e) {
|
852
|
-
return s;
|
853
|
-
}
|
854
|
-
},
|
855
|
-
|
856
|
-
/**
|
857
|
-
* Returns a new object containing all of the properties of
|
858
|
-
* all the supplied objects. The properties from later objects
|
859
|
-
* will overwrite those in earlier objects.
|
860
|
-
* @method merge
|
861
|
-
* @since 2.3.0
|
862
|
-
* @param arguments {Object*} the objects to merge
|
863
|
-
* @return the new merged object
|
864
|
-
*/
|
865
|
-
merge: function() {
|
866
|
-
var o={}, a=arguments, l=a.length, i;
|
867
|
-
for (i=0; i<l; i=i+1) {
|
868
|
-
L.augmentObject(o, a[i], true);
|
869
|
-
}
|
870
|
-
return o;
|
871
|
-
},
|
872
|
-
|
873
|
-
/**
|
874
|
-
* Executes the supplied function in the context of the supplied
|
875
|
-
* object 'when' milliseconds later. Executes the function a
|
876
|
-
* single time unless periodic is set to true.
|
877
|
-
* @method later
|
878
|
-
* @since 2.4.0
|
879
|
-
* @param when {int} the number of milliseconds to wait until the fn
|
880
|
-
* is executed
|
881
|
-
* @param o the context object
|
882
|
-
* @param fn {Function|String} the function to execute or the name of
|
883
|
-
* the method in the 'o' object to execute
|
884
|
-
* @param data [Array] data that is provided to the function. This accepts
|
885
|
-
* either a single item or an array. If an array is provided, the
|
886
|
-
* function is executed with one parameter for each array item. If
|
887
|
-
* you need to pass a single array parameter, it needs to be wrapped in
|
888
|
-
* an array [myarray]
|
889
|
-
* @param periodic {boolean} if true, executes continuously at supplied
|
890
|
-
* interval until canceled
|
891
|
-
* @return a timer object. Call the cancel() method on this object to
|
892
|
-
* stop the timer.
|
893
|
-
*/
|
894
|
-
later: function(when, o, fn, data, periodic) {
|
895
|
-
when = when || 0;
|
896
|
-
o = o || {};
|
897
|
-
var m=fn, d=data, f, r;
|
898
|
-
|
899
|
-
if (L.isString(fn)) {
|
900
|
-
m = o[fn];
|
901
|
-
}
|
902
|
-
|
903
|
-
if (!m) {
|
904
|
-
throw new TypeError("method undefined");
|
905
|
-
}
|
906
|
-
|
907
|
-
if (!L.isArray(d)) {
|
908
|
-
d = [data];
|
909
|
-
}
|
910
|
-
|
911
|
-
f = function() {
|
912
|
-
m.apply(o, d);
|
913
|
-
};
|
914
|
-
|
915
|
-
r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
|
916
|
-
|
917
|
-
return {
|
918
|
-
interval: periodic,
|
919
|
-
cancel: function() {
|
920
|
-
if (this.interval) {
|
921
|
-
clearInterval(r);
|
922
|
-
} else {
|
923
|
-
clearTimeout(r);
|
924
|
-
}
|
925
|
-
}
|
926
|
-
};
|
927
|
-
},
|
928
|
-
|
929
|
-
/**
|
930
|
-
* A convenience method for detecting a legitimate non-null value.
|
931
|
-
* Returns false for null/undefined/NaN, true for other values,
|
932
|
-
* including 0/false/''
|
933
|
-
* @method isValue
|
934
|
-
* @since 2.3.0
|
935
|
-
* @param o {any} the item to test
|
936
|
-
* @return {boolean} true if it is not null/undefined/NaN || false
|
937
|
-
*/
|
938
|
-
isValue: function(o) {
|
939
|
-
// return (o || o === false || o === 0 || o === ''); // Infinity fails
|
940
|
-
return (L.isObject(o) || L.isString(o) || L.isNumber(o) || L.isBoolean(o));
|
941
|
-
}
|
942
|
-
|
943
|
-
};
|
944
|
-
|
945
|
-
/**
|
946
|
-
* Determines whether or not the property was added
|
947
|
-
* to the object instance. Returns false if the property is not present
|
948
|
-
* in the object, or was inherited from the prototype.
|
949
|
-
* This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
|
950
|
-
* There is a discrepancy between YAHOO.lang.hasOwnProperty and
|
951
|
-
* Object.prototype.hasOwnProperty when the property is a primitive added to
|
952
|
-
* both the instance AND prototype with the same value:
|
953
|
-
* <pre>
|
954
|
-
* var A = function() {};
|
955
|
-
* A.prototype.foo = 'foo';
|
956
|
-
* var a = new A();
|
957
|
-
* a.foo = 'foo';
|
958
|
-
* alert(a.hasOwnProperty('foo')); // true
|
959
|
-
* alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
|
960
|
-
* </pre>
|
961
|
-
* @method hasOwnProperty
|
962
|
-
* @param {any} o The object being testing
|
963
|
-
* @param prop {string} the name of the property to test
|
964
|
-
* @return {boolean} the result
|
965
|
-
*/
|
966
|
-
L.hasOwnProperty = (OP.hasOwnProperty) ?
|
967
|
-
function(o, prop) {
|
968
|
-
return o && o.hasOwnProperty(prop);
|
969
|
-
} : function(o, prop) {
|
970
|
-
return !L.isUndefined(o[prop]) &&
|
971
|
-
o.constructor.prototype[prop] !== o[prop];
|
972
|
-
};
|
973
|
-
|
974
|
-
// new lang wins
|
975
|
-
OB.augmentObject(L, OB, true);
|
976
|
-
|
977
|
-
/*
|
978
|
-
* An alias for <a href="YAHOO.lang.html">YAHOO.lang</a>
|
979
|
-
* @class YAHOO.util.Lang
|
980
|
-
*/
|
981
|
-
YAHOO.util.Lang = L;
|
982
|
-
|
983
|
-
/**
|
984
|
-
* Same as YAHOO.lang.augmentObject, except it only applies prototype
|
985
|
-
* properties. This is an alias for augmentProto.
|
986
|
-
* @see YAHOO.lang.augmentObject
|
987
|
-
* @method augment
|
988
|
-
* @static
|
989
|
-
* @param {Function} r the object to receive the augmentation
|
990
|
-
* @param {Function} s the object that supplies the properties to augment
|
991
|
-
* @param {String*|boolean} arguments zero or more properties methods to
|
992
|
-
* augment the receiver with. If none specified, everything
|
993
|
-
* in the supplier will be used unless it would
|
994
|
-
* overwrite an existing property in the receiver. if true
|
995
|
-
* is specified as the third parameter, all properties will
|
996
|
-
* be applied and will overwrite an existing property in
|
997
|
-
* the receiver
|
998
|
-
*/
|
999
|
-
L.augment = L.augmentProto;
|
1000
|
-
|
1001
|
-
/**
|
1002
|
-
* An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
|
1003
|
-
* @for YAHOO
|
1004
|
-
* @method augment
|
1005
|
-
* @static
|
1006
|
-
* @param {Function} r the object to receive the augmentation
|
1007
|
-
* @param {Function} s the object that supplies the properties to augment
|
1008
|
-
* @param {String*} arguments zero or more properties methods to
|
1009
|
-
* augment the receiver with. If none specified, everything
|
1010
|
-
* in the supplier will be used unless it would
|
1011
|
-
* overwrite an existing property in the receiver
|
1012
|
-
*/
|
1013
|
-
YAHOO.augment = L.augmentProto;
|
1014
|
-
|
1015
|
-
/**
|
1016
|
-
* An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
|
1017
|
-
* @method extend
|
1018
|
-
* @static
|
1019
|
-
* @param {Function} subc the object to modify
|
1020
|
-
* @param {Function} superc the object to inherit
|
1021
|
-
* @param {Object} overrides additional properties/methods to add to the
|
1022
|
-
* subclass prototype. These will override the
|
1023
|
-
* matching items obtained from the superclass if present.
|
1024
|
-
*/
|
1025
|
-
YAHOO.extend = L.extend;
|
1026
|
-
|
1027
|
-
})();
|
1028
|
-
YAHOO.register("yahoo", YAHOO, {version: "2.7.0", build: "1796"});
|