{"id":18084522,"url":"https://github.com/endel/tryout","last_synced_at":"2025-06-14T09:38:12.807Z","repository":{"id":59158125,"uuid":"7157168","full_name":"endel/tryout","owner":"endel","description":"Clean begin/rescue/retry utility.","archived":false,"fork":false,"pushed_at":"2013-02-01T20:51:41.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T22:34:01.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"rubygems.org/gems/tryout","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/endel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-13T23:27:56.000Z","updated_at":"2013-12-20T00:13:15.000Z","dependencies_parsed_at":"2022-09-13T20:11:24.641Z","dependency_job_id":null,"html_url":"https://github.com/endel/tryout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/endel/tryout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Ftryout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Ftryout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Ftryout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Ftryout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endel","download_url":"https://codeload.github.com/endel/tryout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Ftryout/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259712497,"owners_count":22900048,"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-31T15:07:04.695Z","updated_at":"2025-06-14T09:38:12.781Z","avatar_url":"https://github.com/endel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tryout [![Build Status](https://secure.travis-ci.org/endel/tryout.png)](http://travis-ci.org/endel/tryout)\n===\n\nAllows you to do dirty stuff without messing up your code base.\n\nBackground\n---\n\nI've found myself using begin/rescue/retry through HTTP requests frequently, due\ntimeout, weird stuff caused by a messed up third-party service, or even due\ninternet connectivity lost.\n\n\nHow to use\n---\n\n    value = Tryout.try { RestClient.get('http://www.google.com') }.retry(3)\n\n**if/unless**: call any method on the result of the `try` block.\n\n    value = Tryout.try { RestClient.get('http://www.google.com') }.retry(3, :if =\u003e :empty?)\n    value = Tryout.try { RestClient.get('http://www.google.com') }.retry(3, :unless =\u003e :present?)\n\n**block**: the result of the `try` block will be passed as argument for the second one.\nIs up to you when the result is considered invalid.\n\n    value = Tryout.try { RestClient.get('http://www.google.com') }.retry(3) do |invalid|\n      # Invalidate when response have length lesser than 100\n      invalid.length \u003c 100\n    end\n\nLicense\n---\n\nTryout is released under the MIT license. Please read the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendel%2Ftryout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendel%2Ftryout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendel%2Ftryout/lists"}