stashify-aws-s3 1.1.0 → 1.2.0

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
  SHA256:
3
- metadata.gz: e2d92f216c0ac762098278c4893270d42d7bb70fb9e5bf0877c2540c811b60fc
4
- data.tar.gz: a3993a29801b0cc4ab4ca3861760ab1a75141d2f9d035bbd4462a3c9baa0232c
3
+ metadata.gz: ce717afda57c7d79f38076ed0a99d31a30addd862130127c39e0b1cd4e9b74e0
4
+ data.tar.gz: 4d8201ac2421c564ac6ddd315d6423349d6f9ec9be14fc3fa106f5884ce1ba3c
5
5
  SHA512:
6
- metadata.gz: 98ad66cbd51d5809df61c81bbe6fb584b0af056d90770679538e1c36f935162a5a4f9eca795041f88ddd8fc1a0487215101523bf19b6ef6ba91fb5b503421958
7
- data.tar.gz: 8bd45401e6b9e7a8a6b20e5edcc051d90045beb1473993409ae74e3916e4c665330bdf3ed7a87a2c442ea84eb65ed7e4f4cb150cc786b70173ee7f8f7afb3abd
6
+ metadata.gz: 105eeb1a4271a585ffea9e05dd8accfc38ad2cf95b36d75d8c43f40e202320f7c45fd3ca3fd20fafe0a27b4470cb8b349576686867ce6063f51b1f9d3ff71272
7
+ data.tar.gz: ee603c5f9313be928fde0d3fb470595af324d6b21c042fb62e6103650b442675a63bbf7ec2d4aae550b246d1594ee986333d96335f2a39660e9206400aa28294
data/.reek.yml CHANGED
@@ -1,7 +1,4 @@
1
1
  detectors:
2
- IrresponsibleModule:
3
- enabled: false
4
-
5
2
  UncommunicativeModuleName:
6
3
  accept:
7
4
  - Stashify::AWS::S3
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,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stashify-aws-s3 (1.1.0)
4
+ stashify-aws-s3 (1.2.0)
5
5
  aws-sdk-s3 (~> 1.119.2)
