rdp / os

The OS gem allows for some easy telling if you’re on windows or not. OS.windows? as well as some other helper utilities
MIT License
145 stars 33 forks source link

Warnings emitted on minimal use #22

Closed MarkDBlackwell closed 7 years ago

MarkDBlackwell commented 8 years ago

When we check for Ruby warnings (in order to clean up and improve our own code), a minimal use of the gem produces these (messy) warnings:

$ ruby -r os -w -e' '
os-0.9.6/lib/os.rb:154: warning: mismatched indentations at 'end' with 'for' at 151
os-0.9.6/lib/os.rb:158: warning: assigned but unused variable - kb
os-0.9.6/lib/os.rb:198: warning: mismatched indentations at 'end' with 'def' at 190
os-0.9.6/lib/os.rb:240: warning: mismatched indentations at 'end' with 'case' at 218

The same warnings are emitted on Windows, as well (of course).

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.4
  - RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/mark/.rvm/gems/ruby-2.3.1
  - USER INSTALLATION DIRECTORY: /home/mark/.gem/ruby/2.3.0
  - RUBY EXECUTABLE: /home/mark/.rvm/rubies/ruby-2.3.1/bin/ruby
  - EXECUTABLE DIRECTORY: bin
  - SPEC CACHE DIRECTORY: /home/mark/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /home/mark/.rvm/rubies/ruby-2.3.1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/mark/.rvm/gems/ruby-2.3.1
     - /home/mark/.rvm/gems/ruby-2.3.1@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - bin
     - /home/mark/.rvm/gems/ruby-2.3.1@global/bin
     - /home/mark/.rvm/rubies/ruby-2.3.1/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/local/games
     - /usr/games
     - /home/mark/.rvm/bin