File: modify_example_rb.patch

package info (click to toggle)
ruby-fssm 0.2.10-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 364 kB
  • sloc: ruby: 1,082; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 487 bytes parent folder | download | duplicates (5)
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'