<commit_before>module Fastlane
  module Actions
    class NotifyAction < Action
      def self.run(params)
        require 'terminal-notifier'

        text = params.join(' ')
        TerminalNotifier.notify(text, title: 'fastlane')
      end

      def self.description
        "Shows a Mac OS X notification"
      end

      def self.author
        "champo"
      end

      def self.is_supported?(platform)
        true
      end
    end
  end
end<commit_msg>Fix up notify to be useful/not crash: Add optional and required parameters for message, title, and subtitle.<commit_after>module Fastlane
  module Actions
    class NotifyAction < Action
      def self.run(params)
        require 'terminal-notifier'

        message  = params[:message]
        title    = params[:title] || 'fastlane'
        subtitle = params[:subtitle] if params[:subtitle]

        if subtitle
          TerminalNotifier.notify(message, title: title, subtitle: subtitle)
        else
          TerminalNotifier.notify(message, title: title)
        end
      end

      def self.description
        "Shows a Mac OS X notification"
      end

      def self.author
        "champo, cbowns"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :message,
                                       description: "The message to display in the notification",
                                       optional: false),
          FastlaneCore::ConfigItem.new(key: :title,
                                       description: "The title to display in the notification",
                                       optional: true),
          FastlaneCore::ConfigItem.new(key: :subtitle,
                                       description: "A subtitle to display in the notification",
                                       optional: true),
        ]
      end

      def self.is_supported?(platform)
        true
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06933744221879815, 'fraction_numerical': 0.0, 'mean_word_length': 1.6008010680907878, 'pattern_counts': {'":': 0, '<': 5, '<?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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6062251', 'n_tokens_mistral': 499, 'n_tokens_neox': 480, 'n_words': 145}