[DRE-commits] [ruby-rspec-instafail] 51/108: refactor absolute path patch
Hideki Yamane
henrich at moszumanska.debian.org
Sun Nov 15 18:36:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to branch debian/sid
in repository ruby-rspec-instafail.
commit 017e5c95f25037579312aff8ae7757b866be61ff
Author: grosser <grosser.michael at gmail.com>
Date: Tue Jan 25 20:50:58 2011 +0100
refactor absolute path patch
---
Readme.md | 1 +
lib/rspec/instafail.rb | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Readme.md b/Readme.md
index bb01620..5f9a686 100644
--- a/Readme.md
+++ b/Readme.md
@@ -41,6 +41,7 @@ Authors
- [Matthew Willhite](http://github.com/miwillhite)
- [Jeff Kreeftmeijer](http://jeffkreeftmeijer.com)
- [Steve Tooke](http://tooky.github.com)
+ - [Josh Ellithorpe](https://github.com/zquestz)
[Michael Grosser](http://pragmatig.wordpress.com)
diff --git a/lib/rspec/instafail.rb b/lib/rspec/instafail.rb
index 0bbe5d4..9eca4c8 100644
--- a/lib/rspec/instafail.rb
+++ b/lib/rspec/instafail.rb
@@ -1,8 +1,11 @@
module RSpec
+ # when installed as plugin in jruby, lib is not in load-path
+ # https://github.com/grosser/rspec-instafail/pull/3
+ lib = File.dirname(File.dirname(__FILE__))
begin
- require File.dirname(__FILE__) + '/instafail/rspec_2'
+ require "#{lib}/rspec/instafail/rspec_2"
rescue LoadError # try rspec 1
- require File.dirname(__FILE__) + '/instafail/rspec_1'
+ require "#{lib}/rspec/instafail/rspec_1"
end
Instafail::VERSION = File.read( File.join(File.dirname(__FILE__),'..','..','VERSION') ).strip
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rspec-instafail.git
More information about the Pkg-ruby-extras-commits
mailing list