Sha256: 527c42e7a73ada9e35485d296383fc0d92f15dde53f87bb5e3c9aac9a4494414

Contents?: true

Size: 1.02 KB

Versions: 80

Compression:

Stored size: 1.02 KB

Contents

# Copyright 2016 gRPC authors.
#
# 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 express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'rbconfig'

# This is based on http://stackoverflow.com/a/171011/159388 by Aaron Hinni

module PLATFORM
  def PLATFORM.os_name
    case RbConfig::CONFIG['host_os']
      when /cygwin|mswin|mingw|bccwin|wince|emx/
        'windows'
      when /darwin/
        'macos'
      else
        'linux'
    end
  end

  def PLATFORM.architecture
    case RbConfig::CONFIG['host_cpu']
      when /x86_64/
        'x86_64'
      else
        'x86'
    end
  end
end

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
grpc-tools-1.37.1 platform_check.rb
grpc-tools-1.37.0 platform_check.rb
grpc-tools-1.37.0.pre1 platform_check.rb
grpc-tools-1.36.0 platform_check.rb
grpc-tools-1.35.0 platform_check.rb
grpc-tools-1.35.0.pre1 platform_check.rb
grpc-tools-1.34.0 platform_check.rb
grpc-tools-1.33.0.pre1 platform_check.rb
grpc-tools-1.32.0 platform_check.rb
grpc-tools-1.32.0.pre1 platform_check.rb
grpc-tools-1.31.1 platform_check.rb
grpc-tools-1.31.0.pre2 platform_check.rb
grpc-tools-1.31.0.pre1 platform_check.rb
grpc-tools-1.30.2 platform_check.rb
grpc-tools-1.30.1 platform_check.rb
grpc-tools-1.30.0 platform_check.rb
grpc-tools-1.30.0.pre1 platform_check.rb
grpc-tools-1.28.0 platform_check.rb
grpc-tools-1.28.0.pre2 platform_check.rb
grpc-tools-1.28.0.pre1 platform_check.rb