Skip to content

Commit 874b2f6

Browse files
committed
Merge pull request #129 from vladson/jruby_support
Add support for JRuby
2 parents 59b4da7 + 15c6162 commit 874b2f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: Ruby/lib/terminal-notifier.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
require 'shellwords'
2+
require 'rbconfig'
23

34
module TerminalNotifier
45
BIN_PATH = File.expand_path('../../vendor/terminal-notifier/terminal-notifier.app/Contents/MacOS/terminal-notifier', __FILE__)
56

67
class UnsupportedPlatformError < StandardError; end
78
# Returns wether or not the current platform is Mac OS X 10.8, or higher.
89
def self.available?
9-
@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')
1011
end
1112

1213
def self.version

0 commit comments

Comments
 (0)