rbfind 2.3.1 → 2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rbfind +1 -1
  3. data/lib/rbfind.rb +7 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28dcc78acea4b26243eb554d31b6df6e97e4ab0b382df6f0cc50382c5c6721cf
4
- data.tar.gz: 8711486e4e567c6581849ac029c2f7b887f4dc707759e17ca52d7e4f45ffafa0
3
+ metadata.gz: cc576c9c24d5acd2c31b95e55bfd40b306c1510060c06c2a5d00140c1fca77dd
4
+ data.tar.gz: e2a95604bf31b4290d71b0c93da8bff1cde417407cf6c22c79872cf4132c6de3
5
5
  SHA512:
6
- metadata.gz: 928d4d2718225a08935c7590c40bd6e917cc0e520f44c657c8e9bf0d496a0b7712452408035f9355992dffb26011156cf81d5272a1e288b3f46d70bff8d8ddc2
7
- data.tar.gz: f47260d1510f30fe4e23c42e93364366be0ffeee930a5972362a370252108ade399c81e5ec2179ab5f31fd1bba093771213f112771d567d8a1c0672b45c4b785
6
+ metadata.gz: 671c10d123f2a025f4ee3b0f0b08cbe2a74ef830a0b8f56cd7485470c68051902db9ace56b00a5f479d36ceefb802d133ddd43aa5cc025286a49405ce4860e79
7
+ data.tar.gz: 39a4b9cd0565455b010228a68fefd7d021e81953cdd23c150555a83fef577a342282f42b6476c6f1e97287d9e99b659349284eae55244fbfff01edf40a2d724c
data/bin/rbfind CHANGED
@@ -142,7 +142,7 @@ module RbFind
142
142
  @binary or @block = "not binary? and (#@block)"
143
143
 
144
144
  else
145
- @block ||= if @args.last and not (File.exists? @args.last) then
145
+ @block ||= if @args.last and not (File.lstat @args.last rescue false) then
146
146
  @args.pop.dup
147
147
  else
148
148
  @puts ||= true
@@ -8,7 +8,7 @@ require "rbfind/csv"
8
8
 
9
9
  module RbFind
10
10
 
11
- VERSION = "2.3.1".freeze
11
+ VERSION = "2.4".freeze
12
12
 
13
13
  =begin rdoc
14
14
 
@@ -307,7 +307,7 @@ Sort without case sensitivity and preceding dot:
307
307
  else
308
308
  args.each { |base|
309
309
  handle_error do
310
- File.exists? base or raise "`#{base}` doesn't exist."
310
+ File.lstat base rescue raise "`#{base}` doesn't exist."
311
311
  visit_depth base
312
312
  end
313
313
  }
@@ -552,7 +552,11 @@ Sort without case sensitivity and preceding dot:
552
552
  # Check whether a directory contains an entry.
553
553
  #
554
554
  def contains? name
555
- File.exists? File.join @path, name
555
+ p = File.join @path, name
556
+ File.lstat p
557
+ true
558
+ rescue
559
+ false
556
560
  end
557
561
 
558
562
  # :call-seq:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbfind
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: '2.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-24 00:00:00.000000000 Z
11
+ date: 2020-11-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  A replacement for the standard UNIX command find.