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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 006a502518adf673cb33da4d3ce62db552755fea4a1756e6c26ab3247f64767e
4
- data.tar.gz: 1c1a8266976872c3d658afbb3c44203a3e49e3c03e519a1001b455bcba1e6ee6
3
+ metadata.gz: '07979739046a829f6b63c0c83e5405fa91f1d8cb602ae9c921d6bb330dd85f1c'
4
+ data.tar.gz: 645e9c6eb121efd9f872ef028c2630eb0e4db7672053b004550dcc8e412359bb
5
5
  SHA512:
6
- metadata.gz: bd74e8cef26550517c999dfbb4402a2138e977f73b7935b9260e019bb0e633dd1687b618c0803eee24bef659d499d1a322da4b29b1b071542e216392bc407d0a
7
- data.tar.gz: 7cc34c97ee1fae097db90698ea4f66fc99f73404065f154104a9249b7510d59215d29d18137421e69965d69cb19fb6793980f4ab813ab30e1d36f918a8ef85b9
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|
@@ -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.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-06-17 00:00:00.000000000 Z
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.4.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.4.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