{"id":15792874,"url":"https://github.com/harled/matey","last_synced_at":"2025-04-28T15:32:28.210Z","repository":{"id":39015854,"uuid":"468858868","full_name":"harled/matey","owner":"harled","description":"User Engagement Tracking Components for Ahoy","archived":false,"fork":false,"pushed_at":"2025-01-14T19:31:55.000Z","size":1763,"stargazers_count":21,"open_issues_count":9,"forks_count":12,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-01T16:56:55.636Z","etag":null,"topics":["bootstrap","rails"],"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/harled.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-03-11T18:26:04.000Z","updated_at":"2025-01-14T19:31:57.000Z","dependencies_parsed_at":"2024-10-26T04:50:30.109Z","dependency_job_id":"1b1ff506-dd2b-4bba-a1c6-f2d7a85b01ee","html_url":"https://github.com/harled/matey","commit_stats":{"total_commits":121,"total_committers":15,"mean_commits":8.066666666666666,"dds":0.7933884297520661,"last_synced_commit":"1c7efd50c3733c8102710c2b233eff8db0cd03de"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harled%2Fmatey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harled%2Fmatey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harled%2Fmatey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harled%2Fmatey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harled","download_url":"https://codeload.github.com/harled/matey/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338644,"owners_count":21573590,"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":["bootstrap","rails"],"created_at":"2024-10-04T23:06:17.968Z","updated_at":"2025-04-28T15:32:28.033Z","avatar_url":"https://github.com/harled.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matey\n\n![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/harled/matey) \n![GitHub issues](https://img.shields.io/github/issues-raw/harled/matey) \n![GitHub Repo stars](https://img.shields.io/github/stars/harled/matey?logoColor=purple\u0026style=social)\n\n📈 User Engagement Tracking ViewComponents for [Ahoy](https://github.com/ankane/ahoy) data 🏴‍☠️\n\nThis gem provides a suite of prebuilt [ViewComponents](https://github.com/github/view_component) to observe user engagement in an Ahoy-powered Ruby on Rails application.\n\n\n## Installation\n\n`matey` depends on:\n* [Ahoy](https://github.com/ankane/ahoy) installed, configured and  tracking user visit and event data\n* [Bootstrap 5.1](https://getbootstrap.com/docs/5.1/getting-started/introduction/) available for styling\n\nAdd this line to the Gemfile:\n\n```ruby\n# latest from rubygems\ngem 'matey'\n\n# or latest from github\ngem 'matey', github: 'harled/matey', branch: 'main'\n```\n\nAnd then execute:\n\n    $ bundle install\n\n## Usage\n\nOnce `matey` is installed, the next step is to render a component. The data required varies by component. \nBelow is an example of how the `Matey::ActiveUsersComponent` would be \ncalled in an application. This component reports on the number of active users within the past two weeks.\n\nBelow the component is called with two named parameters which include `events` (ahoy event data) and \nthe `time_window`, which is the period to report on.\n\n```ruby\n# dashboard.html.erb\n\u003c%= render Matey::ActiveUsersComponent.new(events: Ahoy::Event.all, time_window: 1.week) %\u003e\n```\n\nIt is that simple! There should now be a card displaying the number of active users within the past week.\n\nView the available component color schemes [here](COLOR_SCHEMES.md).\n\nView the list of available components [here](COMPONENTS.md).\n\n**Note**: The more data, the more interesting the components will be. A common and helpful pattern is to capture events on all controller actions. Details on doing this can be found [here](https://github.com/ankane/ahoy#ruby).\n\n## Development\n\nAfter checking out the repository, run the following commands to get started:\n\n```bash\n# install required packages\nbin/setup\n\n# install spec/sample packages\nbundle install --gemfile spec/sample/Gemfile\n\n# run test cases and ensure everything is passing\nrake spec\n\n# an interactive prompt that will allow you to experiment with matey\nbin/console\n```\n\nTo install `matey` and make it available as a regular rubygem, run the following command: `bundle exec rake install`\n\n### Sample Application\n\nViewComponents are pretty hard to test without a Ruby on Rails application. This repository includes a sample application that makes it easy to see how a component renders and make quick adjustments.\n\nTo use the sample application: \n\n1. `cd spec/sample`\n2. `bundle`\n3. `bundle exec rails s`\n4. Open a browser to `localhost:3000`\n\n## Testing\n\nTo run the test cases:\n\n1. `rails db:test:prepare`\n2. `bundle exec rake`\n\n## Releasing a New Version\n\nTo release a new version:\n\n1. Update the version number in `version.rb`\n2. Run `bundle exec rake release`\n\nThe rake task will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n\n## Contributing\n\nPlease take a look at our [Contribution Guidelines](https://github.com/harled/matey/blob/main/docs/CONTRIBUTING.md).\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the *Matey* project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/harled/matey/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharled%2Fmatey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharled%2Fmatey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharled%2Fmatey/lists"}