gitlab-crystalball 1.0.0 → 1.1.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09338c254c5dab6b9c1e9dc9547a923779b7dbc959690ab180d723d7668c1ec0'
|
4
|
+
data.tar.gz: 153ced689ef2d086dd23918ef153ad9bde0ea75306fd1053d17c7ff09a076211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '071864d290306263dd6c18cfba33bc2b6efa56087c274437ea45cbb9bd6480a1e29de371654c38aa59224362f5990a7546ae0876f3cde2bc3f58545e0021507e'
|
7
|
+
data.tar.gz: 04e37581bc6decd802d879e703220bd4fbd619e7520a2851b8eb8ba1146a2e33eafa5edbf9261f8b6d632adfef458ded83d6b255d9582c964e1bb2cc017c7a2c
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Add this line to your application's Gemfile:
|
|
12
12
|
|
13
13
|
```ruby
|
14
14
|
group :test do
|
15
|
-
gem 'crystalball'
|
15
|
+
gem 'gitlab-crystalball'
|
16
16
|
end
|
17
17
|
```
|
18
18
|
|
@@ -48,7 +48,6 @@ In order to release new version, manual pipeline should be triggered via Gitlab
|
|
48
48
|
|
49
49
|
## Contributing
|
50
50
|
|
51
|
-
Bug reports and pull requests are welcome on GitHub at <https://github.com/toptal/crystalball>.
|
52
51
|
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
53
52
|
|
54
53
|
## License
|
@@ -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,16 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Pavel Shutsin
|
8
|
+
- Evgenii Pecherkin
|
9
|
+
- Jaimerson Araujo
|
10
|
+
- GitLab Developer Experience Team
|
8
11
|
bindir: bin
|
9
12
|
cert_chain: []
|
10
|
-
date: 2025-
|
13
|
+
date: 2025-07-01 00:00:00.000000000 Z
|
11
14
|
dependencies:
|
12
15
|
- !ruby/object:Gem::Dependency
|
13
16
|
name: git
|
@@ -65,6 +68,20 @@ dependencies:
|
|
65
68
|
- - "~>"
|
66
69
|
- !ruby/object:Gem::Version
|
67
70
|
version: 8.0.2
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: climate_control
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.2.0
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - "~>"
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 1.2.0
|
68
85
|
- !ruby/object:Gem::Dependency
|
69
86
|
name: factory_bot
|
70
87
|
requirement: !ruby/object:Gem::Requirement
|