[DRE-commits] [ruby-fssm] 01/01: unapply patches in the upstream branch

Cédric Boutillier boutil at moszumanska.debian.org
Thu Aug 13 09:59:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-fssm.

commit 65d78c3f38f392a053801dd51a8cda4cf3041385
Author: Cédric Boutillier <boutil at debian.org>
Date:   Thu Aug 13 11:59:15 2015 +0200

    unapply patches in the upstream branch
---
 example.rb          |  9 ++++-----
 lib/fssm.rb         |  3 +++
 spec/spec_helper.rb | 10 +++++-----
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/example.rb b/example.rb
index 141ccd3..1762304 100644
--- a/example.rb
+++ b/example.rb
@@ -1,8 +1,7 @@
-begin
-  require 'rb-inotify'
-rescue LoadError
-  puts "Cannot load rb-inotify"
-end
+$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+
+# for rb-inotify/rb-fsevent
+require 'rubygems'
 
 require 'fssm'
 
diff --git a/lib/fssm.rb b/lib/fssm.rb
index 2a578f2..9843de9 100644
--- a/lib/fssm.rb
+++ b/lib/fssm.rb
@@ -1,3 +1,6 @@
+dir = File.expand_path(File.dirname(__FILE__))
+$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
+
 require 'thread'
 
 module FSSM
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 8ad59bf..18e6112 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,8 +1,8 @@
-#$LOAD_PATH.unshift(File.dirname(__FILE__))
-#$LOAD_PATH.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
-#
-#require 'rubygems'
-#require 'bundler/setup'
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
+
+require 'rubygems'
+require 'bundler/setup'
 require 'fssm'
 
 require 'rspec'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fssm.git



More information about the Pkg-ruby-extras-commits mailing list