azure-sas 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +17 -0
- data/azure-sas.gemspec +1 -1
- data/lib/azure/sas/sign.rb +2 -0
- data/lib/azure/sas/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43d54b04d954ab0b52af9d7b158b97eb1f72ae07
|
4
|
+
data.tar.gz: 729f365868b5211e2b2fa32f5cfe05dc05d04eca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58fc8ed4f8fdb35c0620b3a867ebf42b23b0dd20efa903f41b089fe96b706c8becd333c0ed1299d822d199fb7b27c0b16e13a537f509929be236ee657a17643b
|
7
|
+
data.tar.gz: cde074aeb924703cdb4d73fa5daad7b7e54d7161c7acc6d52802119b7d0b721e38755b4ab12b083ec2e4e9cc9fe27e252443ebcda908637cc914331659f714db
|
data/Gemfile.lock
CHANGED
@@ -2,8 +2,8 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
azure-sas (0.1)
|
5
|
-
addressable
|
6
|
-
azure
|
5
|
+
addressable (~> 2.3)
|
6
|
+
azure (~> 0.7)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -23,9 +23,9 @@ GEM
|
|
23
23
|
faraday (~> 0.9)
|
24
24
|
faraday_middleware (~> 0.10)
|
25
25
|
nokogiri (~> 1.6)
|
26
|
-
faraday (0.
|
26
|
+
faraday (0.11.0)
|
27
27
|
multipart-post (>= 1.2, < 3)
|
28
|
-
faraday_middleware (0.11.0)
|
28
|
+
faraday_middleware (0.11.0.1)
|
29
29
|
faraday (>= 0.7.4, < 1.0)
|
30
30
|
mime-types (3.1)
|
31
31
|
mime-types-data (~> 3.2015)
|
@@ -46,8 +46,8 @@ PLATFORMS
|
|
46
46
|
DEPENDENCIES
|
47
47
|
azure-sas!
|
48
48
|
bundler (~> 1.5)
|
49
|
-
minitest
|
50
|
-
rake
|
49
|
+
minitest (~> 5.10)
|
50
|
+
rake (~> 12.0)
|
51
51
|
|
52
52
|
BUNDLED WITH
|
53
53
|
1.13.6
|
data/README.md
CHANGED
@@ -4,3 +4,20 @@ Shared Access Signature generation for Azure
|
|
4
4
|
I've implemented this for generating SAS for blobs on azure storage.
|
5
5
|
https://github.com/giantmachines/azure-contrib was not suitable, because it
|
6
6
|
depends on the deprecated version of `celluloid` and is not actively mainained.
|
7
|
+
|
8
|
+
# Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
url = 'https://myaccount.blob.core.windows.net/music '
|
12
|
+
Azure::SAS::BLOB.new(
|
13
|
+
ENV['AZURE_STORAGE_ACCESS_KEY'], # Here should be your azure access key
|
14
|
+
ENV['AZURE_STORAGE_ACCOUNT'], # Here should be your storage account name
|
15
|
+
url, # URL to sign
|
16
|
+
signedpermissions: 'r' # Read-only
|
17
|
+
signedexpiry: Time.now + (60 * 5) # 5 minutes after now the link will be expired
|
18
|
+
).generate
|
19
|
+
```
|
20
|
+
|
21
|
+
# Links
|
22
|
+
* https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/constructing-a-service-sas
|
23
|
+
* https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/constructing-a-service-sas
|
data/azure-sas.gemspec
CHANGED
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_development_dependency 'rake', '~> 12.0'
|
21
21
|
spec.add_development_dependency 'minitest', '~> 5.10'
|
22
22
|
spec.add_dependency 'azure', '~> 0.7'
|
23
|
-
spec.add_dependency 'addressable', '~> 2.
|
23
|
+
spec.add_dependency 'addressable', '~> 2.3'
|
24
24
|
end
|
data/lib/azure/sas/sign.rb
CHANGED
data/lib/azure/sas/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure-sas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Lutsiuk
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '2.
|
75
|
+
version: '2.3'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2.
|
82
|
+
version: '2.3'
|
83
83
|
description: Implements the generation of Azure Shared Access Signature (SAS)
|
84
84
|
email:
|
85
85
|
- michael.lutsiuk@gmail.com
|