rb-fsevent 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/rb-fsevent/fsevent.rb +19 -1
- data/lib/rb-fsevent/version.rb +1 -1
- metadata +4 -4
data/README.rdoc
CHANGED
data/lib/rb-fsevent/fsevent.rb
CHANGED
@@ -25,7 +25,7 @@ private
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def launch_bin
|
28
|
-
|
28
|
+
@pipe = IO.popen("#{bin_path}/fsevent_watch #{shellescape(path)}")
|
29
29
|
end
|
30
30
|
|
31
31
|
def listen
|
@@ -39,4 +39,22 @@ private
|
|
39
39
|
stop
|
40
40
|
end
|
41
41
|
|
42
|
+
# for Ruby 1.8.6 support
|
43
|
+
def shellescape(str)
|
44
|
+
# An empty argument will be skipped, so return empty quotes.
|
45
|
+
return "''" if str.empty?
|
46
|
+
|
47
|
+
str = str.dup
|
48
|
+
|
49
|
+
# Process as a single byte sequence because not all shell
|
50
|
+
# implementations are multibyte aware.
|
51
|
+
str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/n, "\\\\\\1")
|
52
|
+
|
53
|
+
# A LF cannot be escaped with a backslash because a backslash + LF
|
54
|
+
# combo is regarded as line continuation and simply ignored.
|
55
|
+
str.gsub!(/\n/, "'\n'")
|
56
|
+
|
57
|
+
return str
|
58
|
+
end
|
59
|
+
|
42
60
|
end
|
data/lib/rb-fsevent/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb-fsevent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 5
|
10
|
+
version: 0.3.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Thibaud Guillaume-Gentil
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-26 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|