{"id":15513162,"url":"https://github.com/aldesantis/timeful","last_synced_at":"2026-04-27T21:31:49.937Z","repository":{"id":52414947,"uuid":"69356365","full_name":"aldesantis/timeful","owner":"aldesantis","description":"A Ruby on Rails engine for building timelines.","archived":false,"fork":false,"pushed_at":"2021-04-29T21:00:24.000Z","size":63,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-05T16:40:41.382Z","etag":null,"topics":["activity-streams","engine","feed","rails","ruby","timeline"],"latest_commit_sha":null,"homepage":"","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/aldesantis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-27T12:54:30.000Z","updated_at":"2020-01-22T18:37:09.000Z","dependencies_parsed_at":"2022-08-24T14:23:45.446Z","dependency_job_id":null,"html_url":"https://github.com/aldesantis/timeful","commit_stats":null,"previous_names":["alessandro1997/timeful"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/aldesantis/timeful","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Ftimeful","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Ftimeful/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Ftimeful/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Ftimeful/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aldesantis","download_url":"https://codeload.github.com/aldesantis/timeful/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Ftimeful/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32356598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["activity-streams","engine","feed","rails","ruby","timeline"],"created_at":"2024-10-02T09:54:07.650Z","updated_at":"2026-04-27T21:31:49.922Z","avatar_url":"https://github.com/aldesantis.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timeful\n\n[![Gem Version](https://badge.fury.io/rb/timeful.svg)](https://badge.fury.io/rb/timeful)\n[![Build Status](https://travis-ci.org/aldesantis/timeful.svg?branch=master)](https://travis-ci.org/aldesantis/timeful)\n[![Maintainability](https://api.codeclimate.com/v1/badges/54290b636ef759bb5c53/maintainability)](https://codeclimate.com/github/aldesantis/timeful/maintainability)\n\nTimeful is a Ruby on Rails engine for building timelines (aka \"activity streams\").\n\n## Why another gem?\n\nThere are battle-tested activity stream builders out there already (the most known being\n[PublicActivity][public_activity], [TimelineFu][timeline_fu] and [Social Stream][social_stream].\nHowever, these gems do not really create a feed for each user, but simply record a list of global\nactivities and leave you to deal with the retrieval.\n\nTimeful is different: it takes a simple approach at building user feeds and allows you to obtain\nan ordered list of feed items for each user.\n\nAlso, Timeful does not handle presentation: you will have to build your own views and controllers to\nexpose feeds. This keeps the codebase smaller and allows you to easily integrate Timeful in JSON\nAPIs.\n\n[public_activity]: https://github.com/chaps-io/public_activity\n[timeline_fu]: https://github.com/jamesgolick/timeline_fu\n[social_stream]: https://github.com/ging/social_stream\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'timeful'\n```\n\nAnd then execute:\n\n```console\n$ bundle\n```\n\nOr install it yourself as:\n\n```console\n$ gem install timeful\n```\n\nThen, run the installer generator:\n\n```console\n$ rails g timeful:install\n$ rake db:migrate\n```\n\nFinally, add the following to the model that will have a feed and publish activities (this is\nusually your `User` model, but you can use two different models):\n\n```ruby\nclass User \u003c ActiveRecord::Base\n  include Timeful::Model::Actor\n  include Timeful::Model::Subscriber\nend\n```\n\n## Usage\n\nTimeful revolves around three core concepts:\n\n- **Activity**: An _action_ taken by an _actor_ on an _target_. _Metadata_ can also be attached to\n  activities. An example would be \"John Doe (actor) wrote (action) a comment (target).\"\n- **Feed**: A collection of activities that should be accessible by a specific user.\n- **Feed item**: The instance of an activity in a user's feed.\n\nEach activity action (or \"type\") has its own class. This is required because Timeful has to know\nwhich feeds the activity should be added to.\n\nTo avoid polluting `app/models`, it is recommended to put your activities in the `app/activities`\ndirectory.\n\nHere's an example activity:\n\n```ruby\nclass CommentActivity \u003c Timeful::Activity\n  def subscribers\n    [target.post.author]\n  end\nend\n```\n\nNow, you can publish the `comment` activity:\n\n```ruby\nuser.publish_activity :comment, target: comment\n```\n\nYou can also attach metadata to the activity:\n\n```ruby\nuser.publish_activity :comment, target: comment, meta: { foo: 'bar' }\n```\n\nThis will create an `Activity` and link it to the author's feed through a `FeedItem`:\n\n```ruby\nauthor = comment.post.author\nauthor.feed_items.count # =\u003e 1\n```\n\n## Performance\n\nTODO: Write performance considerations\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/alessandro1997/timeful.\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%2Faldesantis%2Ftimeful","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldesantis%2Ftimeful","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldesantis%2Ftimeful/lists"}