Last active
December 27, 2015 13:58
-
-
Save galaakk/7336687 to your computer and use it in GitHub Desktop.
Detect Windows platform - conditional Gem loading
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
winPlatforms = ['mswin', 'mingw', 'mingw_18', 'mingw_19', 'mingw_20'] | |
case Gem::Platform.local.os | |
when *winPlatforms | |
require 'win32console' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org" | |
gem "win32console", ">= 1.3.2", :platforms => [:mswin, :mingw, :mingw_18, :mingw_19, :mingw_20] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment