{"id":22511228,"url":"https://github.com/renderedtext/outside","last_synced_at":"2026-04-25T21:31:42.452Z","repository":{"id":137212091,"uuid":"62807613","full_name":"renderedtext/outside","owner":"renderedtext","description":"Takes care of timeouts and retries for given blocks of code.","archived":false,"fork":false,"pushed_at":"2016-09-26T15:30:44.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-04T04:16:34.546Z","etag":null,"topics":["gem","rails","retries","semaphore-open-source"],"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/renderedtext.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-07T13:10:17.000Z","updated_at":"2018-02-01T14:37:34.000Z","dependencies_parsed_at":"2025-11-15T16:02:31.556Z","dependency_job_id":null,"html_url":"https://github.com/renderedtext/outside","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renderedtext/outside","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Foutside","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Foutside/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Foutside/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Foutside/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renderedtext","download_url":"https://codeload.github.com/renderedtext/outside/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Foutside/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gem","rails","retries","semaphore-open-source"],"created_at":"2024-12-07T02:10:04.519Z","updated_at":"2026-04-25T21:31:42.446Z","avatar_url":"https://github.com/renderedtext.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Outside\n\n![Kindergarten Cop](http://www.showbiz411.com/wp-content/uploads/2015/06/Kindergarten-Cop-1-DI.jpg)\n\nWatches after your blocks of code and makes sure that they find their way back home.\n\n## Description\n\nCurrently wraps blocks of code (for example those handling outbound connections) into a timeout block. The idea is to add all of the generic things that should wrap connections and similar cases right here. Feel free to expand the gem.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'outside'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install outside\n\n## Usage\n\n```\nOutside.go(options) do\n  # code\nend\n```\n\nDefault behavior is the following: if the block passed to the method does not finish executing in the given time (default is 5 seconds), it will be stopped and a `Timeout::Error` will be raised.\n\nPossible options for changing the default behavior are:\n- `:iteration_limit` - Timeout duration for one iteration. Default value is 5 seconds.\n- `:total_limit` - Timeout duration for all of iterations (first one plus the retries). Default value is 3600 seconds (1 hour).\n- `:retry_count` - Retry count. Default is 0.\n- `:interval_duration` - Interval between retries. Default is 0.\n- `:interval_increment` - Value by which the interval is incremented between retries. Default is 0.\n- `:interval_factor` - Factor by which the interval is multiplied between retries. Default is 1.\n- `:interval_randomness` - Range of randomness for the random factor (see interval calculation below). It is a number between 0 and 1. Random factor will be a number in the range of (1 - interval_randomness, 1 + interval_randomness). Default is 0, meaning that the random factor will be 1 and therefore the interval will remain unchanged.\n- `:interval_limit` - Maximum interval value. Not set by default.\n- `:handle_timeout` - Sets if `Timeout::Error` will be raised in case of a timeout. If it is false, it will not raise anything and it will return `nil`. Default value is true.\n\nAll temporal values are in seconds.\n\nInterval calculation:\n```\niteration_interval = random_factor * (interval_factor * previous_iteration_interval + interval_increment)\n```\n\nExample with options:\n\n```\noptions = {\n  :iteration_limit =\u003e 10,\n  :retry_count =\u003e 3,\n  :interval_duration =\u003e 5\n}\n\nOutside.go(options) do\n  # code\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderedtext%2Foutside","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenderedtext%2Foutside","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderedtext%2Foutside/lists"}