All Projects → rewindio → eight_ball

rewindio / eight_ball

Licence: MIT license
Ruby gem for querying feature flags

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to eight ball

flagsmith-js-client
Javascript Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 42 (+147.06%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
toggler
toggler is a feature flag service to decouple deployment, feature enrollment and experiments
Stars: ✭ 27 (+58.82%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
laravel-rollout
A package to integrate rollout into your Laravel project.
Stars: ✭ 23 (+35.29%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
doorkeeper
A Feature Toggle for PHP
Stars: ✭ 16 (-5.88%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
js-sdk
JavaScript frontend SDK for ConfigCat. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
Stars: ✭ 21 (+23.53%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
Unleash
Unleash is the open source feature toggle service.
Stars: ✭ 4,679 (+27423.53%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
featurehub
FeatureHub - cloud native feature flags, A/B testing and remote configuration service. Real-time streaming feature updates. Provided with Java, JavaScript, Go, .Net, Android and Flutter SDKs.
Stars: ✭ 136 (+700%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
ruby-client
Ruby SDK client for Split Software
Stars: ✭ 22 (+29.41%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
ld-redux
A library to integrate launch darkly with react redux
Stars: ✭ 33 (+94.12%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
Flipper
🐬 Beautiful, performant feature flags for Ruby.
Stars: ✭ 2,732 (+15970.59%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
php-client
PHP SDK client for Split Software
Stars: ✭ 14 (-17.65%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
ld-scheduler
Schedule Launch Darkly flags on or off
Stars: ✭ 14 (-17.65%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
request store-sidekiq
Provides an easy integration between RequestStore and Sidekiq
Stars: ✭ 32 (+88.24%)
Mutual labels:  ruby-gem, ruby-on-rails
flipper
Feature Flipper, Feature Flags, Rollout Flags, Feature Toggles for Crystal
Stars: ✭ 21 (+23.53%)
Mutual labels:  feature-flags, feature-toggles
tag columns
Fast & simple Rails ActiveRecord model tagging using PostgreSQL's Array datatype
Stars: ✭ 40 (+135.29%)
Mutual labels:  ruby-gem, ruby-on-rails
superglue
A productive library for Classic Rails, React and Redux
Stars: ✭ 106 (+523.53%)
Mutual labels:  ruby-gem, ruby-on-rails
activerecord-crate-adapter
Ruby on Rails ActiveRecord adapter for CrateDB
Stars: ✭ 27 (+58.82%)
Mutual labels:  ruby-gem, ruby-on-rails
activerecord-setops
Union, Intersect, and Difference set operations for ActiveRecord (also, SQL's UnionAll).
Stars: ✭ 21 (+23.53%)
Mutual labels:  ruby-gem, ruby-on-rails
pheature-flags
Pheature flags main repository
Stars: ✭ 75 (+341.18%)
Mutual labels:  feature-flags, feature-toggles
vue-feature-toggle
No description or website provided.
Stars: ✭ 55 (+223.53%)
Mutual labels:  feature-flags, feature-toggle

EightBall

Gem Version Build

EightBall is a feature toggle querying gem

Installation

Add this line to your application's Gemfile:

gem 'eight_ball'

And then execute:

bundle

Or install it yourself as:

gem install eight_ball

Example Usage

require 'eight_ball'

# This could be read from the filesystem or be the response from an external service, etc.
json_input = %(
  [{
    "name": "Feature1",
    "enabledFor": [{
      "type": "range",
      "parameter": "accountId",
      "min": 1,
      "max": 10
    }],
    "disabledFor": [{
      "type": "list",
      "parameter": "accountId",
      "values": [2, 3]
    }]
  }]
)

# Transform the JSON into a list of Features
marshaller = EightBall::Marshallers::Json.new
features = marshaller.unmarshall json_input

# Tell EightBall about these Features
EightBall.provider = EightBall::Providers::Static.new features

# Away you go
EightBall.enabled? "Feature1", { accountId: 4 } # true
EightBall.enabled? "Feature1", { accountId: 2 } # false

More examples here

Concepts

Feature

A Feature is a part of your application that can be enabled or disabled based on various conditions. It has the following attributes:

  • name: The unique name of the Feature.
  • enabledFor: An array of Conditions for which the Feature is enabled.
  • disabledFor: An array of Conditions for which the Feature is disabled.

Condition

A Condition must either be true or false. It describes when a Feature is enabled or disabled.

Supported Conditions

  • Always: This condition is always satisfied.
  • List: This condition is satisfied if the given value belongs to its list of accepted values.
  • Never: This condition is never satisfied.
  • Range: This condition is satisfied if the given value is within the specified range (inclusive).

Provider

A Provider is able to give EightBall the list of Features it needs to answer queries.

Supported Providers

  • HTTP: Connect to a URL and use the given Marshaller to convert the response into a list of Features.
  • Static: Once initialized with a list of Features, always provides that same list of Features.

RefreshPolicies

Some Providers are able to automatically "refresh" their list of Features using a RefreshPolicy.

Supported RefreshPolicies

  • Interval: The data is considered fresh for a given number of seconds, after which it is considered stale and should be refreshed.

Marshallers

A Marshaller converts Features to and from another format.

Supported Marshaller

Development

After 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.

To install this gem onto your local machine, run bundle exec rake install.

Documenting

Documentation is written using yard syntax. You can view the generated docs by running yard server and going to http://127.0.0.1:8808/docs/EightBall

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rewindio/eight_ball.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].