All Projects → renchap → shrine-google_cloud_storage

renchap / shrine-google_cloud_storage

Licence: MIT License
Google Cloud Storage for Shrine

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to shrine-google cloud storage

shrine-cloudinary
Cloudinary storage for Shrine
Stars: ✭ 23 (-23.33%)
Mutual labels:  shrine
appengine-hosting
Host static websites with Google Cloud Storage and App Engine
Stars: ✭ 17 (-43.33%)
Mutual labels:  google-cloud-storage
zip-bucket
zips files in a Google Cloud Storage [tm] bucket
Stars: ✭ 32 (+6.67%)
Mutual labels:  google-cloud-storage
ob bulkstash
Bulk Stash is a docker rclone service to sync, or copy, files between different storage services. For example, you can copy files either to or from a remote storage services like Amazon S3 to Google Cloud Storage, or locally from your laptop to a remote storage.
Stars: ✭ 113 (+276.67%)
Mutual labels:  google-cloud-storage
Meteor-Files-Demo
Demo application for ostrio:files package
Stars: ✭ 16 (-46.67%)
Mutual labels:  google-cloud-storage
gcp-storage-emulator
Local emulator for Google Cloud Storage
Stars: ✭ 43 (+43.33%)
Mutual labels:  google-cloud-storage
nestjs-storage
Nestjs file system / file storage module wrapping flydrive
Stars: ✭ 92 (+206.67%)
Mutual labels:  google-cloud-storage
googlecloud-storage-tutorial
💾 ☁️ Tutorial for interacting with Google Cloud Storage via the Python SDK.
Stars: ✭ 20 (-33.33%)
Mutual labels:  google-cloud-storage
gcs-resource
Concourse resource for interacting with Google Cloud Storage
Stars: ✭ 33 (+10%)
Mutual labels:  google-cloud-storage
bazel-cache
Minimal cloud oriented Bazel gRPC cache
Stars: ✭ 33 (+10%)
Mutual labels:  google-cloud-storage
hanami-shrine
Upload solution for Hanami using Shrine library
Stars: ✭ 28 (-6.67%)
Mutual labels:  shrine
hubble-scripts
🔭 📜 Transform Sketch config data & assets into dev-friendly formats.
Stars: ✭ 23 (-23.33%)
Mutual labels:  google-cloud-storage
parse-server-gcs-adapter
parse-server adapter for Google Cloud Storage
Stars: ✭ 26 (-13.33%)
Mutual labels:  google-cloud-storage
clj-gcloud-storage
Clojure wrapper for google-cloud-storage Java client.
Stars: ✭ 20 (-33.33%)
Mutual labels:  google-cloud-storage
gcp-dataprep-bigquery-twitter-stream
Stream Twitter Data into BigQuery with Cloud Dataprep
Stars: ✭ 21 (-30%)
Mutual labels:  google-cloud-storage
emacs-easy-jekyll
Emacs major mode for managing jekyll
Stars: ✭ 53 (+76.67%)
Mutual labels:  google-cloud-storage
go-bqloader
bqloader is a simple ETL framework to load data from Cloud Storage into BigQuery.
Stars: ✭ 16 (-46.67%)
Mutual labels:  google-cloud-storage
arc gcs
Provides an Arc backend for Google Cloud Storage
Stars: ✭ 48 (+60%)
Mutual labels:  google-cloud-storage
server
The ViUR application development framework - legacy version 2.x for Python 2.7
Stars: ✭ 12 (-60%)
Mutual labels:  google-cloud-storage
artefactory-connectors-kit
ACK is an E(T)L tool specialized in API data ingestion. It is accessible through a Command-Line Interface. The application allows you to easily extract, stream and load data (with minimum transformations), from the API source to the destination of your choice.
Stars: ✭ 34 (+13.33%)
Mutual labels:  google-cloud-storage

Gem Version

Shrine::Storage::GoogleCloudStorage

Provides Google Cloud Storage (GCS) storage for Shrine.

Installation

gem "shrine-google_cloud_storage"

Authentication

The GCS plugin uses the google-cloud-storage gem. Please refer to its documentation for setting up authentication.

Usage

require "shrine/storage/google_cloud_storage"

Shrine.storages = {
  cache: Shrine::Storage::GoogleCloudStorage.new(bucket: "cache"),
  store: Shrine::Storage::GoogleCloudStorage.new(bucket: "store"),
}

You can set a predefined ACL on created objects, as well as custom headers using the object_options parameter:

Shrine::Storage::GoogleCloudStorage.new(
  bucket: "store",
  default_acl: 'publicRead',
  object_options: {
    cache_control: 'public, max-age: 7200'
  },
)

Contributing

Test setup

Option 1 - use the script

Review the script test/create_test_environment.sh. It will:

  • create a Google Cloud project
  • associate it with your billing account
  • create a service account
  • add the roles/storage.admin iam policy
  • download the json credentials
  • create a test bucket
  • add the needed variables to your .env file

To run, it assumes you have already run gcloud auth login. It also needs a .env file in the project root containing the project name and the billing account to use:

cp .env.sample .env
# Edit .env to fill in your project and billing accounts
./test/create_test_environment.sh

Option 2 - manual setup

Create your own bucket and provide variables that allow for project and credential lookup. For example:

GCS_BUCKET=shrine-gcs-test-my-project
GOOGLE_CLOUD_PROJECT=my-project
GOOGLE_CLOUD_KEYFILE=/Users/user/.gcp/my-project/shrine-gcs-test.json

Warning: all content of the bucket is cleared between tests, create a new one only for this usage!

Running tests

After setting up your bucket, run the tests:

$ bundle exec rake test

For additional debug, add the following to your .env file:

GCS_DEBUG=true

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].