0.05
The project is in a healthy, maintained state
The PostHog ruby library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 4.4
~> 0.51.0
~> 3.16.3
~> 13.1
~> 3.13
~> 2.0
~> 0.6.0

Runtime

 Project Readme

PostHog Ruby

Please see the main PostHog docs.

Specifically, the Ruby integration details.

Developing Locally

  1. Install Ruby (and optionally rbenv to control ruby versions)
  2. Install Bundler
  3. Run bundle install to install dependencies

Running example file

  1. Build the posthog-ruby gem by calling: gem build posthog-ruby.gemspec.
  2. Install the gem locally: gem install ./posthog-ruby-<version>.gem
  3. Run ruby example.rb

Testing

  1. Run bundle exec rspec
  2. An example of running specific tests: bundle exec rspec spec/posthog/client_spec.rb:26

Questions?

How to release

  1. Get access to RubyGems from @yakkomajuri or @mariusandra
  2. Update lib/posthog/version.rb with the new version & add to CHANGELOG.md. Commit the changes:
git commit -am "Version 1.2.3"
git tag -a 1.2.3 -m "Version 1.2.3"
git push && git push --tags 
  1. Run
gem build posthog-ruby.gemspec
gem push posthog-ruby-1.2.3.gem
  1. Authenticate with your RubyGems account and approve the publish!