<commit_before># -*- coding: utf-8 -*-
# libnotify gemで通知する

require 'libnotify'

Plugin.create :libnotify do
  on_popup_notify do |user, text, &stop|
    if text.is_a? Diva::Model
      text = text.description
    end
    notify = Libnotify.new(
      body: text,
      summary: user.title,
      timeout: UserConfig[:notify_expire_time].to_f
    )
    notify.update<commit_msg>libnotifyにアプリケーション名を渡す refs #1346<commit_after># -*- coding: utf-8 -*-
# libnotify gemで通知する

require 'libnotify'

Plugin.create :libnotify do
  on_popup_notify do |user, text, &stop|
    if text.is_a? Diva::Model
      text = text.description
    end
    notify = Libnotify.new(
      app_name: Environment::NAME,
      body: text,
      summary: user.title,
      timeout: UserConfig[:notify_expire_time].to_f
    )
    notify.update
{'fraction_non_alphanumeric': 0.11193111931119311, 'fraction_numerical': 0.007380073800738007, 'mean_word_length': 3.0497512437810945, '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': '3084537', 'n_tokens_mistral': 290, 'n_tokens_neox': 286, 'n_words': 63}