stashify-microsoft-azure-storage-blob 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f362690b51717f2929c5094f92697ac2c5fd9f2be42705c8906d8babe89ae7b
4
- data.tar.gz: d39a411efe8df9b899657f779c6223d0d389816af222e307870e282191f77fb4
3
+ metadata.gz: 9bf4a5c60d0c540b066d9f8f6136ed1b1e4eedfb7c29abe9f63c6ba27c3249a4
4
+ data.tar.gz: 7d5acba2556225832082e647adcd26383db572697433825e1afa8dd572953437
5
5
  SHA512:
6
- metadata.gz: bb7c749c53a8e66dc478364bbee8188e49cd4512cdc52a204f7c570a6d5e92b6399ae6be16cf33337f528db2998fcd43460a9f7d1e7576c517b5a6781e95b338
7
- data.tar.gz: 70ef742cc743e5b4e777ef62666843400f64cf8128ae41e2cf1bcfb766583d2086e341982a077761f54adea7ffcb692d6a901f8b7dbe947e43a08362e9db97a1
6
+ metadata.gz: 6ffe30f9f84580e9cceb14cc2a1dfe8faa0e46b3bcdfd8cddd64c76e2c9c3f366c8ba7b031fb7df4d57096267bc00d3d43c8a303e918403443ae962e7c2f842f
7
+ data.tar.gz: 0a9c013a77bb3ad60e28126da53bc80877f5a966c57c629b2a123767bcc20270770c5f253e4cafdfb7696413f181e85661e62b0897d55caee3f5694253761ae8
data/.reek.yml CHANGED
@@ -1,7 +1,4 @@
1
1
  detectors:
2
- IrresponsibleModule:
3
- enabled: false
4
-
5
2
  UncommunicativeVariableName:
6
3
  accept:
7
4
  - e
data/.rubocop.yml CHANGED
@@ -2,9 +2,6 @@ AllCops:
2
2
  TargetRubyVersion: 2.6
3
3
  NewCops: enable
4
4
 
5
- Style/Documentation:
6
- Enabled: false
7
-
8
5
  Style/StringLiterals:
9
6
  Enabled: true
10
7
  EnforcedStyle: double_quotes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stashify-microsoft-azure-storage-blob (1.0.0)
4
+ stashify-microsoft-azure-storage-blob (1.0.1)
5
5
  azure-storage-blob (~> 2.0.3)
6
6
  stashify (~> 3.1.0)
7
7
 
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Stashify::Microsoft::Azure::Storage::Blob
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/stashify/microsoft/azure/storage/blob`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This is an implementation of the [Stashify](https://rubydoc.info/gems/stashify) abstraction for Azure Blob Storage. It operates under the assumption that the "/" in file names has the typical meaning of a path separater.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,35 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ This implementation is built expecting an instance of `Azure::Storage::Blob::BlobService` and `Azure::Storage::Blob::Container::Container`. The following usage is an abbreviated form to illustrate how to engage in this particular library. For a more extensive example see [Stashify's Usage](https://rubydoc.info/gems/stashify#usage).
24
+
25
+ ```ruby
26
+ > require "azure/storage/blob"
27
+ => true
28
+ > client = Azure::Storage::Blob::BlobService.create
29
+ =>
30
+ #<Azure::Storage::Blob::BlobService:0x0000563aa41d14a8
31
+ > container = Azure::Storage::Blob::Container::Container.new
32
+ =>
33
+ ...
34
+ > container.name = "some-container"
35
+ ...
36
+ > file = Stashify::File::Microsoft::Azure::Storage::Blob.new(client: client,
37
+ container: container, path: "path/to/file")
38
+ =>
39
+ #<Stashify::File::Microsoft::Azure::Storage::Blob:0x0000555afaadd6f8
40
+ ...
41
+ > file.contents
42
+ => "foo"
43
+ > require "stashify/directory/microsoft/azure/storage/blob"
44
+ => true
45
+ > dir = Stashify::Directory::Microsoft::Azure::Storage::Blob.new(client: client, container: container, path: "path/to")
46
+ =>
47
+ #<Stashify::Directory::Microsoft::Azure::Storage::Blob:0x0000555afa40c7c0
48
+ ...
49
+ > dir.find("file") == file
50
+ => true
51
+ ```
26
52
 
27
53
  ## Development
28
54
 
@@ -9,6 +9,12 @@ module Stashify
9
9
  module Microsoft
10
10
  module Azure
11
11
  module Storage
12
+ # An implementation for interacting with Azure Blob Storage
13
+ # as if they had directories with "/" as a path
14
+ # separator. In addition to a path, it also needs a
15
+ # Azure::Storage::Blob::BlobService and
16
+ # Azure::Storage::Blob::Container::Container objects
17
+ # representing the container the file resides within.
12
18
  class Blob < Stashify::Directory
13
19
  attr_reader :container
14
20
 
@@ -7,6 +7,11 @@ module Stashify
7
7
  module Microsoft
8
8
  module Azure
9
9
  module Storage
10
+ # An implementation for interacting with files in Azure Blob
11
+ # Storage. The constructor needs an instance of
12
+ # Azure::Storage::Blob::BlobService and
13
+ # Azure::Storage::Blob::Container::Container in order to
14
+ # know which bucket to interact with.
10
15
  class Blob < Stashify::File
11
16
  def initialize(client:, container:, path:)
12
17
  @client = client
@@ -5,7 +5,7 @@ module Stashify
5
5
  module Azure
6
6
  module Storage
7
7
  module Blob
8
- VERSION = "1.0.0"
8
+ VERSION = "1.0.1"
9
9
  end
10
10
  end
11
11
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/stashify/microsoft/azure/storage/blob/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "stashify-microsoft-azure-storage-blob"
7
+ spec.version = Stashify::Microsoft::Azure::Storage::Blob::VERSION
8
+ spec.authors = ["Lambda Null"]
9
+ spec.email = ["lambda.null.42@gmail.com"]
10
+
11
+ spec.summary = "An implementation of the Stashify abstraction for Azure's Blob Storage"
12
+ spec.description = "Interact with Azure Blob Storage using the common building blocks provided by Stashify"
13
+ spec.homepage = "https://github.com/Lambda-Null/stashify-microsoft-azure-storage-blob"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = spec.homepage
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ # spec.add_dependency "example-gem", "~> 1.0"
33
+ spec.add_dependency "azure-storage-blob", "~> 2.0.3"
34
+ spec.add_dependency "stashify", "~> 3.1.0"
35
+
36
+ # For more information and examples about making a new gem, checkout our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ spec.metadata["rubygems_mfa_required"] = "true"
39
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stashify-microsoft-azure-storage-blob
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lambda Null
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-02 00:00:00.000000000 Z
11
+ date: 2023-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: azure-storage-blob
@@ -63,6 +63,7 @@ files:
63
63
  - lib/stashify/microsoft/azure/storage/blob.rb
64
64
  - lib/stashify/microsoft/azure/storage/blob/version.rb
65
65
  - sig/stashify/microsoft/azure/storage/blob.rbs
66
+ - stashify-microsoft-azure-storage-blob.gemspec
66
67
  homepage: https://github.com/Lambda-Null/stashify-microsoft-azure-storage-blob
67
68
  licenses:
68
69
  - MIT