Distroid Gem Version Dependency Status

distroid is a simple gem to detect the kernel, OS, and distro that the the current system is running on. Useful for situations where programs or commands to be run may differ between operating systems.

Installation

Add this line to your application's Gemfile:

gem 'distroid'

And then execute:

$ bundle

Or install it yourself as:

$ gem install distroid

Usage

Using Distroid is as simple as including it into your project as you would normally. The most used function is simply Distroid::distro?, which will return the distro of the current computer as a symbol.

require 'distroid'

puts "Running Fedora" if Distroid::distro? == :fedora
puts "Running Debian" if Distroid::distro? == :debian
puts "Running SUSE" if Distroid::distro? == :suse

Contributing

  1. Fork it (http://github.com/joshbeitler/distroid/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 new Pull Request