pathspec 0.1.1 → 0.1.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/pathspec.rb +2 -2
- data/spec/unit/pathspec_spec.rb +4 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f259b8f0d32109d62b9bbc1a0f6a96c34f607cf9
|
4
|
+
data.tar.gz: 551a347443c3e6017eccee1b3ce7ca9cf1e51339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df440335455b0deea4f7ca6f8b3566868d7d58f62be038217413628931b68acc3feb8899b38bd83b219676fa70aa8ad25d2e7e57d8ba65a6e56cc1bb908a0986
|
7
|
+
data.tar.gz: 1f20ff703cf2b7f725cf744139ec26c73e60a496014a929b8ff06dceb8794dea03a73e3884036be57c4dd0d04fc122f23701c7545a160a9756d9e89c7858ced0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# pathspec-ruby CHANGELOG
|
2
2
|
|
3
|
+
## 0.1.2
|
4
|
+
- Fix for regexp matching Thanks @incase! #16
|
5
|
+
- File handling cleanup Thanks @martinandert! #13
|
6
|
+
- `from_filename` actually works now! Thanks @martinandert! #12
|
7
|
+
|
3
8
|
## 0.1.0
|
4
9
|
- Port new edgecase handling from [python-path-specification](https://github.com/cpburnz/python-path-specification/pull/8). Many thanks to @jdpace! :)
|
5
10
|
- Removed EOL Ruby support
|
data/lib/pathspec.rb
CHANGED
@@ -70,12 +70,12 @@ class PathSpec
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def drive_letter_to_path(path)
|
73
|
-
path.gsub(/^([a-zA-
|
73
|
+
path.gsub(/^([a-zA-Z]):\//, '/\1/')
|
74
74
|
end
|
75
75
|
|
76
76
|
# Generate specs from a filename, such as a .gitignore
|
77
77
|
def self.from_filename(filename, type=:git)
|
78
|
-
|
78
|
+
File.open(filename, 'r') { |io| self.from_lines(io, type) }
|
79
79
|
end
|
80
80
|
|
81
81
|
def self.from_lines(lines, type=:git)
|
data/spec/unit/pathspec_spec.rb
CHANGED
@@ -310,8 +310,10 @@ REGEX
|
|
310
310
|
|
311
311
|
context "#from_filename" do
|
312
312
|
it "forwards the type argument" do
|
313
|
-
|
314
|
-
|
313
|
+
io = double
|
314
|
+
|
315
|
+
expect(File).to receive(:open).and_yield(io)
|
316
|
+
expect(PathSpec).to receive(:from_lines).with(io, :regex)
|
315
317
|
|
316
318
|
PathSpec.from_filename "/some/file", :regex
|
317
319
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pathspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon High
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.0'
|
41
41
|
description: Use to match path patterns such as gitignore
|
42
42
|
email: bh@brandon-high.com
|
43
43
|
executables: []
|