bfs-gs 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bfs/bucket/gs.rb +2 -1
- data/spec/bfs/bucket/gs_spec.rb +2 -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: '07979739046a829f6b63c0c83e5405fa91f1d8cb602ae9c921d6bb330dd85f1c'
|
4
|
+
data.tar.gz: 645e9c6eb121efd9f872ef028c2630eb0e4db7672053b004550dcc8e412359bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 463ddade4c9135d1f08ef08320b94535113f0ce9dde7645342def7dd69006cf68d808dbc8c4bfddf3787432c07a157ade9ff2a12cb760333ffa058112bc02a95
|
7
|
+
data.tar.gz: a0e7accd57342843962cb5c95db971becf5f42d453656dd0ce03236ec03914673f7ca4feab5e569b2dd8eac188287b05acacc80da626e3d5deb7010a152106bc
|
data/lib/bfs/bucket/gs.rb
CHANGED
@@ -59,11 +59,12 @@ module BFS
|
|
59
59
|
raise BFS::FileNotFound, trim_prefix(path) unless file
|
60
60
|
|
61
61
|
name = trim_prefix(file.name)
|
62
|
-
BFS::FileInfo.new(name, file.size, file.updated_at.to_time, file.content_type, file.metadata)
|
62
|
+
BFS::FileInfo.new(name, file.size, file.updated_at.to_time, file.content_type, norm_meta(file.metadata))
|
63
63
|
end
|
64
64
|
|
65
65
|
# Creates a new file and opens it for writing
|
66
66
|
def create(path, opts={}, &block)
|
67
|
+
opts[:metadata] = norm_meta(opts[:metadata])
|
67
68
|
path = full_path(path)
|
68
69
|
enc = opts.delete(:encoding) || @encoding
|
69
70
|
temp = BFS::TempWriter.new(path, encoding: enc) do |t|
|
data/spec/bfs/bucket/gs_spec.rb
CHANGED
@@ -11,7 +11,8 @@ run_spec = \
|
|
11
11
|
begin
|
12
12
|
s = Google::Cloud::Storage.new(project_id: sandbox[:project])
|
13
13
|
!s.bucket(sandbox[:bucket]).nil?
|
14
|
-
rescue Signet::AuthorizationError
|
14
|
+
rescue Signet::AuthorizationError => e
|
15
|
+
warn "WARNING: unable to run #{File.basename __FILE__}: #{e.message}"
|
15
16
|
false
|
16
17
|
end
|
17
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bfs-gs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bfs
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-storage
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|