gitlab-exporter 7.1.0 → 7.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2590101193dd650767c1f39170beb0b54661c188b7c1222fa7d01d59ee1f442a
4
- data.tar.gz: 9237f257766fefe33cf0e398a86d44ecae609a393c046c7e5203b07a74adaca4
3
+ metadata.gz: 9ef9540e75d17cc9904aa53962399870425e6ca52d57ed994dff10d53fad201f
4
+ data.tar.gz: 7ab18ebbb09faaac5c4924cab93af2059dbe28e4177365771c897a153878daee
5
5
  SHA512:
6
- metadata.gz: 4109296df37f483e64b5c3f9c9da8ce6359a8b36cbb8b2bc7a40c3147ee0401fafee78829b6e67e43167b1a859d771669e6f94e85f7ebf8529a7bbea45be6431
7
- data.tar.gz: e4d05c4fad006d5a27f693887320b6f2a633f96b1109e97f7e89f5b990d695528b72ef2e7b876901d520df3f4be6c6b24850208228923c227443e06b70b81988
6
+ metadata.gz: 05a779426c541c1371d880b9b2d4a321b78243b4bb89ce8c8a4d41e977569f88386505e205719079b0ea85a1bbc3f9d5558bdbb6e1de94de4eb283c05513ad16
7
+ data.tar.gz: 39fa8909ce99c35bc0e929760cf820593b3ee30526fdb4d10f3230646f63f271b4b3b8e29cc62fbde59106d5f4563335c184f18de21fe8fe5246f7b722ed0b0e
@@ -1,17 +1,26 @@
1
+ include:
2
+ - template: Security/DAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml
3
+ - template: Security/Container-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
4
+ - template: Security/Dependency-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
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
+ - 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
+ - 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
+
1
9
  default:
2
10
  image: "ruby:2.3"
3
- before_script:
4
- - git config --global user.email "bot@gitlab.com"
5
- - git config --global user.name "Bot User"
6
- - bundle install -j $(nproc) --path vendor
7
11
  cache:
8
12
  paths:
9
13
  - vendor
10
14
  tags:
11
15
  - gitlab-org
12
16
 
17
+ .before_scripts: &before_scripts
18
+ - git config --global user.email "bot@gitlab.com"
19
+ - git config --global user.name "Bot User"
20
+ - bundle install -j $(nproc) --path vendor
21
+
13
22
  workflow:
14
- rules:
23
+ rules: &workflow_rules
15
24
  # For merge requests, create a pipeline.
16
25
  - if: '$CI_MERGE_REQUEST_IID'
17
26
  # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
@@ -22,15 +31,18 @@ workflow:
22
31
  rspec:
23
32
  script:
24
33
  - bundle exec rspec spec -f d -c
34
+ before_script: *before_scripts
25
35
 
26
36
  rubocop:
27
37
  script:
28
38
  - bundle exec rubocop
39
+ before_script: *before_scripts
29
40
 
30
- include:
31
- - template: Security/DAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml
32
- - template: Security/Container-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
33
- - template: Security/Dependency-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
34
- - 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
35
- - template: Security/SAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
41
+ license_scanning:
42
+ rules: *workflow_rules
43
+
44
+ gemnasium-dependency_scanning:
45
+ rules: *workflow_rules
36
46
 
47
+ secret_detection:
48
+ rules: *workflow_rules
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-exporter (7.1.0)
4
+ gitlab-exporter (7.1.1)
5
5
  connection_pool (~> 2.2.1)
6
6
  pg (~> 1.1)
7
7
  quantile (~> 0.2.0)
@@ -175,6 +175,14 @@ module GitLab
175
175
 
176
176
  def execute(query)
177
177
  with_connection_pool do |conn|
178
+ conn.exec(query).map_types!(type_map_for_results(conn))
179
+ end
180
+ rescue PG::UndefinedTable, PG::UndefinedColumn
181
+ nil
182
+ end
183
+
184
+ def type_map_for_results(conn)
185
+ @type_map_for_results ||= begin
178
186
  tm = PG::BasicTypeMapForResults.new(conn)
179
187
 
180
188
  # Remove warning message:
@@ -187,10 +195,8 @@ module GitLab
187
195
  tm.add_coder(old_coder.dup.tap { |c| c.oid = value[:oid] })
188
196
  end
189
197
 
190
- conn.exec(query).map_types!(tm)
198
+ tm
191
199
  end
192
- rescue PG::UndefinedTable, PG::UndefinedColumn
193
- nil
194
200
  end
195
201
 
196
202
  # Not private so I can test it without meta programming tricks
@@ -1,5 +1,5 @@
1
1
  module GitLab
2
2
  module Exporter
3
- VERSION = "7.1.0".freeze
3
+ VERSION = "7.1.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0
4
+ version: 7.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Carranza