propshaft 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/propshaft/load_path.rb +6 -5
- data/lib/propshaft/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bee1e0c2fcf39062df053618528b93dd5977bd8968fea03a67d31b7196f04f9
|
4
|
+
data.tar.gz: ad9c5f3b7bc878a359931d2c1edc2a2ecb98004b8cfba38dd226acd0a19e43ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41a54360ed2d9424f1c190af2606c5d2bc88a2d01d61a1396ed60fc64ba1531e815cc259ac41904fe3a49053d057ee2f838be0c8763b37a1ebbe79067f52301f
|
7
|
+
data.tar.gz: be6381394ff2c2dfa9bf0ca23d2023b196492d83012970091eca5ce03822ee127fa40103382dd85d6093ae1edc5b91545a59be21beb0a9736fa3037a322d5678
|
data/lib/propshaft/load_path.rb
CHANGED
@@ -4,7 +4,7 @@ class Propshaft::LoadPath
|
|
4
4
|
attr_reader :paths, :version
|
5
5
|
|
6
6
|
def initialize(paths = [], version: nil)
|
7
|
-
@paths
|
7
|
+
@paths = dedup(paths)
|
8
8
|
@version = version
|
9
9
|
end
|
10
10
|
|
@@ -67,10 +67,11 @@ class Propshaft::LoadPath
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def dedup(paths)
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
end
|
70
|
+
paths = Array(paths).map { |path| Pathname.new(path) }
|
71
|
+
deduped = [].tap do |deduped|
|
72
|
+
paths.sort.each { |path| deduped << path if deduped.blank? || !path.to_s.start_with?(deduped.last.to_s) }
|
74
73
|
end
|
74
|
+
|
75
|
+
paths & deduped
|
75
76
|
end
|
76
77
|
end
|
data/lib/propshaft/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: propshaft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|