gitlab-crystalball 1.0.0 → 1.1.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76c3fc8876c4ed95ab72f8d6bb9a04b9af10d7f20411404464943694b851dc8a
|
4
|
+
data.tar.gz: 794f36ab0899adf1950a1da5a0a842966b7a52f7e0b1ea6f25bf0b675253a140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 827bbcc9c2409258cf8bb5a07ef9cc5418668f0c6ce219c56c3c602ade44106792f53c8c66a37152e1b898fed04dddab2423aaca1ae5947926a69ef031c77167
|
7
|
+
data.tar.gz: 1ce5ee4200c43f4d34e5e2cf9169d21a8ba0fbac23f89caed6d8f974f15c016a015b50160097255bf8830c7b80f260c1b1aa1644b46077614e701bbf0594d6e1
|
@@ -8,7 +8,7 @@ module Crystalball
|
|
8
8
|
attr_reader :root_path, :exclude_prefixes
|
9
9
|
|
10
10
|
# @param [String] root_path - absolute path to root folder of repository
|
11
|
-
# @param [Array] exclude_prefixes - list of prefixes to filter out from paths
|
11
|
+
# @param [Array<String, Regexp>] exclude_prefixes - list of prefixes or patterns to filter out from paths
|
12
12
|
def initialize(root_path = Dir.pwd, exclude_prefixes: [])
|
13
13
|
@root_path = root_path
|
14
14
|
@exclude_prefixes = exclude_prefixes
|
@@ -17,11 +17,7 @@ module Crystalball
|
|
17
17
|
# @param [Array<String>] paths
|
18
18
|
# @return relative paths inside root_path only
|
19
19
|
def filter(paths)
|
20
|
-
paths.filter_map
|
21
|
-
next unless path.start_with?(root_path)
|
22
|
-
|
23
|
-
valid_path(path)
|
24
|
-
end
|
20
|
+
paths.filter_map { |path| valid_path(path) }
|
25
21
|
end
|
26
22
|
|
27
23
|
private
|
@@ -34,10 +30,22 @@ module Crystalball
|
|
34
30
|
return unless path.start_with?(root_path)
|
35
31
|
|
36
32
|
relative_path = path.sub("#{root_path}/", "")
|
37
|
-
return if
|
33
|
+
return if matches_exclude_pattern?(relative_path)
|
38
34
|
|
39
35
|
relative_path
|
40
36
|
end
|
37
|
+
|
38
|
+
# Path matches exclude prefix based on string or regex conditions
|
39
|
+
#
|
40
|
+
# @param path [String]
|
41
|
+
# @return [Boolean]
|
42
|
+
def matches_exclude_pattern?(path)
|
43
|
+
exclude_prefixes&.any? do |prefix|
|
44
|
+
next path.match?(prefix) if prefix.instance_of? Regexp
|
45
|
+
|
46
|
+
path.start_with?(prefix)
|
47
|
+
end
|
48
|
+
end
|
41
49
|
end
|
42
50
|
end
|
43
51
|
end
|
@@ -7,7 +7,7 @@ module Crystalball
|
|
7
7
|
class Runner
|
8
8
|
# Class for storing local runner configuration
|
9
9
|
class Configuration
|
10
|
-
def initialize(config = {})
|
10
|
+
def initialize(config = {})
|
11
11
|
@values = {
|
12
12
|
"execution_map_path" => "tmp/crystalball_data.yml",
|
13
13
|
"map_expiration_period" => 86_400,
|
data/lib/crystalball/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-crystalball
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Developer Experience Team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-06-
|
10
|
+
date: 2025-06-09 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: git
|
@@ -65,6 +65,20 @@ dependencies:
|
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: 8.0.2
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: climate_control
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.2.0
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 1.2.0
|
68
82
|
- !ruby/object:Gem::Dependency
|
69
83
|
name: factory_bot
|
70
84
|
requirement: !ruby/object:Gem::Requirement
|