stashify-aws-s3 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +8 -5
- data/lib/stashify/aws/s3/version.rb +1 -1
- data/lib/stashify/directory/aws/s3.rb +12 -7
- data/lib/stashify/file/aws/s3.rb +4 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2d92f216c0ac762098278c4893270d42d7bb70fb9e5bf0877c2540c811b60fc
|
4
|
+
data.tar.gz: a3993a29801b0cc4ab4ca3861760ab1a75141d2f9d035bbd4462a3c9baa0232c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98ad66cbd51d5809df61c81bbe6fb584b0af056d90770679538e1c36f935162a5a4f9eca795041f88ddd8fc1a0487215101523bf19b6ef6ba91fb5b503421958
|
7
|
+
data.tar.gz: 8bd45401e6b9e7a8a6b20e5edcc051d90045beb1473993409ae74e3916e4c665330bdf3ed7a87a2c442ea84eb65ed7e4f4cb150cc786b70173ee7f8f7afb3abd
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stashify-aws-s3 (
|
4
|
+
stashify-aws-s3 (1.1.0)
|
5
5
|
aws-sdk-s3 (~> 1.119.2)
|
6
|
-
stashify (~> 3.
|
6
|
+
stashify (~> 3.1.0)
|
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.
|
13
|
+
aws-partitions (1.739.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)
|
@@ -107,7 +107,10 @@ GEM
|
|
107
107
|
parser (>= 3.2.1.0)
|
108
108
|
ruby-progressbar (1.13.0)
|
109
109
|
shellany (0.0.1)
|
110
|
-
stashify (3.
|
110
|
+
stashify (3.1.0)
|
111
|
+
stashify-contract (1.0.1)
|
112
|
+
rantly (~> 2.0.0)
|
113
|
+
rspec (~> 3.0)
|
111
114
|
thor (1.2.1)
|
112
115
|
unicode-display_width (2.4.2)
|
113
116
|
|
@@ -121,11 +124,11 @@ DEPENDENCIES
|
|
121
124
|
guard-rspec
|
122
125
|
guard-rubocop
|
123
126
|
rake (~> 13.0)
|
124
|
-
rantly
|
125
127
|
reek (~> 6.1.4)
|
126
128
|
rspec (~> 3.0)
|
127
129
|
rubocop (~> 1.21)
|
128
130
|
stashify-aws-s3!
|
131
|
+
stashify-contract
|
129
132
|
|
130
133
|
BUNDLED WITH
|
131
134
|
2.2.33
|
@@ -14,6 +14,13 @@ module Stashify
|
|
14
14
|
super(path: path)
|
15
15
|
end
|
16
16
|
|
17
|
+
def parent
|
18
|
+
Stashify::Directory::AWS::S3.new(
|
19
|
+
bucket: @bucket,
|
20
|
+
path: ::File.dirname(path),
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
17
24
|
def files
|
18
25
|
@bucket.objects.map do |object|
|
19
26
|
key = object.key
|
@@ -21,12 +28,6 @@ module Stashify
|
|
21
28
|
end.compact
|
22
29
|
end
|
23
30
|
|
24
|
-
def ==(other)
|
25
|
-
self.class == other.class && @bucket == other.bucket && path == other.path
|
26
|
-
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
31
|
def directory?(name)
|
31
32
|
@bucket.objects(prefix: path_of(name, "")).count.positive?
|
32
33
|
end
|
@@ -35,13 +36,17 @@ module Stashify
|
|
35
36
|
Stashify::Directory::AWS::S3.new(bucket: @bucket, path: path_of(name))
|
36
37
|
end
|
37
38
|
|
38
|
-
def
|
39
|
+
def exists?(name)
|
39
40
|
@bucket.object(::File.join(path, name)).exists?
|
40
41
|
end
|
41
42
|
|
42
43
|
def file(name)
|
43
44
|
Stashify::File::AWS::S3.new(bucket: @bucket, path: ::File.join(path, name))
|
44
45
|
end
|
46
|
+
|
47
|
+
def ==(other)
|
48
|
+
self.class == other.class && @bucket == other.bucket && path == other.path
|
49
|
+
end
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
data/lib/stashify/file/aws/s3.rb
CHANGED
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.
|
4
|
+
version: 1.1.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-
|
11
|
+
date: 2023-04-01 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.
|
33
|
+
version: 3.1.0
|
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.
|
40
|
+
version: 3.1.0
|
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
|