Skip to content

flipt-io/flipt-grpc-ruby

Repository files navigation

Flipt::Grpc::Ruby

The official GRPC Ruby client for Flipt.

Installation

  1. Configure RubyGems to authenticate with GitHub Package Registry

  2. Update your ~/.gemrc to contain the following:

:sources:
- https://rubygems.org/
- https://{GITHUB_USERNAME}:{GITHUB_TOKEN}@rubygems.pkg.github.com/flipt-io/
  1. Add this line to your application's Gemfile:
source "https://rubygems.pkg.github.com/flipt-io" do
  gem "flipt-grpc", "1.0.0"
end
  1. And then execute:

    $ bundle

Or install it yourself as:

gem install flipt-grpc --version "1.0.0" --source "https://rubygems.pkg.github.com/flipt-io"

Usage Example

  1. Run flipt server

    $ docker run --rm -p 8080:8080 -p 9000:9000 flipt/flipt:latest

  2. Open the UI at localhost:8080 and create some flags

  3. cd examples/basic

  4. bundle install

  5. bundle exec flipt.rb

    Available Flags: [<Flipt::Flag: key: "flipt-ruby", name: "Flipt Ruby", description: "I'm flipt from Ruby", enabled: true, created_at: <Google::Protobuf::Timestamp: seconds: 1571496667, nanos: 305497800>, updated_at: <Google::Protobuf::Timestamp: seconds: 1571496667, nanos: 305497800>, variants: []>]

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/flipt-io/flipt-grpc-ruby.

License

The gem is available as open source under the terms of the MIT License.