Skip to content

Commit

Permalink
Merge pull request julienXX#129 from vladson/jruby_support
Browse files Browse the repository at this point in the history
Add support for JRuby
  • Loading branch information
julienXX committed Apr 4, 2015
2 parents 59b4da7 + 15c6162 commit 874b2f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Ruby/lib/terminal-notifier.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
require 'shellwords'
require 'rbconfig'

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

class UnsupportedPlatformError < StandardError; end
# Returns wether or not the current platform is Mac OS X 10.8, or higher.
def self.available?
@available ||= (/darwin/ =~ RUBY_PLATFORM) && Gem::Version.new(version) > Gem::Version.new('10.8')
@available ||= (/darwin|mac os/ =~ RbConfig::CONFIG['host_os']) && Gem::Version.new(version) > Gem::Version.new('10.8')
end

def self.version
Expand Down

0 comments on commit 874b2f6

Please sign in to comment.