Package: ruby-fssm / 0.2.9-2

modify_example_rb.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Modify slightly the example to avoid requirement on rubygems
Author: Cédric Boutillier <cedric.boutillier@gmail.com>
Last-Update: 2012-05-15
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/example.rb
+++ b/example.rb
@@ -1,7 +1,8 @@
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
-
-# for rb-inotify/rb-fsevent
-require 'rubygems'
+begin
+  require 'rb-inotify'
+rescue LoadError
+  puts "Cannot load rb-inotify"
+end
 
 require 'fssm'