azure-core 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/ChangeLog.md +4 -1
- data/lib/azure/core/auth/shared_key.rb +5 -3
- data/lib/azure/core/auth/signer.rb +2 -2
- data/lib/azure/core/signed_service.rb +1 -1
- data/lib/azure/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzQ1MTkxYmY0NmQ5M2NmZTViNDFlZWZmNzQyNTRjNGNiOTFjMzQzNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzUyNWE2NWI1NmExY2E3ZmViODAwOTk0NmU2MjA4YzdkOTM1ZGMxNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWRjOTIyNjc1OTdlYWMyYWU4NzdjYmExNGY2NTA3MDVhNzdmNzBkZmVlZThk
|
10
|
+
ZmNmZjY2ZjYxOWFhOWRiMjU5NmU5YzRkMTcxNWQ0NjIwMDdiY2Y4NjRiMjMz
|
11
|
+
MzFmN2NiODQ2ODY3NzRiNmQ5ODQyODcxZWYxNzIxOTRhZTUyODk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzBmNzBjYTE1NDRiNDgxNWRkNjY5MDcwN2UwYWQ0NWI5MDU3Nzg2ZTc0MTk1
|
14
|
+
NzgwY2NkZGU0NmVjMGI1YmJjZjhlOWY2ZTc5ODZlMWQ3NzUzM2Y2NDAwMGM3
|
15
|
+
NzBjOTQ5ZWU4NzQ2Mzc4OTcyM2Q0M2M4YzVjZTVhZjZiOGY5YzM=
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# 2016.8.19 - azure-core gem @version 0.1.
|
1
|
+
# 2016.8.19 - azure-core gem @version 0.1.4
|
2
|
+
* Reverted the breaking changes [#23](https://github.com/Azure/azure-ruby-asm-core/pull/23)
|
3
|
+
|
4
|
+
# 2016.8.18 - azure-core gem @version 0.1.3
|
2
5
|
* Set default open timeout for the request [#16](https://github.com/Azure/azure-ruby-asm-core/issues/16)
|
3
6
|
* Fixed the issue that debug filter cannot display the right request information when the signer filter is added [#15](https://github.com/Azure/azure-ruby-asm-core/issues/15)
|
4
7
|
* Fixed the unrecognized method in the MockHttpResponse class [#18](https://github.com/Azure/azure-ruby-asm-core/pull/18)
|
@@ -24,9 +24,11 @@ module Azure
|
|
24
24
|
|
25
25
|
# Initialize the Signer.
|
26
26
|
#
|
27
|
-
# @param account_name [String] The account name.
|
28
|
-
#
|
29
|
-
|
27
|
+
# @param account_name [String] The account name. Defaults to the one in the
|
28
|
+
# global configuration.
|
29
|
+
# @param access_key [String] The access_key encoded in Base64. Defaults to the
|
30
|
+
# one in the global configuration.
|
31
|
+
def initialize(account_name=Azure.storage_account_name, access_key=Azure.storage_access_key)
|
30
32
|
@account_name = account_name
|
31
33
|
super(access_key)
|
32
34
|
end
|
@@ -32,7 +32,7 @@ module Azure
|
|
32
32
|
raise ArgumentError, 'Signing key must be provided'
|
33
33
|
end
|
34
34
|
|
35
|
-
@access_key = access_key
|
35
|
+
@access_key = Base64.strict_decode64(access_key)
|
36
36
|
end
|
37
37
|
|
38
38
|
# Generate an HMAC signature.
|
@@ -41,7 +41,7 @@ module Azure
|
|
41
41
|
#
|
42
42
|
# @return [String] a Base64 String signed with HMAC.
|
43
43
|
def sign(body)
|
44
|
-
signed = OpenSSL::HMAC.digest(
|
44
|
+
signed = OpenSSL::HMAC.digest('sha256', access_key, body)
|
45
45
|
Base64.strict_encode64(signed)
|
46
46
|
end
|
47
47
|
|
@@ -24,7 +24,7 @@ module Azure
|
|
24
24
|
# Create a new instance of the SignedService
|
25
25
|
#
|
26
26
|
# @param signer [Azure::Core::Auth::Signer]. An implementation of Signer used for signing requests. (optional, Default=Azure::Core::Auth::SharedKey.new)
|
27
|
-
# @param account_name [String] The account name (optional, Default=Azure.storage_account_name)
|
27
|
+
# @param account_name [String] The account name (optional, Default=Azure.config.storage_account_name)
|
28
28
|
# @param options [Hash] options
|
29
29
|
def initialize(signer=nil, account_name=nil, options={})
|
30
30
|
super('', options)
|
data/lib/azure/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-08-
|
12
|
+
date: 2016-08-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|