rogerdpack-whichr 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README +12 -1
  2. data/bin/whichr +5 -2
  3. metadata +1 -1
data/README CHANGED
@@ -23,8 +23,19 @@ Usage:
23
23
 
24
24
  Installation:
25
25
 
26
- C:\>gem install rogerdpack-whichr
26
+ C:\>gem install rogerdpack-whichr --source http://gems.github.com
27
27
 
28
28
  Enjoy.
29
29
 
30
30
  Feedback welcome rogerdpack on github/gmail
31
+
32
+ Also Related:
33
+ http://github.com/Pistos/ruby-which discovers the location of installed ruby libraries, i.e. which gem folder they're in
34
+ C:\>rwhich ruby-which
35
+ c:/ruby/lib/ruby/gems/1.9.1/gems/Pistos-ruby-which-0.5.3/lib/ruby-which.rb
36
+
37
+ Except you don't actually need it since you have
38
+ $ gem which fileutils
39
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb
40
+
41
+ Thanks Eric!
data/bin/whichr CHANGED
@@ -1,5 +1,6 @@
1
1
  # stolen from the gnuplot gem
2
2
  # and then modified
3
+ require 'rubygems'
3
4
  require 'sane'
4
5
 
5
6
  if(ARGV[0].in?( ['-h', '--help'])) || !ARGV[0]
@@ -8,7 +9,9 @@ else
8
9
  puts 'higher in the list will be executed first'
9
10
  def which ( bins )
10
11
  success = false
11
- path = '.' + File::PATH_SEPARATOR + ENV['PATH']
12
+ path = ENV['PATH']
13
+ # on windows add . [cwd]
14
+ path += ('.' + File::PATH_SEPARATOR) if RUBY_PLATFORM =~ /mswin|mingw/
12
15
 
13
16
  path.split(File::PATH_SEPARATOR).each do |dir|
14
17
  for bin in bins
@@ -39,7 +42,7 @@ else
39
42
 
40
43
  if RUBY_PLATFORM =~ /mswin|mingw/
41
44
  # windows compat.
42
- for extension in ['.exe', '.bat', '.cmd', '.dll'] do
45
+ for extension in ENV['PATHEXT'].split(';') do
43
46
  list << ARGV[0] + extension
44
47
  end
45
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rogerdpack-whichr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Pack