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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53b5149cc877e7373747a5803b482fba6172839a
4
- data.tar.gz: 36508e8078da0ecc09bf016c1c2a83f2a7e8780a
3
+ metadata.gz: 43d54b04d954ab0b52af9d7b158b97eb1f72ae07
4
+ data.tar.gz: 729f365868b5211e2b2fa32f5cfe05dc05d04eca
5
5
  SHA512:
6
- metadata.gz: d25a316b2ab6797abe5e84b105c4ed6c8807ed510ce5262d48820e795f6a0ecb6e8fe70acc18149b9224c24b83b38fbcf616dc76d4fadcd6b122c1706d39b915
7
- data.tar.gz: acd524a09e1d61e79ea5ece34c485845947b39f1cd7ebf541af77ebdf9e6e3fc476e986f2215da58dbf8a4c739480c564c2d7abd2abd16c3e9239337d6023db5
6
+ metadata.gz: 58fc8ed4f8fdb35c0620b3a867ebf42b23b0dd20efa903f41b089fe96b706c8becd333c0ed1299d822d199fb7b27c0b16e13a537f509929be236ee657a17643b
7
+ data.tar.gz: cde074aeb924703cdb4d73fa5daad7b7e54d7161c7acc6d52802119b7d0b721e38755b4ab12b083ec2e4e9cc9fe27e252443ebcda908637cc914331659f714db
@@ -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.9.2)
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
@@ -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.5'
23
+ spec.add_dependency 'addressable', '~> 2.3'
24
24
  end
@@ -1,3 +1,5 @@
1
+ require 'azure'
2
+
1
3
  module Azure
2
4
  class SAS
3
5
  class Sign
@@ -1,5 +1,5 @@
1
1
  module Azure
2
2
  class SAS
3
- VERSION = '0.1'.freeze
3
+ VERSION = '0.2'.freeze
4
4
  end
5
5
  end
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.1'
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.5'
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.5'
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