stashify-google-cloud-storage 2.0.0 → 3.1.0
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/Gemfile +1 -1
- data/Gemfile.lock +9 -6
- data/lib/stashify/directory/google/cloud/storage.rb +9 -15
- data/lib/stashify/file/google/cloud/storage.rb +15 -0
- data/lib/stashify/google/cloud/storage/version.rb +1 -1
- 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: 13c38a2c3e9b7459ce0c579ce8811bed99d9e982d8d3560cb14c866f3f19cf2c
|
|
4
|
+
data.tar.gz: 8ae15cf5d924de45be2dedb43ab52a455e8fd374dd239b82d325c81e9ad8572a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aca97733dfa8377147faf342fbfd221a116a96540a854f90235e67ea02c9e9295267df864e57047914d5e85c13d396b69b5582ba9117d33072fc70444efd74eb
|
|
7
|
+
data.tar.gz: c18f6614c5d47e13fd920ff45afe6895d7a53334b1203f10ed0cb886a2999fb443333ba9e6319b8f3be0133b3287f5a2ea93df3c9451672831b6304dedf14c07
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
stashify-google-cloud-storage (
|
|
4
|
+
stashify-google-cloud-storage (3.1.0)
|
|
5
5
|
google-cloud-storage (~> 1.44.0)
|
|
6
|
-
stashify (~>
|
|
6
|
+
stashify (~> 3.1.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
addressable (2.8.
|
|
11
|
+
addressable (2.8.2)
|
|
12
12
|
public_suffix (>= 2.0.2, < 6.0)
|
|
13
13
|
ast (2.4.2)
|
|
14
14
|
byebug (11.1.3)
|
|
@@ -127,7 +127,7 @@ GEM
|
|
|
127
127
|
rspec-expectations (3.12.2)
|
|
128
128
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
129
129
|
rspec-support (~> 3.12.0)
|
|
130
|
-
rspec-mocks (3.12.
|
|
130
|
+
rspec-mocks (3.12.5)
|
|
131
131
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
132
132
|
rspec-support (~> 3.12.0)
|
|
133
133
|
rspec-support (3.12.0)
|
|
@@ -151,7 +151,10 @@ GEM
|
|
|
151
151
|
faraday (>= 0.17.5, < 3.a)
|
|
152
152
|
jwt (>= 1.5, < 3.0)
|
|
153
153
|
multi_json (~> 1.10)
|
|
154
|
-
stashify (
|
|
154
|
+
stashify (3.1.0)
|
|
155
|
+
stashify-contract (1.0.1)
|
|
156
|
+
rantly (~> 2.0.0)
|
|
157
|
+
rspec (~> 3.0)
|
|
155
158
|
thor (1.2.1)
|
|
156
159
|
trailblazer-option (0.1.2)
|
|
157
160
|
uber (0.1.0)
|
|
@@ -168,10 +171,10 @@ DEPENDENCIES
|
|
|
168
171
|
guard-rspec
|
|
169
172
|
guard-rubocop
|
|
170
173
|
rake (~> 13.0)
|
|
171
|
-
rantly
|
|
172
174
|
reek (~> 6.1.4)
|
|
173
175
|
rspec (~> 3.0)
|
|
174
176
|
rubocop (~> 1.21)
|
|
177
|
+
stashify-contract
|
|
175
178
|
stashify-google-cloud-storage!
|
|
176
179
|
|
|
177
180
|
BUNDLED WITH
|
|
@@ -16,29 +16,19 @@ module Stashify
|
|
|
16
16
|
super(path: path)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
def parent
|
|
20
|
+
Stashify::Directory::Google::Cloud::Storage.new(
|
|
21
|
+
bucket: @bucket,
|
|
22
|
+
path: ::File.dirname(path),
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def delete_file(name)
|
|
27
|
-
@bucket.file(path_of(name)).delete
|
|
28
|
-
end
|
|
29
|
-
|
|
30
26
|
def files
|
|
31
27
|
@bucket.files.map do |gcloud_file|
|
|
32
28
|
find(::Regexp.last_match(1)) if gcloud_file.name =~ %r{^#{Regexp.escape(path)}/([^/]*)(/.*)?$}
|
|
33
29
|
end.compact
|
|
34
30
|
end
|
|
35
31
|
|
|
36
|
-
def ==(other)
|
|
37
|
-
self.class == other.class && @bucket == other.bucket && path == other.path
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
private
|
|
41
|
-
|
|
42
32
|
def directory?(name)
|
|
43
33
|
path = path_of(name)
|
|
44
34
|
!@bucket.file(path) && !@bucket.files(prefix: path).empty?
|
|
@@ -48,13 +38,17 @@ module Stashify
|
|
|
48
38
|
Stashify::Directory::Google::Cloud::Storage.new(bucket: @bucket, path: path_of(name))
|
|
49
39
|
end
|
|
50
40
|
|
|
51
|
-
def
|
|
41
|
+
def exists?(name)
|
|
52
42
|
@bucket.file(path_of(name))
|
|
53
43
|
end
|
|
54
44
|
|
|
55
45
|
def file(name)
|
|
56
46
|
Stashify::File::Google::Cloud::Storage.new(bucket: @bucket, path: path_of(name))
|
|
57
47
|
end
|
|
48
|
+
|
|
49
|
+
def ==(other)
|
|
50
|
+
self.class == other.class && @bucket == other.bucket && path == other.path
|
|
51
|
+
end
|
|
58
52
|
end
|
|
59
53
|
end
|
|
60
54
|
end
|
|
@@ -15,6 +15,21 @@ module Stashify
|
|
|
15
15
|
def contents
|
|
16
16
|
@bucket.file(path).download.string
|
|
17
17
|
end
|
|
18
|
+
|
|
19
|
+
def write(contents)
|
|
20
|
+
@bucket.create_file(
|
|
21
|
+
StringIO.new(contents),
|
|
22
|
+
path,
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def delete
|
|
27
|
+
@bucket.file(path).delete
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def exists?
|
|
31
|
+
@bucket.file(path)
|
|
32
|
+
end
|
|
18
33
|
end
|
|
19
34
|
end
|
|
20
35
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stashify-google-cloud-storage
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.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: google-cloud-storage
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
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:
|
|
40
|
+
version: 3.1.0
|
|
41
41
|
description: Interact with Google Cloud Storage using the common building blocks provided
|
|
42
42
|
by Stashify
|
|
43
43
|
email:
|