gitlab-fog-azure-rm 1.9.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile +3 -0
  4. data/gitlab-fog-azure-rm.gemspec +1 -3
  5. data/lib/fog/azurerm/version.rb +1 -1
  6. data/vendor/azure-storage-ruby/.env_sample +8 -0
  7. data/vendor/azure-storage-ruby/.gitignore +35 -0
  8. data/vendor/azure-storage-ruby/.rubocop.yml +132 -0
  9. data/vendor/azure-storage-ruby/.travis.yml +23 -0
  10. data/vendor/azure-storage-ruby/BreakingChanges.md +34 -0
  11. data/vendor/azure-storage-ruby/CONTRIBUTING.md +74 -0
  12. data/vendor/azure-storage-ruby/ChangeLog.md +198 -0
  13. data/vendor/azure-storage-ruby/Gemfile +41 -0
  14. data/vendor/azure-storage-ruby/README.md +48 -0
  15. data/vendor/azure-storage-ruby/Rakefile +216 -0
  16. data/vendor/azure-storage-ruby/SECURITY.md +41 -0
  17. data/vendor/azure-storage-ruby/blob/BreakingChanges.md +10 -0
  18. data/vendor/azure-storage-ruby/blob/ChangeLog.md +33 -0
  19. data/vendor/azure-storage-ruby/blob/Gemfile +30 -0
  20. data/vendor/azure-storage-ruby/blob/LICENSE.txt +21 -0
  21. data/vendor/azure-storage-ruby/blob/README.md +188 -0
  22. data/vendor/azure-storage-ruby/blob/azure-storage-blob.gemspec +52 -0
  23. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/append.rb +244 -0
  24. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/autoload.rb +47 -0
  25. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/blob.rb +932 -0
  26. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/blob_service.rb +720 -0
  27. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/block.rb +530 -0
  28. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/container.rb +634 -0
  29. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/default.rb +171 -0
  30. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/page.rb +566 -0
  31. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/serialization.rb +351 -0
  32. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/version.rb +49 -0
  33. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob.rb +26 -0
  34. data/vendor/azure-storage-ruby/common/BreakingChanges.md +8 -0
  35. data/vendor/azure-storage-ruby/common/ChangeLog.md +41 -0
  36. data/vendor/azure-storage-ruby/common/Gemfile +30 -0
  37. data/vendor/azure-storage-ruby/common/LICENSE.txt +21 -0
  38. data/vendor/azure-storage-ruby/common/README.md +146 -0
  39. data/vendor/azure-storage-ruby/common/azure-storage-common.gemspec +57 -0
  40. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/authorizer.rb +36 -0
  41. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/shared_key.rb +125 -0
  42. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/shared_key_lite.rb +48 -0
  43. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/signer.rb +51 -0
  44. data/vendor/azure-storage-ruby/common/lib/azure/core/default.rb +23 -0
  45. data/vendor/azure-storage-ruby/common/lib/azure/core/error.rb +21 -0
  46. data/vendor/azure-storage-ruby/common/lib/azure/core/filtered_service.rb +45 -0
  47. data/vendor/azure-storage-ruby/common/lib/azure/core/http/debug_filter.rb +36 -0
  48. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_error.rb +135 -0
  49. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_filter.rb +53 -0
  50. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_request.rb +195 -0
  51. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_response.rb +102 -0
  52. data/vendor/azure-storage-ruby/common/lib/azure/core/http/retry_policy.rb +84 -0
  53. data/vendor/azure-storage-ruby/common/lib/azure/core/http/signer_filter.rb +33 -0
  54. data/vendor/azure-storage-ruby/common/lib/azure/core/service.rb +46 -0
  55. data/vendor/azure-storage-ruby/common/lib/azure/core/signed_service.rb +45 -0
  56. data/vendor/azure-storage-ruby/common/lib/azure/core/utility.rb +244 -0
  57. data/vendor/azure-storage-ruby/common/lib/azure/core/version.rb +33 -0
  58. data/vendor/azure-storage-ruby/common/lib/azure/core.rb +48 -0
  59. data/vendor/azure-storage-ruby/common/lib/azure/http_response_helper.rb +38 -0
  60. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/autoload.rb +62 -0
  61. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/client.rb +162 -0
  62. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/client_options.rb +363 -0
  63. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/client_options_error.rb +41 -0
  64. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/configurable.rb +212 -0
  65. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/anonymous_signer.rb +43 -0
  66. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_access_signature.rb +30 -0
  67. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_access_signature_generator.rb +399 -0
  68. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_access_signature_signer.rb +57 -0
  69. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_key.rb +60 -0
  70. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/token_signer.rb +43 -0
  71. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/autoload.rb +53 -0
  72. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/error.rb +43 -0
  73. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/filter/exponential_retry_filter.rb +64 -0
  74. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/filter/linear_retry_filter.rb +55 -0
  75. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/filter/retry_filter.rb +300 -0
  76. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/http_client.rb +82 -0
  77. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/sr.rb +85 -0
  78. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/token_credential.rb +64 -0
  79. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/utility.rb +261 -0
  80. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core.rb +35 -0
  81. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/default.rb +868 -0
  82. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/access_policy.rb +37 -0
  83. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/cors.rb +38 -0
  84. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/cors_rule.rb +48 -0
  85. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/enumeration_results.rb +32 -0
  86. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/geo_replication.rb +40 -0
  87. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/logging.rb +47 -0
  88. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/metrics.rb +45 -0
  89. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/retention_policy.rb +37 -0
  90. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/serialization.rb +335 -0
  91. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/signed_identifier.rb +40 -0
  92. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/storage_service.rb +322 -0
  93. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/storage_service_properties.rb +48 -0
  94. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/storage_service_stats.rb +39 -0
  95. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/user_delegation_key.rb +50 -0
  96. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/version.rb +49 -0
  97. data/vendor/azure-storage-ruby/common/lib/azure/storage/common.rb +26 -0
  98. metadata +95 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e3d095e019cbc998273c882272f179c5490107474e18fe4e723443933136bf7
