{"id":20756505,"url":"https://github.com/basiliscos/lua-scope","last_synced_at":"2026-04-20T18:01:40.045Z","repository":{"id":32903951,"uuid":"36498743","full_name":"basiliscos/lua-scope","owner":"basiliscos","description":"Resource Acquisition Is Initialization implementation for Lua","archived":false,"fork":false,"pushed_at":"2015-06-06T15:34:32.000Z","size":172,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T15:53:35.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basiliscos.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":"2015-05-29T10:53:30.000Z","updated_at":"2020-10-09T12:03:19.000Z","dependencies_parsed_at":"2022-07-22T04:32:06.968Z","dependency_job_id":null,"html_url":"https://github.com/basiliscos/lua-scope","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/basiliscos/lua-scope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basiliscos%2Flua-scope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basiliscos%2Flua-scope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basiliscos%2Flua-scope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basiliscos%2Flua-scope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basiliscos","download_url":"https://codeload.github.com/basiliscos/lua-scope/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basiliscos%2Flua-scope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-11-17T09:32:49.317Z","updated_at":"2026-04-20T18:01:40.029Z","avatar_url":"https://github.com/basiliscos.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"lua-scope\n=========\n\n*lua-scope* is simple Resource Acquisition Is Initialization implementation for Lua.\n\n[![Build Status](https://travis-ci.org/basiliscos/lua-scope.png)](https://travis-ci.org/basiliscos/lua-scope)\n\nSynopsis\n=========\n\n```lua\nlocal scope = require \"scope\"\n\nscope(function(guard)\n    local f = assert(io.open(\"out\", \"w\"))\n    -- always executed at the end of the function\n    guard:on_exit(function() f:close() end)\n    -- might die or might not\n    do_more_stuff(f)\n    \n    local f2 = assert(io.open(\"out\", \"w\"))\n    -- some other protector\n    guard:on_exit(function() f2:close() end)\n    do_more_stuff_2(f2)\nend)\n```\n\nInstallation\n============\n\n```luarocks install luascope```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasiliscos%2Flua-scope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasiliscos%2Flua-scope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasiliscos%2Flua-scope/lists"}