helmsnap 2.0.3 → 2.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: 2ce9680975ee9caf5eca42e8509be379b0020f47476ee63478737cd3533c4abf
4
- data.tar.gz: bb9dd282eb121cee4b34efa192a413f0c14275eede086d52df8ecc875ddc2790
3
+ metadata.gz: a7decf0917131f1450ef26ffd2e0de0ab58e71c0b50407194ed12cc075f4f0b7
4
+ data.tar.gz: 3d7f0953ba331a47c3c70abc80993c11006229fd2bb7d4c1cddf856f60162e82
5
5
  SHA512:
6
- metadata.gz: 9fe33c0245bf37c5985f85afa8e49adb4a7d942d2d16c001014fa4400d02c06b64bc87a264c9a70012312d19e838bc6be539ad422c418f203b41c7333bcabd75
7
- data.tar.gz: 4d9882d84651419761bab86073d7292c3851a05aa9221851d0aa2c03292899208e5a82e0e1861b1fe34249a600b647e24a7aa8d311f06d8a60938eb64bf3b338
6
+ metadata.gz: f43d352ca19f81c001b421cc9e2986bee9c973db2317944cc2c89180c8532191c7d63020f34ac58ba4d71c887d88b7ca78c1606c3401adecf3fe0a9fee089a7e
7
+ data.tar.gz: dc2078c1bddeadbe92e0cd8682c6abe6880d03eddeaea4d73229ee9bc5a6fb782c0febc38efaf6630ac96ceed0c79458ceab607b694c098f3f680c48874a0c8c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- helmsnap (2.0.3)
4
+ helmsnap (2.1.0)
5
5
  colorize (~> 1.1)
6
6
 
7
7
  GEM
@@ -123,9 +123,9 @@ GEM
123
123
  uri (1.1.1)
124
124
 
125
125
  PLATFORMS
126
- arm64-darwin-21
126
+ arm64-darwin
127
127
  ruby
128
- x86_64-darwin-20
128
+ x86_64-darwin
129
129
  x86_64-linux
130
130
 
131
131
  DEPENDENCIES
@@ -138,4 +138,4 @@ DEPENDENCIES
138
138
  rubocop-config-umbrellio
139
139
 
140
140
  BUNDLED WITH
141
- 2.5.21
141
+ 4.0.12
@@ -34,15 +34,20 @@ class Helmsnap::Generate < Helmsnap::Service
34
34
  )
35
35
  end
36
36
 
37
- tmp_path.glob(["**/*yaml", "**/*.yml"]).each do |path|
38
- content = path.read
39
- content.gsub!(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d+/, "2022-01-01 00:00:00.000")
40
- content.gsub!(/\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d/, "2022-01-01-00-00-00")
41
- content.gsub!(/\d\d\d\d-\d\d-\d\d-\d\d-\d\d/, "2022-01-01-00-00")
42
- path.write(content)
43
- end
37
+ tmp_path.glob(["**/*yaml", "**/*.yml"]).each { |path| normalize!(path) }
44
38
 
45
39
  FileUtils.rmtree(snapshots_path)
46
40
  FileUtils.cp_r(tmp_path, snapshots_path)
47
41
  end
42
+
43
+ def normalize!(path)
44
+ content = path.read
45
+ content.gsub!(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d+/, "2022-01-01 00:00:00.000")
46
+ content.gsub!(/\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d/, "2022-01-01-00-00-00")
47
+ content.gsub!(/\d\d\d\d-\d\d-\d\d-\d\d-\d\d/, "2022-01-01-00-00")
48
+ content.gsub!(/\n{3,}/, "\n\n")
49
+ content.gsub!(/\n\n+---/, "\n---")
50
+ content.gsub!(/\n+\z/, "\n")
51
+ path.write(content)
52
+ end
48
53
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Helmsnap
4
- VERSION = "2.0.3"
4
+ VERSION = "2.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helmsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Smirnov