gitlab-labkit 1.1.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: ed4c330d977763fb6063a9caab83352d59f32c46ac10a097f33f468cb06b2ddc
4
- data.tar.gz: 558fae5ff6684b13cce03ee9b5f306c949a19c1a44b89c3fcae0567caa8175cc
3
+ metadata.gz: a972f127411670b92f75299fcd1d597d0fd89e48a6105ac455ba10d4bb80b034
4
+ data.tar.gz: d92435f9a5065dffc16a4bf41af04964f65771212f1da2966ab51bb25f08bb9e
5
5
  SHA512:
6
- metadata.gz: f1cd4013a210766f17a988f7922e900b9b00f74089fdde68e143cc718da629bd5d7442248ee47d15d0d7aa513e85eae6d9d642a5ddbfa5eddbe74046f7674cbb
7
- data.tar.gz: 22dae3a5fb187c7118f4dd86df667982c1e72ef023d5a52aad1c6c10813845f3128d714973957c3ddca2b436b1419115904ca5bd76510315f57a7a8d3cd48078
6
+ metadata.gz: bec41580e39640af8956d3ae5923d886395a6b4fdb0b7e1561777e74220e1fc84824af27dac79bc94d0f9fc318e544d3b89fa532b1a4b349a77a942735b3bf27
7
+ data.tar.gz: 998efc3b825e94fb2ba9c3ba828b566ff1978fde3d45c6e31bd5603a4caac36a849a2ef21515b466ad840a4014c4d5a66828c95248b2df23cdfcceb6acc30d0b
data/.copier-answers.yml CHANGED
@@ -3,7 +3,7 @@
3
3
  # See the project for instructions on how to update the project
4
4
  #
5
5
  # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
6
- _commit: v1.36.0
6
+ _commit: v1.38.0
7
7
  _src_path: https://gitlab.com/gitlab-com/gl-infra/common-template-copier.git
8
8
  ee_licensed: false
9
9
  golang: false
@@ -1,5 +1,5 @@
1
1
  # DO NOT MANUALLY EDIT; Run ./scripts/update-asdf-version-variables.sh to update this
2
2
  variables:
3
- GL_ASDF_RUBY_VERSION: "3.4.7"
3
+ GL_ASDF_RUBY_VERSION: "3.4.8"
4
4
  GL_ASDF_SHELLCHECK_VERSION: "0.11"
5
5
  GL_ASDF_SHFMT_VERSION: "3.12"
data/.gitlab-ci.yml CHANGED
@@ -19,13 +19,13 @@ include:
19
19
  # It includes standard checks, gitlab-scanners, validations and release processes
20
20
  # common to all projects using this template library.
21
21
  # see https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/templates/standard.md
22
- - component: $CI_SERVER_FQDN/gitlab-com/gl-infra/common-ci-tasks/standard-build@v2.78
22
+ - component: $CI_SERVER_FQDN/gitlab-com/gl-infra/common-ci-tasks/standard-build@v3.4
23
23
 
24
24
  # Runs rspec tests and rubocop on the project
25
25
  # see https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/templates/ruby.md
26
- - component: $CI_SERVER_FQDN/gitlab-com/gl-infra/common-ci-tasks/ruby-build@v2.78
26
+ - component: $CI_SERVER_FQDN/gitlab-com/gl-infra/common-ci-tasks/ruby-build@v3.4
27
27
 
28
- - component: $CI_SERVER_FQDN/gitlab-com/gl-infra/common-ci-tasks/danger@v2.78
28
+ - component: $CI_SERVER_FQDN/gitlab-com/gl-infra/common-ci-tasks/danger@v3.4
29
29
 
30
30
  .test_template: &test_definition
31
31
  extends: .with_bundle
@@ -25,7 +25,7 @@ repos:
25
25
  # Documentation available at
26
26
  # https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/docs/pre-commit.md
27
27
  - repo: https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks
28
- rev: v3.0 # renovate:managed
28
+ rev: v3.4 # renovate:managed
29
29
 
30
30
  hooks:
31
31
  - id: shellcheck # Run shellcheck for changed Shell files
data/.tool-versions CHANGED
@@ -1,3 +1,3 @@
1
- ruby 3.4.7
1
+ ruby 3.4.8
2
2
  shfmt 3.12
3
3
  shellcheck 0.11
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require "time"
3
+ require "date"
3
4
  require "logger"
4
5
  require "json"
5
6
 
@@ -52,7 +53,7 @@ module Labkit
52
53
  data[:message] = message
53
54
  when Hash
54
55
  reject_reserved_log_keys!(message)
55
- format_time!(data)
56
+ format_time!(message)
56
57
  data.merge!(message)
57
58
  end
58
59
 
@@ -81,11 +82,23 @@ module Labkit
81
82
 
82
83
  def format_time!(hash)
83
84
  hash.each do |key, value|
84
- if value.is_a?(Time)
85
- hash[key] = value.utc.iso8601(3)
86
- elsif value.is_a?(Hash)
87
- format_time!(value)
88
- end
85
+ hash[key] = convert_time_value(value)
86
+ end
87
+ end
88
+
89
+ def convert_time_value(value)
90
+ case value
91
+ when Time
92
+ value.utc.iso8601(3)
93
+ when DateTime
94
+ value.to_time.utc.iso8601(3)
95
+ when Hash
96
+ format_time!(value)
97
+ value
98
+ when Array
99
+ value.map { |v| convert_time_value(v) }
100
+ else
101
+ value
89
102
  end
90
103
  end
91
104
  end
@@ -53,8 +53,11 @@ fi
53
53
 
54
54
  # install mise/asdf dependencies
55
55
  echo "installing required plugins with mise install.."
56
- mise plugins update
56
+ mise plugins update -q
57
57
  mise install
58
+
59
+ # set PROMPT_COMMAND to empty value for mise if unset
60
+ : "${PROMPT_COMMAND:=}"
58
61
  eval "$(mise activate bash)"
59
62
 
60
63
  # pre-commit is optional
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-labkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Newdigate
@@ -555,7 +555,6 @@ files:
555
555
  - lib/labkit/user_experience_sli/null.rb
556
556
  - lib/labkit/user_experience_sli/registry.rb
557
557
  - renovate.json
558
- - scripts/install-asdf-plugins.sh
559
558
  - scripts/prepare-dev-env.sh
560
559
  - scripts/update-asdf-version-variables.sh
561
560
  homepage: https://gitlab.com/gitlab-org/labkit-ruby
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Vendored from https://gitlab.com/gitlab-com/gl-infra/common-template-copier
3
- # Consider contributing upstream when updating this file
4
-
5
- # This file is deprecated: going forward running `mise install` should be sufficient.
6
-
7
- set -euo pipefail
8
- IFS=$'\n\t'
9
-
10
- echo >&2 -e "2024-08-07: this file is deprecated: going forward, simply run 'mise install' to install plugins."
11
- echo >&2 -e "Recommended reading: https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/docs/developer-setup.md"
12
-
13
- mise install