{"id":20481156,"url":"https://github.com/userlist/userlist-ruby","last_synced_at":"2026-02-11T12:42:47.979Z","repository":{"id":54964233,"uuid":"117681035","full_name":"userlist/userlist-ruby","owner":"userlist","description":"Ruby wrapper for the Userlist Push API","archived":false,"fork":false,"pushed_at":"2025-10-17T12:15:59.000Z","size":258,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-14T00:19:16.583Z","etag":null,"topics":["ruby","userlist"],"latest_commit_sha":null,"homepage":"http://userlist.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/userlist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-01-16T12:29:31.000Z","updated_at":"2025-11-04T22:48:02.000Z","dependencies_parsed_at":"2023-07-14T07:14:09.355Z","dependency_job_id":"bfb85fa8-5b89-40f2-b73c-f565418d01be","html_url":"https://github.com/userlist/userlist-ruby","commit_stats":null,"previous_names":["userlistio/userlist-ruby"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/userlist/userlist-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userlist%2Fuserlist-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userlist%2Fuserlist-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userlist%2Fuserlist-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userlist%2Fuserlist-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/userlist","download_url":"https://codeload.github.com/userlist/userlist-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userlist%2Fuserlist-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29333114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T12:42:24.625Z","status":"ssl_error","status_checked_at":"2026-02-11T12:41:23.344Z","response_time":97,"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":["ruby","userlist"],"created_at":"2024-11-15T16:07:04.394Z","updated_at":"2026-02-11T12:42:47.964Z","avatar_url":"https://github.com/userlist.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Userlist for Ruby [![Build Status](https://github.com/userlist/userlist-ruby/workflows/Tests/badge.svg)](https://github.com/userlist/userlist-ruby)\n\nThis gem helps with integrating [Userlist](https://userlist.com) into Ruby applications.\n\n\u003e To integrate Userlist into a Ruby on Rails application, please use [userlist-rails](https://github.com/userlist/userlist-rails)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'userlist'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install userlist\n\n## Configuration\n\nThe only required configuration is the Push API key. You can get your Push API key via the [Push API settings](https://app.userlist.com/settings/push) in your Userlist account.\n\nConfiguration values can either be set via the `Userlist.configure` method or as environment variables. The environment variables take precedence over configuration values from the initializer.\n\nConfiguration via environment variables:\n\n```shell\nUSERLIST_PUSH_KEY=VvB7pjDrv0V2hoaOCeZ5rIiUEPbEhSUN\nUSERLIST_PUSH_ID=6vPkJl44cm82y4aLBIzaOhuEHJd0Bm7b\n```\n\nConfiguration via an initializer:\n\n```ruby\nUserlist.configure do |config|\n  config.push_key = 'VvB7pjDrv0V2hoaOCeZ5rIiUEPbEhSUN'\n  config.push_id = '6vPkJl44cm82y4aLBIzaOhuEHJd0Bm7b'\nend\n```\n\nThe possible configuration values are listed in the table below.\n\n| Name                    | Default value                | Description                                                                                                                                |\n| ----------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| `push_key`              | `nil`                        | The push key for your account. See [Push API settings](https://app.userlist.com/settings/push).                                            |\n| `push_id`               | `nil`                        | The push id for your account. See [Push API settings](https://app.userlist.com/settings/push).                                             |\n| `push_endpoint`         | `https://push.userlist.com/` | The HTTP endpoint that the library will send data to.                                                                                      |\n| `push_strategy`         | `:threaded`                  | The strategy to use to send data to the HTTP endpoint. Possible values are `:threaded`, `:sidekiq`, `:active_job`, `:direct`, and `:null`. |\n| `push_strategy_options` | `{}`                         | Any additional options for the push strategy.                                                                                              |\n| `log_level`             | `:warn`                      | The log level for Userlist related log messages. Possible values are `:debug`, `:error`, `:fatal`, `:info`, and `:warn`                    |\n| `token_lifetime`        | `3600`                       | The lifetime of generated in-app messages tokens in seconds                                                                                |\n\n### Disabling in development and test environments\n\nAs sending test and development data into data into Userlist isn't very desirable, you can disable transmissions by setting the push strategy to `:null`.\n\n```ruby\nUserlist.configure do |config|\n  config.push_strategy = :null\nend\n```\n\n## Usage\n\nThis library is a wrapper for Userlist's Push API. For details about the accepted payloads, please check [its documentation](https://userlist.com/docs/getting-started/integration-guide/).\n\n### Tracking Users\n\nTo manually send user data into Userlist, use the `Userlist::Push.users.push` method.\n\n```ruby\nUserlist::Push.users.push(\n  identifier: 'user-1',\n  email: 'foo@example.com',\n  properties: {\n    first_name: 'Foo',\n    last_name: 'Example'\n  }\n)\n```\n\nIt's also possible to delete a user from Userlist, using the `Userlist::Push.users.delete` method.\n\n```ruby\nUserlist::Push.users.delete('user-1')\n```\n\n### Tracking Companies\n\nTo manually send company data into Userlist, use the `Userlist::Push.companies.push` method.\n\n```ruby\nUserlist::Push.companies.push(\n  identifier: 'company-1',\n  email: 'Example, Inc.',\n  properties: {\n    industry: 'Software Testing'\n  }\n)\n```\n\nIt's also possible to delete a user from Userlist, using the `Userlist::Push.companies.delete` method.\n\n```ruby\nUserlist::Push.companies.delete('user-1')\n```\n\n### Tracking Relationships\n\nTracking relationships can either be done using nested properties in user or company payloads or via the `Userlist::Push.relationships.push` method.\n\n```ruby\nUserlist::Push.relationships.push(\n  user: 'user-1',\n  company: 'company-1',\n  properties: {\n    role: 'owner'\n  }\n)\n```\n\nThis is equivalent to specifying the relationship on the user model.\n\n```ruby\nUserlist::Push.users.push(\n  identifier: 'user-1',\n  relationships: [\n    {\n      company: 'company-1',\n      properties: {\n        role: 'owner'\n      }\n    }\n  ]\n)\n```\n\nIt's also equivalent specifying the relationship on the company model.\n\n```ruby\nUserlist::Push.companies.push(\n  identifier: 'company-1',\n  relationships: [\n    {\n      user: 'user-1',\n      properties: {\n        role: 'owner'\n      }\n    }\n  ]\n)\n```\n\n### Tracking Events\n\nTo track custom events use the `Userlist::Push.events.push` method.\n\n```ruby\nUserlist::Push.events.push(\n  name: 'project_created',\n  user: 'user-1',\n  properties: {\n    project_name: 'Example project'\n  }\n)\n```\n\nInstead of just sending a user or company identifier, it's also possible to expand the properties into objects. This will update the user / company record as well as trigger the event in one operation.\n\n```ruby\nUserlist::Push.events.push(\n  name: 'project_created',\n  user: {\n    identifier: 'user-1',\n    properties: {\n      projects: 5\n    }\n  },\n  properties: {\n    project_name: 'Example project'\n  }\n)\n```\n\n### Sending Transactional Messages\n\nTo send transactional messages, use the `Userlist::Push.messages.push` method.\n\n```ruby\nmessage = {\n  user: 'user-1',\n  template: 'welcome-email',\n  properties: {\n    account_name: 'Example, Inc.',\n    billing_plan: 'Pro'\n  }\n}\n\nUserlist::Push.messages.push(message)\n```\n\n### Tokens for in-app messages\n\nIn order to use in-app messages, you must create a JWT token for the currently signed in user on the server side. To do this, please configure both the `push_key` and the `push_id` configuration variables. Afterwards, you can use the `Userlist::Token.generate` method to get a signed token for the given user identifier.\n\n```ruby\nUserlist::Token.generate('user-1')\n# =\u003e \"eyJraWQiOiI2dlBrSmw0NGNtODJ5NGFMQkl6YU9odU...kPGe8KX8JZBTQ\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at \u003chttps://github.com/userlist/userlist-ruby\u003e. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Userlist project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/userlist/userlist-ruby/blob/master/CODE_OF_CONDUCT.md).\n\n## What is Userlist?\n\n[![Userlist](https://userlist.com/images/external/userlist-logo-github.svg)](https://userlist.com/)\n\n[Userlist](https://userlist.com/) allows you to onboard and engage your SaaS users with targeted behavior-based campaigns using email or in-app messages.\n\nUserlist was started in 2017 as an alternative to bulky enterprise messaging tools. We believe that running SaaS products should be more enjoyable. Learn more [about us](https://userlist.com/about-us/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserlist%2Fuserlist-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuserlist%2Fuserlist-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserlist%2Fuserlist-ruby/lists"}