Sha256: cc78f98070a0db81b46ebfdab85bd89f3ba5f392a1671dd5e99eeb14889b4799

Contents?: true

Size: 266 Bytes

Versions: 5

Compression:

Stored size: 266 Bytes

Contents

require 'rbconfig'

module Sunspot
  module Solr
    module Java
      NULL_DEVICE = RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL' : '/dev/null'

      def self.installed?
        !system("java -version >#{NULL_DEVICE} 2>&1").nil?
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sunspot_solr-2.2.5 lib/sunspot/solr/java.rb
sunspot_solr-2.2.4 lib/sunspot/solr/java.rb
sunspot_solr-2.2.3 lib/sunspot/solr/java.rb
sunspot_solr-2.2.2 lib/sunspot/solr/java.rb
sunspot_solr-2.2.1 lib/sunspot/solr/java.rb