paperclip-gcs 0.3.2 → 0.3.3

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: a1d92a7ec7300528df2c69939eca97548b3cbb482427b15e3e8e63fcdccc456a
4
- data.tar.gz: 36a2ca6b9a42f01266980f76c62443e0d5b68519fbd78d1e8229570b6614111e
3
+ metadata.gz: ee33bf47ab8e2d8d716a81763a80d29869ef387b96669620e65c4cafeec54f52
4
+ data.tar.gz: 8ede8d389042c86981fc9aea320595b05fbc294dd12f4b3ea48961f105214ab2
5
5
  SHA512:
6
- metadata.gz: 8a35c54927a1920a05016b0f0053ced96374860164457786e4a9c30a18dbb60152cd28264019766cd93c2627eb1dde0ad328a4881d929f6f57dcb8b5881dfb84
7
- data.tar.gz: 4a6a26ec94dcbec160fa73e3b709b601661ee6c514ac1728480654fba12d64e913d5506006351872d1e9544a76bf63d007db0e3c898b606755b3a30834a2ec83
6
+ metadata.gz: 2fe0e36d4b6735eeae579cde6deca1462f9477618d90599d174d6127871479fc573ebb4c5094f1225084877b03fc800fbddd71a3722f643dd492e142f732b8e2
7
+ data.tar.gz: d402cd94d689bc740e3b958777cfb9471e875500d09f7ec758c5d992114485b19076d2e8461e489b8f6a8aaf11021ddde150d46530ba6b171808df4c2a54da6b
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  module Gcs
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
@@ -1,3 +1,5 @@
1
+ require "google/cloud/storage"
2
+
1
3
  module Paperclip
2
4
  module Storage
3
5
  module Gcs
@@ -11,9 +13,10 @@ module Paperclip
11
13
  end
12
14
 
13
15
  def find(config)
14
- clients[config] ||= Google::Cloud.storage(
15
- config[:project],
16
- config[:keyfile],
16
+ clients[config] ||= Google::Cloud::Storage.new(
17
+ project_id: config[:project],
18
+ credentials: config[:keyfile],
19
+ endpoint: config[:gcs_host_name],
17
20
  **config.slice(:scope, :retries, :timeout)
18
21
  )
19
22
  end
@@ -170,7 +170,9 @@ module Paperclip
170
170
 
171
171
  def gcs_client
172
172
  @_gcs_client ||= ClientRepository.find(gcs_credentials.slice(:project, :keyfile).merge(
173
- @gcs_options.slice(:scope, :retries, :timeout)))
173
+ @gcs_options.slice(:scope, :retries, :timeout)).merge(
174
+ @options.slice(:gcs_host_name)
175
+ ))
174
176
  end
175
177
 
176
178
  def gcs_bucket
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-gcs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daichi HIRATA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-02 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kt-paperclip
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubygems_version: 3.3.7
81
+ rubygems_version: 3.5.16
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Extends Paperclip with Google Cloud Storage