listen 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d489e80cf9d6b15f4a42482bba84e75d4994828e
4
- data.tar.gz: 803c713b6ce06f2a51b5c3506324f934d4d4ed69
3
+ metadata.gz: b77b3524696878ca9c7e797552c9830e0173408c
4
+ data.tar.gz: f8d88a5651b054f14feff8f810c2182c057c6d80
5
5
  SHA512:
6
- metadata.gz: 7e72f4f7c6e77871cbc17ff66b38832df74005a087197fd68ffc5bf6561bef2894fe037417d26a7ec0ca8d504eed2cbd2d518f034c64e7c47211c97d2a5059e4
7
- data.tar.gz: 3b1d258b109e74f8addd4e657ac09c8ec359cfe9ee60070f19193f3d3d38e948b5d4cffd863c3afcc93b304bf0c1f194dc6ec2013ef189e8fa4b0936425a618e
6
+ metadata.gz: 5356a5660f3dafacf6c7f7c229339835923615c237a922368302bfe8546261ba987f8b6157994549a6e629f5cdd42564e282f6dbc13a8f0c65573d19c29f9acf
7
+ data.tar.gz: 153897ff1f97a4c5bb92863f8c26d90d24071ba4300f0dd8864230898d26ca5d11c2e57e1698d5c665b2fcde1967017e8b8c6f49699d4fd76ec68f179552b2da
@@ -1,3 +1,9 @@
1
+ ## 1.1.3 - May 21, 2013
2
+
3
+ ### Bug fix
4
+
5
+ - [#117][] Fix jruby error on Pathname#relative_path_from. ([@luikore][])
6
+
1
7
  ## 1.1.2 - May 14, 2013
2
8
 
3
9
  ### Bug fix
@@ -282,6 +288,7 @@
282
288
  [#112]: https://github.com/guard/listen/issues/112
283
289
  [#113]: https://github.com/guard/listen/issues/113
284
290
  [#115]: https://github.com/guard/listen/issues/115
291
+ [#117]: https://github.com/guard/listen/issues/117
285
292
  [@Maher4Ever]: https://github.com/Maher4Ever
286
293
  [@ahoward]: https://github.com/ahoward
287
294
  [@akerbos]: https://github.com/akerbos
@@ -190,9 +190,15 @@ module Listen
190
190
  # @return [String] the relative path
191
191
  #
192
192
  def relative_to_base(path)
193
- path = path.force_encoding("BINARY") if path.respond_to?(:force_encoding)
194
- relative_path = Pathname.new(path).relative_path_from(Pathname.new directory).to_s
195
- relative_path unless relative_path.start_with?('..')
193
+ path = path.dup
194
+ regexp = "\\A#{Regexp.quote directory}(#{File::SEPARATOR}|\\z)"
195
+ if path.respond_to?(:force_encoding)
196
+ path.force_encoding("BINARY")
197
+ regexp.force_encoding("BINARY")
198
+ end
199
+ if path.sub!(Regexp.new(regexp), '')
200
+ path
201
+ end
196
202
  end
197
203
 
198
204
  private
@@ -1,3 +1,3 @@
1
1
  module Listen
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-16 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rb-fsevent