Project

wheel

0.0
The project is in a healthy, maintained state
A Rails engine that provides feature flag and configuration management
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

>= 0
>= 6.0.0
 Project Readme

Wheel 🛞

A Rails engine for managing dynamic configuration and feature flags with conditional rules.

It's time for you to take the wheel.

Features

  • Dynamic Configuration Storage

    • Store and manage configuration values with type safety
    • Supported types: string, integer, float, boolean, and JSON
    • In-memory caching for fast access
    • Real-time configuration updates
  • Conditional Rules

    • Define rules based on context attributes
    • Supported operators: equals, not_equals, in, not_in, matches, greater_than, less_than
    • Multiple conditions per configuration
    • Context-based evaluation
  • Web Interface

    • Modern UI for managing configurations
    • Create and edit configuration values
    • Define conditional rules
    • Type-safe value editing

Installation

  1. Add to your Gemfile:
gem 'wheel'
  1. Install:
$ bundle install
  1. Run the installer:
$ rails generate wheel:install
$ rails db:migrate
  1. Mount the engine in config/routes.rb:
Rails.application.routes.draw do
  mount Wheel::Engine => "/wheel"
end

Usage

Basic Configuration

# Get a configuration value
value = Wheel["feature.enabled"]

# Get a configuration with context
value = Wheel["pricing.tier", user_id: "123"]

Using with Context

You can define default context attributes:

# config/initializers/wheel.rb
Wheel.configure do |config|
  config.attributes = {
    user_id: {
      name: 'User ID',
      description: 'The unique identifier of the user'
    }
  }
end

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -am 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Create a Pull Request

License

This project is licensed under the MIT License.