{"id":18133311,"url":"https://github.com/andreapavoni/easy_config","last_synced_at":"2025-10-18T12:53:14.503Z","repository":{"id":62557643,"uuid":"9698944","full_name":"andreapavoni/easy_config","owner":"andreapavoni","description":"Store Ruby or Rails app settings in the easiest way","archived":false,"fork":false,"pushed_at":"2013-05-29T10:30:24.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T16:18:34.344Z","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/andreapavoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-26T15:53:15.000Z","updated_at":"2019-07-11T14:54:02.000Z","dependencies_parsed_at":"2022-11-03T06:45:29.306Z","dependency_job_id":null,"html_url":"https://github.com/andreapavoni/easy_config","commit_stats":null,"previous_names":["apeacox/easy_config"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Feasy_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Feasy_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Feasy_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Feasy_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreapavoni","download_url":"https://codeload.github.com/andreapavoni/easy_config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509820,"owners_count":20950325,"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","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-11-01T13:07:24.748Z","updated_at":"2025-10-18T12:53:09.426Z","avatar_url":"https://github.com/andreapavoni.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyConfig\n\nA simple gem to store custom app settings the easiest way. It can be used in any\nRuby application (Rails included).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```gem 'easy_configs'```\n\nthen execute:\n\n```$ bundle install```\n\nor install it yourself as:\n\n```$ gem install easy_configs```\n\n## Usage\n\nEasyConfig loads a YAML file (with eventual ERB tags, so you can use ```ENV``` variables).\nFor example, given a YAML file with a bunch of keys:\n\n```\nfoo:\n  bar: 1\n  env: \u003c%= ENV['USER'] %\u003e\n  baz:\n    nested: 2\n```\n\nHere's how to use it:\n\n```\n# Load yaml file\nMyConfig = EasyConfig.load_yaml 'path_to_yaml.yml'\n\n# Retrieve keys\nMyConfig.bar # =\u003e 1\nMyConfig.env # =\u003e YOUR_USERNAME\n\n# Retuns a nested object (EasyConfig::DeepStruct is a modified version of Ruby's OpenStruct)\nMyConfig.baz # =\u003e \u003c#EasyConfig::DeepStruct\u003e\n\n# Access a nested key\nMyConfig.baz.nested # =\u003e 2\n\n# Returns an Hash\nMyConfig.to_h # =\u003e {foo: {bar: 1, env: ..., baz: {nested: 2} }}\n\n```\n\n## Rails support\n\nEasyConfig has built-in support for Rails. It provides a generator to create an initializer and a sample config:\n\n* run the generator\n\n  ```rails generate easy_config:install```\n* edit the sample configuration in ```config/easy_config.yml```\n\nYou might want to modify ```config/initializers/easy_config.rb``` to choose another name for the object that should store the settings.\n(default name is ```EConfig```), or add additional logic. No problem, this is just a *decent default* for the lazy.\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n### Testing\n\n* clone this repo\n* run `bundle install`\n* run `rake spec`\n\n\n## License\nCopyright (c) 2013 Andrea Pavoni http://andreapavoni.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapavoni%2Feasy_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreapavoni%2Feasy_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapavoni%2Feasy_config/lists"}