Sha256: 802b364e446f948d64a4aebdcde13eeed870fda97b315766c493183cfeac468f

Contents?: true

Size: 458 Bytes

Versions: 23

Compression:

Stored size: 458 Bytes

Contents

module FSSM::Support
  class << self
    def backend
      (mac? && carbon_core?) ? 'FSEvents' : 'Polling'
    end

    def mac?
      @@mac ||= RUBY_PLATFORM =~ /darwin/i
    end

    def carbon_core?
      @@carbon_core ||= begin
        require 'osx/foundation'
        OSX.require_framework '/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework'
        true
      rescue LoadError
        false
      end
    end

  end
end

Version data entries

23 entries across 23 versions & 6 rubygems

Version Path
compass-0.8.17 lib/vendor/fssm/support.rb
fssm-0.0.8 lib/fssm/support.rb
compass-0.8.16 lib/vendor/fssm/support.rb