Please see the main PostHog docs.
Specifically, the Ruby integration details.
- Install Ruby (and optionally
rbenv
to control ruby versions) - Install Bundler
- Run
bundle install
to install dependencies
- Build the
posthog-ruby
gem by calling:gem build posthog-ruby.gemspec
. - Install the gem locally:
gem install ./posthog-ruby-<version>.gem
- Run
ruby example.rb
- Run
bundle exec rspec
- An example of running specific tests:
bundle exec rspec spec/posthog/client_spec.rb:26
- Get access to RubyGems from @yakkomajuri or @mariusandra
- Update
lib/posthog/version.rb
with the new version & add toCHANGELOG.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
- Run
gem build posthog-ruby.gemspec
gem push posthog-ruby-1.2.3.gem
- Authenticate with your RubyGems account and approve the publish!