We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 59b4da7 + 15c6162 commit 874b2f6Copy full SHA for 874b2f6
Ruby/lib/terminal-notifier.rb
@@ -1,12 +1,13 @@
1
require 'shellwords'
2
+require 'rbconfig'
3
4
module TerminalNotifier
5
BIN_PATH = File.expand_path('../../vendor/terminal-notifier/terminal-notifier.app/Contents/MacOS/terminal-notifier', __FILE__)
6
7
class UnsupportedPlatformError < StandardError; end
8
# Returns wether or not the current platform is Mac OS X 10.8, or higher.
9
def self.available?
- @available ||= (/darwin/ =~ RUBY_PLATFORM) && Gem::Version.new(version) > Gem::Version.new('10.8')
10
+ @available ||= (/darwin|mac os/ =~ RbConfig::CONFIG['host_os']) && Gem::Version.new(version) > Gem::Version.new('10.8')
11
end
12
13
def self.version
0 commit comments