gitlab-exporter 13.3.1 → 13.4.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: 5ffa16533118568301cba662228785262ac08d3fb58d85572b6a02199316732d
4
- data.tar.gz: 26fe29073fb946867318bef4dd785653d6385ebd51fa8f8ae431bebab3daf3a8
3
+ metadata.gz: 5841c9c02dc87806b53fd5bb4087dfcc63f1a249f9b47f178bb765401d02e6e4
4
+ data.tar.gz: f4ef520597e0c4feb314f6579639da75fd0c61d641048a60c4facb1db6441fc4
5
5
  SHA512:
6
- metadata.gz: d422202e989b82e4222a6bcc6610a2d62421da260e4a8e014b40458778ea0a64f135afb02269bb6f3513cea4cbeb3c127d3b917c6152c9c46f4403b241896f0f
7
- data.tar.gz: e2a470642b3f97b3d9e19007bfeb365af4abe4fe7a71079a5fdcccae31939fa7b786c24a0f580c5f9a27c52edbb6c052bcea6055df89403d2e5c673caef3ee7c
6
+ metadata.gz: 8631a32ce6cbf2c2d74ac46cf5646635bc3e3fb4dbc8a1556b6e47a00e128bd12e248c29eaafb9719e171a1c1dc6e6b4f62ccdcb3bf1478216e5a5a5dadf0b40
7
+ data.tar.gz: ebe1e65ff91911c749650fa59e0e84229740d3fe251bd448a571cb8ce0e23ee6bf6a788656b91e6de870f0e6b2ef58dd349e7fe0e0db49728d2f1531408804e1
@@ -0,0 +1,13 @@
1
+ <!-- Replace `<PREVIOUS_VERSION>` with the previous version number here, `<COMMIT_UPDATING_VERSION>` with the latest
2
+ commit from this merge request, and `<NEW_VERSION>` with the upcoming version number. -->
3
+ ## Diff
4
+
5
+ https://gitlab.com/gitlab-org/ruby/gems/gitlab-exporter/-/compare/v<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
6
+
7
+ ## Checklist
8
+
9
+ - [ ] Diff link is up-to-date.
10
+ - [ ] Check the release notes: https://gitlab.com/api/v4/projects/gitlab-org%2Fruby%2Fgems%2Fgitlab-exporter/repository/changelog?version=<NEW_VERSION>
11
+ - [ ] Based on the diff and the release notes, `version.rb` is updated, according to [SemVer](https://semver.org).
12
+
13
+ /label ~"type::maintenance" ~"static code analysis"
data/.gitlab-ci.yml CHANGED
@@ -5,14 +5,17 @@ include:
5
5
  - template: Security/License-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml
6
6
  - template: Security/SAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
7
7
  - template: Security/Secret-Detection.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/lib/gitlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
8
+ - project: 'gitlab-org/quality/pipeline-common'
9
+ file:
10
+ - '/ci/gem-release.yml'
8
11
 
9
12
  variables:
10
- RUBY_VERSION: "3.2"
13
+ RUBY_VERSION: "2.7"
11
14
 
12
15
  stages:
13
16
  - test
14
17
  - dast
15
- - publish
18
+ - deploy
16
19
 
17
20
  default:
18
21
  image: ruby:${RUBY_VERSION}
@@ -43,7 +46,7 @@ rspec:
43
46
  before_script: *before_scripts
44
47
  parallel:
45
48
  matrix:
46
- - RUBY_VERSION: ["3.0", "3.1", "3.2"]
49
+ - RUBY_VERSION: ["2.7", "3.0", "3.1", "3.2"]
47
50
 
48
51
  rspec_integration:
49
52
  script:
@@ -55,7 +58,7 @@ rspec_integration:
55
58
  REDIS_URL: "redis://redis"
56
59
  parallel:
57
60
  matrix:
58
- - RUBY_VERSION: ["3.0", "3.1", "3.2"]
61
+ - RUBY_VERSION: ["2.7", "3.0", "3.1", "3.2"]
59
62
 
60
63
  rubocop:
61
64
  script:
@@ -70,16 +73,3 @@ gemnasium-dependency_scanning:
70
73
 
71
74
  secret_detection:
72
75
  rules: *workflow_rules
73
-
74
- publish_to_rubygems:
75
- stage: publish
76
- script:
77
- - mkdir -p ~/.gem
78
- - 'echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials'
79
- - chmod 0600 ~/.gem/credentials
80
- - gem build gitlab-exporter.gemspec --output=gitlab-exporter.gem
81
- - gem push gitlab-exporter.gem
82
- before_script: *before_scripts
83
- rules:
84
- # Only push to RubyGems.org when we tag a new version
85
- - if: '$CI_COMMIT_TAG'
data/.rubocop_todo.yml CHANGED
@@ -1,35 +1,19 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2023-09-25 18:54:37 UTC using RuboCop version 1.56.3.
3
+ # on 2021-01-11 12:24:03 UTC using RuboCop version 0.93.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
9
  # Offense count: 1
10
- # Configuration parameters: Severity, Include.
10
+ # Configuration parameters: Include.
11
11
  # Include: **/*.gemspec
12
12
  Gemspec/RequiredRubyVersion:
13
13
  Exclude:
14
14
  - 'gitlab-exporter.gemspec'
15
15
 
16
- # Offense count: 1
17
- # This cop supports safe autocorrection (--autocorrect).
18
- # Configuration parameters: EnforcedStyleAlignWith, Severity.
19
- # SupportedStylesAlignWith: start_of_line, begin
20
- Layout/BeginEndAlignment:
21
- Exclude:
22
- - 'lib/gitlab_exporter/git.rb'
23
-
24
- # Offense count: 1
25
- # This cop supports safe autocorrection (--autocorrect).
26
- Layout/RescueEnsureAlignment:
27
- Exclude:
28
- - 'lib/gitlab_exporter/git.rb'
29
-
30
16
  # Offense count: 3
31
- # This cop supports safe autocorrection (--autocorrect).
32
- # Configuration parameters: AllowedMethods, AllowedPatterns.
33
17
  Lint/AmbiguousBlockAssociation:
34
18
  Exclude:
35
19
  - 'spec/git_spec.rb'
@@ -43,83 +27,38 @@ Lint/MissingCopEnableDirective:
43
27
  - 'spec/git_process_proper_spec.rb'
44
28
 
45
29
  # Offense count: 1
46
- # This cop supports unsafe autocorrection (--autocorrect-all).
30
+ # Cop supports --auto-correct.
47
31
  Lint/NonDeterministicRequireOrder:
48
32
  Exclude:
49
33
  - 'spec/spec_helper.rb'
50
34
 
51
- # Offense count: 17
52
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
53
- # AllowedMethods: refine
35
+ # Offense count: 16
36
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
37
+ # ExcludedMethods: refine
54
38
  Metrics/BlockLength:
55
- Max: 285
39
+ Max: 349
56
40
 
57
- # Offense count: 3
58
- # Configuration parameters: AllowedMethods, AllowedPatterns.
41
+ # Offense count: 1
42
+ # Configuration parameters: IgnoredMethods.
59
43
  Metrics/CyclomaticComplexity:
60
44
  Max: 8
61
45
 
62
46
  # Offense count: 1
63
- # Configuration parameters: AllowedMethods, AllowedPatterns.
47
+ # Configuration parameters: IgnoredMethods.
64
48
  Metrics/PerceivedComplexity:
65
49
  Max: 9
66
50
 
67
- # Offense count: 9
68
- # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
69
- # SupportedStyles: snake_case, normalcase, non_integer
70
- # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
71
- Naming/VariableNumber:
72
- Exclude:
73
- - 'spec/database/row_count_spec.rb'
74
-
75
- # Offense count: 16
76
- # This cop supports safe autocorrection (--autocorrect).
77
- # Configuration parameters: EnforcedStyle.
78
- # SupportedStyles: separated, grouped
79
- Style/AccessorGrouping:
80
- Exclude:
81
- - 'lib/gitlab_exporter/memstats/mapping.rb'
82
-
83
- # Offense count: 8
84
- # This cop supports unsafe autocorrection (--autocorrect-all).
85
- Style/GlobalStdStream:
86
- Exclude:
87
- - 'lib/gitlab_exporter/cli.rb'
88
- - 'spec/database/bloat_spec.rb'
89
-
90
51
  # Offense count: 1
91
- # This cop supports unsafe autocorrection (--autocorrect-all).
92
- # Configuration parameters: AllowedReceivers.
93
- # AllowedReceivers: Thread.current
94
- Style/HashEachMethods:
52
+ # Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols.
53
+ # SupportedStyles: inline, group
54
+ Style/AccessModifierDeclarations:
95
55
  Exclude:
96
56
  - 'lib/gitlab_exporter/util.rb'
97
57
 
98
- # Offense count: 9
99
- # Configuration parameters: AllowedMethods.
100
- # AllowedMethods: respond_to_missing?
101
- Style/OptionalBooleanParameter:
102
- Exclude:
103
- - 'lib/gitlab_exporter/prometheus.rb'
104
- - 'lib/gitlab_exporter/sidekiq.rb'
105
-
106
- # Offense count: 1
107
- # This cop supports safe autocorrection (--autocorrect).
108
- Style/RedundantRegexpEscape:
109
- Exclude:
110
- - 'lib/gitlab_exporter/git.rb'
111
-
112
58
  # Offense count: 2
113
- # This cop supports unsafe autocorrection (--autocorrect-all).
114
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
59
+ # Cop supports --auto-correct.
60
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
115
61
  # AllowedMethods: present?, blank?, presence, try, try!
116
62
  Style/SafeNavigation:
117
63
  Exclude:
118
64
  - 'lib/gitlab_exporter/database/base.rb'
119
-
120
- # Offense count: 1
121
- # This cop supports unsafe autocorrection (--autocorrect-all).
122
- # Configuration parameters: Mode.
123
- Style/StringConcatenation:
124
- Exclude:
125
- - 'lib/gitlab_exporter/database/row_count.rb'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 2.7.7
data/Gemfile CHANGED
@@ -4,5 +4,5 @@ gemspec
4
4
 
5
5
  group :test do
6
6
  gem "rspec", "~>3.12"
7
- gem "rubocop", "~> 1.52"
7
+ gem "rubocop", "~>0.42"
8
8
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-exporter (13.3.1)
4
+ gitlab-exporter (13.4.1)
5
5
  connection_pool (= 2.2.5)
6
6
  faraday (~> 1.8.0)
7
7
  pg (= 1.5.3)
@@ -16,8 +16,7 @@ PATH
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- ast (2.4.2)
20
- base64 (0.1.1)
19
+ ast (2.4.1)
21
20
  connection_pool (2.2.5)
22
21
  diff-lcs (1.5.0)
23
22
  faraday (1.8.0)
@@ -39,30 +38,26 @@ GEM
39
38
  faraday-net_http_persistent (1.2.0)
40
39
  faraday-patron (1.0.0)
41
40
  faraday-rack (1.0.0)
42
- json (2.6.3)
43
- language_server-protocol (3.17.0.3)
44
41
  multipart-post (2.2.3)
45
42
  mustermann (2.0.2)
46
43
  ruby2_keywords (~> 0.0.1)
47
44
  nio4r (2.5.8)
48
- parallel (1.23.0)
49
- parser (3.2.2.3)
45
+ parallel (1.20.1)
46
+ parser (3.0.0.0)
50
47
  ast (~> 2.4.1)
51
- racc
52
48
  pg (1.5.3)
53
49
  puma (5.6.5)
54
50
  nio4r (~> 2.0)
55
51
  quantile (0.2.1)
56
- racc (1.7.1)
57
52
  rack (2.2.5)
58
53
  rack-protection (2.2.4)
59
54
  rack
60
- rainbow (3.1.1)
55
+ rainbow (3.0.0)
61
56
  redis (4.4.0)
62
57
  redis-namespace (1.9.0)
63
58
  redis (>= 4)
64
- regexp_parser (2.8.1)
65
- rexml (3.2.6)
59
+ regexp_parser (2.0.3)
60
+ rexml (3.2.4)
66
61
  rspec (3.12.0)
67
62
  rspec-core (~> 3.12.0)
68
63
  rspec-expectations (~> 3.12.0)
@@ -76,21 +71,18 @@ GEM
76
71
  diff-lcs (>= 1.2.0, < 2.0)
77
72
  rspec-support (~> 3.12.0)
78
73
  rspec-support (3.12.0)
79
- rubocop (1.56.3)
80
- base64 (~> 0.1.1)
81
- json (~> 2.3)
82
- language_server-protocol (>= 3.17.0)
74
+ rubocop (0.93.1)
83
75
  parallel (~> 1.10)
84
- parser (>= 3.2.2.3)
76
+ parser (>= 2.7.1.5)
85
77
  rainbow (>= 2.2.2, < 4.0)
86
- regexp_parser (>= 1.8, < 3.0)
87
- rexml (>= 3.2.5, < 4.0)
88
- rubocop-ast (>= 1.28.1, < 2.0)
78
+ regexp_parser (>= 1.8)
79
+ rexml
80
+ rubocop-ast (>= 0.6.0)
89
81
  ruby-progressbar (~> 1.7)
90
- unicode-display_width (>= 2.4.0, < 3.0)
91
- rubocop-ast (1.29.0)
92
- parser (>= 3.2.1.0)
93
- ruby-progressbar (1.13.0)
82
+ unicode-display_width (>= 1.4.0, < 2.0)
83
+ rubocop-ast (1.4.0)
84
+ parser (>= 2.7.1.5)
85
+ ruby-progressbar (1.11.0)
94
86
  ruby2_keywords (0.0.5)
95
87
  sidekiq (6.4.0)
96
88
  connection_pool (>= 2.2.2)
@@ -102,7 +94,7 @@ GEM
102
94
  rack-protection (= 2.2.4)
103
95
  tilt (~> 2.0)
104
96
  tilt (2.0.11)
105
- unicode-display_width (2.4.2)
97
+ unicode-display_width (1.7.0)
106
98
  webrick (1.7.0)
107
99
 
108
100
  PLATFORMS
@@ -112,7 +104,7 @@ DEPENDENCIES
112
104
  gitlab-exporter!
113
105
  rspec (~> 3.12)
114
106
  rspec-expectations (~> 3.12.0)
115
- rubocop (~> 1.52)
107
+ rubocop (~> 0.42)
116
108
 
117
109
  BUNDLED WITH
118
110
  2.4.5
@@ -10,7 +10,6 @@ Gem::Specification.new do |s|
10
10
  s.description = "GitLab metrics exporter to use with prometheus"
11
11
  s.authors = ["Pablo Carranza"]
12
12
  s.email = "pablo@gitlab.com"
13
- s.required_ruby_version = ">= 3.0.0"
14
13
 
15
14
  s.files = `git ls-files -z`.split("\x0")
16
15
 
@@ -18,7 +17,7 @@ Gem::Specification.new do |s|
18
17
  s.test_files = s.files.grep(%r{^(spec)/})
19
18
 
20
19
  s.require_paths = ["lib"]
21
- s.homepage = "http://gitlab.com"
20
+ s.homepage = "https://gitlab.com/gitlab-org/ruby/gems/gitlab-exporter"
22
21
  s.license = "MIT"
23
22
 
24
23
  s.add_runtime_dependency "connection_pool", "2.2.5"
@@ -1,5 +1,19 @@
1
1
  require "yaml"
2
2
 
3
+ # TODO: Remove this once we're on Ruby 3
4
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/393651
5
+ unless YAML.respond_to?(:safe_load_file)
6
+ module YAML # rubocop:disable Style/Documentation
7
+ # Temporary Ruby 2 back-compat workaround.
8
+ #
9
+ # This method only exists as of stdlib 3.0.0:
10
+ # https://ruby-doc.org/stdlib-3.0.0/libdoc/psych/rdoc/Psych.html
11
+ def self.safe_load_file(path, **options)
12
+ YAML.safe_load(File.read(path), **options)
13
+ end
14
+ end
15
+ end
16
+
3
17
  module GitLab
4
18
  module Exporter
5
19
  # Stores runner classes in a single place
@@ -1,5 +1,5 @@
1
1
  module GitLab
2
2
  module Exporter
3
- VERSION = "13.3.1".freeze
3
+ VERSION = "13.4.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.3.1
4
+ version: 13.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Carranza
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2016-07-27 00:00:00.000000000 Z
@@ -187,6 +187,7 @@ extra_rdoc_files: []
187
187
  files:
188
188
  - ".gitignore"
189
189
  - ".gitlab-ci.yml"
190
+ - ".gitlab/merge_request_templates/Release.md"
190
191
  - ".rubocop.yml"
191
192
  - ".rubocop_todo.yml"
192
193
  - ".ruby-version"
@@ -238,11 +239,11 @@ files:
238
239
  - spec/sidekiq_spec.rb
239
240
  - spec/spec_helper.rb
240
241
  - spec/util_spec.rb
241
- homepage: http://gitlab.com
242
+ homepage: https://gitlab.com/gitlab-org/ruby/gems/gitlab-exporter
242
243
  licenses:
243
244
  - MIT
244
245
  metadata: {}
245
- post_install_message:
246
+ post_install_message:
246
247
  rdoc_options: []
247
248
  require_paths:
248
249
  - lib
@@ -250,15 +251,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
251
  requirements:
251
252
  - - ">="
252
253
  - !ruby/object:Gem::Version
253
- version: 3.0.0
254
+ version: '0'
254
255
  required_rubygems_version: !ruby/object:Gem::Requirement
255
256
  requirements:
256
257
  - - ">="
257
258
  - !ruby/object:Gem::Version
258
259
  version: '0'
259
260
  requirements: []
260
- rubygems_version: 3.4.10
261
- signing_key:
261
+ rubygems_version: 3.1.6
262
+ signing_key:
262
263
  specification_version: 4
263
264
  summary: GitLab metrics exporter
264
265
  test_files: