Sha256: d7291482c6fbf495db1c0746fabea7b35dfccf867d11322016f441da8453e1e7

Contents?: true

Size: 875 Bytes

Versions: 39

Compression:

Stored size: 875 Bytes

Contents

#
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You may
# obtain a copy of the license at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License
#

def windows?
  !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
end

def unix?
  !windows?
end

def os_x?
  !!(RUBY_PLATFORM =~ /darwin/)
end

def solaris?
  !!(RUBY_PLATFORM =~ /solaris/)
end

def freebsd?
  !!(RUBY_PLATFORM =~ /freebsd/)
end

DEV_NULL = windows? ? "NUL" : "/dev/null"

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
ohai-14.15.0 spec/support/platform_helpers.rb
ohai-15.3.1 spec/support/platform_helpers.rb
ohai-14.14.0 spec/support/platform_helpers.rb
ohai-15.2.5 spec/support/platform_helpers.rb
ohai-15.1.5 spec/support/platform_helpers.rb
ohai-15.1.3 spec/support/platform_helpers.rb
ohai-14.8.12 spec/support/platform_helpers.rb
ohai-15.0.35 spec/support/platform_helpers.rb
ohai-14.8.11 spec/support/platform_helpers.rb
ohai-13.12.6 spec/support/platform_helpers.rb
ohai-14.8.10 spec/support/platform_helpers.rb
ohai-13.12.4 spec/support/platform_helpers.rb
ohai-14.6.2 spec/support/platform_helpers.rb
ohai-14.5.4 spec/support/platform_helpers.rb
ohai-14.5.0 spec/support/platform_helpers.rb
ohai-14.4.2 spec/support/platform_helpers.rb
ohai-14.4.1 spec/support/platform_helpers.rb
ohai-14.4.0 spec/support/platform_helpers.rb
ohai-13.10.0 spec/support/platform_helpers.rb
ohai-14.3.0 spec/support/platform_helpers.rb