bfs-gs 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bfs/bucket/gs.rb +2 -9
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d02eb412617f33a9e5485ddc8f80c1a1daee35a13b8bf8de3522b42af8e67fd
4
- data.tar.gz: 369a667e176cc6105c445ea127dc5c37d01042ab7d7f81b472591b2000070c4b
3
+ metadata.gz: '068f4b652ec2ef87b680e2ababa9de943b87807626a662fc645813d8fe038eca'
4
+ data.tar.gz: de6b4d78c33dee9c85929031cf29f5b3fc19c9a0d0d28ae8735609f5f5f00b1e
5
5
  SHA512:
6
- metadata.gz: 7f0a7e56499b185b886945229e6bb85714ac64583b878e7f820402d0546b81a1ae885d19f6545ee6ee3655ed0a9639703b2b6826940a2f1b6786d6ccf7ab3f09
7
- data.tar.gz: 94b29d3eb53ec0365bec5beaed37246a5b63514954262b49b9df1d9d4bc6e61fd1c1898546cea21204070b50c870db1ef4d2e445cb5f81f78f9744c88d7abd4d
6
+ metadata.gz: 7d15bb556314fa4e06c24742890a47427b4b7af5e946120c7e24079e613dd236384146af23e67349e5625e7bcd283a5900394a1fb75144cff885bb7020231b76
7
+ data.tar.gz: 22bd175fecc3c3e75d3a60154a760c1c87c5e773f5ec6e1dd90af001b4ef91a799595d9942c3a5128542a0cd58a16a0f4a48e52e6a6b850657cacb66bc089bcd
@@ -59,18 +59,11 @@ module BFS
59
59
  def create(path, encoding: self.encoding, perm: self.perm, **opts, &block)
60
60
  opts[:metadata] = norm_meta(opts[:metadata])
61
61
  path = full_path(path)
62
- temp = BFS::TempWriter.new(path, encoding: encoding, perm: perm) do |t|
62
+ BFS::TempWriter.new(path, encoding: encoding, perm: perm) do |t|
63
63
  File.open(t, encoding: encoding) do |file|
64
64
  @bucket.create_file(file, path, **opts)
65
65
  end
66
- end
67
- return temp unless block
68
-
69
- begin
70
- yield temp
71
- ensure
72
- temp.close
73
- end
66
+ end.perform(&block)
74
67
  end
75
68
 
76
69
  # Opens an existing file for reading
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.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitrij Denissenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2020-11-02 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.7.4
19
+ version: 0.7.5
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.7.4
26
+ version: 0.7.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-storage
29
29
  requirement: !ruby/object:Gem::Requirement