azure-storage-file 1.0.0 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{file/lib → lib}/azure/storage/file/autoload.rb +45 -45
- data/{file/lib → lib}/azure/storage/file/default.rb +101 -101
- data/{file/lib → lib}/azure/storage/file/directory.rb +284 -284
- data/{file/lib → lib}/azure/storage/file/file.rb +673 -673
- data/{file/lib → lib}/azure/storage/file/file_service.rb +346 -343
- data/{file/lib → lib}/azure/storage/file/serialization.rb +228 -228
- data/{file/lib → lib}/azure/storage/file/share.rb +377 -377
- data/{file/lib → lib}/azure/storage/file/version.rb +49 -49
- data/{file/lib → lib}/azure/storage/file.rb +26 -26
- metadata +19 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c6891d30d48a52a5e0541c7d69072fe0c9e4055
|
4
|
+
data.tar.gz: 3714502d550b6fc8d608009b5f49f8ac52028e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5fd378be0b36933bd70a671d1e06906edfa36e1abf1ebece0cee90f950421d5a52e7961198ecffa18e4d83b16a81453fac98e973a0d77176ae1dcbf90f7b621
|
7
|
+
data.tar.gz: 2d729d3caffcf32552e383913947f045f7741929656abf2df39d6f98dc109c52770e4f7cf0db550104179d9f6988abc11fc836d2ade0f23bdf5394c64a136a62
|
@@ -1,45 +1,45 @@
|
|
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
|
-
|
27
|
-
require "rubygems"
|
28
|
-
require "nokogiri"
|
29
|
-
require "base64"
|
30
|
-
|
31
|
-
require "azure/storage/common"
|
32
|
-
|
33
|
-
module Azure
|
34
|
-
module Storage
|
35
|
-
module File
|
36
|
-
autoload :Default, "azure/storage/file/default"
|
37
|
-
autoload :Version, "azure/storage/file/version"
|
38
|
-
autoload :FileService, "azure/storage/file/file_service"
|
39
|
-
autoload :Share, "azure/storage/file/share"
|
40
|
-
autoload :Directory, "azure/storage/file/directory"
|
41
|
-
autoload :File, "azure/storage/file/file"
|
42
|
-
autoload :Serialization, "azure/storage/file/serialization"
|
43
|
-
end
|
44
|
-
end
|
45
|
-
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
|
+
|
27
|
+
require "rubygems"
|
28
|
+
require "nokogiri"
|
29
|
+
require "base64"
|
30
|
+
|
31
|
+
require "azure/storage/common"
|
32
|
+
|
33
|
+
module Azure
|
34
|
+
module Storage
|
35
|
+
module File
|
36
|
+
autoload :Default, "azure/storage/file/default"
|
37
|
+
autoload :Version, "azure/storage/file/version"
|
38
|
+
autoload :FileService, "azure/storage/file/file_service"
|
39
|
+
autoload :Share, "azure/storage/file/share"
|
40
|
+
autoload :Directory, "azure/storage/file/directory"
|
41
|
+
autoload :File, "azure/storage/file/file"
|
42
|
+
autoload :Serialization, "azure/storage/file/serialization"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -1,101 +1,101 @@
|
|
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
|
-
|
27
|
-
require "rbconfig"
|
28
|
-
require "azure/storage/file/version"
|
29
|
-
|
30
|
-
module Azure::Storage::File
|
31
|
-
module Default
|
32
|
-
# Default REST service (STG) version number
|
33
|
-
STG_VERSION = "2016-05-31"
|
34
|
-
|
35
|
-
# The number of default concurrent requests for parallel operation.
|
36
|
-
DEFAULT_PARALLEL_OPERATION_THREAD_COUNT = 1
|
37
|
-
|
38
|
-
# Constant representing a kilobyte (Non-SI version).
|
39
|
-
KB = 1024
|
40
|
-
# Constant representing a megabyte (Non-SI version).
|
41
|
-
MB = 1024 * 1024
|
42
|
-
# Constant representing a gigabyte (Non-SI version).
|
43
|
-
GB = 1024 * 1024 * 1024
|
44
|
-
|
45
|
-
# Specifies HTTP.
|
46
|
-
HTTP = "http"
|
47
|
-
# Specifies HTTPS.
|
48
|
-
HTTPS = "https"
|
49
|
-
# Default HTTP port.
|
50
|
-
DEFAULT_HTTP_PORT = 80
|
51
|
-
# Default HTTPS port.
|
52
|
-
DEFAULT_HTTPS_PORT = 443
|
53
|
-
|
54
|
-
# Marker for atom metadata.
|
55
|
-
XML_METADATA_MARKER = "$"
|
56
|
-
# Marker for atom value.
|
57
|
-
XML_VALUE_MARKER = "_"
|
58
|
-
|
59
|
-
# Default value for Content-Type if request has body.
|
60
|
-
CONTENT_TYPE_VALUE = "application/octet-stream"
|
61
|
-
|
62
|
-
# Default User Agent header string
|
63
|
-
USER_AGENT = "Azure-Storage/#{Azure::Storage::File::Version.to_uas}-#{Azure::Storage::Common::Version.to_uas} (Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}; #{Azure::Storage::Common::Default.os})".freeze
|
64
|
-
end
|
65
|
-
|
66
|
-
# Defines constants for use with file operations.
|
67
|
-
module FileConstants
|
68
|
-
# The default write size, in bytes, used by file streams.
|
69
|
-
DEFAULT_WRITE_SIZE_IN_BYTES = 4 * 1024 * 1024
|
70
|
-
|
71
|
-
# The maximum range size when requesting for a contentMD5.
|
72
|
-
MAX_RANGE_GET_SIZE_WITH_MD5 = 4 * 1024 * 1024
|
73
|
-
|
74
|
-
# The maximum range size for a file update operation.
|
75
|
-
MAX_UPDATE_FILE_SIZE = 4 * 1024 * 1024
|
76
|
-
|
77
|
-
# The default minimum size, in bytes, of a file when it must be separated into ranges.
|
78
|
-
DEFAULT_SINGLE_FILE_GET_THRESHOLD_IN_BYTES = 32 * 1024 * 1024
|
79
|
-
|
80
|
-
# The minimum write file size, in bytes, used by file streams.
|
81
|
-
MIN_WRITE_FILE_SIZE_IN_BYTES = 2 * 1024 * 1024
|
82
|
-
|
83
|
-
# Put range write options
|
84
|
-
module RangeWriteOptions
|
85
|
-
UPDATE = "update"
|
86
|
-
CLEAR = "clear"
|
87
|
-
end
|
88
|
-
|
89
|
-
# Resource types.
|
90
|
-
module ResourceTypes
|
91
|
-
SHARE = "s"
|
92
|
-
FILE = "f"
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
module FileErrorCodeStrings
|
97
|
-
SHARE_ALREADY_EXISTS = "ShareAlreadyExists"
|
98
|
-
SHARE_NOT_FOUND = "ShareNotFound"
|
99
|
-
FILE_NOT_FOUND = "FileNotFound"
|
100
|
-
end
|
101
|
-
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
|
+
|
27
|
+
require "rbconfig"
|
28
|
+
require "azure/storage/file/version"
|
29
|
+
|
30
|
+
module Azure::Storage::File
|
31
|
+
module Default
|
32
|
+
# Default REST service (STG) version number
|
33
|
+
STG_VERSION = "2016-05-31"
|
34
|
+
|
35
|
+
# The number of default concurrent requests for parallel operation.
|
36
|
+
DEFAULT_PARALLEL_OPERATION_THREAD_COUNT = 1
|
37
|
+
|
38
|
+
# Constant representing a kilobyte (Non-SI version).
|
39
|
+
KB = 1024
|
40
|
+
# Constant representing a megabyte (Non-SI version).
|
41
|
+
MB = 1024 * 1024
|
42
|
+
# Constant representing a gigabyte (Non-SI version).
|
43
|
+
GB = 1024 * 1024 * 1024
|
44
|
+
|
45
|
+
# Specifies HTTP.
|
46
|
+
HTTP = "http"
|
47
|
+
# Specifies HTTPS.
|
48
|
+
HTTPS = "https"
|
49
|
+
# Default HTTP port.
|
50
|
+
DEFAULT_HTTP_PORT = 80
|
51
|
+
# Default HTTPS port.
|
52
|
+
DEFAULT_HTTPS_PORT = 443
|
53
|
+
|
54
|
+
# Marker for atom metadata.
|
55
|
+
XML_METADATA_MARKER = "$"
|
56
|
+
# Marker for atom value.
|
57
|
+
XML_VALUE_MARKER = "_"
|
58
|
+
|
59
|
+
# Default value for Content-Type if request has body.
|
60
|
+
CONTENT_TYPE_VALUE = "application/octet-stream"
|
61
|
+
|
62
|
+
# Default User Agent header string
|
63
|
+
USER_AGENT = "Azure-Storage/#{Azure::Storage::File::Version.to_uas}-#{Azure::Storage::Common::Version.to_uas} (Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}; #{Azure::Storage::Common::Default.os})".freeze
|
64
|
+
end
|
65
|
+
|
66
|
+
# Defines constants for use with file operations.
|
67
|
+
module FileConstants
|
68
|
+
# The default write size, in bytes, used by file streams.
|
69
|
+
DEFAULT_WRITE_SIZE_IN_BYTES = 4 * 1024 * 1024
|
70
|
+
|
71
|
+
# The maximum range size when requesting for a contentMD5.
|
72
|
+
MAX_RANGE_GET_SIZE_WITH_MD5 = 4 * 1024 * 1024
|
73
|
+
|
74
|
+
# The maximum range size for a file update operation.
|
75
|
+
MAX_UPDATE_FILE_SIZE = 4 * 1024 * 1024
|
76
|
+
|
77
|
+
# The default minimum size, in bytes, of a file when it must be separated into ranges.
|
78
|
+
DEFAULT_SINGLE_FILE_GET_THRESHOLD_IN_BYTES = 32 * 1024 * 1024
|
79
|
+
|
80
|
+
# The minimum write file size, in bytes, used by file streams.
|
81
|
+
MIN_WRITE_FILE_SIZE_IN_BYTES = 2 * 1024 * 1024
|
82
|
+
|
83
|
+
# Put range write options
|
84
|
+
module RangeWriteOptions
|
85
|
+
UPDATE = "update"
|
86
|
+
CLEAR = "clear"
|
87
|
+
end
|
88
|
+
|
89
|
+
# Resource types.
|
90
|
+
module ResourceTypes
|
91
|
+
SHARE = "s"
|
92
|
+
FILE = "f"
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
module FileErrorCodeStrings
|
97
|
+
SHARE_ALREADY_EXISTS = "ShareAlreadyExists"
|
98
|
+
SHARE_NOT_FOUND = "ShareNotFound"
|
99
|
+
FILE_NOT_FOUND = "FileNotFound"
|
100
|
+
end
|
101
|
+
end
|