Skip to content

Commit b2a6877

Browse files
committed
Basic OSX 10.10 compatibility
10.10 is not seen as lower than 10.8 anymore. Closes julienXX#92
1 parent 581ca1c commit b2a6877

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Ruby/lib/terminal-notifier.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ module TerminalNotifier
66
class UnsupportedPlatformError < StandardError; end
77
# Returns wether or not the current platform is Mac OS X 10.8, or higher.
88
def self.available?
9-
@available ||= `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip >= '10.8'
9+
@available ||= Gem::Version.new(version) > Gem::Version.new('10.8')
10+
end
11+
12+
def self.version
13+
@version ||= `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip
1014
end
1115

1216
def self.execute(verbose, options)

0 commit comments

Comments
 (0)