hike 1.2.1 → 1.2.2
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.
- checksums.yaml +7 -0
- data/lib/hike/trail.rb +8 -4
- metadata +38 -47
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 01de26f4036e2ee500951abeab83b4ae19a6434d
|
4
|
+
data.tar.gz: 2ba70fc875f4d5043c4d07043ce5dae4503cca0f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 21fc21254d387204b69182230f5f039442bac40769479a91497127c90ee3a0e1c9d23617da68facb9332ef70206a9b4f142b26f4ba829e11cb448e65dfe1c5d7
|
7
|
+
data.tar.gz: 898b5bbe2f9326b5a80d7d47b7c8278324ae20a3a5bd16bd945bdc46671de7122a0f9c8a7b486e1a1e8f26fbad2d76f006469a0967665e310057ec51488c97c0
|
data/lib/hike/trail.rb
CHANGED
@@ -156,15 +156,19 @@ module Hike
|
|
156
156
|
# `Trail#entries` is equivalent to `Dir#entries`. It is not
|
157
157
|
# recommend to use this method for general purposes. It exists for
|
158
158
|
# parity with `Index#entries`.
|
159
|
-
def entries(
|
160
|
-
|
159
|
+
def entries(path)
|
160
|
+
Pathname.new(path).entries.reject { |entry| entry.to_s =~ /^\.|~$|^\#.*\#$/ }.sort
|
161
|
+
rescue Errno::ENOENT
|
162
|
+
[]
|
161
163
|
end
|
162
164
|
|
163
165
|
# `Trail#stat` is equivalent to `File#stat`. It is not
|
164
166
|
# recommend to use this method for general purposes. It exists for
|
165
167
|
# parity with `Index#stat`.
|
166
|
-
def stat(
|
167
|
-
|
168
|
+
def stat(path)
|
169
|
+
File.stat(path.to_s)
|
170
|
+
rescue Errno::ENOENT
|
171
|
+
nil
|
168
172
|
end
|
169
173
|
|
170
174
|
private
|
metadata
CHANGED
@@ -1,34 +1,36 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hike
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 1.2.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.2
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Sam Stephenson
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
date: 2013-04-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
22
27
|
description: A Ruby library for finding files in a set of paths.
|
23
|
-
email:
|
28
|
+
email:
|
24
29
|
- sstephenson@gmail.com
|
25
30
|
executables: []
|
26
|
-
|
27
31
|
extensions: []
|
28
|
-
|
29
32
|
extra_rdoc_files: []
|
30
|
-
|
31
|
-
files:
|
33
|
+
files:
|
32
34
|
- README.md
|
33
35
|
- LICENSE
|
34
36
|
- lib/hike/extensions.rb
|
@@ -37,39 +39,28 @@ files:
|
|
37
39
|
- lib/hike/paths.rb
|
38
40
|
- lib/hike/trail.rb
|
39
41
|
- lib/hike.rb
|
40
|
-
has_rdoc: true
|
41
42
|
homepage: http://github.com/sstephenson/hike
|
42
|
-
licenses:
|
43
|
-
|
43
|
+
licenses:
|
44
|
+
- MIT
|
45
|
+
metadata: {}
|
44
46
|
post_install_message:
|
45
47
|
rdoc_options: []
|
46
|
-
|
47
|
-
require_paths:
|
48
|
+
require_paths:
|
48
49
|
- lib
|
49
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
none: false
|
60
|
-
requirements:
|
61
|
-
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
hash: 3
|
64
|
-
segments:
|
65
|
-
- 0
|
66
|
-
version: "0"
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
67
60
|
requirements: []
|
68
|
-
|
69
61
|
rubyforge_project:
|
70
|
-
rubygems_version:
|
62
|
+
rubygems_version: 2.0.0
|
71
63
|
signing_key:
|
72
|
-
specification_version:
|
64
|
+
specification_version: 4
|
73
65
|
summary: Find files in a set of paths
|
74
66
|
test_files: []
|
75
|
-
|