Skip to content

Commit

Permalink
terminal-notifier OSX 10.10 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tka committed Mar 9, 2015
1 parent 31b8ef7 commit 2fc5fd4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/ruby/common/terminal-notifier/lib/terminal-notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ module TerminalNotifier
BIN_PATH = File.expand_path('../../vendor/compassapp-notifier/compassapp-notifier.app/Contents/MacOS/compassapp', __FILE__)

class UnsupportedPlatformError < StandardError; end
# Returns wether or not the current platform is Mac OS X 10.8, or higher.

# 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'
end
@available
@available ||= Gem::Version.new(version) > Gem::Version.new('10.8')
end

def self.version
@version ||= `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip
end

def self.execute(verbose, options)
Expand Down

0 comments on commit 2fc5fd4

Please sign in to comment.