Ruby SDK

Ruby SDK v2.0.0

View on GitHub

New Features and Improvements

  • Experience Version-Based Bucketing Layout

    • The bucketing layout is now selected by experience.version, allowing for more granular control over experiment segmentation.
  • Anchored Bucketing Layout

    • Introduced anchored bucketing layout under contract v12, offering enhanced stability in bucketing logic.
  • Enhanced Rails Demo with Experiment Preview Links

    • Experiment preview links and debug_token are now integrated into the Rails demo, providing better visibility and testing capabilities.
  • Improved Event/State Preview Parity

    • Implemented naive-fold summation to enhance preview event/state parity, ensuring consistent experiment previews.

Bug Fixes

  • Rubocop and Data-Only Guard Enhancements

    • Addressed code review issues by implementing data-only guards, coercing preview IDs, and aligning with Rubocop standards. #41
  • Run Experiences Preview Target Fix

    • The preview target is now correctly forced in run_experiences, aligning behavior across all runs.
  • Steep RBS Declaration for Force Preview

    • Added force_preview_in_run_all to RBS and ensured previews are passed as non-nil arguments, resolving type system issues.
  • RBS Signature Compliance in Redactor

    • Retained URL_QUERY_PATTERN to meet RBS signature requirements, ensuring compatibility with type checking.
  • ReDoS Vulnerability Fixes in URL Redactor

    • Enhanced the URL query-stripping regex to prevent polynomial ReDoS vulnerabilities through more efficient regex patterns.

Ruby SDK v1.0.1

View on GitHub

New Features and Improvements

  • Flatten DataManager Configuration

    • The DataManager configuration has been simplified by removing the fictional "data" envelope. This change streamlines the configuration process and reduces complexity for developers.
  • Simplified Demo OFFLINE Configuration

    • The demo OFFLINE configuration has been flattened, which resolves issues with the staging CI coverage gate. This update ensures more reliable testing and continuous integration processes.

Bug Fixes

  • Removed Residual Envelope Construction

    • Eliminated unnecessary envelope constructions in fork/api-manager specifications. This cleanup improves performance and readability of the specs.
  • Enhanced Project ID Configuration

    • The config_available? method has been tightened to specifically use project.id, and additional hardening of project_id has been implemented. This addresses issue #38 by improving reliability and security of project configuration checks.

Ruby SDK v1.0.0

View on GitHub

New Features and Improvements

  • New SDK Creation Method
    Introduced ConvertSdk.create factory for easier client, DataManager, and Client instances creation. This simplifies the instantiation process and improves code readability.

  • New Enum Types Added
    Added several enums: FeatureStatus, LogLevel, SystemEvents, and GoalDataKey, providing a structured way to handle these common option sets.

  • Enhanced Error Handling
    Introduced RuleError and BucketingError singleton enums for clearer error handling during rule processing.

  • Improved Hashing
    Integrated a pure-Ruby implementation of MurmurHash3 x86 32-bit. This vendorized solution enhances performance and stability for hashing needs.

  • Advanced Comparison Logic
    Implemented 13 comparison operators ported from JavaScript, allowing for more robust rule evaluations.

  • Logical Rule Processing
    Ported OR/AND/OR_WHEN rule processing logic from JavaScript, enhancing the flexibility of rule evaluations.

  • Type Signatures for Rule Handling
    Added RBS signatures and refactored comparisons and rule management using Steep. This ensures type safety and reduces potential bugs.

  • New Sentinel Value Object
    Introduced ConvertSdk::Sentinel, a frozen singleton value object that standardizes uninitialized contexts.

  • Enhanced Type Checking
    Built a backend-spec drift gate using generated RBS and Steep probes to ensure consistency and prevent type-related errors.

  • Immutable Bucket Structures
    Added frozen BucketedVariation and BucketedFeature structs, improving data handling integrity by preventing modifications.

  • Type Checking for Supported Ruby Versions
    Enabled RBS and Steep type checking only for Ruby versions >= 3.2, aligning with compatibility standards.

Bug Fixes

  • Authentication Correction
    Fixed the staging/demo SDK-key authentication to adhere to a two-key model, ensuring consistent and secure authentication.

  • SDK Review Improvements
    Addressed issues highlighted in the Gemini review: improved fork-safety, ensured to_number method parity, and enhanced log aggregation for reliable performance.


Did this page help you?