{"id":17942634,"url":"https://github.com/petercamilleri/insouciant","last_synced_at":"2025-04-03T13:27:41.508Z","repository":{"id":56877699,"uuid":"168875342","full_name":"PeterCamilleri/insouciant","owner":"PeterCamilleri","description":"Run Ruby code snippets without worrying about warnings, errors or exceptions. E\u0026OE for coders.","archived":false,"fork":false,"pushed_at":"2021-05-19T19:08:30.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T17:47:54.631Z","etag":null,"topics":["exception-handling","ruby","rubygem"],"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/PeterCamilleri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-02T20:37:18.000Z","updated_at":"2023-03-05T04:20:47.000Z","dependencies_parsed_at":"2022-08-20T10:40:37.121Z","dependency_job_id":null,"html_url":"https://github.com/PeterCamilleri/insouciant","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterCamilleri%2Finsouciant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterCamilleri%2Finsouciant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterCamilleri%2Finsouciant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterCamilleri%2Finsouciant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterCamilleri","download_url":"https://codeload.github.com/PeterCamilleri/insouciant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247008818,"owners_count":20868427,"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":["exception-handling","ruby","rubygem"],"created_at":"2024-10-29T03:06:32.316Z","updated_at":"2025-04-03T13:27:41.487Z","avatar_url":"https://github.com/PeterCamilleri.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Insouciant\n\nNow I recognize that sound computer science practices dictate that all code\nshould always strive to handle, on some level, all exceptions that may come up.\n\nThe reality is there are cases when you may not be aware, let alone in control\nof all the possible sources of errors. Sometimes, it would be nice to have\nyour troublesome code run, and NOT bring the house down because some host is\nunreachable or some other error beyond your control.\n\nThe [insouciant](https://en.wiktionary.org/wiki/insouciant) gem allows for\njust such a use case.\n\nThe single method in this gem, Object::insouciant allows code to be run in a\nsimple and care free manner.\n\nNow for some back story. In 2014, I had the wonderful experience of visiting\nGermany for a cruise on the Elbe river. One of the stops was the\n[Sanssouci](https://en.wikipedia.org/wiki/Sanssouci) palace in Potsdam near\nBerlin. The palace was the refuge of Frederick the Great, King of Prussia.\nA safe place without the worries, stress or concerns of that troubled man.\n\nIn English this is translated as \"insouciant\" and is the inspiration for this gem.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'insouciant'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install insouciant\n\n## Usage\n\nTo use this gem simply:\n\n```ruby\nrequire 'insouciant'\n```\n\nThen, wherever dodgy code may lurk, render it worry free. For example:\n\n```ruby\ninsouciant {latest_version_for(\"mysh\").to_s}\n```\n\nIf an error should occur, the error string of the exception will be returned.\nYou may also choose to specify an alternate return value:\n\n```ruby\ninsouciant(\"\u003cError\u003e\") {latest_version_for(\"mysh\").to_s}\n```\nAnd that is it. Compact, easy-to-use, easy-to-deal-with, and above all, trouble\nand worry free!\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 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nOR...\n\n* Make a suggestion by raising an\n [issue](https://github.com/PeterCamilleri/insouciant/issues)\n. All ideas and comments are welcome.\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](./LICENSE.txt).\n\n## Code of Conduct\n\nEveryone interacting in the pause_output project’s codebases, issue trackers,\nchat rooms and mailing lists is expected to follow the\n[code of conduct](./CODE_OF_CONDUCT.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetercamilleri%2Finsouciant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetercamilleri%2Finsouciant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetercamilleri%2Finsouciant/lists"}