{"id":17210145,"url":"https://github.com/mockdeep/configurator","last_synced_at":"2025-10-11T01:41:40.677Z","repository":{"id":66286077,"uuid":"73635410","full_name":"mockdeep/configurator","owner":"mockdeep","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-03T03:41:02.000Z","size":230,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T12:12:53.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mockdeep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-11-13T18:42:41.000Z","updated_at":"2018-04-10T02:49:10.000Z","dependencies_parsed_at":"2023-03-13T20:30:07.824Z","dependency_job_id":null,"html_url":"https://github.com/mockdeep/configurator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mockdeep/configurator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fconfigurator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fconfigurator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fconfigurator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fconfigurator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mockdeep","download_url":"https://codeload.github.com/mockdeep/configurator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fconfigurator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005928,"owners_count":26083986,"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-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2024-10-15T02:53:30.267Z","updated_at":"2025-10-11T01:41:40.631Z","avatar_url":"https://github.com/mockdeep.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"`Configurator` allows you to easily create configuration classes. Simply\n`include Configurator` and specify the options you want to be available via\n`config`.\n\n## Defining a configuration class\n\n```ruby\nrequire 'configurator'\n\nmodule MyGem\n  class Configuration\n    include Configurator\n\n    config :name\n    config :age\n  end\nend\n```\n\n## Accessing your configuration\n\n```ruby\nconfig = MyGem::Configuration.new\nconfig.name = 'Matsumoto'\nconfig.age = 18\nconfig.name # =\u003e 'Matsumoto'\n```\n\n## Setting configuration options\n\n`Configurator` loads configuration options from three locations automatically.\nIn order of precedence, lowest to highest:\n\n1. It first tries to infer a default configuration path based on where it is\n  included from.  From your library root directory, you can add a\n  `config/default.yml`:\n\n  ```\n  my_gem\n  ├── config\n  │   └── default.yml\n  └── lib\n      └── my_gem\n          └── configuration.rb\n  ```\n\n2. It then looks in the home directory of the user for a dot config file named\n  the same as the library, e.g.: `~/.my_gem.yml`. Any options in this file will\n  supercede what is defined in the library `config/defaults.yml`.\n\n3. Finally, `Configurator` looks in the current execution directory for a dot\n  config file with the name of the library: `./.my_gem.yml`. The options here\n  take precedence over both the `config/default.yml` and home directory\n  `.my_gem.yml`.\n\nIf any options loaded from these config files are not specified in your config\nclass, an error will be thrown listing the invalid keys.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockdeep%2Fconfigurator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmockdeep%2Fconfigurator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockdeep%2Fconfigurator/lists"}