OS gem 可以帮助您轻松判断是否运行在 Windows 上。例如,OS.windows? 以及一些其他辅助工具
The OS gem allows for some easy telling if you're on windows or not.
bundle add os…If there are any other features you'd like, let me know, I'll do what I can to add them :)
http://github.com/rdp/os for feedback et al
rubygems:
Gem::Platform.local
Gem.rubyThe reason Gem::Platform.local felt wrong to me is that it treated cygwin as windows--which for most build environments, is wrong. Hence the creation of this gem.
the facets gem (has a class similar to rubygems, above)
require 'facets/platform'
Platform.localthe "platform" gem, itself (a different gem)
FFI::Platform::OSDevelop locally:
bundle install
bundle exec guardLicense: MIT (see LICENSE file)
暂无开放 Issues,或尚未同步最近议题。