{"id":15797941,"url":"https://github.com/grokify/lita_dotenv","last_synced_at":"2025-03-31T19:45:46.178Z","repository":{"id":56881484,"uuid":"67192389","full_name":"grokify/lita_dotenv","owner":"grokify","description":"Load a Lita configuration from ENV and .env.","archived":false,"fork":false,"pushed_at":"2017-03-14T03:38:49.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-18T18:27:39.249Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grokify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-02T05:20:48.000Z","updated_at":"2020-09-10T09:32:08.000Z","dependencies_parsed_at":"2022-08-20T13:00:45.785Z","dependency_job_id":null,"html_url":"https://github.com/grokify/lita_dotenv","commit_stats":null,"previous_names":["grokify/lita-dotenv_config"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Flita_dotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Flita_dotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Flita_dotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Flita_dotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grokify","download_url":"https://codeload.github.com/grokify/lita_dotenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246531986,"owners_count":20792735,"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-10-05T00:22:12.449Z","updated_at":"2025-03-31T19:45:46.144Z","avatar_url":"https://github.com/grokify.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lita Dotenv Config Loader\n=========================\n\n[![Gem Version][gem-version-svg]][gem-version-link]\n[![Dependency Status][dependency-status-svg]][dependency-status-link]\n[![Code Climate][codeclimate-status-svg]][codeclimate-status-link]\n[![Scrutinizer Code Quality][scrutinizer-status-svg]][scrutinizer-status-link]\n[![Downloads][downloads-svg]][downloads-link]\n[![Docs][docs-rubydoc-svg]][docs-rubydoc-link]\n[![License][license-svg]][license-link]\n\n`lita_dotenv` is designed to allow storing an entire [Lita bot](https://www.lita.io/) config in an `.env` file including the following:\n\n* map environment variables to Lita config properties\n* coerce environment variable value types to Ruby types\n* load .env file if exists\n\n The `lita_config.rb` file should be as simple as:\n\n```ruby\nrequire 'lita_dotenv'\n\nLita.configure do |config|\n  config = LitaDotenv.new(config).config\nend\n```\n\n## Installation\n\nAdd `lita_dotenv` to your Lita instance's Gemfile:\n\n``` ruby\ngem \"lita_dotenv\"\n```\n\n## Configuration\n\n### .env\n\n`DotenvConfig` uses a simple parser that follows the following rules for assigning ENV variable names to Lita paths:\n\n1. all paths begin with `LITA_`\n2. all paths are designed to match Lita configure paths\n3. optional type coercion is available by setting the type as a suffix:\n  1. Symbol: `__TYPESYM`\n  2. Boolean: `__TYPEBOOL`\n  3. Integer: `__TYPEINT`\n  4. JSON: `__TYPEJSON`\n  5. JSON with symbole keys: `__TYPEJSONSYM`\n4. underscores are handled in paths by using camelCase starting with a lowercase letter where an underscore is inserted before each uppercase letter\n\n```\nLITA_ROBOT_NAME=Configbot          # config.robot.name = 'Configbot'\nLITA_ROBOT_LOCALE__TYPESYM=en      # config.robot.locale = :en\nLITA_ROBOT_logLevel__TYPESYM=info  # config.robot.log_level = :info\n```\n\n### lita_config.rb\n\nIn the ideal case, the `lita_config.rb` file should be as simple as:\n\n```ruby\nrequire 'lita_dotenv'\n\nLita.configure do |config|\n  config = LitaDotenv.new(config).config\nend\n```\n\n## To Do\n\n* Map config hash key values, e.g. `config.redis[:url]`\n\n## Change Log\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n## Links\n\nProject Repo\n\n* https://github.com/grokify/lita_dotenv\n\nLita\n\n* https://www.lita.io/\n\n## Contributing\n\n1. Fork it ( http://github.com/grokify/lita_dotenv/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\nLita Dotenv Config Loader is available under the MIT license. See [LICENSE.txt](LICENSE.txt) for details.\n\nLita Dotenv Config Loader \u0026copy; 2016 by John Wang\n\n [gem-version-svg]: https://badge.fury.io/rb/lita_dotenv.svg\n [gem-version-link]: http://badge.fury.io/rb/lita_dotenv\n [downloads-svg]: http://ruby-gem-downloads-badge.herokuapp.com/lita_dotenv\n [downloads-link]: https://rubygems.org/gems/lita_dotenv\n [dependency-status-svg]: https://gemnasium.com/grokify/lita_dotenv.svg\n [dependency-status-link]: https://gemnasium.com/grokify/lita_dotenv\n [codeclimate-status-svg]: https://codeclimate.com/github/grokify/lita_dotenv/badges/gpa.svg\n [codeclimate-status-link]: https://codeclimate.com/github/grokify/lita_dotenv\n [scrutinizer-status-svg]: https://scrutinizer-ci.com/g/grokify/lita_dotenv/badges/quality-score.png?b=master\n [scrutinizer-status-link]: https://scrutinizer-ci.com/g/grokify/lita_dotenv/?branch=master\n [docs-rubydoc-svg]: https://img.shields.io/badge/docs-rubydoc-blue.svg\n [docs-rubydoc-link]: http://www.rubydoc.info/gems/lita_dotenv/\n [license-svg]: https://img.shields.io/badge/license-MIT-blue.svg\n [license-link]: https://github.com/grokify/lita_dotenv/blob/master/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokify%2Flita_dotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrokify%2Flita_dotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokify%2Flita_dotenv/lists"}