<commit_before># frozen_string_literal: true

require_relative "flipper/version"
require "ruby_event_store"

module RubyEventStore
  module Flipper
    def self.enable(event_store)
      ActiveSupport::Notifications.subscribe("feature_operation.flipper", NotificationHandler.new(event_store))
    end

    module Events
      class ToggleAdded < RubyEventStore::Event
      end

      class ToggleRemoved < RubyEventStore::Event
      end

      class ToggleGloballyEnabled < RubyEventStore::Event
      end

      class ToggleGloballyDisabled < RubyEventStore::Event
      end

      class ToggleEnabledForActor < RubyEventStore::Event
      end

      class ToggleDisabledForActor < RubyEventStore::Event
      end<commit_msg>Add ability to customize instrumenter<commit_after># frozen_string_literal: true

require_relative "flipper/version"
require "ruby_event_store"

module RubyEventStore
  module Flipper
    def self.enable(event_store, instrumenter: ActiveSupport::Notifications)
      instrumenter.subscribe("feature_operation.flipper", NotificationHandler.new(event_store))
    end

    module Events
      class ToggleAdded < RubyEventStore::Event
      end

      class ToggleRemoved < RubyEventStore::Event
      end

      class ToggleGloballyEnabled < RubyEventStore::Event
      end

      class ToggleGloballyDisabled < RubyEventStore::Event
      end

      class ToggleEnabledForActor < RubyEventStore::Event
      end

      class ToggleDisabledForActor < RubyEventStore::Event
      end
{'fraction_non_alphanumeric': 0.058355437665782495, 'fraction_numerical': 0.0, 'mean_word_length': 3.852090032154341, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3139468', 'n_tokens_mistral': 413, 'n_tokens_neox': 402, 'n_words': 89}