{"id":16068137,"url":"https://github.com/ged/presentability","last_synced_at":"2025-08-18T19:44:10.763Z","repository":{"id":54480068,"uuid":"522408064","full_name":"ged/presentability","owner":"ged","description":"Facade-based presenter toolkit with minimal assumptions.","archived":false,"fork":false,"pushed_at":"2024-04-30T06:53:55.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T03:51:02.392Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ged.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2022-08-08T04:47:35.000Z","updated_at":"2024-04-30T06:53:58.000Z","dependencies_parsed_at":"2025-06-10T03:38:48.143Z","dependency_job_id":"101717f1-228f-453c-a167-9415996a3d6a","html_url":"https://github.com/ged/presentability","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ged/presentability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fpresentability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fpresentability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fpresentability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fpresentability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ged","download_url":"https://codeload.github.com/ged/presentability/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fpresentability/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271050782,"owners_count":24691184,"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-08-18T02:00:08.743Z","response_time":89,"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":[],"created_at":"2024-10-09T06:08:42.122Z","updated_at":"2025-08-18T19:44:10.706Z","avatar_url":"https://github.com/ged.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Presentability\n\nhome\n: https://hg.sr.ht/~ged/Presentability\n\ncode\n: https://hg.sr.ht/~ged/Presentability\n\ngithub\n: https://github.com/ged/presentability\n\ndocs\n: https://deveiate.org/code/presentability\n\n\n## Description\n\nFacade-based presenters with minimal assumptions. This library contains\nutilities for setting up presenters for data classes for things like web\nservices, logging output, etc.\n\nIt is intended to be dead-simple by default, returning a Hash containing\nonly the attributes you have intentionally exposed from the subject.\n\nThe most basic usage looks something like this:\n\n    require 'presentability'\n\n    # lib/acme/presenters.rb\n    module Acme::Presenters\n      extend Presentability\n      \n      presenter_for Acme::Widget do\n        expose :sku\n        expose :name\n        expose :unit_price\n      end\n    end\n\n    # lib/acme/service.rb\n    class Acme::Service \u003c Some::Webservice::Framework\n    \n      get '/api/widgets/\u003csku\u003e' do |sku|\n        widget = Acme::Widget.lookup( sku )\n        content_type 'application/json'\n        representation = Acme::Presenters.present( widget )\n        return representation.to_json\n      end\n    \n    end\n\nNote that Presentability doesn't do any encoding for you, or infer anything, or\nrequire that you alter your data classes. It's just a collection of Facades for\nyour data objects that return a limited representation of their subjects.\n\nMore details can be found in the docs for the Presentability module, and in\nPresentability::Presenter.\n\nSee GettingStarted to get started with your own presenters.\n\n\n## Prerequisites\n\n* Ruby\n\n\n## Installation\n\n    $ gem install presentability\n\n\n## Contributing\n\nYou can check out the current development source with Mercurial via its\n[project page](http://bitbucket.org/ged/presentability). Or if you prefer Git, via\n[its Github mirror](https://github.com/ged/presentability).\n\nAfter checking out the source and changing into the resulting directory, run:\n\n    $ gem install -Ng\n    $ rake setup\n\nThis will install dependencies, and do any other necessary setup for development.\n\n\n## Authors\n\n- Michael Granger \u003cged@faeriemud.org\u003e\n\n\n## License\n\nCopyright (c) 2022-2024, Michael Granger\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice,\n  this list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author/s, nor the names of the project's\n  contributors may be used to endorse or promote products derived from this\n  software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fpresentability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fged%2Fpresentability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fpresentability/lists"}