{"id":17133560,"url":"https://github.com/spickermann/has_configuration","last_synced_at":"2025-10-08T17:17:36.885Z","repository":{"id":11073525,"uuid":"13417971","full_name":"spickermann/has_configuration","owner":"spickermann","description":"Easy configuration management for Ruby classes with yaml file ","archived":false,"fork":false,"pushed_at":"2025-07-22T13:24:03.000Z","size":128,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-28T12:50:09.914Z","etag":null,"topics":["configuration","configuration-management","gem","rails","ruby","yml"],"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/spickermann.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,"zenodo":null}},"created_at":"2013-10-08T15:47:29.000Z","updated_at":"2025-07-22T13:24:07.000Z","dependencies_parsed_at":"2024-03-11T16:37:07.173Z","dependency_job_id":"55fc5763-bcb4-4f41-9114-da2084a818c6","html_url":"https://github.com/spickermann/has_configuration","commit_stats":{"total_commits":129,"total_committers":4,"mean_commits":32.25,"dds":0.06976744186046513,"last_synced_commit":"413c8bbc3266ac2927105b1e0c9729ea592b6b28"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/spickermann/has_configuration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spickermann%2Fhas_configuration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spickermann%2Fhas_configuration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spickermann%2Fhas_configuration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spickermann%2Fhas_configuration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spickermann","download_url":"https://codeload.github.com/spickermann/has_configuration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spickermann%2Fhas_configuration/sbom","scorecard":{"id":841363,"data":{"date":"2025-08-11","repo":{"name":"github.com/spickermann/has_configuration","commit":"5c62148c528a9c72210617e22f700f8dbee5dde1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/spickermann/has_configuration/CI.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/spickermann/has_configuration/CI.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/spickermann/has_configuration/CI.yml/main?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":0,"reason":"Found 0/16 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/CI.yml:1","Info: no jobLevel write permissions found"],"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":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: MIT-LICENSE:0","Info: FSF or OSI recognized license: MIT License: MIT-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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 17 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-23T20:33:28.778Z","repository_id":11073525,"created_at":"2025-08-23T20:33:28.778Z","updated_at":"2025-08-23T20:33:28.778Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278838463,"owners_count":26054726,"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-07T02:00:06.786Z","response_time":59,"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":["configuration","configuration-management","gem","rails","ruby","yml"],"created_at":"2024-10-14T19:42:27.927Z","updated_at":"2025-10-08T17:17:36.878Z","avatar_url":"https://github.com/spickermann.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Has Configuration\n=================\n\nLoad configuration settings from a YAML file and adds a class and an instance method `configuration` to an object.\n\n[![License MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/spickermann/has_configuration/blob/main/MIT-LICENSE)\n[![Gem Version](https://badge.fury.io/rb/has_configuration.svg)](http://badge.fury.io/rb/has_configuration)\n[![Build Status](https://github.com/spickermann/has_configuration/actions/workflows/CI.yml/badge.svg)](https://github.com/spickermann/has_configuration/actions/workflows/CI.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a740e5e773aa40e48363117832b8b9ff)](https://app.codacy.com/gh/spickermann/has_configuration/dashboard)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/a740e5e773aa40e48363117832b8b9ff)](https://app.codacy.com/gh/spickermann/has_configuration/dashboard)\n\nInstallation\n------------\n\nInclude the gem into your Gemfile:\n\n```ruby\ngem 'has_configuration'\n```\n\nWhen you are still on Ruby 1.8 or on Ruby on Rails 2.3:\n\n```ruby\ngem 'has_configuration', '~\u003e 0.2.4'\n```\n\nWhen you are still on Ruby 2.4 – 2.7:\n\n```ruby\ngem 'has_configuration', '~\u003e 5.0.1'\n```\n\nUsage\n-----\n\n```ruby\nhas_configuration\n# =\u003e loads setting without environment processing from the file #{self.class.name.downcase}.yml\n\nhas_configuration file: Rails.root.join('config', 'example.yml'), env: 'staging'\n# =\u003e loads settings for staging environment from RAILS_ROOT/config/example.yml file\n```\n\n**options**\n\n\u003cdl\u003e\n\u003cdt\u003efile\u003c/dt\u003e\n\u003cdd\u003e\n  The YAML file to load: Defaults to \u003ccode\u003econfig/classname.yml\u003c/code\u003e if Rails is\n  defined, \u003ccode\u003eclassname.yml\u003c/code\u003e otherwise.\n\u003c/dd\u003e\n\u003cdt\u003eenv\u003c/dt\u003e\n\u003cdd\u003e\n  The environment to load from the file. Defaults to `Rails.env` if Rails is defined, no default if not.\n\u003c/dd\u003e\n\nYAML File Example\n-----------------\n\nThe YAML file may contain defaults. Nesting is not limited. ERB in the YAML file is evaluated.\n\n```yaml\ndefaults: \u0026defaults\n  user: root\n  some:\n    nested: value\ndevelopment:\n  \u003c\u003c: *defaults\n  password: secret\nproduction:\n  \u003c\u003c: *defaults\n  password: \u003c%= ENV[:secret] %\u003e\n```\n\nConfiguration Retrieval\n-----------------------\n\nIf the example above was loaded into a class `Foo` in `production` environment:\n\n```ruby\nFoo.configuration                         # =\u003e \u003cHasConfiguration::Configuration:0x00...\u003e\nFoo.new.configuration                     # =\u003e \u003cHasConfiguration::Configuration:0x00...\u003e\n\n# convenient getter methods\nFoo.configuration.some.nested             # =\u003e \"value\"\n\n# to_h returns a HashWithIndifferentAccess\nFoo.configuration.to_h                    # =\u003e { :user =\u003e \"root\", :password =\u003e \"prod-secret\"\n                                          #      :some =\u003e { :nested =\u003e \"value\" } }\nFoo.configuration.to_h[:some][:nested]    # =\u003e \"value\"\nFoo.configuration.to_h[:some]['nested']   # =\u003e \"value\"\n\n# force a special key type (when merging with other hashes)\nFoo.configuration.to_h(:symbolized)       # =\u003e { :user =\u003e \"root\", :password =\u003e \"prod-secret\"\n                                          #      :some =\u003e { :nested =\u003e \"value\" } }\nFoo.configuration.to_h(:stringify)        # =\u003e { 'user' =\u003e \"root\", 'password' =\u003e \"prod-secret\"\n                                          #      'some' =\u003e { 'nested' =\u003e \"value\" } }\n```\n\nContributing\n------------\n\n1. [Fork it](http://github.com/spickermann/has_configuration/fork)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspickermann%2Fhas_configuration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspickermann%2Fhas_configuration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspickermann%2Fhas_configuration/lists"}