{"id":13878234,"url":"https://github.com/webmachine/webmachine-ruby","last_synced_at":"2025-12-16T22:49:30.922Z","repository":{"id":1537397,"uuid":"1838008","full_name":"webmachine/webmachine-ruby","owner":"webmachine","description":"Webmachine, the HTTP toolkit (in Ruby)","archived":false,"fork":false,"pushed_at":"2025-11-27T08:23:35.000Z","size":1413,"stargazers_count":850,"open_issues_count":16,"forks_count":52,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-12-08T01:40:31.514Z","etag":null,"topics":["http-server","ruby","webmachine"],"latest_commit_sha":null,"homepage":"http://rdoc.info/github/seancribbs/webmachine-ruby/master/frames","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webmachine.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-06-02T16:10:29.000Z","updated_at":"2025-11-27T08:23:40.000Z","dependencies_parsed_at":"2024-06-18T15:16:42.836Z","dependency_job_id":"9c47900c-4468-439a-aa80-e27644e1fb79","html_url":"https://github.com/webmachine/webmachine-ruby","commit_stats":{"total_commits":555,"total_committers":44,"mean_commits":"12.613636363636363","dds":0.7477477477477478,"last_synced_commit":"2470ae64ea54ac253222f16ef91baffbc54bef48"},"previous_names":["seancribbs/webmachine-ruby"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/webmachine/webmachine-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmachine%2Fwebmachine-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmachine%2Fwebmachine-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmachine%2Fwebmachine-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmachine%2Fwebmachine-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webmachine","download_url":"https://codeload.github.com/webmachine/webmachine-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmachine%2Fwebmachine-ruby/sbom","scorecard":{"id":807774,"data":{"date":"2025-08-04","repo":{"name":"github.com/webmachine/webmachine-ruby","commit":"8added2046bd9dee162c1d1b799e694a2c1d206b"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.8,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/webmachine/webmachine-ruby/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/webmachine/webmachine-ruby/test.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T12:15:48.781Z","repository_id":1537397,"created_at":"2025-08-23T12:15:48.781Z","updated_at":"2025-08-23T12:15:48.781Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27694560,"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","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["http-server","ruby","webmachine"],"created_at":"2024-08-06T08:01:43.484Z","updated_at":"2025-12-16T22:49:30.903Z","avatar_url":"https://github.com/webmachine.png","language":"Ruby","readme":"# webmachine for Ruby\n [![Gem Version](https://badge.fury.io/rb/webmachine.svg)](https://badge.fury.io/rb/webmachine)\n [![Build Status](https://github.com/webmachine/webmachine-ruby/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/webmachine/webmachine-ruby/actions/workflows/test.yml)\n\nwebmachine-ruby is a port of\n[Webmachine](https://github.com/basho/webmachine), which is written in\nErlang.  The goal of both projects is to expose interesting parts of\nthe HTTP protocol to your application in a declarative way.  This\nmeans that you are less concerned with the procedures involved in handling\nrequests directly and more with describing facts about the resources\nthat make up your application.\nWebmachine is not a web framework _per se_, but more of a\ntoolkit for building HTTP-friendly applications. For example, it does\nnot provide a templating engine or a persistence layer; those choices\nare up to you.\n\n## Features\n\n* Handles the hard parts of content negotiation, conditional\n  requests, and response codes for you.\n* Provides a base resource with points of extension to let you\n  describe what is relevant about your particular resource.\n* Supports WEBrick and a Rack shim. Other host servers are being investigated.\n* Streaming/chunked response bodies are permitted as Enumerables,\n  Procs, or Fibers!\n* Unlike the Erlang original, it does real Language negotiation.\n* Includes a visual debugger so you can look through the decision\n  graph to determine how your resources are behaving.\n\n## Documentation \u0026 Finding Help\n\n* [How it works](/documentation/how-it-works.md) - understand how Webmachine works and the basics of creating a resource.\n* [Example resources][example-resources] showing how to implement each HTTP method.\n* [Routes][routes]\n* [Authentication and authorization][authentication-and-authorization]\n* [Validation][validation]\n* [Error handling][error-handling]\n* [Visual debugger][visual-debugger]\n* [Configurator][configurator]\n* [Webserver adapters][adapters]\n* [Versioning APIs][versioning-apis]\n* [API documentation](http://rubydoc.info/gems/webmachine/frames/file/README.md)\n* [Mailing list](mailto:webmachine.rb@librelist.com)\n* IRC channel #webmachine on freenode\n\n## Getting Started\n\nBelow we go through some examples of how to do basic things\nwith webmachine-ruby.\n\nThe first example defines a simple resource that doesn't demo the\ntrue power of Webmachine but perhaps gives a feel for how a\nWebmachine resource might look. `Webmachine::Resource.run` is available\nto provide for quick prototyping and development. In a real application\nyou will want to configure what path a resource is served from.\nSee the __Router__ section in the README for more details on how to\ndo that.\n\nThere are many other HTTP features exposed to a resource through\n{Webmachine::Resource::Callbacks}. A callback can alter the outcome\nof the decision tree Webmachine implements, and the decision tree\nis what makes Webmachine unique and powerful.\n\n### A simple static  HTML resource\n\n```ruby\nrequire 'webmachine'\n\nclass MyResource \u003c Webmachine::Resource\n  def to_html\n    \"\u003chtml\u003e\u003cbody\u003eHello, world!\u003c/body\u003e\u003c/html\u003e\"\n  end\nend\n\n# Start a web server to serve requests via localhost\nMyResource.run\n```\n\n### A simple dynamic JSON Resource\n\n```ruby\nrequire 'webmachine'\nrequire 'widget'\n\nclass MyResource \u003c Webmachine::Resource\n\n  # GET and HEAD are allowed by default, but are shown here for clarity.\n  def allowed_methods\n    ['GET','HEAD']\n  end\n\n  def content_types_provided\n    [['application/json', :to_json]]\n  end\n\n  # Return a Truthy or Falsey value\n  def resource_exists?\n    widget\n  end\n\n  def widget\n    @widget ||= Widget.find(request.path_info[:id])\n  end\n\n  def to_json\n    widget.to_json\n  end\nend\n\n```\n\n### Router\n\nThe router is used to map a resource to a given path. To map the class `MyResource` to\nthe path `/myresource` you would write something along the lines of:\n\n```ruby\nWebmachine.application.routes do\n  add ['myresource'], MyResource\nend\n\n# Start a web server to serve requests via localhost\nWebmachine.application.run\n```\n\nWhen the resource needs to be mapped with variables that will be passed into the resource, use symbols to identify which path components are variables.\n\n```ruby\n\nWebmachine.application.routes do\n  add ['myresource', :id], MyResource\nend\n\n```\n\nTo add more components to the URL mapping, simply add them to the array.\n\n```ruby\n\nWebmachine.application.routes do\n  add ['myparentresource', :parent_id, 'myresource', :id], MyResource\nend\n\n```\n\nRead more about routing [here][routes].\n\n### Application/Configurator\n\nThere is a configurator that allows you to set what IP address and port\na web server should bind to as well as what web server should serve a\nwebmachine resource. Learn how to configure your application [here][configurator].\n\n\n### Adapters\n\nWebmachine provides adapters for many popular webservers. Learn more [here][adapters].\n\n### Visual debugger\n\nIt can be hard to understand all of the decisions that Webmachine\nmakes when servicing a request to your resource, which is why we have\nthe \"visual debugger\". Learn how to configure it [here][visual-debugger].\n\n## Related libraries\n\n* [webmachine-test](https://github.com/bernd/webmachine-test) - Helpers for testing Webmachine applications\n* [webmachine-linking](https://github.com/petejohanson/webmachine-linking) - Helpers for linking between Resources, and Web Linking\n* [webmachine-actionview](https://github.com/rgarner/webmachine-actionview) - Integration of some Rails-style view conventions into Webmachine\n* [jruby-http-kit](https://github.com/nLight/jruby-http-kit) - Includes an adapter for the Clojure-based Ring library/server\n* [newrelic-webmachine](https://github.com/mdub/newrelic-webmachine) - NewRelic instrumentation\n\n## LICENSE\n\nwebmachine-ruby is licensed under the\n[Apache v2.0 license](http://www.apache.org/licenses/LICENSE-2.0). See\nLICENSE for details.\n\n[example-resources]: /documentation/examples.md\n[versioning-apis]: /documentation/versioning-apis.md\n[routes]: /documentation/routes.md\n[error-handling]: /documentation/error-handling.md\n[authentication-and-authorization]: /documentation/authentication-and-authorization.md\n[adapters]: /documentation/adapters.md\n[visual-debugger]: /documentation/visual-debugger.md\n[configurator]: /documentation/configurator.md\n[validation]: /documentation/validation.md\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmachine%2Fwebmachine-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebmachine%2Fwebmachine-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmachine%2Fwebmachine-ruby/lists"}