{"id":17330604,"url":"https://github.com/adam12/rack-unpoly","last_synced_at":"2025-04-14T17:54:11.666Z","repository":{"id":52279424,"uuid":"118069400","full_name":"adam12/rack-unpoly","owner":"adam12","description":"Integrate Unpoly with any Rack or Sinatra application","archived":false,"fork":false,"pushed_at":"2024-12-27T16:36:33.000Z","size":55,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T05:43:27.382Z","etag":null,"topics":["cuba","hanami","hobbit","padrino","rack","roda","sinatra","unpoly"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adam12.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2018-01-19T03:06:03.000Z","updated_at":"2024-12-27T16:36:37.000Z","dependencies_parsed_at":"2023-12-27T17:23:49.922Z","dependency_job_id":"2d4f69ef-5e1b-4c7e-91ad-42849a6c9713","html_url":"https://github.com/adam12/rack-unpoly","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"4026bc36fcd9d149660160f3e36eff02abe566c3"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Frack-unpoly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Frack-unpoly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Frack-unpoly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Frack-unpoly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adam12","download_url":"https://codeload.github.com/adam12/rack-unpoly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824694,"owners_count":21167345,"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":["cuba","hanami","hobbit","padrino","rack","roda","sinatra","unpoly"],"created_at":"2024-10-15T14:51:45.447Z","updated_at":"2025-04-14T17:54:11.646Z","avatar_url":"https://github.com/adam12.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unpoly for Rack \u0026 Sinatra\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"rack-unpoly\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rack-unpoly\n\n## Usage in a Rails application\n\nUse the official [Unpoly](https://rubygems.org/gems/unpoly-rails) gem from Makandra.\n\n## Usage in a Sinatra application\n\n```ruby\nrequire \"sinatra/base\"\nrequire \"sinatra/unpoly\"\n\nclass App \u003c Sinatra::Base\n  register Sinatra::Unpoly\n\n  get \"/\" do\n    if up?\n      \"Unpoly request!\"\n    else\n      \"Not Unpoly :(\"\n    end\n  end\nend\n```\n\n## Usage in a Roda application\n\nUse the [roda-unpoly](https://rubygems.org/gems/roda-unpoly) gem.\n\n## Usage in a Rack application (that's not Rails, Sinatra, or Roda)\n\n```ruby\nrequire \"rack\"\nrequire \"rack/unpoly/middleware\"\n\nuse Rack::Unpoly::Middleware\n\napp = -\u003e(env) {\n  if env[\"rack.unpoly\"].up?\n    [200, {}, [\"Unpoly request!\"]]\n  else\n    [200, {}, [\"Not Unpoly :(\"]]\n  end\n}\n\nrun app\n```\n\n## Where are the Javascript and CSS assets?\n\nI've chosen not to bundle those assets with the gem as they might be updated more\nfrequently then this library. Most Ruby web libraries outside of Rails are asset-agnostic\n(for the most part), so it's easier if you bring in your assets as you see fit for your\nspecific needs.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/adam12/rack-unpoly.\n\nI love pull requests! If you fork this project and modify it, please ping me to see\nif your changes can be incorporated back into this project.\n\nThat said, if your feature idea is nontrivial, you should probably open an issue to\n[discuss it](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/)\nbefore attempting a pull request.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam12%2Frack-unpoly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam12%2Frack-unpoly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam12%2Frack-unpoly/lists"}