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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 402740750d3b6341f9a771184e3c8fc4bdf0cad7
4
- data.tar.gz: 533ac2a5d1d11074fd714cd3cb0e442dcd335f2b
3
+ metadata.gz: 2fc61f51bc1911f5d48c836d5d58cabe05b565eb
4
+ data.tar.gz: 7408ab253a25028fce9e7adf5f6c04e769dc03a3
5
5
  SHA512:
6
- metadata.gz: 6a0b48932284241d92ad64288b041552c647521ed02bb894e2684026ba36228b47ac92f78b1fb30b52d42ec1320bd685116e516b9dcbf0a5afc16fed6bbf2bb1
7
- data.tar.gz: 80eaf676183660f4e661ab64a30987bd86c793f207de3b305420057388777e56f8fa6e5560239d512cd657e0cd6e9cc2551131a3bae7925394f90bf58516fa95
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