{"id":16426272,"url":"https://github.com/eiskrenkov/open_config","last_synced_at":"2026-05-07T09:33:10.408Z","repository":{"id":40439260,"uuid":"381163581","full_name":"eiskrenkov/open_config","owner":"eiskrenkov","description":"Building deep OpenStructs from configuration files","archived":false,"fork":false,"pushed_at":"2023-02-15T23:41:58.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-26T02:11:36.026Z","etag":null,"topics":["config","configuration","gem","json","ruby","rubygems","yaml"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/open_config","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/eiskrenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"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":"2021-06-28T21:17:53.000Z","updated_at":"2022-05-08T20:17:34.000Z","dependencies_parsed_at":"2024-11-10T12:45:54.906Z","dependency_job_id":"c0d0de93-dc6a-4afa-8274-e2763b73de97","html_url":"https://github.com/eiskrenkov/open_config","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.4285714285714286,"last_synced_commit":"4972063c31bb937c4451d39a48332c4be9ec2af2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/eiskrenkov/open_config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Fopen_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Fopen_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Fopen_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Fopen_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiskrenkov","download_url":"https://codeload.github.com/eiskrenkov/open_config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Fopen_config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32731419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["config","configuration","gem","json","ruby","rubygems","yaml"],"created_at":"2024-10-11T08:08:12.795Z","updated_at":"2026-05-07T09:33:10.387Z","avatar_url":"https://github.com/eiskrenkov.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/open_config.svg)](https://badge.fury.io/rb/open_config)\n[![Build](https://github.com/eiskrenkov/open_config/actions/workflows/rspec.yml/badge.svg)](https://github.com/eiskrenkov/open_config/actions/workflows/rspec.yml)\n\n# OpenConfig\nRuby gem, that allows you to build deep OpenStructs from your YAML or JSON configuration files\n\n## Installation\nAdd `open_config` to the project's `Gemfile`:\n\n```ruby\ngem 'open_config', '~\u003e 2.0'\n```\n\nor as a dependency in your gem's `.gemspec` file\n\n```ruby\nGem::Specification.new do |spec|\n  # ...\n  spec.add_dependency 'open_config', '~\u003e 2.0'\n  # ...\nend\n```\n\n### Supported Ruby versions\n- **MRI** \u003e= 2.4\n- **JRuby** \u003e= 9.2\n\n## Usage\nImagine, you have file, called `configuration.yml` in your project's config folder:\n\n```yaml\nruby: \u003c%= 2 + 2 * 2 %\u003e\nnode:\n  string: Some String\n  integer: 123\n  float: 1.23\n  boolean: false\n  nested_node:\n    array:\n      - First Element\n      - Second Element\n```\n\nYou can create OpenConfig instance, and access configuration keys using all advantages of Ruby's `OpenStruct`\n\n```ruby\n\u003e config = OpenConfig::YAML.new('configuration.yml')\n=\u003e #\u003cOpenConfig::Node\n  ruby: 6,\n  node: #\u003cOpenConfig::Node\n    string: \"Some String\",\n    integer: 123,\n    float: 1.23,\n    boolean: false,\n    nested_node: #\u003cOpenConfig::Node array: [\"First Element\", \"Second Element\"]\u003e\u003e\u003e\n\n\u003e config.ruby\n=\u003e 6\n\n\u003e config.node\n=\u003e #\u003cOpenConfig::Node\n  string: \"Some String\",\n  integer: 123,\n  float: 1.23,\n  boolean: false,\n  nested_node: #\u003cOpenConfig::Node array: [\"First Element\", \"Second Element\"]\u003e\u003e\n\n\u003e config.node['string']\n=\u003e \"Some String\"\n\n\u003e config.node[:boolean]\n=\u003e false\n\n\u003e config.dig(:node, :string)\n=\u003e \"Some String\"\n\n\u003e config.fetch(:foobar, 123)\n=\u003e 123\n\n\u003e config.fetch(:foobar) # =\u003e Exception in `fetch': key not found: :foobar (KeyError)\n\u003e config.foobar # =\u003e Exception in `method_missing': undefined method `foobar' for #\u003cOpenConfig::Node\u003e\n```\n\nSame thing will work with `configuration.json`, just use `OpenConfig::JSON` instead\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/eiskrenkov/open_config](https://github.com/eiskrenkov/open_config)\n\n## License\n\nOpenConfig is released under [MIT License](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiskrenkov%2Fopen_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiskrenkov%2Fopen_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiskrenkov%2Fopen_config/lists"}