4
- data.tar.gz: cac7852c0917d11234f0c3aacc99608a7b74e8b1ab47f5ff6532d764503e027b
3
+ metadata.gz: be3af782a97d6f71bb996b358490a17db4af7b3f6a05d275027bb587229a0f22
4
+ data.tar.gz: 3438d03dda366b13f4cc9775a62b2af1e053966ec6e4a648cee277e34f996a6a
5
5
  SHA512:
6
- metadata.gz: 5432a3edbc3820350aa4e789e066801838883522057e148422f66bff0df632072eecae63431909fc0b406e5d1d82f8f90615583bb7202fbdb7fc75562781ce7d
7
- data.tar.gz: 7f0b8fc9d208def6e9740e298c8cf63386898b7a7e81eddbc8f25ba76ffe59ab6a3dae8752563ac0d1ef5521f7012683275096ae9aadaefce2be34ac5146becf
6
+ metadata.gz: eddaf33568eccebc8ec529cf00628b15aff960a0e2c751df77263c8508e98d7eb865fb55bca4498d1073a7564f6244dbf471f2b62cf2918d99740b4f8753e4db
7
+ data.tar.gz: 96209210b3ebe213f5d70e0e1cf3dd3a5d278d3659dc5c9de9b53cec8731631979711d2658b34cf99a489944388b60a5827a6877f26e5105f0a00247a84b2cc2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 2.0.0
4
+
5
+ - Vendor Microsoft Azure gems and upgrade to Faraday 2 !48
6
+
7
+ ## 1.9.1
8
+
9
+ - Duplicate options after modifying it !47
10
+
11
+ ## 1.9.0
12
+
13
+ - Cleanup dead code and tests !41
14
+ - Preserve compressed response bodies when reading blobs !42
15
+ - Add support for using a token signer instead of an account access key !43
16
+ - Support setting Content-Type in pre-signed URLs !44
17
+
3
18
  ## 1.8.0
4
19
 
5
20
  - Remove deprecated ms_rest_azure dependency (thanks to @jasoncodes) !38
data/Gemfile CHANGED
@@ -1,3 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
  # Specify your gem's dependencies in fog-azure-rm.gemspec
3
3
  gemspec
4
+
5
+ gem 'azure-storage-blob', path: 'vendor/azure-storage-ruby/blob'
6
+ gem 'azure-storage-common', path: 'vendor/azure-storage-ruby/common'
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ['Shaffan Chaudhry', 'Samawia Moin', 'Adnan Khalil', 'Zeeshan Arshad', 'Haider Ali', 'Waqar Haider', 'Bilal Naeem', 'Muhammad Asad', 'Azeem Sajid', 'Maham Nazir', 'Abbas Sheikh']
9
9
  spec.summary = "Module for the 'fog' gem to support Azure Blob Storage with CarrierWave and Fog."
10
10
  spec.description = "This is a stripped-down fork of fog-azure-rm that enables Azure Blob Storage to be used with CarrierWave and Fog."
11
- spec.files = `git ls-files`.split("\n")
11
+ spec.files = `git ls-files ':!vendor/azure-storage-ruby/file' ':!vendor/azure-storage-ruby/queue' ':!vendor/azure-storage-ruby/table' ':!vendor/azure-storage-ruby/test'`.split("\n")
12
12
  spec.test_files = `git ls-files -- {spec,tests}/*`.split("\n")
13
13
  spec.require_paths = %w[lib]
14
14
  spec.license = 'MIT'
@@ -23,8 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency 'rubocop', '~> 0.89.1'
24
24
  spec.add_development_dependency 'simplecov'
25
25
  spec.add_development_dependency 'webrick', '~> 1.8'
26
- spec.add_dependency 'azure-storage-blob', '~> 2.0'
27
- spec.add_dependency 'azure-storage-common', '~> 2.0'
28
26
  spec.add_dependency 'fog-core', '~> 2.1'
29
27
  spec.add_dependency 'fog-json', '~> 1.2'
