privy-carrierwave-google-storage 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env.sample +2 -0
- data/.github/workflows/test.yml +43 -0
- data/.gitignore +16 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +99 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/carrierwave-google-storage.gemspec +38 -0
- data/gemfiles/carrierwave-1.gemfile +6 -0
- data/gemfiles/carrierwave-2.gemfile +5 -0
- data/gemfiles/carrierwave-master.gemfile +5 -0
- data/lib/carrierwave/google/storage/version.rb +9 -0
- data/lib/carrierwave/storage/gcloud.rb +57 -0
- data/lib/carrierwave/storage/gcloud_file.rb +110 -0
- data/lib/carrierwave/support/uri_filename.rb +11 -0
- data/lib/carrierwave/utilities/uri.rb +23 -0
- data/lib/carrierwave-google-storage.rb +23 -0
- data/lib/privy-carrierwave-google-storage.rb +1 -0
- metadata +197 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 16be8828e22f7b6f6a6b4067d1dd32f46353b9ab0f051d3cd85fff1e20ccc974
|
4
|
+
data.tar.gz: 7014811e4b89e99f1b09c32a0987350a4947f5edf517169a96aaea3be8bba3cd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b6e47e891dce3464b6f4b600ba386f4d8d6f7c3af4159b547e3243e6a12496717edd3d9614697d26d71613df131fd74c2a1cc373385e5b7fcd26578023064cf6
|
7
|
+
data.tar.gz: 4f9f7b00c78f9e28242d72c335417a7794fa944d6485e8717bf14f2a78c25715aba5268f5111b78e50917328553bc675ac20bd0de0adf58cd1d1395b90c4b359
|
data/.env.sample
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
name: RSpec
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
ruby: [ '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', jruby ]
|
12
|
+
gemfile: [ gemfiles/carrierwave-2.gemfile ]
|
13
|
+
include:
|
14
|
+
- ruby: '2.1'
|
15
|
+
gemfile: gemfiles/carrierwave-1.gemfile
|
16
|
+
- ruby: '2.2'
|
17
|
+
gemfile: gemfiles/carrierwave-1.gemfile
|
18
|
+
- ruby: '3.2'
|
19
|
+
gemfile: gemfiles/carrierwave-master.gemfile
|
20
|
+
runs-on: ubuntu-20.04
|
21
|
+
permissions:
|
22
|
+
id-token: 'write'
|
23
|
+
env:
|
24
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
25
|
+
GCLOUD_PROJECT: ${{ secrets.GCLOUD_PROJECT }}
|
26
|
+
GCLOUD_BUCKET: ${{ secrets.GCLOUD_BUCKET }}
|
27
|
+
JRUBY_OPTS: --debug
|
28
|
+
steps:
|
29
|
+
- uses: actions/checkout@v3
|
30
|
+
- name: Set up Ruby
|
31
|
+
uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: ${{ matrix.ruby }}
|
34
|
+
bundler-cache: true
|
35
|
+
- name: Setup Google Cloud Platform service account credential
|
36
|
+
run: |
|
37
|
+
mkdir -p ${HOME}/.config/gcloud
|
38
|
+
echo "${{ secrets.GCLOUD_SERVICE_ACCOUNT_KEY }}" | base64 -d > ${HOME}/.config/gcloud/application_default_credentials.json
|
39
|
+
- name: Set BUILD_ID
|
40
|
+
run: echo "BUILD_ID=$(echo '${{ github.run_id }}${{ toJSON(matrix) }}' | shasum | cut -c 1-8)" >> $GITHUB_ENV
|
41
|
+
- name: Run RSpec
|
42
|
+
run: bundle exec rake
|
43
|
+
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Jasdeep Singh
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
# Carrierwave Google Storage
|
2
|
+
|
3
|
+
[![Build Status](https://github.com/carrierwaveuploader/carrierwave-google-storage/workflows/Test/badge.svg)](https://github.com/carrierwaveuploader/carrierwave-google-storage/actions)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/metaware/carrierwave-google-storage/badges/gpa.svg)](https://codeclimate.com/github/metaware/carrierwave-google-storage)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/carrierwave-google-storage.svg)](https://badge.fury.io/rb/carrierwave-google-storage)
|
6
|
+
|
7
|
+
Use the official `google-cloud` gem by Google for Google Cloud Storage, instead of Fog.
|
8
|
+
|
9
|
+
- No need to activate Interoperable Access on your project.
|
10
|
+
- Rely on Google's preferred authentication mechanism. ie: Service Accounts.
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
Add this line to your application's Gemfile:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem 'privy-carrierwave-google-storage'
|
18
|
+
```
|
19
|
+
|
20
|
+
## Rails Compatibility:
|
21
|
+
|
22
|
+
- Rails 4 and 5.
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
In `config/initializers/carrierwave.rb` add the following initialization code:
|
27
|
+
|
28
|
+
```
|
29
|
+
CarrierWave.configure do |config|
|
30
|
+
config.storage = :gcloud
|
31
|
+
config.gcloud_bucket = 'your-bucket-name'
|
32
|
+
config.gcloud_bucket_is_public = true
|
33
|
+
config.gcloud_authenticated_url_expiration = 600
|
34
|
+
config.gcloud_content_disposition = 'attachment' // or you can skip this
|
35
|
+
|
36
|
+
config.gcloud_attributes = {
|
37
|
+
expires: 600
|
38
|
+
}
|
39
|
+
|
40
|
+
config.gcloud_credentials = {
|
41
|
+
gcloud_project: 'gcp-project-name',
|
42
|
+
gcloud_keyfile: 'path-to-gcp-keyfile.json'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
Then, in your Uploader classes:
|
48
|
+
|
49
|
+
```
|
50
|
+
class FileUploader < CarrierWave::Uploader::Base
|
51
|
+
storage :gcloud
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
## How to get the Keyfile?
|
56
|
+
|
57
|
+
To generate a new keyfile, perform the following steps:
|
58
|
+
|
59
|
+
- Go to [Cloud Console > API Manager > Credentials](https://console.cloud.google.com/apis/credentials)
|
60
|
+
- Click Create Credentials > Service Account Key
|
61
|
+
- Service Account > New Service Account
|
62
|
+
- Give any name for "Service Account Name"
|
63
|
+
- Set Key type to JSON
|
64
|
+
- Click "Create"
|
65
|
+
|
66
|
+
Here's a quick GIF for those who are visual like myself:
|
67
|
+
|
68
|
+
![](http://g.recordit.co/VjsK6CAUha.gif)
|
69
|
+
|
70
|
+
## Contributing
|
71
|
+
|
72
|
+
### Environment Variables and such
|
73
|
+
|
74
|
+
You should have access to a Google Cloud Platform account, as you'll need the keyfile and a project ID in order to contribute to the development of this gem. You'll need the the following files:
|
75
|
+
|
76
|
+
- `.gcp-keyfile.json` (sample file provided: `.gcp-keyfile.sample.json`)
|
77
|
+
- `.env` (sample file provided: `.env.sample`)
|
78
|
+
|
79
|
+
If you have any questions, please feel free to open up issues and/or PR's. Contributions are welcomed.
|
80
|
+
|
81
|
+
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
|
82
|
+
|
83
|
+
You get extra attention, if your PR includes specs/tests.
|
84
|
+
|
85
|
+
- Fork or clone the project.
|
86
|
+
- Create your feature branch ($ git checkout -b my-new-feature)
|
87
|
+
- Install the dependencies by doing: $ bundle install in the project directory.
|
88
|
+
- Add your bug fixes or new feature code.
|
89
|
+
- New features should include new specs/tests.
|
90
|
+
- Bug fixes should ideally include exposing specs/tests.
|
91
|
+
- Commit your changes ($ git commit -am 'Add some feature')
|
92
|
+
- Push to the branch ($ git push origin my-new-feature)
|
93
|
+
- Open your Pull Request!
|
94
|
+
|
95
|
+
## License
|
96
|
+
|
97
|
+
Copyright (c) 2016 [Jasdeep Singh](http://jasdeep.ca) ([Metaware Labs Inc](http://metawarelabs.com/))
|
98
|
+
|
99
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "carrierwave/google/storage"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'carrierwave/google/storage/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'privy-carrierwave-google-storage'
|
9
|
+
spec.version = Carrierwave::Google::Storage::VERSION
|
10
|
+
spec.authors = ['Achmad Chun Chun']
|
11
|
+
spec.email = ['anonychun@gmail.com']
|
12
|
+
|
13
|
+
spec.summary = %q(Use gcloud for Google Cloud Storage support in Carrierwave.)
|
14
|
+
spec.description = %q(A slimmer alternative to using Fog for Google Cloud Storage support in Carrierwave. Heavily inspired from carrierwave-aws)
|
15
|
+
spec.homepage = 'https://github.com/privy-ruby/carrierwave-google-storage-gem'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
spec.bindir = 'exe'
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_dependency 'carrierwave', ['>= 1.3.2', '< 4']
|
24
|
+
spec.add_dependency 'google-cloud-storage', '~> 1'
|
25
|
+
|
26
|
+
if RUBY_VERSION >= '2.2.2'
|
27
|
+
spec.add_dependency 'activemodel', '>= 3.2.0'
|
28
|
+
else
|
29
|
+
spec.add_dependency 'activemodel', '~> 4.2.7'
|
30
|
+
end
|
31
|
+
|
32
|
+
spec.add_development_dependency 'bundler', '>= 1.12'
|
33
|
+
spec.add_development_dependency 'pry', '>= 0.10.3'
|
34
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
35
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
36
|
+
spec.add_development_dependency 'ssrf_filter', '~> 1.0.0'
|
37
|
+
spec.add_development_dependency 'uri-query_params', '~> 0.7.1'
|
38
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CarrierWave
|
4
|
+
module Storage
|
5
|
+
class Gcloud < Abstract
|
6
|
+
def self.connection_cache
|
7
|
+
@connection_cache ||= {}
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.clear_connection_cache!
|
11
|
+
@connection_cache = {}
|
12
|
+
end
|
13
|
+
|
14
|
+
def store!(file)
|
15
|
+
GcloudFile.new(uploader, connection, uploader.store_path).tap do |gcloud_file|
|
16
|
+
gcloud_file.store(file)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def retrieve!(identifier)
|
21
|
+
GcloudFile.new(uploader, connection, uploader.store_path(identifier))
|
22
|
+
end
|
23
|
+
|
24
|
+
def cache!(file)
|
25
|
+
GcloudFile.new(uploader, connection, uploader.cache_path).tap do |gcloud_file|
|
26
|
+
gcloud_file.store(file)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def retrieve_from_cache!(identifier)
|
31
|
+
GcloudFile.new(uploader, connection, uploader.cache_path(identifier))
|
32
|
+
end
|
33
|
+
|
34
|
+
def delete_dir!(path)
|
35
|
+
# do nothing, because there's no such things as 'empty directory'
|
36
|
+
end
|
37
|
+
|
38
|
+
def clean_cache!(_seconds)
|
39
|
+
raise 'use Object Lifecycle Management to clean the cache'
|
40
|
+
end
|
41
|
+
|
42
|
+
def connection
|
43
|
+
@connection ||= begin
|
44
|
+
conn_cache = self.class.connection_cache
|
45
|
+
conn_cache[credentials] ||= ::Google::Cloud.new(
|
46
|
+
credentials[:gcloud_project] || ENV['GCLOUD_PROJECT'],
|
47
|
+
credentials[:gcloud_keyfile] || ENV['GCLOUD_KEYFILE']
|
48
|
+
).storage
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def credentials
|
53
|
+
uploader.gcloud_credentials || {}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/core_ext/module/delegation'
|
4
|
+
|
5
|
+
module CarrierWave
|
6
|
+
module Storage
|
7
|
+
class GcloudFile
|
8
|
+
GCLOUD_STORAGE_URL = 'https://storage.googleapis.com'
|
9
|
+
|
10
|
+
attr_writer :file
|
11
|
+
attr_accessor :uploader, :connection, :path, :file_exists
|
12
|
+
|
13
|
+
delegate :content_disposition, :content_type, :size, to: :file, allow_nil: true
|
14
|
+
|
15
|
+
def initialize(uploader, connection, path)
|
16
|
+
@uploader = uploader
|
17
|
+
@connection = connection
|
18
|
+
@path = path
|
19
|
+
end
|
20
|
+
|
21
|
+
def file
|
22
|
+
@file ||= bucket.file(path)
|
23
|
+
end
|
24
|
+
alias to_file file
|
25
|
+
|
26
|
+
def attributes
|
27
|
+
return unless exists?
|
28
|
+
{
|
29
|
+
content_type: file.content_type,
|
30
|
+
size: file.size,
|
31
|
+
updated_at: file.updated_at.to_s,
|
32
|
+
etag: file.etag
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
def delete
|
37
|
+
deleted = file ? file.delete : true
|
38
|
+
@file = nil if deleted
|
39
|
+
deleted
|
40
|
+
end
|
41
|
+
|
42
|
+
def exists?
|
43
|
+
!file.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
def extension
|
47
|
+
elements = path.split('.')
|
48
|
+
elements.last if elements.size > 1
|
49
|
+
end
|
50
|
+
|
51
|
+
def filename(options = {})
|
52
|
+
CarrierWave::Support::UriFilename.filename(file.url)
|
53
|
+
end
|
54
|
+
|
55
|
+
def read
|
56
|
+
tmp_file = Tempfile.new(
|
57
|
+
CarrierWave::Support::UriFilename.filename(file.name)
|
58
|
+
)
|
59
|
+
(file.download tmp_file.path, verify: :all).read
|
60
|
+
end
|
61
|
+
|
62
|
+
def store(new_file)
|
63
|
+
if new_file.is_a?(self.class)
|
64
|
+
new_file.copy_to(path)
|
65
|
+
else
|
66
|
+
@file = bucket.create_file(
|
67
|
+
new_file.path,
|
68
|
+
path,
|
69
|
+
acl: uploader.gcloud_bucket_is_public ? 'publicRead' : nil,
|
70
|
+
content_type: new_file.content_type,
|
71
|
+
content_disposition: uploader.gcloud_content_disposition
|
72
|
+
)
|
73
|
+
end
|
74
|
+
self
|
75
|
+
end
|
76
|
+
|
77
|
+
def copy_to(new_path)
|
78
|
+
file.copy(
|
79
|
+
new_path,
|
80
|
+
acl: uploader.gcloud_bucket_is_public ? 'publicRead' : nil
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
84
|
+
def url(options = {})
|
85
|
+
uploader.gcloud_bucket_is_public ? public_url : authenticated_url(options)
|
86
|
+
end
|
87
|
+
|
88
|
+
def authenticated_url(options = {})
|
89
|
+
if uploader.gcloud_authenticated_url_expiration
|
90
|
+
options = { expires: uploader.gcloud_authenticated_url_expiration }.merge(options)
|
91
|
+
end
|
92
|
+
bucket.signed_url(path, **options)
|
93
|
+
end
|
94
|
+
|
95
|
+
def public_url
|
96
|
+
if uploader.asset_host
|
97
|
+
"#{uploader.asset_host}/#{path}"
|
98
|
+
else
|
99
|
+
"#{GCLOUD_STORAGE_URL}/#{uploader.gcloud_bucket}/#{@path}"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
private
|
104
|
+
|
105
|
+
def bucket
|
106
|
+
@bucket ||= connection.bucket(uploader.gcloud_bucket, skip_lookup: true)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
3
|
+
module CarrierWave
|
4
|
+
module Utilities
|
5
|
+
module Uri
|
6
|
+
# based on Ruby < 2.0's URI.encode
|
7
|
+
SAFE_STRING = URI::REGEXP::PATTERN::UNRESERVED + '\/'
|
8
|
+
UNSAFE = Regexp.new("[^#{SAFE_STRING}]", false)
|
9
|
+
|
10
|
+
private
|
11
|
+
def encode_path(path)
|
12
|
+
path.to_s.gsub(UNSAFE) do
|
13
|
+
us = $&
|
14
|
+
tmp = ''
|
15
|
+
us.each_byte do |uc|
|
16
|
+
tmp << sprintf('%%%02X', uc)
|
17
|
+
end
|
18
|
+
tmp
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end # Uri
|
22
|
+
end # Utilities
|
23
|
+
end # CarrierWave
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'google-cloud-storage'
|
2
|
+
require 'carrierwave'
|
3
|
+
require 'carrierwave/google/storage/version'
|
4
|
+
require 'carrierwave/storage/gcloud'
|
5
|
+
require 'carrierwave/storage/gcloud_file'
|
6
|
+
require 'carrierwave/support/uri_filename'
|
7
|
+
|
8
|
+
module CarrierWave
|
9
|
+
module Uploader
|
10
|
+
class Base
|
11
|
+
add_config :gcloud_attributes
|
12
|
+
add_config :gcloud_bucket
|
13
|
+
add_config :gcloud_bucket_is_public
|
14
|
+
add_config :gcloud_credentials
|
15
|
+
add_config :gcloud_authenticated_url_expiration
|
16
|
+
add_config :gcloud_content_disposition
|
17
|
+
|
18
|
+
configure do |config|
|
19
|
+
config.storage_engines[:gcloud] = 'CarrierWave::Storage::Gcloud'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'carrierwave-google-storage'
|
metadata
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: privy-carrierwave-google-storage
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Achmad Chun Chun
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: carrierwave
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.3.2
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '4'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.3.2
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '4'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: google-cloud-storage
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: activemodel
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 3.2.0
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 3.2.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: bundler
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.12'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.12'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: pry
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 0.10.3
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.10.3
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rake
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 12.3.3
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 12.3.3
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rspec
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: ssrf_filter
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 1.0.0
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 1.0.0
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: uri-query_params
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 0.7.1
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.7.1
|
145
|
+
description: A slimmer alternative to using Fog for Google Cloud Storage support in
|
146
|
+
Carrierwave. Heavily inspired from carrierwave-aws
|
147
|
+
email:
|
148
|
+
- anonychun@gmail.com
|
149
|
+
executables: []
|
150
|
+
extensions: []
|
151
|
+
extra_rdoc_files: []
|
152
|
+
files:
|
153
|
+
- ".env.sample"
|
154
|
+
- ".github/workflows/test.yml"
|
155
|
+
- ".gitignore"
|
156
|
+
- ".rspec"
|
157
|
+
- Gemfile
|
158
|
+
- LICENSE.txt
|
159
|
+
- README.md
|
160
|
+
- Rakefile
|
161
|
+
- bin/console
|
162
|
+
- bin/setup
|
163
|
+
- carrierwave-google-storage.gemspec
|
164
|
+
- gemfiles/carrierwave-1.gemfile
|
165
|
+
- gemfiles/carrierwave-2.gemfile
|
166
|
+
- gemfiles/carrierwave-master.gemfile
|
167
|
+
- lib/carrierwave-google-storage.rb
|
168
|
+
- lib/carrierwave/google/storage/version.rb
|
169
|
+
- lib/carrierwave/storage/gcloud.rb
|
170
|
+
- lib/carrierwave/storage/gcloud_file.rb
|
171
|
+
- lib/carrierwave/support/uri_filename.rb
|
172
|
+
- lib/carrierwave/utilities/uri.rb
|
173
|
+
- lib/privy-carrierwave-google-storage.rb
|
174
|
+
homepage: https://github.com/privy-ruby/carrierwave-google-storage-gem
|
175
|
+
licenses:
|
176
|
+
- MIT
|
177
|
+
metadata: {}
|
178
|
+
post_install_message:
|
179
|
+
rdoc_options: []
|
180
|
+
require_paths:
|
181
|
+
- lib
|
182
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
requirements: []
|
193
|
+
rubygems_version: 3.5.3
|
194
|
+
signing_key:
|
195
|
+
specification_version: 4
|
196
|
+
summary: Use gcloud for Google Cloud Storage support in Carrierwave.
|
197
|
+
test_files: []
|