{"id":19010323,"url":"https://github.com/railsware/yaml_settings","last_synced_at":"2025-08-26T01:15:48.554Z","repository":{"id":1279687,"uuid":"1219146","full_name":"railsware/yaml_settings","owner":"railsware","description":"YamlSettings is a simple configuration / settings solution that uses an ERB enabled YAML file.","archived":false,"fork":false,"pushed_at":"2011-01-04T11:17:55.000Z","size":96,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":52,"default_branch":"development","last_synced_at":"2025-02-21T15:31:27.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/railsware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-04T11:16:31.000Z","updated_at":"2017-05-23T17:51:43.000Z","dependencies_parsed_at":"2022-08-16T12:55:09.451Z","dependency_job_id":null,"html_url":"https://github.com/railsware/yaml_settings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/railsware/yaml_settings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fyaml_settings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fyaml_settings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fyaml_settings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fyaml_settings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/railsware","download_url":"https://codeload.github.com/railsware/yaml_settings/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fyaml_settings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272155834,"owners_count":24883108,"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-08-25T02:00:12.092Z","response_time":1107,"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-11-08T19:10:52.453Z","updated_at":"2025-08-26T01:15:48.533Z","avatar_url":"https://github.com/railsware.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"YamlSetings\n===========\n\nYamlSettings is a simple configuration / settings solution that uses an ERB enabled YAML file.\n\nGoals\n-----\n\n* No dependencies\n* Customized\n* DRY in configuration: base overridable configuration for all environments\n* Rails agnostic\n* Rails2/Rails3 zero configuration\n\n\nInstallation\n------------\n\n    gem install yaml_settings\n\nUsage\n-----\n\nPut yaml configuration in config/settings:\n\nconfig/settings/hosts.yml\n    ---\n    default:\n      root: example.com\n      www: www.example.com\n    development:\n      www: www.development.local\n    production:\n      www: www.production.com\n\nIn your application\n\n    require 'yaml_settings'\n    YamlSettings.options(:root =\u003e APP_ROOT, :env =\u003e APP_ENV, ...) # optionaly\n    YamlSettings.load!\n    \n    YamlSettings.configs =\u003e ['hosts']\n    YamlSettings[:hosts] =\u003e { 'www' =\u003e 'www.production.com', 'root' =\u003e 'example.com' }\n    YamlSettings.hosts =\u003e { 'www' =\u003e 'www.production.com', 'root' =\u003e 'example.com' }\n    YamlSettings.hosts[www] =\u003e 'www.production.com'\n    YamlSettings.hosts[:www] =\u003e 'www.production.com'\n    YamlSettings.hosts.www =\u003e 'www.production.com'\n\nOptions\n-------\n\nYamlSettings.options(OPTIONS)\n\n* :env          - environment for configuration ('development') \n* :root         - your application root  ('.')\n* :config_dir   - configurations directory ('config/settings')\n* :config_glob  - configuration files glob  ('*.{yml,yaml}')\n* :extensions   - configuration file extensions (%w(yml yaml))\n* :base_env     - base overridable environment for any configuration ('default')\n* :app_config   - configuration that can be applied to your application configuration ('application')\n\nRails2/Rails3 integration\n-------------------------\n\nAdd to Gemfile\n\n    gem 'yaml_settings'\n\nYou can optionally configure YamlSettings with adding next line:\n\n    YamlSettings.options([desired_options])\n\n* [rails2]: in config/environment.rb before line 'Rails::Initializer.run do |config|'\n* [rails3]: in config/application.rb before line 'class YOUR_APP_MODULE::Application \u003c Rails::Application'\n\nBy default YamlSettings applyes config/settings/application.yml to Rails.configurations.\nSo you can also configure Rails app in using yaml.\n\nExample:\n    config/settings/application.yml\n\n    ---\n    default:\n      action_mailer:\n        smtp_settings:\n          port: 25\n          domain: mydomain.com\n          address: localhost\n    production:\n        smtp_settings:\n          address: smtp.mydomain.com\n\nReferences\n----------\n\n* http://github.com/binarylogic/settingslogic\n* http://github.com/citrusbyte/settings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frailsware%2Fyaml_settings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frailsware%2Fyaml_settings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frailsware%2Fyaml_settings/lists"}