All Projects → piotrmurach → tty-platform

piotrmurach / tty-platform

Licence: MIT license
Operating system detection

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to tty-platform

Tty Prompt
A beautiful and powerful interactive command line prompt
Stars: ✭ 1,210 (+4221.43%)
Mutual labels:  ruby-gem, tty
tty-tree
Print directory or structured data in a tree like format
Stars: ✭ 54 (+92.86%)
Mutual labels:  ruby-gem, tty
tty-editor
Opens a file or text in the user's preferred editor
Stars: ✭ 26 (-7.14%)
Mutual labels:  ruby-gem, tty
Tty Command
Execute shell commands with pretty output logging and capture stdout, stderr and exit status.
Stars: ✭ 348 (+1142.86%)
Mutual labels:  ruby-gem, tty
Tty Which
Cross-platform implementation of Unix `which` command
Stars: ✭ 11 (-60.71%)
Mutual labels:  ruby-gem, tty
Tty Spinner
A terminal spinner for tasks that have non-deterministic time frame.
Stars: ✭ 386 (+1278.57%)
Mutual labels:  ruby-gem, tty
tty-reader
A set of methods for processing keyboard input in character, line and multiline modes.
Stars: ✭ 73 (+160.71%)
Mutual labels:  ruby-gem, tty
Tty Pager
Terminal output paging - cross-platform, major ruby interpreters
Stars: ✭ 37 (+32.14%)
Mutual labels:  ruby-gem, tty
Tty Table
A flexible and intuitive table generator
Stars: ✭ 161 (+475%)
Mutual labels:  ruby-gem, tty
Microservices Platform
基于SpringBoot2.x、SpringCloud和SpringCloudAlibaba并采用前后端分离的企业级微服务多租户系统架构。并引入组件化的思想实现高内聚低耦合,项目代码简洁注释丰富上手容易,适合学习和企业中使用。真正实现了基于RBAC、jwt和oauth2的无状态统一权限认证的解决方案,面向互联网设计同时适合B端和C端用户,支持CI/CD多环境部署,并提供应用管理方便第三方系统接入;同时还集合各种微服务治理功能和监控功能。模块包括:企业级的认证系统、开发平台、应用监控、慢sql监控、统一日志、单点登录、Redis分布式高速缓存、配置中心、分布式任务调度、接口文档、代码生成等等。
Stars: ✭ 3,274 (+11592.86%)
Mutual labels:  platform
busser-rspec
Run RSpec tests through busser
Stars: ✭ 12 (-57.14%)
Mutual labels:  ruby-gem
Grpc Web Devtools
Chrome & Firefox Browser extension to aid gRPC-Web development
Stars: ✭ 223 (+696.43%)
Mutual labels:  platform
Devicehive Java Server
DeviceHive Java Server
Stars: ✭ 241 (+760.71%)
Mutual labels:  platform
stackup
a simple CLI and Ruby API for AWS CloudFormation
Stars: ✭ 89 (+217.86%)
Mutual labels:  ruby-gem
Qards
Qards is a blogging platform focused on performance and on closing the gap between content publishers and developers: https://qards.io
Stars: ✭ 226 (+707.14%)
Mutual labels:  platform
memo wise
The wise choice for Ruby memoization
Stars: ✭ 486 (+1635.71%)
Mutual labels:  ruby-gem
Blazorrepl
Write, compile, execute and share Blazor components entirely in the browser
Stars: ✭ 196 (+600%)
Mutual labels:  platform
Klepto
Klepto is a tool for copying and anonymising data
Stars: ✭ 193 (+589.29%)
Mutual labels:  platform
dice bag
DiceBag is a library of rake tasks for configuring web apps in the style of The Twelve-Factor App.
Stars: ✭ 19 (-32.14%)
Mutual labels:  platform
networker
🔧 A simple CLI tool for various networking operations
Stars: ✭ 20 (-28.57%)
Mutual labels:  tty
TTY Toolkit logo

TTY::Platform Gitter

Gem Version Actions CI Build status Code Climate Coverage Status Inline docs

Terminal platform query methods for detecting different operating systems and their properties.

TTY::Platform provides independent operating system detection component for TTY toolkit.

Installation

Add this line to your application's Gemfile:

gem 'tty-platform'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tty-platform

1. Usage

With TTY::Platform you can find out the properties of your operating system by creating an instance:

platform = TTY::Platform.new

To query for processor name use cpu method:

platform.cpu     # => 'x86_64'

A nil is returned if the value cannot be determined.

To get the system/OS name use os method:

platform.os      # => 'darwin'

A nil is returned if the value cannot be determined.

To get system's release version use version method:

platform.version # => '10.6.1'

A nil is returned. Note that many platforms do not provide this information.

In addition, you can use more generic methods to check the type of operating system out of windows, linux, mac and unix:

platform.windows?  # => false
platform.unix?     # => true
platform.linux?    # => false
platform.mac?      # => true

Contributing

  1. Fork it ( https://github.com/piotrmurach/tty-platform/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Copyright

Copyright (c) 2015 Piotr Murach. See LICENSE for further details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].