Skip to content

rkwap/active_storage_bunny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Active Storage Bunny

Bunny is a fast, powerful, cheap and reliable CDN service and offers a storage service that can be used to store files which is a great alternative to Amazon S3, Azure, and Google Cloud Storage.

Active Storage Bunny is a gem that integrates BunnyCDN Storage services with Active Storage. This gem acts as an adapter to add BunnyCDN as a service to Active Storage.

This uses BunnyStorage Client gem to interact with BunnyCDN storage services.

Gem Version

Table of Contents

Installation

Add this line to your application's Gemfile:

gem 'active_storage_bunny'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install active_storage_bunny

Requirements

Configuration

Configure Active Storage to use the Bunny service by adding the following to your config/storage.yml:

bunny:
  service: Bunny
  access_key: <%= Rails.application.credentials.dig(:bunny, :access_key) %>
  # the API key for cache purging
  api_key: <%= Rails.application.credentials.dig(:bunny, :api_key) %>
  storage_zone: your-app-production
  region: la # leave blank for Falkenstein
  cdn: https://cdn.your-app

Then, in your environment configuration file (e.g., config/environments/production.rb), set the Active Storage service:

config.active_storage.service = :bunny

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rkwaap/active_storage_bunny

  1. Fork the repository.
  2. Create a new branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request.

License

The gem is available as open source under the terms of the MIT License.

About

An Active Storage service for BunnyCDN storage services

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages