{"id":13416387,"url":"https://github.com/thoughtbot/paul_revere","last_synced_at":"2025-10-31T23:30:20.930Z","repository":{"id":551539,"uuid":"181942","full_name":"thoughtbot/paul_revere","owner":"thoughtbot","description":"A library for \"one off\" announcements in Rails apps.","archived":true,"fork":false,"pushed_at":"2024-09-19T22:44:54.000Z","size":224,"stargazers_count":297,"open_issues_count":0,"forks_count":26,"subscribers_count":41,"default_branch":"main","last_synced_at":"2025-02-05T10:50:44.521Z","etag":null,"topics":["rails","ruby"],"latest_commit_sha":null,"homepage":"https://thoughtbot.com","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/thoughtbot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-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}},"created_at":"2009-04-21T16:54:17.000Z","updated_at":"2025-01-25T02:21:55.000Z","dependencies_parsed_at":"2024-03-19T16:30:00.196Z","dependency_job_id":"77cfdd85-32c7-427e-b528-90c4761f3041","html_url":"https://github.com/thoughtbot/paul_revere","commit_stats":{"total_commits":298,"total_committers":20,"mean_commits":14.9,"dds":"0.20805369127516782","last_synced_commit":"835b313148e5352e7dcd4f19de7f0260547486eb"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fpaul_revere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fpaul_revere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fpaul_revere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fpaul_revere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtbot","download_url":"https://codeload.github.com/thoughtbot/paul_revere/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239241533,"owners_count":19605938,"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":["rails","ruby"],"created_at":"2024-07-30T21:00:58.003Z","updated_at":"2025-10-31T23:30:20.888Z","avatar_url":"https://github.com/thoughtbot.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"## Deprecated as of September 19, 2024\n\npaul_revere has been deprecated. We recommend using the [noticed](https://github.com/excid3/noticed) gem.\n\n# Paul Revere\n\n[![Build Status](https://travis-ci.org/thoughtbot/paul_revere.svg?branch=master)](https://travis-ci.org/thoughtbot/paul_revere)\n\nThis gem enables the inclusion of \"one off\" announcements in Rails applications.\n\n## Installation\n\nFirst, include the gem as normal in your Gemfile:\n\n    gem \"paul_revere\"\n\nThen, run the generator to create the migration and copy the javascript.\n\n    rails generate paul_revere\n\nThe announcements JS will be installed into vendor/assets/javascripts.\nYou can add the announcement JS to `app/assets/javascripts/application.js`:\n\n    //= require announcements\n\nThis will include the javascript into the `application.js` for the entire site.\n\nFinally, create the announcements table by running the migration:\n\n    rake db:migrate\n\nCopy built-in partials into your Rails application by running:\n\n    rails generate paul_revere:views\n\n## Background\n\nPaul Revere provides...\n\n* A model called `Announcement`, which has timestamps and a \"body\" text column.\n* A `current` class method on `Announcement` which returns the latest\n  `Announcement`, or a new unsaved instance.\n* A view helper called `#current_announcement`, which will return that latest\n  `Announcement` record.\n* A view partial called `_public_announcement`, which is intended to be shown to\n  all site users.\n* A view partial called `_private_announcement`, which is intended to be shown\n  only to logged in users.  Note that this merely wraps the rendering of the\n  public announcement with a call to a helper which checks that a user is signed\n  in. There is only one type of Announcement.\n* A view partial called `_email_announcement`, which is intended to be used in\n  site emails which are sent out and need to include announcements.\n\n## Usage\n\n* Install the gem, run the migration, ensure the javascript can be accessed.\n* Use those partials in the correct places in your view code and mailer view\n  code where you want announcements to show up.\n\nFor example, to include the latest announcement for all site users:\n\n```\n\u003c%= render \"announcements/public_announcement\" %\u003e\n```\n\nTo make an announcement, use the Rails console to create a new record:\n\n```\nAnnouncement.create!(body: \"Free ice cream on Monday!\")\n```\n\nThere is a helper method called `announcement_visibility_allowed?`, which is\nwhat the `private_announcement` partial calls to determine whether to allow the\ncurrent session to view announcements.  The built-in implementation just checks\nthat `current_user` is truth-y. Override that helper method if you want to do\nsomething more interesting as a check here.\n\n## License\n\nPaul Revere is Copyright © 2009 thoughtbot, inc. It is free software, and may be\nredistributed under the terms specified in the MIT-LICENSE file.\n\n\u003c!-- START /templates/footer.md --\u003e\n## About thoughtbot\n\n![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)\n\nThis repo is maintained and funded by thoughtbot, inc.\nThe names and logos for thoughtbot are trademarks of thoughtbot, inc.\n\nWe love open source software!\nSee [our other projects][community].\nWe are [available for hire][hire].\n\n[community]: https://thoughtbot.com/community?utm_source=github\n[hire]: https://thoughtbot.com/hire-us?utm_source=github\n\n\n\u003c!-- END /templates/footer.md --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fpaul_revere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtbot%2Fpaul_revere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fpaul_revere/lists"}