6
- stashify (~> 3.1.0)
6
+ stashify (~> 3.2.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
12
  aws-eventstream (1.2.0)
13
- aws-partitions (1.739.0)
13
+ aws-partitions (1.743.0)
14
14
  aws-sdk-core (3.171.0)
15
15
  aws-eventstream (~> 1, >= 1.0.2)
16
16
  aws-partitions (~> 1, >= 1.651.0)
@@ -63,7 +63,7 @@ GEM
63
63
  nenv (~> 0.1)
64
64
  shellany (~> 0.0)
65
65
  parallel (1.22.1)
66
- parser (3.2.1.1)
66
+ parser (3.2.2.0)
67
67
  ast (~> 2.4.1)
68
68
  pry (0.14.2)
69
69
  coderay (~> 1.1)
@@ -93,21 +93,21 @@ GEM
93
93
  diff-lcs (>= 1.2.0, < 2.0)
94
94
  rspec-support (~> 3.12.0)
95
95
  rspec-support (3.12.0)
96
- rubocop (1.48.1)
96
+ rubocop (1.49.0)
97
97
  json (~> 2.3)
98
98
  parallel (~> 1.10)
99
99
  parser (>= 3.2.0.0)
100
100
  rainbow (>= 2.2.2, < 4.0)
101
101
  regexp_parser (>= 1.8, < 3.0)
102
102
  rexml (>= 3.2.5, < 4.0)
103
- rubocop-ast (>= 1.26.0, < 2.0)
103
+ rubocop-ast (>= 1.28.0, < 2.0)
104
104
  ruby-progressbar (~> 1.7)
105
105
  unicode-display_width (>= 2.4.0, < 3.0)
106
106
  rubocop-ast (1.28.0)
107
107
  parser (>= 3.2.1.0)
108
108
  ruby-progressbar (1.13.0)
109
109
  shellany (0.0.1)
110
- stashify (3.1.0)
110
+ stashify (3.2.1)
111
111
  stashify-contract (1.0.1)
112
112
  rantly (~> 2.0.0)
113
113
  rspec (~> 3.0)
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Stashify::Aws::S3
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/aws/s3`. 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 AWS S3. 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,28 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ This implementation is built on top of an instance of `Aws::S3::Bucket`. 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 "aws-sdk-s3"
27
+ => true
28
+ > s3 = Aws::S3::Resource.new
29
+ => #<Aws::S3::Resource:0x0000558723dad2e8 @client=#<Aws::S3::Client>>
30
+ irb(main):005:0> bucket = s3.bucket("some-bucket")
31
+ =>
32
+ #<Aws::S3::Bucket:0x0000558723f5a6e0
33
+ ...
34
+ > file.contents
35
+ => "foo"
36
+ > require "stashify/directory/aws/s3"
37
+ => true
38
+ > dir = Stashify::Directory::AWS::S3.new(bucket: bucket, path: "path/to")
39
+ =>
40
+ #<Stashify::Directory::AWS::S3:0x000055872460c628
41
+ ...
42
+ > dir.find("file") == file
43
+ => true
44
+ ```
26
45
 
27
46
  ## Development
28
47
 
@@ -3,7 +3,7 @@
3
3
  module Stashify
4
4
  module AWS
5
5
  module S3
6
- VERSION = "1.1.0"
6
+ VERSION = "1.2.0"
7
7
  end
8
8
  end
9
9
  end
@@ -6,6 +6,10 @@ require "stashify/file/aws/s3"
6
6
  module Stashify
7
7
  class Directory
8
8
  module AWS
9
+ # An implementation for interacting with AWS S3 buckets as if
10
+ # they had directories with "/" as a path separator. In
11
+ # addition to a path, it also needs a Aws::S3::Bucket object
12
+ # representing the bucket the file resides within.
9
13
  class S3 < Stashify::Directory
10
14
  attr_reader :bucket, :path
11
15
 
@@ -5,6 +5,9 @@ require "stashify/file"
5
5
  module Stashify
6
6
  class File
7
7
  module AWS
8
+ # An implementation for interacting with files in AWS S3
9
+ # buckets. The constructor needs an instance of Aws::S3::Bucket
10
+ # order to know which bucket to interact with.
8
11
  class S3 < Stashify::File
9
12
  def initialize(bucket:, path:)
10
13
  @bucket = bucket
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/stashify/aws/s3/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "stashify-aws-s3"
7
+ spec.version = Stashify::AWS::S3::VERSION
8
+ spec.authors = ["Lambda Null"]
9
+ spec.email = ["lambda.null.42@gmail.com"]
10
+
11
+ spec.summary = "An AWS S3 implementation of the Stashify abstraction"
12
+ spec.description = "Interact with AWS S3 using the common building blocks provided by Stashify"
13
+ spec.homepage = "https://github.com/Lambda-Null/stashify-aws-s3"
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 "aws-sdk-s3", "~> 1.119.2"
34
+ spec.add_dependency "stashify", "~> 3.2.1"
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-aws-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
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-01 00:00:00.000000000 Z
11
+ date: 2023-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.1.0
33
+ version: 3.2.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.1.0
40
+ version: 3.2.1
41
41
  description: Interact with AWS S3 using the common building blocks provided by Stashify
42
42
  email:
43
43
  - lambda.null.42@gmail.com
@@ -57,11 +57,11 @@ files:
57
57
  - Rakefile
58
58
  - bin/console
59
59
  - bin/setup
60
- - lib/stashify/aws/s3.rb
61
60
  - lib/stashify/aws/s3/version.rb
62
61
  - lib/stashify/directory/aws/s3.rb
63
62
  - lib/stashify/file/aws/s3.rb
64
63
  - sig/stashify/aws/s3.rbs
64
+ - stashify-aws-s3.gemspec
65
65
  homepage: https://github.com/Lambda-Null/stashify-aws-s3
66
66
  licenses:
67
67
  - MIT
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "s3/version"
4
-
5
- module Stashify
6
- module AWS
7
- module S3
8
- end
9
- end
10
- end