{"id":14955597,"url":"https://github.com/chaadow/activestorage-openstack","last_synced_at":"2025-10-01T18:31:45.840Z","repository":{"id":47230723,"uuid":"137668010","full_name":"chaadow/activestorage-openstack","owner":"chaadow","description":"ActiveStorage Service wrapper for OpenStack","archived":false,"fork":false,"pushed_at":"2023-10-18T23:49:53.000Z","size":127,"stargazers_count":15,"open_issues_count":0,"forks_count":19,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-27T06:49:57.117Z","etag":null,"topics":["activestorage","rails5","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaadow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-17T16:06:31.000Z","updated_at":"2025-06-23T04:35:11.000Z","dependencies_parsed_at":"2024-06-21T05:45:23.760Z","dependency_job_id":"1689c22c-8393-45de-9f31-c12bafa299cc","html_url":"https://github.com/chaadow/activestorage-openstack","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/chaadow/activestorage-openstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaadow%2Factivestorage-openstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaadow%2Factivestorage-openstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaadow%2Factivestorage-openstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaadow%2Factivestorage-openstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaadow","download_url":"https://codeload.github.com/chaadow/activestorage-openstack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaadow%2Factivestorage-openstack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277726603,"owners_count":25866701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activestorage","rails5","ruby","ruby-on-rails"],"created_at":"2024-09-24T13:11:25.719Z","updated_at":"2025-10-01T18:31:45.580Z","avatar_url":"https://github.com/chaadow.png","language":"Ruby","readme":"\n\n# ActiveStorage::Openstack \n![Gem](https://img.shields.io/gem/v/activestorage-openstack?style=for-the-badge) ![Build Status](https://img.shields.io/github/actions/workflow/status/chaadow/activestorage-openstack/ruby.yml?branch=master\u0026style=for-the-badge) ![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability-percentage/chaadow/activestorage-openstack?style=for-the-badge)\n\nThis rails plugin wraps the OpenStack Swift provider as an Active Storage service. \n\nCompatible with rails `6.0.x`, `6.1.x`, `7.0.x`, `7.1.x` as well as `rails main branch` (edge).\n\nCompatible with ruby `2.5`, `2.6`, `2.7`, `3.0`, `3.1`, `3.2`.\n\n**This gem currently supports `fog-openstack` version `~ 1.0`**\n\n## Installation\nAdd this line to your application's Gemfile ( Add the second line for ruby 3/3.1 support)\n\n```ruby\ngem 'activestorage-openstack', '1.6.0'\ngem 'fog-openstack', github: 'chaadow/fog-openstack' # Temporary, for ruby 3 support, until the PR is merged and released\n```\n\n## Usage\nin `config/storage.yml`, in your Rails app, you can create as many entries as\nyou wish. Here is an example with rails 6.1 new support for public containers\n\n```yaml\n\n# Here you can have the common authentication credentials and config\n# by defining a YAML anchor\ndefault_config: \u0026default_config\n  service: OpenStack\n  credentials:\n    openstack_auth_url: \u003cauth url\u003e\n    openstack_username: \u003cusername\u003e\n    openstack_api_key: \u003cpassword\u003e\n    openstack_region: \u003cregion\u003e\n    openstack_temp_url_key: \u003ctemp url key\u003e # Mandatory, instructions below\n  connection_options: # optional\n    chunk_size: 2097152 # 2MBs - 1MB is the default\n\n# starting from rails 6.1, you can have a public container generating public\n# URLs\npublic_openstack:\n  \u003c\u003c: *default_config # we include the anchor defined above\n  public: true # important ; to tell rails that this is a public container\n  container: \u003ccontainer name\u003e # Container name for your public OpenStack provider\n\n# this config will generate signed/expired URLs (aka. private URLs)\nprivate_openstack:\n  \u003c\u003c: *default_config # we include the anchor defined above\n  public: false # Optional in this case, because false is the default value\n  container: \u003ccontainer name\u003e # Container name for your private OpenStack provider\n```\n\nYou can create as many entries as you would like for your different environments. For instance: `public_openstack` for development, `test_openstack` for test environment, and `prod_openstack` for production. This way you can choose the appropriate container for each scenario.\n\nThen register the provider in your `config/{environment}.rb` (`config/development.rb`/`config/test.rb`/`config/production.rb`)\n\nFor example, for the `public_openstack` entry above, change the `config` variable in `config/development.rb` like the following:\n```ruby\n# Store uploaded files on the local file system (see config/storage.yml for options)\nconfig.active_storage.service = :public_openstack\n```\n\n## Setting up a container\n\nFrom your OpenStack provider website, create or sign in to your account.\nThen from your dashboard, create a container, and save the configuration generated.\n\nIt is a good practice to create a separate container for each of your environments.\nOnce safely saved, you can add them to your storage configuration in your Rails application.\n## `temp_url_key` configuration\n\nthe `openstack_temp_url_key` in your configuration is mandatory for generating URLs (expiring ones) as well as for Direct Upload. You can set it up with `Swift` or with the `Fog/OpenStack` gem. More instructions on how to set it up with Swift are found [HERE](https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html#secret-keys)\n\nThe next version of this plugin, will add a rails generator, or expose a method that would use the built-in method from `Fog::OpenStack::Real` to generate the key.\n\n## `ActiveStorage::Openstack`'s Content-Type handling\n\nOpenStack Swift handles the Content-Type of an object differently from other\nobject storage services.\nYou cannot overwrite the Content-Type via a temp URL. This gem will try very\nhard to set the right Content-Type for an object at\nobject creation (either via server upload or direct upload) but this can be\nwrong in some edge cases (e.g. you use direct upload and the browser provides\na wrong mime type).\nThankfully, by implementing the rails hook `#update_metadata`\nthis will update the object in your container by setting the new content type\nafter it's been uploaded.\n\n## Testing\nFirst, run `bundle` to install the gem dependencies (both development and production)\n```bash\n$ bundle\n```\nThen, from the root of the plugin, copy the following file and fill in the appropriate credentials.\n**Preferably, set up a container for your testing, separate from production.**\n```bash\n$ cp test/configurations.example.yml test/configurations.yml\n```\nAnd then run the tests:\n```bash\n$ bin/test\n```\n\n## Contributions\nContributions are welcome. Feel free to open any issues if you encounter any bug, or if you want to suggest a feature by clicking here: https://github.com/chaadow/activestorage-openstack/issues\n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaadow%2Factivestorage-openstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaadow%2Factivestorage-openstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaadow%2Factivestorage-openstack/lists"}