shrine-google_cloud_storage 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/shrine/storage/google_cloud_storage.rb +4 -4
- data/shrine-google_cloud_storage.gemspec +10 -3
- metadata +12 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb917fe9e6635501eee44ec51a1d22260c4644db9e45693f2eb67fec80e5783c
|
|
4
|
+
data.tar.gz: bc5e261763d6e6f8bf2260e8d29f131709fa1fe6c88315f3eced62993270b807
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fce36757f6eae8539ead0310cef964369d533d3b17a1ba26f04fb05af063a23aa65a1abb7db8074a6d16a1a7cda46579c72aadb53283da3e1e83087b294378e9
|
|
7
|
+
data.tar.gz: 80d104beac4587fcc85d2ece8e26b8c1332e57e4a78f3de5e4d4adf8cd3a0784cd35892c20da878495fcc8544f034dcedcc09a75573db96e39d7968bd81b73f2
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@ gem "shrine-google_cloud_storage"
|
|
|
12
12
|
|
|
13
13
|
## Authentication
|
|
14
14
|
|
|
15
|
-
The GCS plugin uses the `google-cloud-storage` gem. Please refer to [its documentation for setting up authentication](
|
|
15
|
+
The GCS plugin uses the `google-cloud-storage` gem. Please refer to [its documentation for setting up authentication](https://googleapis.dev/ruby/google-cloud-storage/latest/file.AUTHENTICATION.html).
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
@@ -65,7 +65,7 @@ cp .env.sample .env
|
|
|
65
65
|
|
|
66
66
|
#### Option 2 - manual setup
|
|
67
67
|
|
|
68
|
-
Create your own bucket and provide variables that allow for [project and credential lookup](
|
|
68
|
+
Create your own bucket and provide variables that allow for [project and credential lookup](https://googleapis.dev/ruby/google-cloud-storage/latest/file.AUTHENTICATION.html#project-and-credential-lookup).
|
|
69
69
|
For example:
|
|
70
70
|
|
|
71
71
|
```sh
|
|
@@ -61,13 +61,13 @@ class Shrine
|
|
|
61
61
|
|
|
62
62
|
# URL to the remote file, accepts options for customizing the URL
|
|
63
63
|
def url(id, **options)
|
|
64
|
-
if
|
|
64
|
+
if @default_acl == 'publicRead'
|
|
65
|
+
host = @host || "storage.googleapis.com/#{@bucket}"
|
|
66
|
+
"https://#{host}/#{URI.encode_www_form_component(object_name(id))}"
|
|
67
|
+
else
|
|
65
68
|
signed_url = storage.signed_url(@bucket, object_name(id), **options)
|
|
66
69
|
signed_url.gsub!(/storage.googleapis.com\/#{@bucket}/, @host) if @host
|
|
67
70
|
signed_url
|
|
68
|
-
else
|
|
69
|
-
host = @host || "storage.googleapis.com/#{@bucket}"
|
|
70
|
-
"https://#{host}/#{object_name(id)}"
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
Gem::Specification.new do |gem|
|
|
2
2
|
gem.name = "shrine-google_cloud_storage"
|
|
3
|
-
gem.version = "3.
|
|
3
|
+
gem.version = "3.2.0"
|
|
4
4
|
|
|
5
|
-
gem.required_ruby_version = ">= 2.
|
|
5
|
+
gem.required_ruby_version = ">= 2.6"
|
|
6
6
|
|
|
7
7
|
gem.summary = "Provides Google Cloud Storage storage for Shrine."
|
|
8
8
|
gem.homepage = "https://github.com/renchap/shrine-google_cloud_storage"
|
|
9
9
|
gem.authors = ["Renaud Chaput"]
|
|
10
10
|
gem.email = ["renchap@gmail.com"]
|
|
11
11
|
gem.license = "MIT"
|
|
12
|
+
gem.metadata = {
|
|
13
|
+
"bug_tracker_uri" => "https://github.com/renchap/shrine-google_cloud_storage/issues",
|
|
14
|
+
"changelog_uri" => "https://github.com/renchap/shrine-google_cloud_storage/blob/main/CHANGELOG.md",
|
|
15
|
+
"homepage_uri" => "https://github.com/renchap/shrine-google_cloud_storage/",
|
|
16
|
+
"source_code_uri" => "https://github.com/renchap/shrine-google_cloud_storage/",
|
|
17
|
+
"rubygems_mfa_required" => "true",
|
|
18
|
+
}
|
|
12
19
|
|
|
13
20
|
gem.files = Dir["README.md", "LICENSE.txt", "lib/**/*.rb", "shrine-google_cloud_storage.gemspec"]
|
|
14
21
|
gem.require_path = "lib"
|
|
@@ -19,5 +26,5 @@ Gem::Specification.new do |gem|
|
|
|
19
26
|
gem.add_development_dependency "rake"
|
|
20
27
|
gem.add_development_dependency "minitest"
|
|
21
28
|
gem.add_development_dependency "dotenv"
|
|
22
|
-
gem.add_development_dependency "http", "~>
|
|
29
|
+
gem.add_development_dependency "http", "~> 5.0"
|
|
23
30
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shrine-google_cloud_storage
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Renaud Chaput
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: shrine
|
|
@@ -86,14 +86,14 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '5.0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '5.0'
|
|
97
97
|
description:
|
|
98
98
|
email:
|
|
99
99
|
- renchap@gmail.com
|
|
@@ -107,7 +107,12 @@ files:
|
|
|
107
107
|
homepage: https://github.com/renchap/shrine-google_cloud_storage
|
|
108
108
|
licenses:
|
|
109
109
|
- MIT
|
|
110
|
-
metadata:
|
|
110
|
+
metadata:
|
|
111
|
+
bug_tracker_uri: https://github.com/renchap/shrine-google_cloud_storage/issues
|
|
112
|
+
changelog_uri: https://github.com/renchap/shrine-google_cloud_storage/blob/main/CHANGELOG.md
|
|
113
|
+
homepage_uri: https://github.com/renchap/shrine-google_cloud_storage/
|
|
114
|
+
source_code_uri: https://github.com/renchap/shrine-google_cloud_storage/
|
|
115
|
+
rubygems_mfa_required: 'true'
|
|
111
116
|
post_install_message:
|
|
112
117
|
rdoc_options: []
|
|
113
118
|
require_paths:
|
|
@@ -116,14 +121,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
116
121
|
requirements:
|
|
117
122
|
- - ">="
|
|
118
123
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: '2.
|
|
124
|
+
version: '2.6'
|
|
120
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
126
|
requirements:
|
|
122
127
|
- - ">="
|
|
123
128
|
- !ruby/object:Gem::Version
|
|
124
129
|
version: '0'
|
|
125
130
|
requirements: []
|
|
126
|
-
rubygems_version: 3.2.
|
|
131
|
+
rubygems_version: 3.2.32
|
|
127
132
|
signing_key:
|
|
128
133
|
specification_version: 4
|
|
129
134
|
summary: Provides Google Cloud Storage storage for Shrine.
|