<commit_before>class Beacon
  module KontaktIoExtension
    module ConfigObject
      extend ActiveSupport::Concern

      included do
        unless method_defined?(:kontakt_extended)
          attr_reader :kontakt_extended
          alias_method :_non_kontakt_io_extension_compatibility, :extension_compatibility
          alias_method :_non_kontakt_io_transmission_power, :transmission_power
          alias_method :_non_kontakt_io_signal_interval, :signal_interval

          # Overrides Beacon::ConfigObject#extension_compatibility
          # Prepare data loaded from KontaktIo API.
          def extension_compatibility(hash)
            hash = _non_kontakt_io_extension_compatibility(hash)
            hash[:transmission_power] = hash[:tx_power] if hash.key?(:tx_power)
            hash[:signal_interval] = hash[:interval] if hash.key?(:interval)
            hash.delete(:was_imported)
            hash
          end

          def current_transmission_power
            if beacon && beacon.kontakt_io_mapping && kontakt_io_active?(admin)
              config.config.tx_power || _non_kontakt_io_transmission_power
            else
              _non_kontakt_io_transmission_power
            end
          end

          def current_signal_interval
            if beacon && beacon.kontakt_io_mapping && kontakt_io_active?(admin)
              config.config.interval || _non_kontakt_io_signal_interval
            else
              _non_kontakt_io_signal_interval
            end
          end

          def transmission_power
            _non_kontakt_io_transmission_power
          end

          def signal_interval
            _non_kontakt_io_signal_interval
          end
        end
      end
    end
  end
end
<commit_msg>BOS-FF: Tooltip with current value<commit_after>class Beacon
  module KontaktIoExtension
    module ConfigObject
      extend ActiveSupport::Concern

      included do
        unless method_defined?(:kontakt_extended)
          attr_reader :kontakt_extended
          alias_method :_non_kontakt_io_extension_compatibility, :extension_compatibility
          alias_method :_non_kontakt_io_transmission_power, :transmission_power
          alias_method :_non_kontakt_io_signal_interval, :signal_interval

          # Overrides Beacon::ConfigObject#extension_compatibility
          # Prepare data loaded from KontaktIo API.
          def extension_compatibility(hash)
            hash = _non_kontakt_io_extension_compatibility(hash)
            hash[:transmission_power] = hash[:tx_power] if hash.key?(:tx_power)
            hash[:signal_interval] = hash[:interval] if hash.key?(:interval)
            hash.delete(:was_imported)
            hash
          end

          def current_transmission_power
            config.config.tx_power || _non_kontakt_io_transmission_power
          end

          def current_signal_interval
            _non_kontakt_io_signal_interval
          end

          def transmission_power
            _non_kontakt_io_transmission_power
          end

          def signal_interval
            _non_kontakt_io_signal_interval
          end
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.046408137317228225, 'fraction_numerical': 0.0, 'mean_word_length': 2.3693790149892933, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1799276', 'n_tokens_mistral': 881, 'n_tokens_neox': 866, 'n_words': 155}