codeclimate 0.2 → 0.2.1
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/lib/cc/analyzer/path_patterns.rb +14 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64251a1ce1f62cb197aeff4608cded2262ec9bba
|
4
|
+
data.tar.gz: d1a024f83b810ee6a1e9cfb4475822f61db89749
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efca44a6c9f009a1038142db8f1a154c1ded40605748b8727a37b5b876c688744f683eaa90cccccc387f8501ec60c571f5e198353c68759f5af7d4db695b0ef3
|
7
|
+
data.tar.gz: 4ba1ff910f91dc8bc283845dedddb6baebd21346b375165ea64283adb91286f139ffb1438e2c6dad73835f9348a59b2c561a5d930e7032088960b265ab0ec27d
|
@@ -15,7 +15,20 @@ module CC
|
|
15
15
|
def expand
|
16
16
|
results = Dir.chdir(@root) do
|
17
17
|
@patterns.flat_map do |pattern|
|
18
|
-
|
18
|
+
# FIXME: there exists a temporary workaround whereby **-style globs
|
19
|
+
# are translated to **/*-style globs within cc-yaml's custom
|
20
|
+
# Glob#value method. It was thought that that would work correctly
|
21
|
+
# with Dir.glob but it turns out we have to actually invoke #value
|
22
|
+
# directory for this to work. We need to guard this on class (not
|
23
|
+
# respond_to?) because our mocking framework adds a #value method to
|
24
|
+
# all objects, apparently.
|
25
|
+
if pattern.is_a?(CC::Yaml::Nodes::Glob)
|
26
|
+
value = pattern.value
|
27
|
+
else
|
28
|
+
value = pattern
|
29
|
+
end
|
30
|
+
|
31
|
+
Dir.glob(value)
|
19
32
|
end
|
20
33
|
end
|
21
34
|
|