azure 0.1.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/ChangeLog.txt +5 -0
- data/Gemfile +16 -3
- data/README.md +344 -2
- data/Rakefile +66 -37
- data/azure.gemspec +30 -11
- data/lib/azure.rb +35 -4
- data/lib/azure/blob/blob.rb +32 -0
- data/lib/azure/blob/blob_service.rb +1423 -0
- data/lib/azure/blob/block.rb +31 -0
- data/lib/azure/blob/container.rb +32 -0
- data/lib/azure/blob/serialization.rb +285 -0
- data/lib/azure/core.rb +32 -0
- data/lib/azure/core/auth/authorizer.rb +36 -0
- data/lib/azure/core/auth/shared_key.rb +21 -6
- data/lib/azure/core/auth/shared_key_lite.rb +17 -3
- data/lib/azure/core/auth/signer.rb +48 -0
- data/lib/azure/core/configuration.rb +152 -0
- data/lib/azure/core/error.rb +22 -0
- data/lib/azure/core/filtered_service.rb +44 -0
- data/lib/azure/core/http/debug_filter.rb +36 -0
- data/lib/azure/core/http/http_error.rb +84 -0
- data/lib/azure/core/http/http_filter.rb +53 -0
- data/lib/azure/core/http/http_request.rb +157 -0
- data/lib/azure/core/http/http_response.rb +133 -0
- data/lib/azure/core/http/retry_policy.rb +68 -0
- data/lib/azure/core/http/signer_filter.rb +34 -0
- data/lib/azure/core/service.rb +38 -32
- data/lib/azure/core/signed_service.rb +43 -0
- data/lib/azure/queue/message.rb +30 -0
- data/lib/azure/queue/queue.rb +29 -0
- data/lib/azure/queue/queue_service.rb +568 -0
- data/lib/azure/queue/serialization.rb +103 -0
- data/lib/azure/service/access_policy.rb +26 -0
- data/lib/azure/service/enumeration_results.rb +21 -0
- data/lib/azure/service/logging.rb +32 -0
- data/lib/azure/service/metrics.rb +31 -0
- data/lib/azure/service/retention_policy.rb +25 -0
- data/lib/azure/service/serialization.rb +240 -0
- data/lib/azure/service/signed_identifier.rb +30 -0
- data/lib/azure/service/storage_service.rb +79 -0
- data/lib/azure/service/storage_service_properties.rb +32 -0
- data/lib/azure/service_bus/action.rb +21 -0
- data/lib/azure/service_bus/auth/wrap_service.rb +59 -46
- data/lib/azure/service_bus/auth/wrap_signer.rb +69 -0
- data/lib/azure/service_bus/brokered_message.rb +36 -51
- data/lib/azure/service_bus/brokered_message_serializer.rb +48 -34
- data/lib/azure/service_bus/correlation_filter.rb +45 -0
- data/lib/azure/service_bus/empty_rule_action.rb +30 -0
- data/lib/azure/service_bus/false_filter.rb +38 -0
- data/lib/azure/service_bus/filter.rb +21 -0
- data/lib/azure/{core/utils → service_bus}/interval.rb +29 -22
- data/lib/azure/service_bus/queue.rb +230 -0
- data/lib/azure/service_bus/resource.rb +109 -0
- data/lib/azure/service_bus/rule.rb +98 -0
- data/lib/azure/service_bus/rule_aspect.rb +34 -0
- data/lib/azure/service_bus/serialization.rb +160 -0
- data/lib/azure/service_bus/service_bus_service.rb +819 -12
- data/lib/azure/service_bus/sql_filter.rb +50 -0
- data/lib/azure/service_bus/sql_rule_action.rb +50 -0
- data/lib/azure/service_bus/subscription.rb +184 -0
- data/lib/azure/service_bus/topic.rb +187 -0
- data/lib/azure/service_bus/true_filter.rb +38 -0
- data/lib/azure/{tables → table}/auth/shared_key.rb +33 -12
- data/lib/azure/table/auth/shared_key_lite.rb +44 -0
- data/lib/azure/table/batch.rb +330 -0
- data/lib/azure/table/batch_response.rb +117 -0
- data/lib/azure/table/edmtype.rb +127 -0
- data/lib/azure/table/entity.rb +31 -0
- data/lib/azure/table/guid.rb +24 -0
- data/lib/azure/table/query.rb +112 -0
- data/lib/azure/table/serialization.rb +105 -0
- data/lib/azure/table/table_service.rb +557 -0
- data/lib/azure/version.rb +31 -0
- data/test/fixtures/container_acl.xml +11 -0
- data/test/fixtures/{error.xml → http_error.xml} +0 -0
- data/test/fixtures/list_blobs.xml +121 -0
- data/test/fixtures/list_block_all_with_none_committed.xml +22 -0
- data/test/fixtures/list_blocks_all.xml +23 -0
- data/test/fixtures/list_blocks_committed.xml +13 -0
- data/test/fixtures/list_containers.xml +38 -0
- data/test/fixtures/list_page_ranges.xml +11 -0
- data/test/fixtures/logging.xml +11 -0
- data/test/fixtures/metrics.xml +10 -0
- data/test/fixtures/queues.xml +1 -1
- data/test/fixtures/retention_policy.xml +5 -0
- data/test/fixtures/storage_service_properties.xml +23 -0
- data/test/integration/blob/blob_metadata_test.rb +75 -0
- data/test/integration/blob/blob_pages_test.rb +119 -0
- data/test/integration/blob/blob_properties_test.rb +77 -0
- data/test/integration/blob/block_blob_test.rb +254 -0
- data/test/integration/blob/container/container_acl_test.rb +69 -0
- data/test/integration/blob/container/container_metadata_test.rb +50 -0
- data/test/integration/blob/container/create_container_test.rb +60 -0
- data/test/integration/blob/container/delete_container_test.rb +39 -0
- data/test/integration/blob/container/get_container_properties_test.rb +48 -0
- data/test/integration/blob/container/list_containers_test.rb +79 -0
- data/test/integration/blob/container/root_container_test.rb +50 -0
- data/test/integration/blob/copy_blob_test.rb +113 -0
- data/test/integration/blob/create_blob_snapshot_test.rb +80 -0
- data/test/integration/blob/create_page_blob_test.rb +83 -0
- data/test/integration/blob/delete_blob_test.rb +159 -0
- data/test/integration/blob/get_blob_test.rb +65 -0
- data/test/integration/blob/informative_errors_test.rb +39 -0
- data/test/integration/blob/lease/acquire_lease_test.rb +36 -0
- data/test/integration/blob/lease/break_lease_test.rb +40 -0
- data/test/integration/blob/lease/release_lease_test.rb +40 -0
- data/test/integration/blob/lease/renew_lease_test.rb +42 -0
- data/test/integration/blob/list_blobs_test.rb +113 -0
- data/test/integration/queue/clear_messages_test.rb +42 -0
- data/test/integration/queue/create_message_test.rb +75 -0
- data/test/integration/queue/create_queue_test.rb +50 -0
- data/test/integration/queue/delete_message_test.rb +67 -0
- data/test/integration/queue/delete_queue_test.rb +45 -0
- data/test/integration/queue/informative_errors_test.rb +42 -0
- data/test/integration/queue/list_messages_encoded_test.rb +79 -0
- data/test/integration/queue/list_messages_test.rb +79 -0
- data/test/integration/queue/list_queues_test.rb +44 -0
- data/test/integration/queue/peek_messages_test.rb +59 -0
- data/test/integration/queue/queue_metadata_test.rb +40 -0
- data/test/integration/queue/update_message_test.rb +74 -0
- data/test/integration/service_bus/informative_errors_test.rb +37 -0
- data/test/integration/service_bus/queues_scenario_test.rb +200 -0
- data/test/integration/service_bus/queues_test.rb +266 -0
- data/test/integration/service_bus/rules_test.rb +145 -0
- data/test/integration/service_bus/scenario_test.rb +102 -0
- data/test/integration/service_bus/subscriptions_test.rb +211 -0
- data/test/integration/service_bus/topics_scenario_test.rb +406 -0
- data/test/integration/service_bus/topics_test.rb +129 -0
- data/test/integration/table/create_table_test.rb +36 -0
- data/test/integration/table/delete_entity_batch_test.rb +107 -0
- data/test/integration/table/delete_entity_test.rb +94 -0
- data/test/integration/table/delete_table_test.rb +40 -0
- data/test/integration/table/get_table_test.rb +37 -0
- data/test/integration/table/informative_errors_test.rb +39 -0
- data/test/integration/table/insert_entity_batch_test.rb +100 -0
- data/test/integration/table/insert_entity_test.rb +88 -0
- data/test/integration/table/insert_or_merge_entity_batch_test.rb +159 -0
- data/test/integration/table/insert_or_merge_entity_test.rb +143 -0
- data/test/integration/table/insert_or_replace_entity_batch_test.rb +152 -0
- data/test/integration/table/insert_or_replace_entity_test.rb +137 -0
- data/test/integration/table/merge_entity_batch_test.rb +128 -0
- data/test/integration/table/merge_entity_test.rb +113 -0
- data/test/integration/table/query_entities_test.rb +195 -0
- data/test/integration/table/query_tables_test.rb +43 -0
- data/test/integration/table/query_test.rb +251 -0
- data/test/integration/table/table_acl_test.rb +52 -0
- data/test/integration/table/update_entity_batch_test.rb +149 -0
- data/test/integration/table/update_entity_test.rb +131 -0
- data/test/integration/test_helper.rb +23 -9
- data/test/support/env.rb +15 -1
- data/test/support/fixtures.rb +14 -0
- data/test/support/name_generator.rb +74 -0
- data/test/support/stubs.rb +14 -0
- data/test/test_helper.rb +43 -3
- data/test/unit/blob/blob_service_test.rb +1947 -0
- data/test/unit/core/auth/shared_key_lite_test.rb +51 -0
- data/test/unit/core/auth/shared_key_test.rb +58 -0
- data/test/unit/core/auth/signer_test.rb +30 -0
- data/test/unit/core/http/http_error_test.rb +57 -0
- data/test/unit/core/http/http_request_test.rb +66 -0
- data/test/unit/core/http/http_response_test.rb +45 -0
- data/test/unit/service/serialization_test.rb +502 -0
- data/test/unit/service/storage_service_test.rb +291 -0
- data/test/unit/table/edmtype_test.rb +108 -0
- metadata +231 -230
- data/Gemfile.lock +0 -36
- data/lib/azure/atom.rb +0 -170
- data/lib/azure/auth.rb +0 -29
- data/lib/azure/blobs.rb +0 -620
- data/lib/azure/blobs/blob.rb +0 -360
- data/lib/azure/blobs/container.rb +0 -209
- data/lib/azure/blobs/service.rb +0 -396
- data/lib/azure/blobs/shared_access_signature.rb +0 -84
- data/lib/azure/blobs/uri.rb +0 -60
- data/lib/azure/configuration.rb +0 -121
- data/lib/azure/core/collection.rb +0 -118
- data/lib/azure/core/signer.rb +0 -32
- data/lib/azure/core/utils/queryable.rb +0 -74
- data/lib/azure/core/utils/storage_service_properties.rb +0 -83
- data/lib/azure/core/utils/string.rb +0 -59
- data/lib/azure/error.rb +0 -72
- data/lib/azure/queues.rb +0 -272
- data/lib/azure/queues/message.rb +0 -174
- data/lib/azure/queues/queue.rb +0 -187
- data/lib/azure/queues/service.rb +0 -263
- data/lib/azure/queues/service_properties.rb +0 -152
- data/lib/azure/queues/uri.rb +0 -78
- data/lib/azure/request.rb +0 -102
- data/lib/azure/response.rb +0 -93
- data/lib/azure/service_bus.rb +0 -4
- data/lib/azure/service_bus/auth/authorizer.rb +0 -22
- data/lib/azure/service_bus/auth/uri.rb +0 -52
- data/lib/azure/service_bus/auth/wrap.rb +0 -37
- data/lib/azure/service_bus/auth/wrap_token.rb +0 -45
- data/lib/azure/service_bus/auth/wrap_token_manager.rb +0 -46
- data/lib/azure/service_bus/queues.rb +0 -194
- data/lib/azure/service_bus/queues/queue.rb +0 -100
- data/lib/azure/service_bus/queues/queue_serializer.rb +0 -51
- data/lib/azure/service_bus/queues/service.rb +0 -154
- data/lib/azure/service_bus/queues/uri.rb +0 -80
- data/lib/azure/service_bus/rules.rb +0 -110
- data/lib/azure/service_bus/rules/rule.rb +0 -97
- data/lib/azure/service_bus/rules/service.rb +0 -122
- data/lib/azure/service_bus/rules/uri.rb +0 -39
- data/lib/azure/service_bus/subscriptions.rb +0 -170
- data/lib/azure/service_bus/subscriptions/service.rb +0 -133
- data/lib/azure/service_bus/subscriptions/subscription.rb +0 -164
- data/lib/azure/service_bus/subscriptions/subscription_serializer.rb +0 -74
- data/lib/azure/service_bus/subscriptions/uri.rb +0 -71
- data/lib/azure/service_bus/topics.rb +0 -120
- data/lib/azure/service_bus/topics/service.rb +0 -98
- data/lib/azure/service_bus/topics/topic.rb +0 -122
- data/lib/azure/service_bus/topics/topic_serializer.rb +0 -44
- data/lib/azure/service_bus/topics/uri.rb +0 -58
- data/lib/azure/service_runtime/client/goal_state_pipe_monitor.rb +0 -21
- data/lib/azure/service_runtime/client/goal_state_protocol.rb +0 -18
- data/lib/azure/service_runtime/client/runtime_client.rb +0 -135
- data/lib/azure/service_runtime/deployment.rb +0 -24
- data/lib/azure/service_runtime/local_resource.rb +0 -15
- data/lib/azure/service_runtime/role.rb +0 -17
- data/lib/azure/service_runtime/role_environment.rb +0 -206
- data/lib/azure/service_runtime/role_environment_change.rb +0 -32
- data/lib/azure/service_runtime/role_instance.rb +0 -35
- data/lib/azure/service_runtime/role_instance_endpoint.rb +0 -14
- data/lib/azure/tables.rb +0 -215
- data/lib/azure/tables/auth/shared_key_lite.rb +0 -30
- data/lib/azure/tables/entities_collection.rb +0 -66
- data/lib/azure/tables/entity.rb +0 -127
- data/lib/azure/tables/service.rb +0 -211
- data/lib/azure/tables/table.rb +0 -129
- data/lib/azure/tables/tables_collection.rb +0 -62
- data/lib/azure/tables/types.rb +0 -65
- data/lib/azure/tables/uri.rb +0 -62
- data/test/integration/blobs/auth_test.rb +0 -19
- data/test/integration/blobs/blob_test.rb +0 -61
- data/test/integration/blobs/clear_page_range_test.rb +0 -19
- data/test/integration/blobs/copy_test.rb +0 -33
- data/test/integration/blobs/create_blobs_test.rb +0 -51
- data/test/integration/blobs/create_container_test.rb +0 -13
- data/test/integration/blobs/create_snapshot_test.rb +0 -17
- data/test/integration/blobs/delete_blob_snapshots_test.rb +0 -19
- data/test/integration/blobs/delete_blobs_test.rb +0 -25
- data/test/integration/blobs/delete_container_test.rb +0 -24
- data/test/integration/blobs/delete_snapshot_test.rb +0 -17
- data/test/integration/blobs/get_blob_snapshot_test.rb +0 -18
- data/test/integration/blobs/get_blobs_test.rb +0 -31
- data/test/integration/blobs/get_page_range_test.rb +0 -19
- data/test/integration/blobs/list_blobs_test.rb +0 -39
- data/test/integration/blobs/list_containers_test.rb +0 -28
- data/test/integration/blobs/manage_blob_leases_test.rb +0 -45
- data/test/integration/blobs/manage_blob_metadata_test.rb +0 -51
- data/test/integration/blobs/manage_blob_properties_test.rb +0 -25
- data/test/integration/blobs/manage_blob_service_properties_test.rb +0 -38
- data/test/integration/blobs/manage_container_metadata_test.rb +0 -46
- data/test/integration/blobs/manage_container_permissions_test.rb +0 -17
- data/test/integration/blobs/update_page_range_test.rb +0 -20
- data/test/integration/queues/clear_messages_test.rb +0 -22
- data/test/integration/queues/create_queue_test.rb +0 -13
- data/test/integration/queues/delete_message_test.rb +0 -42
- data/test/integration/queues/delete_queue_test.rb +0 -24
- data/test/integration/queues/get_messages_test.rb +0 -39
- data/test/integration/queues/list_queues_test.rb +0 -43
- data/test/integration/queues/manage_queue_metadata_test.rb +0 -45
- data/test/integration/queues/manage_queue_service_properties_test.rb +0 -27
- data/test/integration/queues/peek_messages_test.rb +0 -55
- data/test/integration/queues/put_message_test.rb +0 -31
- data/test/integration/queues/update_message_test.rb +0 -46
- data/test/integration/service_bus/auth_test.rb +0 -18
- data/test/integration/service_bus/queues/create_queue_test.rb +0 -25
- data/test/integration/service_bus/queues/delete_message_from_queue_test.rb +0 -29
- data/test/integration/service_bus/queues/delete_queue_test.rb +0 -25
- data/test/integration/service_bus/queues/get_queue_test.rb +0 -23
- data/test/integration/service_bus/queues/list_queues_test.rb +0 -39
- data/test/integration/service_bus/queues/peek_message_from_queue_test.rb +0 -34
- data/test/integration/service_bus/queues/read_and_delete_message_from_queue_test.rb +0 -31
- data/test/integration/service_bus/queues/send_message_to_queue_test.rb +0 -22
- data/test/integration/service_bus/queues/unlock_message_from_queue_test.rb +0 -36
- data/test/integration/service_bus/rules/create_rule_test.rb +0 -19
- data/test/integration/service_bus/rules/delete_rule_test.rb +0 -17
- data/test/integration/service_bus/rules/get_rule_test.rb +0 -21
- data/test/integration/service_bus/rules/list_rules_test.rb +0 -24
- data/test/integration/service_bus/rules/rule_test.rb +0 -16
- data/test/integration/service_bus/subscriptions/create_subscription_test.rb +0 -25
- data/test/integration/service_bus/subscriptions/delete_message_from_subscription_test.rb +0 -31
- data/test/integration/service_bus/subscriptions/delete_subscription_test.rb +0 -30
- data/test/integration/service_bus/subscriptions/fetch_subscription_test.rb +0 -28
- data/test/integration/service_bus/subscriptions/list_subscriptions_test.rb +0 -23
- data/test/integration/service_bus/subscriptions/peek_lock_message_from_subscription_test.rb +0 -42
- data/test/integration/service_bus/subscriptions/read_delete_message_from_subscription_test.rb +0 -36
- data/test/integration/service_bus/subscriptions/subscription_test.rb +0 -31
- data/test/integration/service_bus/subscriptions/unlock_message_from_subscription_test.rb +0 -43
- data/test/integration/service_bus/topics/create_topic_test.rb +0 -25
- data/test/integration/service_bus/topics/delete_topic_test.rb +0 -25
- data/test/integration/service_bus/topics/get_topic_test.rb +0 -23
- data/test/integration/service_bus/topics/list_topics_test.rb +0 -39
- data/test/integration/service_bus/topics/send_message_to_topic_test.rb +0 -23
- data/test/integration/tables/auth_test.rb +0 -29
- data/test/integration/tables/creating_tables_test.rb +0 -16
- data/test/integration/tables/delete_entity_test.rb +0 -39
- data/test/integration/tables/deleting_table_test.rb +0 -22
- data/test/integration/tables/insert_entity_test.rb +0 -23
- data/test/integration/tables/merge_entity_test.rb +0 -28
- data/test/integration/tables/query_entities_test.rb +0 -131
- data/test/integration/tables/query_tables_test.rb +0 -63
- data/test/integration/tables/update_entity_test.rb +0 -54
- data/test/support/blobs.rb +0 -12
- data/test/support/table_names.rb +0 -44
- data/test/unit/atom_test.rb +0 -58
- data/test/unit/auth_test.rb +0 -24
- data/test/unit/blobs/blob_test.rb +0 -5
- data/test/unit/blobs/container_test.rb +0 -67
- data/test/unit/blobs/service_test.rb +0 -17
- data/test/unit/blobs/shared_access_signature_test.rb +0 -66
- data/test/unit/blobs_test.rb +0 -156
- data/test/unit/core/service_test.rb +0 -57
- data/test/unit/core/utils/interval_test.rb +0 -70
- data/test/unit/core/utils/queryable_test.rb +0 -69
- data/test/unit/core/utils/storage_service_properties_test.rb +0 -66
- data/test/unit/error_test.rb +0 -39
- data/test/unit/queues/message_test.rb +0 -40
- data/test/unit/queues/queue_test.rb +0 -64
- data/test/unit/queues/service_properties.rb +0 -35
- data/test/unit/request_test.rb +0 -38
- data/test/unit/response_test.rb +0 -43
- data/test/unit/service_bus/auth/authorizer_test.rb +0 -27
- data/test/unit/service_bus/auth/wrap_token_test.rb +0 -28
- data/test/unit/service_bus/queues/queue_test.rb +0 -38
- data/test/unit/service_bus/topics/topic_test.rb +0 -33
- data/test/unit/service_runtime/data/goalstate.xml +0 -9
- data/test/unit/service_runtime/data/roleenvironmentdata.xml +0 -29
- data/test/unit/service_runtime/data/runtime.xml +0 -6
- data/test/unit/service_runtime/role_environment_test.rb +0 -144
- data/test/unit/tables/auth/shared_key_lite_test.rb +0 -39
- data/test/unit/tables/auth/shared_key_test.rb +0 -45
- data/test/unit/tables/entities_collection_test.rb +0 -39
- data/test/unit/tables/entity_test.rb +0 -72
- data/test/unit/tables/table_test.rb +0 -57
- data/test/unit/tables_test.rb +0 -302
- data/test/unit/types_test.rb +0 -67
@@ -0,0 +1,291 @@
|
|
1
|
+
#-------------------------------------------------------------------------
|
2
|
+
# Copyright (c) Microsoft. All rights reserved.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#--------------------------------------------------------------------------
|
15
|
+
require "test_helper"
|
16
|
+
require "azure/service/storage_service"
|
17
|
+
require "azure/core/http/http_request"
|
18
|
+
require "azure/core/http/signer_filter"
|
19
|
+
require "azure/service/storage_service_properties"
|
20
|
+
|
21
|
+
describe Azure::Service::StorageService do
|
22
|
+
|
23
|
+
let(:uri){ URI.parse "http://dummy.uri/resource" }
|
24
|
+
let(:method){ :get }
|
25
|
+
|
26
|
+
subject do
|
27
|
+
storage_service = Azure::Service::StorageService.new
|
28
|
+
storage_service.host = "http://dumyhost.uri"
|
29
|
+
storage_service
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#call" do
|
33
|
+
let(:mock_request){ mock() }
|
34
|
+
let(:mock_signer_filter){ mock() }
|
35
|
+
|
36
|
+
before do
|
37
|
+
Azure::Core::Http::HttpRequest.stubs(:new).with(method, uri, nil).returns(mock_request)
|
38
|
+
Azure::Core::Http::SignerFilter.stubs(:new).returns(mock_signer_filter)
|
39
|
+
|
40
|
+
mock_request.expects(:call)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "adds a SignerFilter to the HTTP pipeline" do
|
44
|
+
mock_request.expects(:with_filter).with(mock_signer_filter)
|
45
|
+
subject.call(method, uri)
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "when passed the optional headers arguement" do
|
49
|
+
before do
|
50
|
+
mock_request.expects(:with_filter).with(mock_signer_filter)
|
51
|
+
end
|
52
|
+
|
53
|
+
let(:mock_headers) {{
|
54
|
+
"Other-Header"=>"SomeValue",
|
55
|
+
"Custom-Header"=>"PreviousValue",
|
56
|
+
"connection"=>"PreviousValue"
|
57
|
+
}}
|
58
|
+
|
59
|
+
it "merges the custom headers with the HttpRequest headers" do
|
60
|
+
mock_request.expects(:headers).returns(mock_headers).at_least(2)
|
61
|
+
subject.call(method, uri, nil, { "Custom-Header"=>"CustomValue"} )
|
62
|
+
|
63
|
+
mock_headers["Other-Header"].must_equal "SomeValue"
|
64
|
+
mock_headers["Custom-Header"].must_equal "CustomValue"
|
65
|
+
mock_headers["connection"].must_equal "keep-alive"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "when passed the optional body arguement" do
|
70
|
+
before do
|
71
|
+
mock_request.expects(:with_filter).with(mock_signer_filter)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "passes the body to the to HttpRequest" do
|
75
|
+
Azure::Core::Http::HttpRequest.stubs(:new).with(method, uri, 'body').returns(mock_request)
|
76
|
+
subject.call(method, uri, "body")
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "when with_filter was called" do
|
81
|
+
before do
|
82
|
+
mock_request.expects(:with_filter).with(mock_signer_filter)
|
83
|
+
end
|
84
|
+
|
85
|
+
it "builds the HTTP pipeline by passing the filters to the HTTPRequest" do
|
86
|
+
filter = mock()
|
87
|
+
filter1 = mock()
|
88
|
+
|
89
|
+
subject.with_filter filter
|
90
|
+
subject.with_filter filter1
|
91
|
+
|
92
|
+
mock_request.expects(:with_filter).with(filter)
|
93
|
+
mock_request.expects(:with_filter).with(filter1)
|
94
|
+
|
95
|
+
subject.call(method, uri)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
describe "#with_filter" do
|
101
|
+
it "appends filters to a list of filters that will be used in the #call method" do
|
102
|
+
initial_length = subject.filters.length
|
103
|
+
filter = mock()
|
104
|
+
subject.with_filter filter
|
105
|
+
subject.filters.length.must_equal initial_length + 1
|
106
|
+
end
|
107
|
+
|
108
|
+
it "accepts object instances as filters" do
|
109
|
+
filter = mock()
|
110
|
+
subject.with_filter filter
|
111
|
+
subject.filters.last.must_equal filter
|
112
|
+
end
|
113
|
+
|
114
|
+
it "accepts blocks as filters" do
|
115
|
+
subject.with_filter do |a,b| end
|
116
|
+
subject.filters.last.class.must_equal Proc
|
117
|
+
end
|
118
|
+
|
119
|
+
it "preserves the order of the filters" do
|
120
|
+
subject.filters = []
|
121
|
+
|
122
|
+
filter = mock()
|
123
|
+
filter1 = mock()
|
124
|
+
|
125
|
+
subject.with_filter filter
|
126
|
+
subject.with_filter filter1
|
127
|
+
subject.with_filter do |a,b| end
|
128
|
+
|
129
|
+
subject.filters.first.must_equal filter
|
130
|
+
subject.filters[1].must_equal filter1
|
131
|
+
subject.filters.last.class.must_equal Proc
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
describe "#get_service_properties" do
|
136
|
+
let(:service_properties_xml) { Fixtures["storage_service_properties"] }
|
137
|
+
let(:service_properties) { Azure::Service::StorageServiceProperties.new }
|
138
|
+
let(:response) {
|
139
|
+
response = mock()
|
140
|
+
response.stubs(:body).returns(service_properties_xml)
|
141
|
+
response
|
142
|
+
}
|
143
|
+
|
144
|
+
let(:service_properties_uri) { URI.parse 'http://dummy.uri/service/properties' }
|
145
|
+
|
146
|
+
before do
|
147
|
+
Azure::Service::Serialization.stubs(:service_properties_from_xml).with(service_properties_xml).returns(service_properties)
|
148
|
+
subject.stubs(:service_properties_uri).returns(service_properties_uri)
|
149
|
+
subject.stubs(:call).with(:get, service_properties_uri).returns(response)
|
150
|
+
end
|
151
|
+
|
152
|
+
it "calls the service_properties_uri method to determine the correct uri" do
|
153
|
+
subject.expects(:service_properties_uri).returns(service_properties_uri)
|
154
|
+
subject.get_service_properties
|
155
|
+
end
|
156
|
+
|
157
|
+
it "gets the response from the HTTP API" do
|
158
|
+
subject.expects(:call).with(:get, service_properties_uri).returns(response)
|
159
|
+
subject.get_service_properties
|
160
|
+
end
|
161
|
+
|
162
|
+
it "deserializes the response from xml" do
|
163
|
+
Azure::Service::Serialization.expects(:service_properties_from_xml).with(service_properties_xml).returns(service_properties)
|
164
|
+
subject.get_service_properties
|
165
|
+
end
|
166
|
+
|
167
|
+
it "returns a StorageServiceProperties instance" do
|
168
|
+
result = subject.get_service_properties
|
169
|
+
result.must_be_kind_of Azure::Service::StorageServiceProperties
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe "#set_service_properties" do
|
174
|
+
let(:service_properties_xml) { Fixtures["storage_service_properties"] }
|
175
|
+
let(:service_properties) { Azure::Service::StorageServiceProperties.new }
|
176
|
+
let(:response) {
|
177
|
+
response = mock()
|
178
|
+
response.stubs(:success?).returns(true)
|
179
|
+
response
|
180
|
+
}
|
181
|
+
|
182
|
+
let(:service_properties_uri) { URI.parse 'http://dummy.uri/service/properties' }
|
183
|
+
|
184
|
+
before do
|
185
|
+
Azure::Service::Serialization.stubs(:service_properties_to_xml).with(service_properties).returns(service_properties_xml)
|
186
|
+
subject.stubs(:service_properties_uri).returns(service_properties_uri)
|
187
|
+
subject.stubs(:call).with(:put, service_properties_uri, service_properties_xml).returns(response)
|
188
|
+
end
|
189
|
+
|
190
|
+
it "calls the service_properties_uri method to determine the correct uri" do
|
191
|
+
subject.expects(:service_properties_uri).returns(service_properties_uri)
|
192
|
+
subject.set_service_properties service_properties
|
193
|
+
end
|
194
|
+
|
195
|
+
it "posts to the HTTP API" do
|
196
|
+
subject.expects(:call).with(:put, service_properties_uri, service_properties_xml).returns(response)
|
197
|
+
subject.set_service_properties service_properties
|
198
|
+
end
|
199
|
+
|
200
|
+
it "serializes the StorageServiceProperties object to xml" do
|
201
|
+
Azure::Service::Serialization.expects(:service_properties_to_xml).with(service_properties).returns(service_properties_xml)
|
202
|
+
subject.set_service_properties service_properties
|
203
|
+
end
|
204
|
+
|
205
|
+
it "returns nil on success" do
|
206
|
+
result = subject.set_service_properties service_properties
|
207
|
+
result.must_equal nil
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
describe "service_properties_uri" do
|
212
|
+
it "returns an instance of URI" do
|
213
|
+
subject.service_properties_uri.must_be_kind_of URI
|
214
|
+
end
|
215
|
+
|
216
|
+
it "uses the value of the host property as the base of the url" do
|
217
|
+
subject.service_properties_uri.to_s.must_include subject.host
|
218
|
+
subject.host = "http://something.else"
|
219
|
+
subject.service_properties_uri.to_s.must_include subject.host
|
220
|
+
end
|
221
|
+
|
222
|
+
it "sets a query string that specifies the storage service properties endpoint" do
|
223
|
+
subject.service_properties_uri.query.must_include "restype=service&comp=properties"
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
describe "#add_metadata_to_headers" do
|
228
|
+
it "prefixes header names with x-ms-meta- but does not modify the values" do
|
229
|
+
headers = {}
|
230
|
+
subject.add_metadata_to_headers({"Foo"=> "Bar"}, headers)
|
231
|
+
headers.keys.must_include "x-ms-meta-Foo"
|
232
|
+
headers["x-ms-meta-Foo"].must_equal "Bar"
|
233
|
+
end
|
234
|
+
|
235
|
+
it "updates any existing x-ms-meta-* headers with the new values" do
|
236
|
+
headers = { "x-ms-meta-Foo"=> "Foo"}
|
237
|
+
subject.add_metadata_to_headers({"Foo"=> "Bar"}, headers)
|
238
|
+
headers["x-ms-meta-Foo"].must_equal "Bar"
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
describe "#generate_uri" do
|
243
|
+
it "returns a URI instance" do
|
244
|
+
subject.generate_uri().must_be_kind_of ::URI
|
245
|
+
end
|
246
|
+
|
247
|
+
describe "when called with no arguments" do
|
248
|
+
it "returns the StorageService host URL" do
|
249
|
+
subject.generate_uri().to_s.must_equal "http://dumyhost.uri/"
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
describe "when passed an optional path" do
|
254
|
+
it "adds the path to the host url" do
|
255
|
+
subject.generate_uri("resource/entity/").path.must_equal "/resource/entity/"
|
256
|
+
end
|
257
|
+
|
258
|
+
it "correctly joins the path if the host url contained a path" do
|
259
|
+
subject.host = "http://dummy.uri/host/path"
|
260
|
+
subject.generate_uri("resource/entity/").path.must_equal "/host/path/resource/entity/"
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
describe "when passed an Hash of query parameters" do
|
265
|
+
|
266
|
+
it "encodes the keys" do
|
267
|
+
subject.generate_uri('',{"key !" => "value"}).query.must_include "key+%21=value"
|
268
|
+
end
|
269
|
+
|
270
|
+
it "encodes the values" do
|
271
|
+
subject.generate_uri('',{"key" => "value !"}).query.must_include "key=value+%21"
|
272
|
+
end
|
273
|
+
|
274
|
+
it "sets the query string to the encoded result" do
|
275
|
+
subject.generate_uri('',{ "key" => "value !", "key !"=>"value"}).query.must_equal "key=value+%21&key+%21=value"
|
276
|
+
end
|
277
|
+
|
278
|
+
describe "when the query parameters include a timeout key" do
|
279
|
+
it "overrides the default timeout" do
|
280
|
+
subject.generate_uri('', {"timeout" => 45}).query.must_equal "timeout=45"
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
describe "when the query parameters are nil" do
|
285
|
+
it "does not include any query parameters" do
|
286
|
+
subject.generate_uri('', nil).query.must_equal nil
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
#-------------------------------------------------------------------------
|
2
|
+
# Copyright (c) Microsoft. All rights reserved.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#--------------------------------------------------------------------------
|
15
|
+
require "test_helper"
|
16
|
+
require "azure/table/edmtype"
|
17
|
+
|
18
|
+
require "azure/table/guid"
|
19
|
+
|
20
|
+
describe Azure::Table::EdmType do
|
21
|
+
describe "#serialize_query_value" do
|
22
|
+
it "correctly serializes int64 query values" do
|
23
|
+
value = 2**128 + 1256231
|
24
|
+
serializedValue = Azure::Table::EdmType.serialize_query_value(value)
|
25
|
+
serializedValue.must_equal value.to_s + "L"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "correctly serializes int32 query values" do
|
29
|
+
value = 2
|
30
|
+
serializedValue = Azure::Table::EdmType.serialize_query_value(value)
|
31
|
+
serializedValue.must_equal "2"
|
32
|
+
end
|
33
|
+
|
34
|
+
it "correctly serializes datetime query values" do
|
35
|
+
value = DateTime.new(2001,2,3,4,5,6)
|
36
|
+
serializedValue = Azure::Table::EdmType.serialize_query_value(value)
|
37
|
+
serializedValue.must_equal "datetime'2001-02-03T04:05:06+00:00'"
|
38
|
+
end
|
39
|
+
|
40
|
+
it "correctly serializes guid query values" do
|
41
|
+
value = Azure::Table::GUID.new("81425519-6394-43e4-ac6e-28d91f5c3921")
|
42
|
+
serializedValue = Azure::Table::EdmType.serialize_query_value(value)
|
43
|
+
serializedValue.must_equal "guid'81425519-6394-43e4-ac6e-28d91f5c3921'"
|
44
|
+
end
|
45
|
+
|
46
|
+
it "correctly serializes float query values" do
|
47
|
+
value = 1.2
|
48
|
+
serializedValue = Azure::Table::EdmType.serialize_query_value(value)
|
49
|
+
serializedValue.must_equal "1.2"
|
50
|
+
end
|
51
|
+
|
52
|
+
it "correctly serializes string query values" do
|
53
|
+
value = "string"
|
54
|
+
serializedValue = Azure::Table::EdmType.serialize_query_value(value)
|
55
|
+
serializedValue.must_equal "string"
|
56
|
+
end
|
57
|
+
|
58
|
+
it "correctly serializes binary query values" do
|
59
|
+
value = "1".force_encoding("BINARY")
|
60
|
+
serializedValue = Azure::Table::EdmType.serialize_query_value(value)
|
61
|
+
serializedValue.must_equal "X'31'"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "#unserialize_query_value" do
|
66
|
+
it "correctly unserializes int64 query values" do
|
67
|
+
value = "340282366920938463463374607431769467687"
|
68
|
+
unserializedValue = Azure::Table::EdmType.unserialize_query_value(value, "Edm.Int64")
|
69
|
+
unserializedValue.must_equal (2**128 + 1256231)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "correctly unserializes int32 query values" do
|
73
|
+
value = "2"
|
74
|
+
unserializedValue = Azure::Table::EdmType.unserialize_query_value(value, "Edm.Int32")
|
75
|
+
unserializedValue.must_equal 2
|
76
|
+
end
|
77
|
+
|
78
|
+
it "correctly unserializes datetime query values" do
|
79
|
+
value = "2001-02-03T04:05:06+00:00"
|
80
|
+
unserializedValue = Azure::Table::EdmType.unserialize_query_value(value, "Edm.DateTime")
|
81
|
+
unserializedValue.must_equal Time.new(2001, 2, 3, 4, 5, 6, "+00:00")
|
82
|
+
end
|
83
|
+
|
84
|
+
it "correctly unserializes guid query values" do
|
85
|
+
value = "81425519-6394-43e4-ac6e-28d91f5c3921"
|
86
|
+
unserializedValue = Azure::Table::EdmType.unserialize_query_value(value, "Edm.Guid")
|
87
|
+
unserializedValue.must_equal Azure::Table::GUID.new("81425519-6394-43e4-ac6e-28d91f5c3921")
|
88
|
+
end
|
89
|
+
|
90
|
+
it "correctly unserializes float query values" do
|
91
|
+
value = "1.2"
|
92
|
+
unserializedValue = Azure::Table::EdmType.unserialize_query_value(value, "Edm.Double")
|
93
|
+
unserializedValue.must_equal 1.2
|
94
|
+
end
|
95
|
+
|
96
|
+
it "correctly unserializes string query values" do
|
97
|
+
value = "string"
|
98
|
+
unserializedValue = Azure::Table::EdmType.unserialize_query_value(value, "Edm.String")
|
99
|
+
unserializedValue.must_equal "string"
|
100
|
+
end
|
101
|
+
|
102
|
+
it "correctly unserializes binary query values" do
|
103
|
+
value = "MTIzNDU=".force_encoding("BINARY")
|
104
|
+
unserializedValue = Azure::Table::EdmType.unserialize_query_value(value, "Edm.Binary")
|
105
|
+
unserializedValue.must_equal "12345"
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
metadata
CHANGED
@@ -1,333 +1,334 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
9
|
-
- Microsoft
|
7
|
+
- Microsoft Corporation
|
10
8
|
autorequire:
|
11
9
|
bindir: bin
|
12
10
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
default_executable:
|
11
|
+
date: 2013-04-21 00:00:00.000000000 Z
|
15
12
|
dependencies:
|
16
13
|
- !ruby/object:Gem::Dependency
|
17
|
-
name:
|
18
|
-
requirement:
|
19
|
-
none: false
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
20
16
|
requirements:
|
21
17
|
- - ~>
|
22
18
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
19
|
+
version: '1.5'
|
24
20
|
type: :runtime
|
25
21
|
prerelease: false
|
26
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
29
|
-
requirement:
|
30
|
-
none: false
|
28
|
+
name: mime-types
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
31
30
|
requirements:
|
32
31
|
- - ~>
|
33
32
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0
|
33
|
+
version: '1.0'
|
35
34
|
type: :runtime
|
36
35
|
prerelease: false
|
37
|
-
version_requirements:
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: nokogiri
|
40
|
-
requirement: &2153637920 !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '1.
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
46
48
|
type: :runtime
|
47
49
|
prerelease: false
|
48
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
49
55
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
51
|
-
requirement:
|
52
|
-
none: false
|
56
|
+
name: uuid
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
53
58
|
requirements:
|
54
|
-
- -
|
59
|
+
- - '>='
|
55
60
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
61
|
+
version: '0'
|
57
62
|
type: :runtime
|
58
63
|
prerelease: false
|
59
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
60
69
|
- !ruby/object:Gem::Dependency
|
61
70
|
name: rake
|
62
|
-
requirement:
|
63
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
64
72
|
requirements:
|
65
|
-
- -
|
73
|
+
- - '>='
|
66
74
|
- !ruby/object:Gem::Version
|
67
75
|
version: '0'
|
68
76
|
type: :development
|
69
77
|
prerelease: false
|
70
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
71
83
|
- !ruby/object:Gem::Dependency
|
72
84
|
name: minitest
|
73
|
-
requirement:
|
74
|
-
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
93
|
requirements:
|
76
94
|
- - ~>
|
77
95
|
- !ruby/object:Gem::Version
|
78
96
|
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: mocha
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
79
104
|
type: :development
|
80
105
|
prerelease: false
|
81
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
82
111
|
- !ruby/object:Gem::Dependency
|
83
|
-
name:
|
84
|
-
requirement:
|
85
|
-
none: false
|
112
|
+
name: turn
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - '>='
|
88
116
|
- !ruby/object:Gem::Version
|
89
117
|
version: '0'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
|
-
version_requirements:
|
93
|
-
|
94
|
-
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Windows Azure Client Library for Ruby
|
126
|
+
email: azureruby@microsoft.com
|
95
127
|
executables: []
|
96
128
|
extensions: []
|
97
129
|
extra_rdoc_files: []
|
98
130
|
files:
|
131
|
+
- .gitignore
|
132
|
+
- ChangeLog.txt
|
99
133
|
- Gemfile
|
100
|
-
- Gemfile.lock
|
101
134
|
- README.md
|
102
135
|
- Rakefile
|
103
136
|
- azure.gemspec
|
104
137
|
- lib/azure.rb
|
105
|
-
- lib/azure/
|
106
|
-
- lib/azure/
|
107
|
-
- lib/azure/
|
108
|
-
- lib/azure/
|
109
|
-
- lib/azure/
|
110
|
-
- lib/azure/
|
111
|
-
- lib/azure/
|
112
|
-
- lib/azure/blobs/uri.rb
|
113
|
-
- lib/azure/configuration.rb
|
138
|
+
- lib/azure/blob/blob.rb
|
139
|
+
- lib/azure/blob/blob_service.rb
|
140
|
+
- lib/azure/blob/block.rb
|
141
|
+
- lib/azure/blob/container.rb
|
142
|
+
- lib/azure/blob/serialization.rb
|
143
|
+
- lib/azure/core.rb
|
144
|
+
- lib/azure/core/auth/authorizer.rb
|
114
145
|
- lib/azure/core/auth/shared_key.rb
|
115
146
|
- lib/azure/core/auth/shared_key_lite.rb
|
116
|
-
- lib/azure/core/
|
147
|
+
- lib/azure/core/auth/signer.rb
|
148
|
+
- lib/azure/core/configuration.rb
|
149
|
+
- lib/azure/core/error.rb
|
150
|
+
- lib/azure/core/filtered_service.rb
|
151
|
+
- lib/azure/core/http/debug_filter.rb
|
152
|
+
- lib/azure/core/http/http_error.rb
|
153
|
+
- lib/azure/core/http/http_filter.rb
|
154
|
+
- lib/azure/core/http/http_request.rb
|
155
|
+
- lib/azure/core/http/http_response.rb
|
156
|
+
- lib/azure/core/http/retry_policy.rb
|
157
|
+
- lib/azure/core/http/signer_filter.rb
|
117
158
|
- lib/azure/core/service.rb
|
118
|
-
- lib/azure/core/
|
119
|
-
- lib/azure/
|
120
|
-
- lib/azure/
|
121
|
-
- lib/azure/
|
122
|
-
- lib/azure/
|
123
|
-
- lib/azure/
|
124
|
-
- lib/azure/
|
125
|
-
- lib/azure/
|
126
|
-
- lib/azure/
|
127
|
-
- lib/azure/
|
128
|
-
- lib/azure/
|
129
|
-
- lib/azure/
|
130
|
-
- lib/azure/
|
131
|
-
- lib/azure/
|
132
|
-
- lib/azure/service_bus.rb
|
133
|
-
- lib/azure/service_bus/auth/authorizer.rb
|
134
|
-
- lib/azure/service_bus/auth/uri.rb
|
135
|
-
- lib/azure/service_bus/auth/wrap.rb
|
159
|
+
- lib/azure/core/signed_service.rb
|
160
|
+
- lib/azure/queue/message.rb
|
161
|
+
- lib/azure/queue/queue.rb
|
162
|
+
- lib/azure/queue/queue_service.rb
|
163
|
+
- lib/azure/queue/serialization.rb
|
164
|
+
- lib/azure/service/access_policy.rb
|
165
|
+
- lib/azure/service/enumeration_results.rb
|
166
|
+
- lib/azure/service/logging.rb
|
167
|
+
- lib/azure/service/metrics.rb
|
168
|
+
- lib/azure/service/retention_policy.rb
|
169
|
+
- lib/azure/service/serialization.rb
|
170
|
+
- lib/azure/service/signed_identifier.rb
|
171
|
+
- lib/azure/service/storage_service.rb
|
172
|
+
- lib/azure/service/storage_service_properties.rb
|
173
|
+
- lib/azure/service_bus/action.rb
|
136
174
|
- lib/azure/service_bus/auth/wrap_service.rb
|
137
|
-
- lib/azure/service_bus/auth/
|
138
|
-
- lib/azure/service_bus/auth/wrap_token_manager.rb
|
175
|
+
- lib/azure/service_bus/auth/wrap_signer.rb
|
139
176
|
- lib/azure/service_bus/brokered_message.rb
|
140
177
|
- lib/azure/service_bus/brokered_message_serializer.rb
|
141
|
-
- lib/azure/service_bus/
|
142
|
-
- lib/azure/service_bus/
|
143
|
-
- lib/azure/service_bus/
|
144
|
-
- lib/azure/service_bus/
|
145
|
-
- lib/azure/service_bus/
|
146
|
-
- lib/azure/service_bus/
|
147
|
-
- lib/azure/service_bus/
|
148
|
-
- lib/azure/service_bus/
|
149
|
-
- lib/azure/service_bus/
|
178
|
+
- lib/azure/service_bus/correlation_filter.rb
|
179
|
+
- lib/azure/service_bus/empty_rule_action.rb
|
180
|
+
- lib/azure/service_bus/false_filter.rb
|
181
|
+
- lib/azure/service_bus/filter.rb
|
182
|
+
- lib/azure/service_bus/interval.rb
|
183
|
+
- lib/azure/service_bus/queue.rb
|
184
|
+
- lib/azure/service_bus/resource.rb
|
185
|
+
- lib/azure/service_bus/rule.rb
|
186
|
+
- lib/azure/service_bus/rule_aspect.rb
|
187
|
+
- lib/azure/service_bus/serialization.rb
|
150
188
|
- lib/azure/service_bus/service_bus_service.rb
|
151
|
-
- lib/azure/service_bus/
|
152
|
-
- lib/azure/service_bus/
|
153
|
-
- lib/azure/service_bus/
|
154
|
-
- lib/azure/service_bus/
|
155
|
-
- lib/azure/service_bus/
|
156
|
-
- lib/azure/
|
157
|
-
- lib/azure/
|
158
|
-
- lib/azure/
|
159
|
-
- lib/azure/
|
160
|
-
- lib/azure/
|
161
|
-
- lib/azure/
|
162
|
-
- lib/azure/
|
163
|
-
- lib/azure/
|
164
|
-
- lib/azure/
|
165
|
-
- lib/azure/
|
166
|
-
- lib/azure/
|
167
|
-
- lib/azure/service_runtime/role_environment.rb
|
168
|
-
- lib/azure/service_runtime/role_environment_change.rb
|
169
|
-
- lib/azure/service_runtime/role_instance.rb
|
170
|
-
- lib/azure/service_runtime/role_instance_endpoint.rb
|
171
|
-
- lib/azure/tables.rb
|
172
|
-
- lib/azure/tables/auth/shared_key.rb
|
173
|
-
- lib/azure/tables/auth/shared_key_lite.rb
|
174
|
-
- lib/azure/tables/entities_collection.rb
|
175
|
-
- lib/azure/tables/entity.rb
|
176
|
-
- lib/azure/tables/service.rb
|
177
|
-
- lib/azure/tables/table.rb
|
178
|
-
- lib/azure/tables/tables_collection.rb
|
179
|
-
- lib/azure/tables/types.rb
|
180
|
-
- lib/azure/tables/uri.rb
|
189
|
+
- lib/azure/service_bus/sql_filter.rb
|
190
|
+
- lib/azure/service_bus/sql_rule_action.rb
|
191
|
+
- lib/azure/service_bus/subscription.rb
|
192
|
+
- lib/azure/service_bus/topic.rb
|
193
|
+
- lib/azure/service_bus/true_filter.rb
|
194
|
+
- lib/azure/table/auth/shared_key.rb
|
195
|
+
- lib/azure/table/auth/shared_key_lite.rb
|
196
|
+
- lib/azure/table/batch.rb
|
197
|
+
- lib/azure/table/batch_response.rb
|
198
|
+
- lib/azure/table/edmtype.rb
|
199
|
+
- lib/azure/table/entity.rb
|
200
|
+
- lib/azure/table/guid.rb
|
201
|
+
- lib/azure/table/query.rb
|
202
|
+
- lib/azure/table/serialization.rb
|
203
|
+
- lib/azure/table/table_service.rb
|
204
|
+
- lib/azure/version.rb
|
181
205
|
- test/fixtures/32px-fulls-black.jpg
|
182
206
|
- test/fixtures/all_containers.xml
|
183
207
|
- test/fixtures/all_tables.xml
|
208
|
+
- test/fixtures/container_acl.xml
|
184
209
|
- test/fixtures/create_table_response_entry.xml
|
185
|
-
- test/fixtures/
|
210
|
+
- test/fixtures/http_error.xml
|
186
211
|
- test/fixtures/insert_entity_response_entry.xml
|
212
|
+
- test/fixtures/list_blobs.xml
|
213
|
+
- test/fixtures/list_block_all_with_none_committed.xml
|
214
|
+
- test/fixtures/list_blocks_all.xml
|
215
|
+
- test/fixtures/list_blocks_committed.xml
|
216
|
+
- test/fixtures/list_containers.xml
|
217
|
+
- test/fixtures/list_page_ranges.xml
|
218
|
+
- test/fixtures/logging.xml
|
187
219
|
- test/fixtures/messages.xml
|
220
|
+
- test/fixtures/metrics.xml
|
188
221
|
- test/fixtures/query_entities_empty_response.xml
|
189
222
|
- test/fixtures/query_entities_response.xml
|
190
223
|
- test/fixtures/queue_service_properties.xml
|
191
224
|
- test/fixtures/queue_service_properties_original.xml
|
192
225
|
- test/fixtures/queues.xml
|
226
|
+
- test/fixtures/retention_policy.xml
|
193
227
|
- test/fixtures/sb_default_create_queue_response.xml
|
194
228
|
- test/fixtures/sb_default_create_topic_response.xml
|
195
229
|
- test/fixtures/sb_get_access_token_response.txt
|
196
230
|
- test/fixtures/sb_queues_runtime_peek_message_response_headers.txt
|
197
|
-
- test/
|
198
|
-
- test/integration/
|
199
|
-
- test/integration/
|
200
|
-
- test/integration/
|
201
|
-
- test/integration/
|
202
|
-
- test/integration/
|
203
|
-
- test/integration/
|
204
|
-
- test/integration/
|
205
|
-
- test/integration/
|
206
|
-
- test/integration/
|
207
|
-
- test/integration/
|
208
|
-
- test/integration/
|
209
|
-
- test/integration/
|
210
|
-
- test/integration/
|
211
|
-
- test/integration/
|
212
|
-
- test/integration/
|
213
|
-
- test/integration/
|
214
|
-
- test/integration/
|
215
|
-
- test/integration/
|
216
|
-
- test/integration/
|
217
|
-
- test/integration/
|
218
|
-
- test/integration/
|
219
|
-
- test/integration/
|
220
|
-
- test/integration/
|
221
|
-
- test/integration/
|
222
|
-
- test/integration/
|
223
|
-
- test/integration/
|
224
|
-
- test/integration/
|
225
|
-
- test/integration/
|
226
|
-
- test/integration/
|
227
|
-
- test/integration/
|
228
|
-
- test/integration/
|
229
|
-
- test/integration/
|
230
|
-
- test/integration/
|
231
|
-
- test/integration/
|
232
|
-
- test/integration/service_bus/
|
233
|
-
- test/integration/service_bus/
|
234
|
-
- test/integration/service_bus/
|
235
|
-
- test/integration/service_bus/
|
236
|
-
- test/integration/service_bus/
|
237
|
-
- test/integration/service_bus/
|
238
|
-
- test/integration/service_bus/
|
239
|
-
- test/integration/service_bus/
|
240
|
-
- test/integration/
|
241
|
-
- test/integration/
|
242
|
-
- test/integration/
|
243
|
-
- test/integration/
|
244
|
-
- test/integration/
|
245
|
-
- test/integration/
|
246
|
-
- test/integration/
|
247
|
-
- test/integration/
|
248
|
-
- test/integration/
|
249
|
-
- test/integration/
|
250
|
-
- test/integration/
|
251
|
-
- test/integration/
|
252
|
-
- test/integration/
|
253
|
-
- test/integration/
|
254
|
-
- test/integration/
|
255
|
-
- test/integration/
|
256
|
-
- test/integration/
|
257
|
-
- test/integration/
|
258
|
-
- test/integration/
|
259
|
-
- test/integration/
|
260
|
-
- test/integration/tables/auth_test.rb
|
261
|
-
- test/integration/tables/creating_tables_test.rb
|
262
|
-
- test/integration/tables/delete_entity_test.rb
|
263
|
-
- test/integration/tables/deleting_table_test.rb
|
264
|
-
- test/integration/tables/insert_entity_test.rb
|
265
|
-
- test/integration/tables/merge_entity_test.rb
|
266
|
-
- test/integration/tables/query_entities_test.rb
|
267
|
-
- test/integration/tables/query_tables_test.rb
|
268
|
-
- test/integration/tables/update_entity_test.rb
|
231
|
+
- test/fixtures/storage_service_properties.xml
|
232
|
+
- test/integration/blob/blob_metadata_test.rb
|
233
|
+
- test/integration/blob/blob_pages_test.rb
|
234
|
+
- test/integration/blob/blob_properties_test.rb
|
235
|
+
- test/integration/blob/block_blob_test.rb
|
236
|
+
- test/integration/blob/container/container_acl_test.rb
|
237
|
+
- test/integration/blob/container/container_metadata_test.rb
|
238
|
+
- test/integration/blob/container/create_container_test.rb
|
239
|
+
- test/integration/blob/container/delete_container_test.rb
|
240
|
+
- test/integration/blob/container/get_container_properties_test.rb
|
241
|
+
- test/integration/blob/container/list_containers_test.rb
|
242
|
+
- test/integration/blob/container/root_container_test.rb
|
243
|
+
- test/integration/blob/copy_blob_test.rb
|
244
|
+
- test/integration/blob/create_blob_snapshot_test.rb
|
245
|
+
- test/integration/blob/create_page_blob_test.rb
|
246
|
+
- test/integration/blob/delete_blob_test.rb
|
247
|
+
- test/integration/blob/get_blob_test.rb
|
248
|
+
- test/integration/blob/informative_errors_test.rb
|
249
|
+
- test/integration/blob/lease/acquire_lease_test.rb
|
250
|
+
- test/integration/blob/lease/break_lease_test.rb
|
251
|
+
- test/integration/blob/lease/release_lease_test.rb
|
252
|
+
- test/integration/blob/lease/renew_lease_test.rb
|
253
|
+
- test/integration/blob/list_blobs_test.rb
|
254
|
+
- test/integration/queue/clear_messages_test.rb
|
255
|
+
- test/integration/queue/create_message_test.rb
|
256
|
+
- test/integration/queue/create_queue_test.rb
|
257
|
+
- test/integration/queue/delete_message_test.rb
|
258
|
+
- test/integration/queue/delete_queue_test.rb
|
259
|
+
- test/integration/queue/informative_errors_test.rb
|
260
|
+
- test/integration/queue/list_messages_encoded_test.rb
|
261
|
+
- test/integration/queue/list_messages_test.rb
|
262
|
+
- test/integration/queue/list_queues_test.rb
|
263
|
+
- test/integration/queue/peek_messages_test.rb
|
264
|
+
- test/integration/queue/queue_metadata_test.rb
|
265
|
+
- test/integration/queue/update_message_test.rb
|
266
|
+
- test/integration/service_bus/informative_errors_test.rb
|
267
|
+
- test/integration/service_bus/queues_scenario_test.rb
|
268
|
+
- test/integration/service_bus/queues_test.rb
|
269
|
+
- test/integration/service_bus/rules_test.rb
|
270
|
+
- test/integration/service_bus/scenario_test.rb
|
271
|
+
- test/integration/service_bus/subscriptions_test.rb
|
272
|
+
- test/integration/service_bus/topics_scenario_test.rb
|
273
|
+
- test/integration/service_bus/topics_test.rb
|
274
|
+
- test/integration/table/create_table_test.rb
|
275
|
+
- test/integration/table/delete_entity_batch_test.rb
|
276
|
+
- test/integration/table/delete_entity_test.rb
|
277
|
+
- test/integration/table/delete_table_test.rb
|
278
|
+
- test/integration/table/get_table_test.rb
|
279
|
+
- test/integration/table/informative_errors_test.rb
|
280
|
+
- test/integration/table/insert_entity_batch_test.rb
|
281
|
+
- test/integration/table/insert_entity_test.rb
|
282
|
+
- test/integration/table/insert_or_merge_entity_batch_test.rb
|
283
|
+
- test/integration/table/insert_or_merge_entity_test.rb
|
284
|
+
- test/integration/table/insert_or_replace_entity_batch_test.rb
|
285
|
+
- test/integration/table/insert_or_replace_entity_test.rb
|
286
|
+
- test/integration/table/merge_entity_batch_test.rb
|
287
|
+
- test/integration/table/merge_entity_test.rb
|
288
|
+
- test/integration/table/query_entities_test.rb
|
289
|
+
- test/integration/table/query_tables_test.rb
|
290
|
+
- test/integration/table/query_test.rb
|
291
|
+
- test/integration/table/table_acl_test.rb
|
292
|
+
- test/integration/table/update_entity_batch_test.rb
|
293
|
+
- test/integration/table/update_entity_test.rb
|
269
294
|
- test/integration/test_helper.rb
|
270
|
-
- test/support/blobs.rb
|
271
295
|
- test/support/env.rb
|
272
296
|
- test/support/fixtures.rb
|
297
|
+
- test/support/name_generator.rb
|
273
298
|
- test/support/stubs.rb
|
274
|
-
- test/support/table_names.rb
|
275
299
|
- test/test_helper.rb
|
276
|
-
- test/unit/
|
277
|
-
- test/unit/
|
278
|
-
- test/unit/
|
279
|
-
- test/unit/
|
280
|
-
- test/unit/
|
281
|
-
- test/unit/
|
282
|
-
- test/unit/
|
283
|
-
- test/unit/
|
284
|
-
- test/unit/
|
285
|
-
- test/unit/
|
286
|
-
|
287
|
-
|
288
|
-
-
|
289
|
-
|
290
|
-
- test/unit/queues/service_properties.rb
|
291
|
-
- test/unit/request_test.rb
|
292
|
-
- test/unit/response_test.rb
|
293
|
-
- test/unit/service_bus/auth/authorizer_test.rb
|
294
|
-
- test/unit/service_bus/auth/wrap_token_test.rb
|
295
|
-
- test/unit/service_bus/queues/queue_test.rb
|
296
|
-
- test/unit/service_bus/topics/topic_test.rb
|
297
|
-
- test/unit/service_runtime/data/goalstate.xml
|
298
|
-
- test/unit/service_runtime/data/roleenvironmentdata.xml
|
299
|
-
- test/unit/service_runtime/data/runtime.xml
|
300
|
-
- test/unit/service_runtime/role_environment_test.rb
|
301
|
-
- test/unit/tables/auth/shared_key_lite_test.rb
|
302
|
-
- test/unit/tables/auth/shared_key_test.rb
|
303
|
-
- test/unit/tables/entities_collection_test.rb
|
304
|
-
- test/unit/tables/entity_test.rb
|
305
|
-
- test/unit/tables/table_test.rb
|
306
|
-
- test/unit/tables_test.rb
|
307
|
-
- test/unit/types_test.rb
|
308
|
-
has_rdoc: true
|
309
|
-
homepage: http://azure.com
|
310
|
-
licenses: []
|
300
|
+
- test/unit/blob/blob_service_test.rb
|
301
|
+
- test/unit/core/auth/shared_key_lite_test.rb
|
302
|
+
- test/unit/core/auth/shared_key_test.rb
|
303
|
+
- test/unit/core/auth/signer_test.rb
|
304
|
+
- test/unit/core/http/http_error_test.rb
|
305
|
+
- test/unit/core/http/http_request_test.rb
|
306
|
+
- test/unit/core/http/http_response_test.rb
|
307
|
+
- test/unit/service/serialization_test.rb
|
308
|
+
- test/unit/service/storage_service_test.rb
|
309
|
+
- test/unit/table/edmtype_test.rb
|
310
|
+
homepage: http://github.com/WindowsAzure/azure-sdk-for-ruby
|
311
|
+
licenses:
|
312
|
+
- Apache License, Version 2.0
|
313
|
+
metadata: {}
|
311
314
|
post_install_message:
|
312
315
|
rdoc_options: []
|
313
316
|
require_paths:
|
314
317
|
- lib
|
315
318
|
required_ruby_version: !ruby/object:Gem::Requirement
|
316
|
-
none: false
|
317
319
|
requirements:
|
318
|
-
- -
|
320
|
+
- - '>='
|
319
321
|
- !ruby/object:Gem::Version
|
320
|
-
version:
|
322
|
+
version: 1.9.3
|
321
323
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
322
|
-
none: false
|
323
324
|
requirements:
|
324
|
-
- -
|
325
|
+
- - '>='
|
325
326
|
- !ruby/object:Gem::Version
|
326
327
|
version: '0'
|
327
328
|
requirements: []
|
328
329
|
rubyforge_project:
|
329
|
-
rubygems_version:
|
330
|
+
rubygems_version: 2.0.3
|
330
331
|
signing_key:
|
331
|
-
specification_version:
|
332
|
-
summary:
|
332
|
+
specification_version: 4
|
333
|
+
summary: Official ruby client library to consume Windows Azure services.
|
333
334
|
test_files: []
|