{"id":18323999,"url":"https://github.com/dirk/captain_config","last_synced_at":"2026-04-29T01:33:24.357Z","repository":{"id":56843269,"uuid":"153548277","full_name":"dirk/captain_config","owner":"dirk","description":"Fast, safe configuration for Ruby on Rails applications","archived":false,"fork":false,"pushed_at":"2019-08-16T19:41:16.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-30T04:45:02.255Z","etag":null,"topics":["configuration","rails","settings"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-18T01:55:08.000Z","updated_at":"2019-08-16T19:41:13.000Z","dependencies_parsed_at":"2022-09-09T04:12:20.351Z","dependency_job_id":null,"html_url":"https://github.com/dirk/captain_config","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dirk/captain_config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirk%2Fcaptain_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirk%2Fcaptain_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirk%2Fcaptain_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirk%2Fcaptain_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirk","download_url":"https://codeload.github.com/dirk/captain_config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirk%2Fcaptain_config/sbom","scorecard":{"id":344383,"data":{"date":"2025-08-11","repo":{"name":"github.com/dirk/captain_config","commit":"6adc63009a80b6df2d14b4c01de5ec24f738ce55"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T06:42:52.957Z","repository_id":56843269,"created_at":"2025-08-18T06:42:52.957Z","updated_at":"2025-08-18T06:42:52.957Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32407164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["configuration","rails","settings"],"created_at":"2024-11-05T18:30:47.487Z","updated_at":"2026-04-29T01:33:24.336Z","avatar_url":"https://github.com/dirk.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CaptainConfig\n\n[![Build Status](https://travis-ci.org/dirk/captain_config.svg?branch=master)](https://travis-ci.org/dirk/captain_config)\n\n`CaptainConfig` makes it easy to add developer-friendly configuration to control your application's behavior.\n\n## Getting Started\n\nAdd the gem to your application's Gemfile:\n\n```rb\ngem 'captain_config'\n```\n\nRun the generator to create the migration for the `captain_configs` table:\n\n```sh\nbundle exec rails generate captain_config\n```\n\n**Not on Rails?** Check out the [template](https://github.com/dirk/captain_config/blob/master/lib/generators/templates/create_captain_configs.rb.tt) for the ActiveRecord migration that would have been generated; that describes how this gem expects that table to look.\n\nThen—assuming you're using Rails—set up some configuration in your `config/initializers`:\n\n```rb\n# config/initializers/captain_config.rb\nCONFIG = CaptainConfig::Service.new do\n  new_feature_enabled :boolean, default: false\n  important_user_points_threshold :integer, default: 9000\nend\n```\n\nAdd the Puma middleware so that the configuration is reloaded out-of-band in between requests:\n\n```rb\n# config.ru\nrequire_relative 'config/environment'\n\nuse CaptainConfig::PumaMiddleware\n\nrun Rails.application\n```\n\nNow you can read the configuration anywhere! The configuration will be reloaded in between requests, so reading it in your application is a fast hash lookup.\n\n```rb\nclass User \u003c Application\n  def met_threshold?\n    points \u003e= CONFIG[:important_user_points_threshold]\n  end\nend\n```\n\n```erb\n\u003c% if CONFIG[:new_feature_enabled] %\u003e\n  \u003c%= link_to 'New Stuff!', new_feature_path %\u003e\n\u003c% end \u003e\n```\n\n### Sidekiq\n\nThere is a Sidekiq middleware to automatically reload configuration.\n\n```rb\nSidekiq.configure_server do |config|\n  config.server_middleware do |chain|\n    chain.add CaptainConfig::SidekiqMiddlewareFactory.build\n\n    # By default it only reloads every 1 second. Use the `interval:` argument\n    # to change this frequency:\n    #\n    # chain.add CaptainConfig::SidekiqMiddlewareFactory.build(interval: 5.0)\n  end\nend\n```\n\n## Contributing\n\nClone the repo and run `bundle install` to get started developing locally.\n\nThere are integration specs which set up a sample Rails application and run tests against it. As that takes some time (more than a few seconds), there is a script to run just the non-integration specs:\n\n```sh\n./script/rspec-without-integration\n```\n\nArguments are forwarded to RSpec, so if you want to run an individual spec file:\n\n```sh\n./script/rspec-without-integration spec/captain_config_spec.rb\n```\n\nBug reports and pull requests are welcome on [the GitHub repository](https://github.com/dirk/captain_config).\n\n## Code of Conduct\n\nThis project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. Everyone interacting in the project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dirk/captain_config/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nReleased under the Modified BSD license, see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirk%2Fcaptain_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirk%2Fcaptain_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirk%2Fcaptain_config/lists"}