lib/terminal-notifier-guard.rb in terminal-notifier-guard-1.5.3 vs lib/terminal-notifier-guard.rb in terminal-notifier-guard-1.6.0

- old
+ new

@@ -1,6 +1,6 @@ -%w(version failed notify pending success).each do |type| +%w(failed notify pending success).each do |type| require File.expand_path("../terminal_notifier/guard/#{type}", __FILE__) end module TerminalNotifier module Guard @@ -10,10 +10,11 @@ include TerminalNotifier::Guard::Pending # Returns wether or not the current platform is Mac OS X 10.8, or higher. def self.available? if @available.nil? - @available = `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip >= '10.8' + @available = `uname`.strip == 'Darwin' && + Gem::Version.new(`sw_vers -productVersion`.strip) >= Gem::Version.new('10.8') end @available end def self.execute(verbose, options)