Class: Paperclip::Storage::Gcs::ClientRepository
- Inherits:
-
Object
- Object
- Paperclip::Storage::Gcs::ClientRepository
- Includes:
- Singleton
- Defined in:
- lib/paperclip/storage/gcs/client_repository.rb
Constant Summary collapse
- CACHE_KEY =
self.class.name.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.find(config) ⇒ Object
11 12 13 |
# File 'lib/paperclip/storage/gcs/client_repository.rb', line 11 def self.find(config) instance.find(config) end |
Instance Method Details
#find(config) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/paperclip/storage/gcs/client_repository.rb', line 15 def find(config) clients[config] ||= Google::Cloud::Storage.new( project_id: config[:project], credentials: config[:keyfile], endpoint: config[:gcs_host_name], **config.slice(:scope, :retries, :timeout) ) end |