Skip to content

Commit

Permalink
Basic OSX 10.10 compatibility
Browse files Browse the repository at this point in the history
10.10 is not seen as lower than 10.8 anymore.

Closes julienXX#92
  • Loading branch information
julienXX committed Jun 4, 2014
1 parent 581ca1c commit b2a6877
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Ruby/lib/terminal-notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ module TerminalNotifier
class UnsupportedPlatformError < StandardError; end
# Returns wether or not the current platform is Mac OS X 10.8, or higher.
def self.available?
@available ||= `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip >= '10.8'
@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 b2a6877

Please sign in to comment.