{"id":15603479,"url":"https://github.com/hidakatsuya/gsm_env","last_synced_at":"2025-10-13T12:30:18.848Z","repository":{"id":77279821,"uuid":"603730001","full_name":"hidakatsuya/gsm_env","owner":"hidakatsuya","description":"A gem to set parameters obtained from GCP Secret Manager as environment variables.","archived":true,"fork":false,"pushed_at":"2024-09-28T14:39:38.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T12:42:45.705Z","etag":null,"topics":["gcp","ruby","secret-manager"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/gsm_env","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/hidakatsuya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-02-19T12:11:18.000Z","updated_at":"2024-09-28T14:39:57.000Z","dependencies_parsed_at":"2025-01-30T11:31:42.904Z","dependency_job_id":"e6c2144a-9f8e-47d8-b9f0-a656f46c2e7a","html_url":"https://github.com/hidakatsuya/gsm_env","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hidakatsuya/gsm_env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fgsm_env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fgsm_env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fgsm_env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fgsm_env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hidakatsuya","download_url":"https://codeload.github.com/hidakatsuya/gsm_env/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fgsm_env/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015060,"owners_count":26085643,"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-10-13T02:00:06.723Z","response_time":61,"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":["gcp","ruby","secret-manager"],"created_at":"2024-10-03T03:03:32.918Z","updated_at":"2025-10-13T12:30:18.843Z","avatar_url":"https://github.com/hidakatsuya.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GsmEnv\n\n[![Gem Version](https://badge.fury.io/rb/gsm_env.svg)](https://badge.fury.io/rb/gsm_env)\n[![Test](https://github.com/hidakatsuya/gsm_env/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/hidakatsuya/gsm_env/actions/workflows/test.yml)\n\nGsmEnv is a gem to set parameters obtained from GCP Secret Manager as environment variables, inspired by [aws-ssm-env gem](https://github.com/sonodar/aws-ssm-env-ruby).\n\n## Prerequisites\n\n### Supported Ruby Versions\n\n2.7, 3.0, 3.1, 3.2\n\n### Google Cloud\n\n- [Authentication Settings](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager/latest/AUTHENTICATION)\n- Required Permissions: `secretmanager.secrets.list` and `secretmanager.versions.access`\n\n#### FYI\n- [Access a secret version](https://cloud.google.com/secret-manager/docs/access-secret-version)\n- [List a secret's versions](https://cloud.google.com/secret-manager/docs/view-secret-version#list)\n- [Cloud Build network](https://cloud.google.com/build/docs/build-config-file-schema#network)\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    bundle add gsm_env\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    gem install gsm_env\n\n## Usage\n\n```ruby\nGsmEnv.load(project_id: \"your-project-id\")\n```\n\nAlternatively, you can omit the `project_id` by setting it to `GCP_PROJECT_ID` environment variable.\n\n```ruby\nENV[\"GCP_PROJECT_ID\"] = \"your-project-id\"\n\nGsmEnv.load\n```\n\n### Filtering Secrets\n\n```ruby\nGsmEnv.load(filter: \"labels.environment=production\")\n```\n\nSee https://cloud.google.com/secret-manager/docs/filtering for more details.\n\n### Customizing Environment Assignment\n\n```ruby\nGsmEnv.load do |secret|\n  ENV[\"DEVELOPMENT_#{secret.name}\"] = secret.value\nend\n```\n\nSee [test/gsm_env_test.rb](https://github.com/hidakatsuya/gsm_env/blob/main/test/gsm_env_test.rb) for more details.\n\n### Using with Rails\n\n```ruby\n# config/application.rb\nif defined?(GsmEnv)\n  GsmEnv.load(project_id: \"your-project-id\")\nend\n```\n\nSee also [hidakatsuya/shopping_list](https://github.com/hidakatsuya/shopping_list) for a reference of actual usage.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/hidakatsuya/gsm_env. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/hidakatsuya/gsm_env/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the GsmEnv project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/hidakatsuya/gsm_env/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidakatsuya%2Fgsm_env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhidakatsuya%2Fgsm_env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidakatsuya%2Fgsm_env/lists"}