azure-storage-table 1.0.1 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9d6b032a68dc79dd98665bcc15d46421f1491d34
4
- data.tar.gz: ce386074b44d0badb2c563d08397be6d0acf6ce7
2
+ SHA256:
3
+ metadata.gz: 4a00522fd6580f874709069b92157ca0987fff16fe53ee85d09204466fc0fe15
4
+ data.tar.gz: 96ba2ae0f8ecf6462555a2a890d1c96b57a6621b3f1d85660ebd5f70fa2efd30
5
5
  SHA512:
6
- metadata.gz: a975813a24aa07e98dee4b6b3d15a530265b89c9a64a472d11765de7bbd7cd4eadeeba07c0a2e2eb246c8fdb4f7b5df1eadb4aa9705c7616e0f7d72f55e333a7
7
- data.tar.gz: bbfc1e19e733994310ad337cdae1dedf6f43952fccf1c4c3e2ba5f222fc6800537ee3fe41d85e1cc4835b3e5043acd7f7b268c091f2b2aa4d4c3da3cee2043a3
6
+ metadata.gz: 74b9949fe3d7ce456c55b75ee4c4b0112ad2ffef381cc04892180b42f897d2902000282e51911e64a622cf769b1856b101476a89b9665511bf126dee77a458a9
7
+ data.tar.gz: a5e33f84f8214e79f7f269cf0a5ecb7bdc05942b20e6232d8863107dc7ee3165ef0aa538dad9c95fb7b8ebee82f853872f4836c96c6063b4f694beca47edcb14
@@ -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