Permalink
Please sign in to comment.
Showing
with
28 additions
and 4 deletions.
- +9 −1 bin/yard
- +9 −1 bin/yardoc
- +10 −2 bin/yri
@@ -1,4 +1,12 @@ | ||
#!/usr/bin/env ruby | ||
-require File.dirname(__FILE__) + '/../lib/yard' | ||
+ | ||
+# We do all this work just to find the proper load path | ||
+path = __FILE__ | ||
+while File.symlink?(path) | ||
+ path = File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) | ||
+end | ||
+$:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib')) | ||
+ | ||
+require 'yard' | ||
YARD::CLI::CommandParser.run(*ARGV) |
10
bin/yardoc
@@ -1,4 +1,12 @@ | ||
#!/usr/bin/env ruby | ||
-require File.dirname(__FILE__) + '/../lib/yard' | ||
+ | ||
+# We do all this work just to find the proper load path | ||
+path = __FILE__ | ||
+while File.symlink?(path) | ||
+ path = File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) | ||
+end | ||
+$:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib')) | ||
+ | ||
+require 'yard' | ||
YARD::CLI::Yardoc.run(*ARGV) |
@@ -1,4 +1,12 @@ | ||
#!/usr/bin/env ruby | ||
-require File.dirname(__FILE__) + '/../lib/yard' | ||
-YARD::CLI::YRI.run(*ARGV) | ||
+# We do all this work just to find the proper load path | ||
+path = __FILE__ | ||
+while File.symlink?(path) | ||
+ path = File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) | ||
+end | ||
+$:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib')) | ||
+ | ||
+require 'yard' | ||
+ | ||
+YARD::CLI::YRI.run(*ARGV) |
0 comments on commit
313d7f8