Module: EasyPost::InternalUtilities::System

Defined in:
lib/easypost/utilities/system.rb

Class Method Summary collapse

Class Method Details

.lib_versionObject



33
34
35
# File 'lib/easypost/utilities/system.rb', line 33

def self.lib_version
  File.open(File.expand_path('../../VERSION', __dir__)).read.strip
end

.os_archObject



21
22
23
# File 'lib/easypost/utilities/system.rb', line 21

def self.os_arch
  Gem::Platform.local.cpu
end

.os_nameObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/easypost/utilities/system.rb', line 4

def self.os_name
  case RUBY_PLATFORM
  when /linux/i
    'Linux'
  when /darwin/i
    'Darwin'
  when /cygwin|mswin|mingw|bccwin|wince|emx/i
    'Windows'
  else
    'Unknown'
  end
end

.os_versionObject



17
18
19
# File 'lib/easypost/utilities/system.rb', line 17

def self.os_version
  Gem::Platform.local.version
end

.ruby_patchlevelObject



29
30
31
# File 'lib/easypost/utilities/system.rb', line 29

def self.ruby_patchlevel
  RUBY_PATCHLEVEL
end

.ruby_versionObject



25
26
27
# File 'lib/easypost/utilities/system.rb', line 25

def self.ruby_version
  RUBY_VERSION
end