{"id":19142215,"url":"https://github.com/eldoy/flatspace","last_synced_at":"2025-11-13T02:04:05.282Z","repository":{"id":56848107,"uuid":"77346166","full_name":"eldoy/flatspace","owner":"eldoy","description":"Request helpers for flat space ruby apps","archived":false,"fork":false,"pushed_at":"2017-01-05T23:59:58.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T12:37:33.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/eldoy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-12-25T23:07:25.000Z","updated_at":"2022-06-04T21:57:57.000Z","dependencies_parsed_at":"2022-09-07T04:51:36.124Z","dependency_job_id":null,"html_url":"https://github.com/eldoy/flatspace","commit_stats":null,"previous_names":["fugroup/flatspace"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fflatspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fflatspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fflatspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fflatspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldoy","download_url":"https://codeload.github.com/eldoy/flatspace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240223214,"owners_count":19767597,"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-11-09T07:26:20.024Z","updated_at":"2025-11-13T02:04:05.240Z","avatar_url":"https://github.com/eldoy.png","language":"Ruby","readme":"# Flatspace ruby web app helpers\nRequest helpers for flat space ruby apps running Sinatra.\n\n### Installation\n```\ngem install flatspace\n```\nor add to your Gemfile.\n\n### Usage\n```ruby\n# Include as helper in your Sinatra app\nhelpers Flatspace::Helpers::Request\n\n# Login redirect unless session[:u] is set\nlogin\n\n# Password is valid?\npassword_valid?\n\n# HTTP Basic auth authentication\nprotect!\n\n# Check HTTP Basic authorization\nauthorized?\n\n# Colorize input green or red\ngreen('text')\nred('text')\n\n# Errors, use for request errors\ne\ne[:id]\ne.any?\n\n# Params\np\np[:i]\np[:i] = 'val'\n\n# Flash\nf\nf[:i]\nf[:i] = 'val'\n\n# Session\ns\ns[:u]\ns[:u] = 'val'\n\n# Halt, stop and return\nh(val)\n\n# Go, redirect to path\ngo(path)\n\n# Go with flash[:info]\ngo(path, :i =\u003e 'message')\n\n# Go with flash[:error]\ngo(path, :e =\u003e 'error')\n\n# Show erb view and use flash.now\nnow(:view)\nnow(:view, :i =\u003e 'message')\nnow(:view, :f =\u003e 'error')\n```\n\nCreated and maintained by [Fugroup Ltd.](https://www.fugroup.net) We are the creators of [CrowdfundHQ.](https://crowdfundhq.com)\n\n`@authors: Vidar`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Fflatspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldoy%2Fflatspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Fflatspace/lists"}