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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee33bf47ab8e2d8d716a81763a80d29869ef387b96669620e65c4cafeec54f52
|
4
|
+
data.tar.gz: 8ede8d389042c86981fc9aea320595b05fbc294dd12f4b3ea48961f105214ab2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fe0e36d4b6735eeae579cde6deca1462f9477618d90599d174d6127871479fc573ebb4c5094f1225084877b03fc800fbddd71a3722f643dd492e142f732b8e2
|
7
|
+
data.tar.gz: d402cd94d689bc740e3b958777cfb9471e875500d09f7ec758c5d992114485b19076d2e8461e489b8f6a8aaf11021ddde150d46530ba6b171808df4c2a54da6b
|
@@ -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.
|
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.
|
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:
|
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.
|
81
|
+
rubygems_version: 3.5.16
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Extends Paperclip with Google Cloud Storage
|