azure-storage-table 1.0.0 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{table/lib → lib}/azure/storage/table/auth/shared_key.rb +69 -69
- data/{table/lib → lib}/azure/storage/table/autoload.rb +48 -48
- data/{table/lib → lib}/azure/storage/table/batch.rb +366 -366
- data/{table/lib → lib}/azure/storage/table/batch_response.rb +133 -133
- data/{table/lib → lib}/azure/storage/table/default.rb +165 -165
- data/{table/lib → lib}/azure/storage/table/edmtype.rb +134 -134
- data/{table/lib → lib}/azure/storage/table/entity.rb +39 -39
- data/{table/lib → lib}/azure/storage/table/guid.rb +35 -35
- data/{table/lib → lib}/azure/storage/table/query.rb +118 -118
- data/{table/lib → lib}/azure/storage/table/serialization.rb +116 -116
- data/{table/lib → lib}/azure/storage/table/table_service.rb +778 -775
- data/{table/lib → lib}/azure/storage/table/version.rb +49 -49
- data/{table/lib → lib}/azure/storage/table.rb +26 -26
- metadata +23 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fc61f51bc1911f5d48c836d5d58cabe05b565eb
|
4
|
+
data.tar.gz: 7408ab253a25028fce9e7adf5f6c04e769dc03a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e1a3ff7c00f591432bffc0630dd2911d0283d171f58b04971ada63c9f22fbb04389d603a8a9164d711aefc95d9090ad78d2dca63224f273a80f271a9988f154
|
7
|
+
data.tar.gz: 529df36f35cf173e6ba08a35aac5bf90c47dc280b0ed6b36ee8f9d3897a2b7fd4820e0a5d3128f1b424c6f004c4364afd65aff8550d775fcae297bb95e7c21aa
|
@@ -1,69 +1,69 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
#-------------------------------------------------------------------------
|
4
|
-
# # Copyright (c) Microsoft and contributors. All rights reserved.
|
5
|
-
#
|
6
|
-
# The MIT License(MIT)
|
7
|
-
|
8
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
# of this software and associated documentation files(the "Software"), to deal
|
10
|
-
# in the Software without restriction, including without limitation the rights
|
11
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
12
|
-
# copies of the Software, and to permit persons to whom the Software is
|
13
|
-
# furnished to do so, subject to the following conditions :
|
14
|
-
|
15
|
-
# The above copyright notice and this permission notice shall be included in
|
16
|
-
# all copies or substantial portions of the Software.
|
17
|
-
|
18
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
21
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
# THE SOFTWARE.
|
25
|
-
#--------------------------------------------------------------------------
|
26
|
-
require "cgi"
|
27
|
-
require "azure/storage/common/core/auth/shared_key"
|
28
|
-
|
29
|
-
module Azure::Storage
|
30
|
-
module Table
|
31
|
-
module Auth
|
32
|
-
class SharedKey < Azure::Storage::Common::Core::Auth::SharedKey
|
33
|
-
# The account name
|
34
|
-
attr :account_name
|
35
|
-
|
36
|
-
# Generate the string to sign.
|
37
|
-
#
|
38
|
-
# @param method [Symbol] The HTTP request method.
|
39
|
-
# @param uri [URI] The URI of the request we're signing.
|
40
|
-
# @param headers [Hash] The HTTP request headers.
|
41
|
-
#
|
42
|
-
# Returns a plain text string.
|
43
|
-
def signable_string(method, uri, headers)
|
44
|
-
[
|
45
|
-
method.to_s.upcase,
|
46
|
-
headers.fetch("Content-MD5", ""),
|
47
|
-
headers.fetch("Content-Type", ""),
|
48
|
-
headers.fetch("Date") { headers.fetch("x-ms-date") },
|
49
|
-
canonicalized_resource(uri)
|
50
|
-
].join("\n")
|
51
|
-
end
|
52
|
-
|
53
|
-
# Calculate the Canonicalized Resource string for a request.
|
54
|
-
#
|
55
|
-
# @param uri [URI] The request's URI.
|
56
|
-
#
|
57
|
-
# @return [String] with the canonicalized resource.
|
58
|
-
def canonicalized_resource(uri)
|
59
|
-
resource = "/#{account_name}#{uri.path}"
|
60
|
-
|
61
|
-
comp = CGI.parse(uri.query.to_s).fetch("comp", nil)
|
62
|
-
resource = [resource, "comp=" + comp[0]].join("?") if comp
|
63
|
-
|
64
|
-
resource
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#-------------------------------------------------------------------------
|
4
|
+
# # Copyright (c) Microsoft and contributors. All rights reserved.
|
5
|
+
#
|
6
|
+
# The MIT License(MIT)
|
7
|
+
|
8
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
# of this software and associated documentation files(the "Software"), to deal
|
10
|
+
# in the Software without restriction, including without limitation the rights
|
11
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
12
|
+
# copies of the Software, and to permit persons to whom the Software is
|
13
|
+
# furnished to do so, subject to the following conditions :
|
14
|
+
|
15
|
+
# The above copyright notice and this permission notice shall be included in
|
16
|
+
# all copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
21
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
+
# THE SOFTWARE.
|
25
|
+
#--------------------------------------------------------------------------
|
26
|
+
require "cgi"
|
27
|
+
require "azure/storage/common/core/auth/shared_key"
|
28
|
+
|
29
|
+
module Azure::Storage
|
30
|
+
module Table
|
31
|
+
module Auth
|
32
|
+
class SharedKey < Azure::Storage::Common::Core::Auth::SharedKey
|
33
|
+
# The account name
|
34
|
+
attr :account_name
|
35
|
+
|
36
|
+
# Generate the string to sign.
|
37
|
+
#
|
38
|
+
# @param method [Symbol] The HTTP request method.
|
39
|
+
# @param uri [URI] The URI of the request we're signing.
|
40
|
+
# @param headers [Hash] The HTTP request headers.
|
41
|
+
#
|
42
|
+
# Returns a plain text string.
|
43
|
+
def signable_string(method, uri, headers)
|
44
|
+
[
|
45
|
+
method.to_s.upcase,
|
46
|
+
headers.fetch("Content-MD5", ""),
|
47
|
+
headers.fetch("Content-Type", ""),
|
48
|
+
headers.fetch("Date") { headers.fetch("x-ms-date") },
|
49
|
+
canonicalized_resource(uri)
|
50
|
+
].join("\n")
|
51
|
+
end
|
52
|
+
|
53
|
+
# Calculate the Canonicalized Resource string for a request.
|
54
|
+
#
|
55
|
+
# @param uri [URI] The request's URI.
|
56
|
+
#
|
57
|
+
# @return [String] with the canonicalized resource.
|
58
|
+
def canonicalized_resource(uri)
|
59
|
+
resource = "/#{account_name}#{uri.path}"
|
60
|
+
|
61
|
+
comp = CGI.parse(uri.query.to_s).fetch("comp", nil)
|
62
|
+
resource = [resource, "comp=" + comp[0]].join("?") if comp
|
63
|
+
|
64
|
+
resource
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -1,48 +1,48 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
#-------------------------------------------------------------------------
|
4
|
-
# # Copyright (c) Microsoft and contributors. All rights reserved.
|
5
|
-
#
|
6
|
-
# The MIT License(MIT)
|
7
|
-
|
8
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
# of this software and associated documentation files(the "Software"), to deal
|
10
|
-
# in the Software without restriction, including without limitation the rights
|
11
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
12
|
-
# copies of the Software, and to permit persons to whom the Software is
|
13
|
-
# furnished to do so, subject to the following conditions :
|
14
|
-
|
15
|
-
# The above copyright notice and this permission notice shall be included in
|
16
|
-
# all copies or substantial portions of the Software.
|
17
|
-
|
18
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
21
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
# THE SOFTWARE.
|
25
|
-
#--------------------------------------------------------------------------
|
26
|
-
require "rubygems"
|
27
|
-
require "nokogiri"
|
28
|
-
require "base64"
|
29
|
-
|
30
|
-
require "azure/storage/common"
|
31
|
-
|
32
|
-
module Azure
|
33
|
-
module Storage
|
34
|
-
module Table
|
35
|
-
autoload :Default, "azure/storage/table/default"
|
36
|
-
autoload :TableConstants, "azure/storage/table/default"
|
37
|
-
autoload :Version, "azure/storage/table/version"
|
38
|
-
autoload :Serialization, "azure/storage/table/serialization"
|
39
|
-
autoload :TableService, "azure/storage/table/table_service"
|
40
|
-
autoload :Batch, "azure/storage/table/batch"
|
41
|
-
autoload :Query, "azure/storage/table/query"
|
42
|
-
autoload :BatchResponse, "azure/storage/table/batch_response"
|
43
|
-
autoload :EdmType, "azure/storage/table/edmtype"
|
44
|
-
autoload :Entity, "azure/storage/table/entity"
|
45
|
-
autoload :GUID, "azure/storage/table/guid"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#-------------------------------------------------------------------------
|
4
|
+
# # Copyright (c) Microsoft and contributors. All rights reserved.
|
5
|
+
#
|
6
|
+
# The MIT License(MIT)
|
7
|
+
|
8
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
# of this software and associated documentation files(the "Software"), to deal
|
10
|
+
# in the Software without restriction, including without limitation the rights
|
11
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
12
|
+
# copies of the Software, and to permit persons to whom the Software is
|
13
|
+
# furnished to do so, subject to the following conditions :
|
14
|
+
|
15
|
+
# The above copyright notice and this permission notice shall be included in
|
16
|
+
# all copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
21
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
+
# THE SOFTWARE.
|
25
|
+
#--------------------------------------------------------------------------
|
26
|
+
require "rubygems"
|
27
|
+
require "nokogiri"
|
28
|
+
require "base64"
|
29
|
+
|
30
|
+
require "azure/storage/common"
|
31
|
+
|
32
|
+
module Azure
|
33
|
+
module Storage
|
34
|
+
module Table
|
35
|
+
autoload :Default, "azure/storage/table/default"
|
36
|
+
autoload :TableConstants, "azure/storage/table/default"
|
37
|
+
autoload :Version, "azure/storage/table/version"
|
38
|
+
autoload :Serialization, "azure/storage/table/serialization"
|
39
|
+
autoload :TableService, "azure/storage/table/table_service"
|
40
|
+
autoload :Batch, "azure/storage/table/batch"
|
41
|
+
autoload :Query, "azure/storage/table/query"
|
42
|
+
autoload :BatchResponse, "azure/storage/table/batch_response"
|
43
|
+
autoload :EdmType, "azure/storage/table/edmtype"
|
44
|
+
autoload :Entity, "azure/storage/table/entity"
|
45
|
+
autoload :GUID, "azure/storage/table/guid"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|