Sha256: d7080394440300a87f51bc4bdd05934e2c8f7ce9223f8fcd413df9459d64f64d
Contents?: true
Size: 950 Bytes
Versions: 2
Compression:
Stored size: 950 Bytes
Contents
class Autotestforphp module Notification class Config class << self attr_reader :images_directory attr_accessor :success_image, :fail_image#, :expiration_in_seconds def images_directory=(path) @images_directory = File.expand_path(path) @success_image = "#{@images_directory}/pass.png" @fail_image = "#{@images_directory}/fail.png" end end self.images_directory = "#{File.dirname(__FILE__)}/../../images/" # self.expiration_in_seconds = 3 end class << self def notify(title, msg, img = Config.success_image) case RUBY_PLATFORM when /linux/ Linux.notify(title, msg, img) when /darwin/ Mac.notify(title, msg, img) when /mswin/ Windows.notify(title, msg, img) end end end end end %w{ linux mac windows }.each { |x| require "autotestforphp/notification/#{x}" }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fgrehm-autotestforphp-0.0.1 | lib/autotestforphp/notification.rb |
fgrehm-autotestforphp-0.0.2 | lib/autotestforphp/notification.rb |