30
28
  spec.add_dependency 'mime-types'
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AzureRM
3
- VERSION = '1.9.1'.freeze
3
+ VERSION = '2.0.0'.freeze
4
4
  end
5
5
  end
@@ -0,0 +1,8 @@
1
+ # This is a sample of what your .env file should look like if you wanted to run integration tests.
2
+ # If you move this file to the .env and replace the environment variables with your own values, then the environment
3
+ # will be included when the rake test tasks are executed. Otherwise, you could just export the environment vars
4
+ # yourself.
5
+
6
+ AZURE_STORAGE_ACCOUNT="your storage account"
7
+ AZURE_STORAGE_ACCESS_KEY="your storage access key"
8
+ AZURE_STORAGE_CONNECTION_STRING="your storage connection string"
@@ -0,0 +1,35 @@
1
+ .rvmrc
2
+ debug.rb
3
+ debug.old.rb
4
+ *.gem
5
+ *.rbc
6
+ *.swp
7
+ *.tmproj
8
+ *~
9
+ .\#*
10
+ tags
11
+ /pkg
12
+ /doc
13
+ Gemfile.lock
14
+ nbproject/*
15
+ *.gem
16
+ .idea/*
17
+ .project
18
+ .bundle
19
+ .config
20
+ .yardoc
21
+ _yardoc
22
+ coverage
23
+ doc/
24
+ lib/bundler/man
25
+ pkg
26
+ rdoc
27
+ .vscode/
28
+
29
+ .DS_Store
30
+ .ruby-version
31
+ .env
32
+ *.pem
33
+
34
+ # pkg path for sub gems
35
+ pkg_*
@@ -0,0 +1,132 @@
1
+ AllCops:
2
+ TargetRubyVersion: 1.9.3
3
+ # Turns off the default Rubocop rules.
4
+ DisabledByDefault: true
5
+ Exclude:
6
+ - 'coverage/**/*'
7
+ - 'vendor/**/*'
8
+ - 'test/fixtures/**/*'
9
+
10
+ # Prefer &&/|| over and/or.
11
+ Style/AndOr:
12
+ Enabled: true
13
+
14
+ # Do not use braces for hash literals when they are the last argument of a
15
+ # method call.
16
+ Style/BracesAroundHashParameters:
17
+ Enabled: true
18
+ EnforcedStyle: context_dependent
19
+
20
+ # Align `when` with `case`.
21
+ Layout/CaseIndentation:
22
+ Enabled: true
23
+
24
+ # Align comments with method definitions.
25
+ Layout/CommentIndentation:
26
+ Enabled: true
27
+
28
+ Layout/EmptyLineAfterMagicComment:
29
+ Enabled: true
30
+
31
+ # In a regular class definition, no empty lines around the body.
32
+ Layout/EmptyLinesAroundClassBody:
33
+ Enabled: true
34
+
35
+ # In a regular method definition, no empty lines around the body.
36
+ Layout/EmptyLinesAroundMethodBody:
37
+ Enabled: true
38
+
39
+ # In a regular module definition, no empty lines around the body.
40
+ Layout/EmptyLinesAroundModuleBody:
41
+ Enabled: true
42
+
43
+ Layout/FirstParameterIndentation:
44
+ Enabled: true
45
+
46
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
47
+ Style/HashSyntax:
48
+ Enabled: true
49
+
50
+ # Method definitions after `private` or `protected` isolated calls need one
51
+ # extra level of indentation.
52
+ Layout/IndentationConsistency:
53
+ Enabled: true
54
+ EnforcedStyle: rails
55
+
56
+ # Two spaces, no tabs (for indentation).
57
+ Layout/IndentationWidth:
58
+ Enabled: true
59
+
60
+ Layout/SpaceAfterColon:
61
+ Enabled: true
62
+
63
+ Layout/SpaceAfterComma:
64
+ Enabled: true
65
+
66
+ Layout/SpaceAroundEqualsInParameterDefault:
67
+ Enabled: true
68
+
69
+ Layout/SpaceAroundKeyword:
70
+ Enabled: true
71
+
72
+ Layout/SpaceAroundOperators:
73
+ Enabled: true
74
+
75
+ Layout/SpaceBeforeFirstArg:
76
+ Enabled: true
77
+
78
+ # Defining a method with parameters needs parentheses.
79
+ Style/MethodDefParentheses:
80
+ Enabled: true
81
+
82
+ Style/FrozenStringLiteralComment:
83
+ Enabled: true
84
+ EnforcedStyle: always
85
+ Exclude:
86
+ - 'test/**/*.rb'
87
+
88
+ # Use `foo {}` not `foo{}`.
89
+ Layout/SpaceBeforeBlockBraces:
90
+ Enabled: true
91
+
92
+ # Use `foo { bar }` not `foo {bar}`.
93
+ Layout/SpaceInsideBlockBraces:
94
+ Enabled: true
95
+
96
+ # Use `{ a: 1 }` not `{a:1}`.
97
+ Layout/SpaceInsideHashLiteralBraces:
98
+ Enabled: true
99
+
100
+ Layout/SpaceInsideParens:
101
+ Enabled: true
102
+
103
+ # Check quotes usage according to lint rule below.
104
+ Style/StringLiterals:
105
+ Enabled: true
106
+ EnforcedStyle: double_quotes
107
+
108
+ # Detect hard tabs, no hard tabs.
109
+ Layout/Tab:
110
+ Enabled: true
111
+
112
+ # Blank lines should not have any spaces.
113
+ Layout/TrailingBlankLines:
114
+ Enabled: true
115
+
116
+ # No trailing whitespace.
117
+ Layout/TrailingWhitespace:
118
+ Enabled: true
119
+
120
+ # Use quotes for string literals when they are enough.
121
+ Style/UnneededPercentQ:
122
+ Enabled: true
123
+
124
+ # Align `end` with the matching keyword or starting expression except for
125
+ # assignments, where it should be aligned with the LHS.
126
+ Lint/EndAlignment:
127
+ Enabled: true
128
+ EnforcedStyleAlignWith: variable
129
+
130
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
131
+ Lint/RequireParentheses:
132
+ Enabled: true
@@ -0,0 +1,23 @@
1
+ ---
2
+ language: ruby
3
+
4
+ rvm:
5
+ - 2.3.0
6
+ - 2.4.1
7
+ - 2.5.0
8
+ - 2.6.0
9
+
10
+ before_install:
11
+ - |
12
+ if [[ $RUBY_VERSION == ruby-2.0* ]] || [[ $RUBY_VERSION == ruby-2.1* ]] || [[ $RUBY_VERSION == ruby-2.2* ]] ; then
13
+ gem install bundler -v '< 2';
14
+ else
15
+ gem install bundler
16
+ fi
17
+
18
+ script:
19
+ - bundle exec rake test:unit
20
+ - if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ; then rake test:integration ; fi
21
+ - rake sanity_check
22
+
23
+ sudo: false
@@ -0,0 +1,34 @@
1
+ **Note: This BreakingChanges.md file is deprecated after version 0.15.0-preview, please refer to the BreakingChange.md in each package for future change logs.**
2
+
3
+ Tracking Breaking Changes in 0.14.0-preview
4
+
5
+ QUEUE
6
+ * The return type of `Azure::Storage::Queue::create_message` is changed from `nil` to an `Azure::Storage::Queue::Message` object.
7
+
8
+ Tracking Breaking Changes in 0.13.0-preview
9
+
10
+ TABLE
11
+ * The return type `Azure::Service::EnumerationResult` of `query_tables` has a changed structure. Now the `'updated'` will not be contained, and is flattened to a structure in the form of `{ {"TableName" => "tableone"}, {"TableName" => "tabletwo"}, {"TableName" => "tablethree"}}`.
12
+ * The `Azure::Storage::Table::Entity` does not contain `:table` and `updated` anymore. The updated time can be found in `:properties`.
13
+ * The return type of `get_table` is changed to a Hash that contains full metadata returned from the server when query the table.
14
+ * The method `Azure::Storage::Table::EdmType::unserialize_query_value` is renamed to `deserialize_value`.
15
+
16
+ Tracking Breaking Changes in 0.11.0-preview
17
+
18
+ ALL
19
+ * `Azure::Storage::Core::Auth::SharedAccessSignature.generate` is renamed to `generate_service_sas_token`.
20
+ * `Azure::Storage::Core::Auth::SharedAccessSignature.signed_uri` requires `use_account_sas` as the second parameter.
21
+ * Removed the support for the Shared Key Lite.
22
+
23
+ Tracking Breaking Changes in 0.10.0-preview
24
+
25
+ ALL
26
+ * Require "azure-storage" instead of "azure_storage".
27
+
28
+ BLOB
29
+ * The `create_blob_pages` method is renamed to `put_blob_pages`.
30
+ * The `create_blob_block` method is renamed to `put_blob_block`.
31
+ * The `acquire_lease` method is renamed to `acquire_blob_lease`.
32
+ * The `renew_lease` method is renamed to `renew_blob_lease`.
33
+ * The `release_lease` method is renamed to `release_blob_lease`.
34
+ * The `break_lease` method is renamed to `break_blob_lease`.
@@ -0,0 +1,74 @@
1
+ If you intend to contribute to the project, please make sure you've followed the instructions provided in the [Azure Projects Contribution Guidelines](http://azure.github.io/guidelines/).
2
+ ## Project Setup
3
+ The Azure Storage development team uses Visual Studio Code so instructions will be tailored to that preference. However, any preferred IDE or other toolset should be usable.
4
+
5
+ ### Install
6
+ * Ruby 1.9.3 to 2.5.0.
7
+ * [Visual Studio Code](https://code.visualstudio.com/)
8
+
9
+ ### Development Environment Setup
10
+ To get the source code of the SDK via **git** just type:
11
+
12
+ ```bash
13
+ git clone https://github.com/Azure/azure-storage-ruby.git
14
+ cd ./azure-storage-ruby
15
+ ```
16
+
17
+ Then, install Bundler and run bundler to install all the gem dependencies:
18
+
19
+ ```bash
20
+ gem install bundler
21
+ bundle install
22
+ ```
23
+
24
+ ## Tests
25
+
26
+ ### Configuration
27
+ If you would like to run the integration test suite, you will need to setup environment variables which will be used
28
+ during the integration tests. These tests will use these credentials to run live tests against Azure with the provided
29
+ credentials (you will be charged for usage, so verify the clean up scripts did their job at the end of a test run).
30
+
31
+ The root of the project contains a [.env_sample](.env_sample) file. This dot file is a sample of the actual environment vars needed to
32
+ run the integration tests.
33
+
34
+ Unit tests don't require real credentials and don't require to provide the .env file.
35
+
36
+ Do the following to prepare your environment for integration tests:
37
+
38
+ * Copy [.env_sample](.env_sample) to .env **relative to root of the project dir**
39
+ * Update .env with your credentials **.env is in the .gitignore, so should only reside locally**
40
+
41
+ ### Running
42
+ You can use the following commands to run:
43
+
44
+ * All the tests: ``rake test``. **This will run integration tests if you have .env file or env vars setup**
45
+ * Run storage suite of tests: ``rake test:unit``, ``rake test:integration``
46
+ * One particular test file: ``ruby -I".\blob\lib;.\common\lib;.\table\lib;.\queue\lib;.\file\lib;test" "<path of the test file>"``
47
+
48
+ ### Testing Features
49
+ As you develop a feature, you'll need to write tests to ensure quality. Your changes should be covered by both unit tests and integration tests. You should also run existing tests related to your change to address any unexpected breaks.
50
+
51
+ ## Pull Requests
52
+
53
+ ### Guidelines
54
+ The following are the minimum requirements for any pull request that must be met before contributions can be accepted.
55
+ * Make sure you've signed the CLA before you start working on any change.
56
+ * Discuss any proposed contribution with the team via a GitHub issue **before** starting development.
57
+ * Code must be professional quality
58
+ * No style issues
59
+ * You should strive to mimic the style with which we have written the library
60
+ * Clean, well-commented, well-designed code
61
+ * Try to limit the number of commits for a feature to 1-2. If you end up having too many we may ask you to squash your changes into fewer commits.
62
+ * ChangeLog.md in service module folders needs to be updated describing the new change
63
+ * Thoroughly test your feature
64
+
65
+ ### Branching Policy
66
+ Changes should be based on the **dev** branch, not master as master is considered publicly released code. Each breaking change should be recorded in the corresponding BreakingChanges.md in service module folders. Note that [BreakingChanges.md](BreakingChanges.md) is deprecated after GA release.
67
+
68
+ ### Adding Features for All Platforms
69
+ We strive to release each new feature for each of our environments at the same time. Therefore, we ask that all contributions be written for Ruby 1.9.3 and later.
70
+
71
+ ### Review Process
72
+ We expect all guidelines to be met before accepting a pull request. As such, we will work with you to address issues we find by leaving comments in your code. Please understand that it may take a few iterations before the code is accepted as we maintain high standards on code quality. Once we feel comfortable with a contribution, we will validate the change and accept the pull request.
73
+
74
+ Thank you for any contributions! Please let the team know if you have any questions or concerns about our contribution policy.
@@ -0,0 +1,198 @@
1
+ **Note: This changelog is deprecated after version 0.15.0-preview, please refer to the ChangeLog.md in each package for future change logs.**
2
+
3
+ 2017.11 - version 0.15.0-preview
4
+
5
+ ALL
6
+ * Added the support for the location mode in the API options.
7
+ * Added the support for retrying according to the location mode.
8
+
9
+ BLOB
10
+ * Added the support for retrieving statistics related to replication for the Blob service.
11
+ * Added the support for anonymous read access of public containers.
12
+ * Added full lease ID header support for following methods:
13
+ - Azure::Storage::Blob::BlobService::get_container_properties
14
+ - Azure::Storage::Blob::BlobService::get_container_metadata
15
+ - Azure::Storage::Blob::BlobService::get_container_acl
16
+ - Azure::Storage::Blob::BlobService::set_container_metadata
17
+ - Azure::Storage::Blob::BlobService::set_container_acl
18
+ - Azure::Storage::Blob::BlobService::delete_container
19
+ - Azure::Storage::Blob::BlobService::create_block_blob
20
+ - Azure::Storage::Blob::BlobService::create_page_blob
21
+ - Azure::Storage::Blob::BlobService::create_append_blob
22
+ - Azure::Storage::Blob::BlobService::get_blob
23
+ - Azure::Storage::Blob::BlobService::get_blob_properties
24
+ - Azure::Storage::Blob::BlobService::set_blob_properties
25
+ - Azure::Storage::Blob::BlobService::get_blob_metadata
26
+ - Azure::Storage::Blob::BlobService::set_blob_metadata
27
+ - Azure::Storage::Blob::BlobService::create_blob_snapshot
28
+ - Azure::Storage::Blob::BlobService::copy_blob
29
+ - Azure::Storage::Blob::BlobService::copy_blob_from_uri
30
+ - Azure::Storage::Blob::BlobService::delete_blob
31
+ - Azure::Storage::Blob::BlobService::put_blob_block
32
+ - Azure::Storage::Blob::BlobService::commit_blob_blocks
33
+ - Azure::Storage::Blob::BlobService::list_blob_blocks
34
+ - Azure::Storage::Blob::BlobService::put_blob_pages
35
+ - Azure::Storage::Blob::BlobService::list_page_blob_ranges
36
+ - Azure::Storage::Blob::BlobService::incremental_copy_blob
37
+ - Azure::Storage::Blob::BlobService::append_blob_block
38
+
39
+ Queue
40
+ * Added the support for retrieving statistics related to replication for the Queue service.
41
+
42
+ Table
43
+ * Added the support for retrieving statistics related to replication for the Table service.
44
+
45
+ 2017.09 - version 0.14.0-preview
46
+
47
+ ALL
48
+ * Added configuration file for Rubocop and auto-resolved coding style issue.
49
+
50
+ BLOB
51
+ * The `Azure::Storage::Blob::list_page_blob_ranges` API now accepts `:previous_snapshot` as an optional parameter, that specifies that the response returns pages that have been updated or cleared since the snapshot specified by `:previous_snapshot` was taken.
52
+ * The `Azure::Storage::Blob::Blob` object now has an attribute `:encrypted` showing if the blob or blob related request has been encrypted.
53
+ * The `Azure::Storage::Blob::BlobService::list_containers` and `Azure::Storage::Blob::BlobService::get_container_properties` will now also return public access level for each container.
54
+ * The stored Content-MD5 property is now returned when requesting a range of a blob. Previously this was only returned for full blob downloads. `Azure::Storage::Blob::Blob.properties[:content_md5]` will always hold the stored Content_MD5 property, and `Azure::Storage::Blob::Blob.properties[:range_md5]` will always represent the MD5 for the content returned from the server.
55
+ * Added an API `Azure::Storage::Blob::BlobService::incremental_copy_blob` to support [incremental copy](https://docs.microsoft.com/en-us/rest/api/storageservices/incremental-copy-blob) for page blob snapshots.
56
+
57
+ FILE
58
+ * The stored Content-MD5 property is now returned when requesting a range of a file. Previously this was only returned for full file downloads. `Azure::Storage::File::File.properties[:content_md5]` will always hold the stored Content_MD5 property, and `Azure::Storage::File::File.properties[:range_md5]` will always represent the MD5 for the content returned from the server.
59
+
60
+ QUEUE
61
+ * The return type of `Azure::Storage::Queue::create_message` is changed from `nil` to an `Azure::Storage::Queue::Message` object.
62
+
63
+ FILE
64
+ * The API `Azure::Storage::File::list_directories_and_files` now also accepts `:prefix` as an optional parameter. The return value will be filtered with the specified prefix if set.
65
+
66
+ 2017.09 - version 0.13.0-preview
67
+
68
+ ALL
69
+ * Removed Nokogiri from Gemfile because it causes bundler fail to install azure-storage. Added it back to runtime dependency and explicitly require user to install the correct version of Nokogiri in README.md.
70
+ * Service version is upgraded to 2016-05-31.
71
+
72
+ BLOB
73
+ * Block size can now be up to 100MB.
74
+
75
+ TABLE
76
+ * The return type `Azure::Service::EnumerationResult` of `query_tables` has a changed structure. Now the `'updated'` will not be contained, and is flattened to a structure in the form of `{ {"TableName" => "tableone"}, {"TableName" => "tabletwo"}, {"TableName" => "tablethree"}}`.
77
+ * The `Azure::Storage::Table::Entity` does not contain `:table` and `updated` anymore. The updated time can be found in `:properties`.
78
+ * The return type of `get_table` is changed to a Hash that contains full metadata returned from the server when query the table.
79
+ * The method `Azure::Storage::Table::EdmType::unserialize_query_value` is renamed to `deserialize_value`.
80
+
81
+ 2017.08 - version 0.12.3-preview
82
+
83
+ ALL
84
+ * Added Nokogiri as a gem into Gemfile, resolving an issue where bundler failed to recognize that the dependency exists after installation.
85
+
86
+ 2017.08 - version 0.12.2-preview
87
+
88
+ ALL
89
+ * Removed Nokogiri as a dependency to resolve conflict version caused by azure-core also depending on Nokogiri.
90
+
91
+ 2017.04 - version 0.12.1-preview
92
+
93
+ ALL
94
+ * Relaxed constraint on Nokogiri version dependency to allow Nokogiri 1.7.x for Ruby 2.1 and later, but preserving support for Ruby 1.9.3. (Note that this may require updating to Bundler 1.13 or later if you're using Ruby 1.9 or 2.0.)
95
+
96
+ 2017.02 - version 0.12.0-preview
97
+
98
+ ALL
99
+ * Fixed the issue where `should_retry?` in the retry_filter.rb overwrites the result from derived `apply_retry_policy`. [#76](https://github.com/Azure/azure-storage-ruby/issues/76)
100
+ * Fixed the issue where `Azure::Storage::Client.create_from_connection_string` throws an exception. [#77](https://github.com/Azure/azure-storage-ruby/issues/77)
101
+ * Added the support for setting the "timeout" option in `get_service_properties` and `set_service_properties`.
102
+
103
+ BLOB
104
+ * Added the metadata to the returning instance when creates a blob.
105
+ * Added `transactional_md5` to the options of `put_blob_pages`.
106
+
107
+ FILE
108
+ * Added File Service support, targeting storage service version 2015-04-05.
109
+
110
+ 2016.12 - version 0.11.5-preview
111
+
112
+ ALL
113
+ * Added the support for setting customer user agent. [#71](https://github.com/Azure/azure-storage-ruby/issues/71)
114
+ * Added the support for hooking in sending requests.
115
+
116
+ 2016.11 - version 0.11.4-preview
117
+
118
+ ALL
119
+ * Removed the unnecessary dependencies. [#55](https://github.com/Azure/azure-storage-ruby/issues/55), [#67](https://github.com/Azure/azure-storage-ruby/issues/67)
120
+
121
+ BLOB
122
+ * Fixed the issue when checking the content encoding.
123
+ * Fixed the wrong "Content-Encoding" value in the test cases.
124
+ * Fixed the issue where it cannot use the `create_block_blob` method with an IO/File object. [#61](https://github.com/Azure/azure-storage-ruby/issues/61)
125
+
126
+ 2016.10 - version 0.11.3-preview
127
+
128
+ ALL
129
+ * Fixed an issue in retry policies.
130
+
131
+ 2016.10 - version 0.11.2-preview
132
+
133
+ ALL
134
+ * Fixed the issue where it retries on HTTP 4xx errors.
135
+
136
+ BLOB
137
+ * Fixed the issue of wrong "Content-Encoding". [#49](https://github.com/Azure/azure-storage-ruby/issues/49)
138
+
139
+ 2016.09 - version 0.11.1-preview
140
+
141
+ ALL
142
+ * Added the support for setting the client request ID via the "request_id" parameter.
143
+ * Added the retry for the timeout errors.
144
+ * Added the retry for the connection reset error.
145
+
146
+ BLOB
147
+ * Fixed the issue where "list_blobs" doesn't work when delimiter is specified. [#41](https://github.com/Azure/azure-storage-ruby/issues/41)
148
+
149
+ 2016.08 - version 0.11.0-preview
150
+
151
+ ALL
152
+ * Added the support for the account shared access signature.
153
+ * Removed the support for the Shared Key Lite.
154
+
155
+ BLOB
156
+ * Added the support for the "add" and "create" permissions in the blob service shared access signature.
157
+
158
+ FILE
159
+ * Added the support for the "create" permission in the file service shared access signature.
160
+
161
+ 2016.06 - version 0.10.2-preview
162
+
163
+ ALL
164
+ * Fixed the issue that cannot run against storage emulator on Windows.
165
+ * Fixed the issue that it doesn't run as a singleton when it calls Azure::Storage.setup.
166
+ * Updated to storage service version 2015-04-05.
167
+
168
+ 2016.05 - version 0.10.1-preview
169
+
170
+ ALL
171
+ * Replaced the core module by the 'azure-core' gem.
172
+ * Stopped maintaining the support for Ruby 1.9.
173
+ * Added support for retry filters.
174
+
175
+ 2016.03 - version 0.10.0-preview
176
+
177
+ ALL
178
+ * Separated out parts of Azure Storage previously found in the Azure SDK 0.7.0 to establish an independent release cycle.
179
+ * Supported Ruby 1.9.3, 2.0, 2.1 and 2.2.
180
+ * Updated to storage service version 2015-02-21.
181
+ * Fixed issue where previous query's parameters were used, causing authentication to fail (https://github.com/Azure/azure-sdk-for-ruby/issues/276).
182
+ * Fixed the issue that the Content-MD5 is overwritten when request body exists, regardless the input value.
183
+ * Refined the code for setting service properties to be compatible with the XML schema.
184
+
185
+ BLOB
186
+ * Added support for container lease operations.
187
+ * Added support for changing the ID of an existing lease.
188
+ * Added support for copying from source blob URI.
189
+ * Added support for aborting copying a blob.
190
+ * Added support for creating an append blob.
191
+ * Added support for appending a block to an appendblob.
192
+ * Added support for the content disposition property of a blob.
193
+ * Added support for resizing a page blob.
194
+ * Added support for setting a page blob's sequence number.
195
+ * Fixed the issue where conditional headers for some APIs could not be set.
196
+ * Fixed the issue where the request fails when calling list_page_blob_ranges with start range and end range.
197
+ * Renamed create_blob_block to put_blob_block.
198
+ * Renamed create_blob_pages to put_blob_pages.
@@ -0,0 +1,41 @@
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
+ source "https://rubygems.org" do
27
+ gem "faraday", "~> 2.0", :require => false
28
+ gem "faraday-follow_redirects", "~> 0.3.0", :require => false
29
+ gem "faraday-net_http_persistent", "~> 2.0", :require => false
30
+ gem "net-http-persistent", "~> 4.0", :require => false
31
+ gem "nokogiri", "~> 1", ">= 1.10.8", :require => false
32
+ gem "adal", "~> 1.0", :require => false
33
+ gem "dotenv", "~> 2.0", :require => false
34
+ gem "minitest", "~> 5.18.0", :require => false
35
+ gem "minitest-reporters", "~> 1", :require => false
36
+ gem "mocha", "~> 1.0", :require => false
37
+ gem "rake", "~> 13.0", :require => false
38
+ gem "timecop", "~> 0.7", :require => false
39
+ gem "yard", "~> 0.9", ">= 0.9.11", :require => false
40
+ gem "coveralls", require: false
41
+ end
@@ -0,0 +1,48 @@
1
+ # Microsoft Azure Storage Client Library for Ruby (Deprecated)
2
+
3
+ This project will be in [Community Support](https://azure.github.io/azure-sdk/policies_support.html#package-lifecycle) until 13 September 2024. After this date the project and associated client libraries will be retired permanently. For more details on the retirement and alternatives to using this project, visit [Retirement notice: The Azure Storage Ruby client libraries will be retired on 13 September 2024](https://azure.microsoft.com/updates/retirement-notice-the-azure-storage-ruby-client-libraries-will-be-retired-on-13-september-2024/).
4
+
5
+ ---
6
+
7
+ * Master: [![Master Build Status](https://travis-ci.org/Azure/azure-storage-ruby.svg?branch=master)](https://travis-ci.org/Azure/azure-storage-ruby/branches) [![Coverage Status](https://coveralls.io/repos/github/Azure/azure-storage-ruby/badge.svg?branch=master)](https://coveralls.io/github/Azure/azure-storage-ruby?branch=master)
8
+ * Dev: [![Dev Build Status](https://travis-ci.org/Azure/azure-storage-ruby.svg?branch=dev)](https://travis-ci.org/Azure/azure-storage-ruby/branches) [![Coverage Status](https://coveralls.io/repos/github/Azure/azure-storage-ruby/badge.svg?branch=dev)](https://coveralls.io/github/Azure/azure-storage-ruby?branch=dev)
9
+
10
+ This project provides Ruby packages that makes it easy to access and manage Microsoft Azure Storage Services.
11
+
12
+ # Library Packages
13
+
14
+ * [Blobs](https://github.com/azure/azure-storage-ruby/tree/master/blob)
15
+ * [Tables](https://github.com/azure/azure-storage-ruby/tree/master/table)
16
+ * [Queues](https://github.com/azure/azure-storage-ruby/tree/master/queue)
17
+ * [Files](https://github.com/azure/azure-storage-ruby/tree/master/file)
18
+
19
+ Note:
20
+
21
+ * x64 Ruby for Windows is known to have some compatibility issues.
22
+ * Each service gems depends on gem nokogiri. For Ruby version lower than 2.2, please install the compatible nokogiri before trying to install azure-storage.
23
+
24
+ # Getting Started for Contributors
25
+
26
+ If you would like to become an active contributor to this project please follow the instructions provided in [Azure Projects Contribution Guidelines](http://azure.github.io/guidelines/).
27
+ You can find more details for contributing in the [CONTRIBUTING.md](CONTRIBUTING.md).
28
+
29
+ # Provide Feedback
30
+
31
+ If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-storage-ruby/issues) section of the project.
32
+
33
+ # Azure Storage SDKs and Tooling
34
+
35
+ * [Azure Storage Client Library for .Net](http://github.com/azure/azure-storage-net)
36
+ * [Azure Storage Client Library for Java](http://github.com/azure/azure-storage-java)
37
+ * [Azure Storage Client Library for Node.js](http://github.com/azure/azure-storage-node)
38
+ * [Azure Storage Client Library for Python](http://github.com/azure/azure-storage-python)
39
+ * [Azure Storage Client Library for Ruby](http://github.com/azure/azure-storage-ruby)
40
+ * [Azure Storage Client Library for C++](http://github.com/azure/azure-storage-cpp)
41
+ * [Azure Storage Client Library for PHP](http://github.com/azure/azure-storage-php)
42
+ * [Azure Storage Blob Client Library for Go](https://github.com/Azure/azure-storage-blob-go)
43
+ * [Azure Storage Client Library for iOS](http://github.com/azure/azure-storage-ios)
44
+ * [Azure Storage Client Library for Android](http://github.com/azure/azure-storage-android)
45
+ * [Azure Storage Data Movement Library](https://github.com/Azure/azure-storage-net-data-movement)
46
+
47
+ # Code of Conduct
48
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.