{"id":15554151,"url":"https://github.com/virtualstaticvoid/rails_simple_config","last_synced_at":"2025-10-12T18:30:22.068Z","repository":{"id":46048760,"uuid":"2257431","full_name":"virtualstaticvoid/rails_simple_config","owner":"virtualstaticvoid","description":"Simple YAML based configuration gem for Rails 3+","archived":false,"fork":false,"pushed_at":"2024-01-12T15:54:40.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T13:15:51.096Z","etag":null,"topics":["configuration","gem","rails","ruby","yaml"],"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/virtualstaticvoid.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-08-23T19:56:17.000Z","updated_at":"2021-11-17T21:17:07.000Z","dependencies_parsed_at":"2024-12-16T14:04:03.497Z","dependency_job_id":"e7f1ffec-60bc-4da7-9a8a-8b6244c314ce","html_url":"https://github.com/virtualstaticvoid/rails_simple_config","commit_stats":{"total_commits":17,"total_committers":3,"mean_commits":5.666666666666667,"dds":"0.11764705882352944","last_synced_commit":"e095f14d417cf2037ad66f1c55ec24bb6feae265"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualstaticvoid%2Frails_simple_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualstaticvoid%2Frails_simple_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualstaticvoid%2Frails_simple_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualstaticvoid%2Frails_simple_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virtualstaticvoid","download_url":"https://codeload.github.com/virtualstaticvoid/rails_simple_config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236261782,"owners_count":19120773,"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":["configuration","gem","rails","ruby","yaml"],"created_at":"2024-10-02T14:50:07.345Z","updated_at":"2025-10-12T18:30:16.755Z","avatar_url":"https://github.com/virtualstaticvoid.png","language":"Ruby","readme":"# Rails Simple Config\n\n[![Gem Version](https://badge.fury.io/rb/rails_simple_config.png)](http://badge.fury.io/rb/rails_simple_config)\n\nA simple YAML based configuration for Ruby on Rails 3+, which supports shared settings, ERB and more.\n\nInspired in part by the database configuration in Rails, [app_config](https://github.com/die-antwort/app_config) and [rails_config](https://github.com/railsjedi/rails_config).\n\n## Installation\n\nAdd RailsSimpleConfig to your Gemfile:\n\n    gem 'rails_simple_config'\n\nRun the generator to create the default configuration files:\n\n    rails generate rails_simple_config:install\n\nThe generator will create 3 files in your Rails `config` directory, namely:\n\n* `secrets.yml`\n* `secrets.example.yml`\n* `config.yml`\n\nThe `secrets.yml` should _not_ be committed to source control. It should be used to keep settings which are\nconsidered a secret; such as your Amazon credentials. It is loaded first.\n\nThe `secrets.example.yml` file can be added to source control and should serve as an _example_ of the settings\ncontained in the `secrets.yml` file.\n\nThe `config.yml` file should contain all other configuration settings.\n\n## Usage\n\n### Define configuration settings\n\nDefine your settings in the generated `secrets.yml` and `config.yml` files, found in your Rails `config` directory.\n\nBoth files contain a shared section and sections with overrides for the respective development, test and production Rails environments.\nIt can also contain ERB code so that more advanced configuration scenarios can be supported.\n\n    # example configuration\n\n    shared: \u0026shared\n\n      title: My Website Title\n      description: Meta description of the site\n      keywords: Meta keywords for search engines\n\n      no_reply_email: noreply@example.com\n\n      dynamic_setting: \u003c%= 30 * 60 %\u003e\n\n    development:\n\n      # inherit shared settings\n      \u003c\u003c: *shared\n\n      # define additional settings and overrides\n\n      # e.g. mail settings for mailcatcher\n      smtp_server: localhost\n      smtp_port: 1025\n      mail_prefix: DEV -\n\n    production:\n\n      # inherit shared settings\n      \u003c\u003c: *shared\n\n      # define additional settings and overrides\n\n      # e.g. mail settings for send grid\n      smtp_server: www.sendgrid.com\n      smtp_port: 25\n\n### Access configuration settings\n\nTo access configuration settings in your Rails application, use the `SimpleConfig` global or the `AppConfig` alias for it.\n\nFor example, in your application layout:\n\n    \u003chtml\u003e\n      \u003chead\u003e\n        \u003ctitle\u003e\u003c%= SimpleConfig.title %\u003e\u003c/title\u003e\n        \u003cmeta name=\"description\" content=\"\u003c%= SimpleConfig.description %\u003e\" /\u003e\n        \u003cmeta name=\"keywords\" content=\"\u003c%= SimpleConfig.keywords %\u003e\" /\u003e\n\n        ...\n\n      \u003c/head\u003e\n      \u003cbody\u003e\n\n        ...\n\n      \u003c/body\u003e\n    \u003c/html\u003e\n\nIn addition, unlike other Rails configuration solutions, `SimpleConfig` is available to the Rails development, test and production environment configuration files,\ninitializers and routes during startup. It can be used as a replacement for environment variables; thus making your setup and code much cleaner.\n\nFor example, the `SimpleConfig.no_reply_email` will be accessible to the [devise](https://github.com/plataformatec/devise) initializer when configuring `mailer_sender`:\n\n    # extract of the devise.rb initializer\n    Devise.setup do |config|\n\n      # ==\u003e Mailer Configuration\n      # Configure the e-mail address which will be shown in DeviseMailer.\n      config.mailer_sender = SimpleConfig.no_reply_email\n\n      ...\n\n    end\n\n### Notes\n\n`SimpleConfig` makes use of the [ActiveSupport::OrderedOptions](http://api.rubyonrails.org/classes/ActiveSupport/OrderedOptions.html) class, so accessing undefined settings will always return `nil`.\n\nIn development, the configuration is reloaded upon each request, however, any configuration used within the `application.rb` file and initializers\nwill _not_ be automatically reloaded, without having to restart your web server.\n\n## Project Info\n\nRailsSimpleConfig is hosted on [Github](http://github.com/virtualstaticvoid/rails_simple_config), where your contributions, forkings, comments and feedback are greatly welcomed.\n\nCopyright © 2011 Chris Stefano, released under the MIT license.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtualstaticvoid%2Frails_simple_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtualstaticvoid%2Frails_simple_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtualstaticvoid%2Frails_simple_config/lists"}