fspath 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fspath.gemspec +1 -1
- data/lib/fspath.rb +2 -1
- data/spec/fspath_spec.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26721162b01f79487fb1b452b3e00563c8c02428
|
4
|
+
data.tar.gz: c39238fa94c0decd977c58c7d54b1c6b01b2d933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5870e1c093ef606e6dfb714212866627208795690083e5e4a9ec2b6b8d2cd1289f8510716f150aa976f5cca9d10e7a4b4ad6a1d28c89438d5d636f8c0b8948d3
|
7
|
+
data.tar.gz: be026afeedaa9d37879a808cfa6c76fab9374c39bc240357103eb0c881de60e6c842e7d641d337abcc980dda3277556e0fa08cfc6753fc401922840a1084da73
|
data/fspath.gemspec
CHANGED
data/lib/fspath.rb
CHANGED
@@ -47,8 +47,9 @@ class FSPath < Pathname
|
|
47
47
|
|
48
48
|
# Returns common dir for paths
|
49
49
|
def common_dir(*paths)
|
50
|
+
fail ArgumentError, 'At least one path is required' if paths.empty?
|
50
51
|
paths.map do |path|
|
51
|
-
new(path).ascendants
|
52
|
+
new(path).dirname.ascendants
|
52
53
|
end.inject(:&).first
|
53
54
|
end
|
54
55
|
|
data/spec/fspath_spec.rb
CHANGED
@@ -49,6 +49,10 @@ describe FSPath do
|
|
49
49
|
it 'returns nil if there is no common path' do
|
50
50
|
expect(FSPath.common_dir('../a', './b')).to be_nil
|
51
51
|
end
|
52
|
+
|
53
|
+
it 'returns nil if called without parameters' do
|
54
|
+
expect{ FSPath.common_dir }.to raise_error(ArgumentError)
|
55
|
+
end
|
52
56
|
end
|
53
57
|
|
54
58
|
describe '.temp_file' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fspath
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project: fspath
|
77
|
-
rubygems_version: 2.6.
|
77
|
+
rubygems_version: 2.6.8
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Better than Pathname
|