helmsnap 2.0.4 → 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: b974ad37d29fcabe95c2bb2c49b40603833d69a5431a5495b704912133c73c1f
4
- data.tar.gz: 2d4d76110745821ba5cc9db6d8507799f1dd0580368e623e0e7757a6ba42b537
3
+ metadata.gz: a7decf0917131f1450ef26ffd2e0de0ab58e71c0b50407194ed12cc075f4f0b7
4
+ data.tar.gz: 3d7f0953ba331a47c3c70abc80993c11006229fd2bb7d4c1cddf856f60162e82
5
5
  SHA512:
6
- metadata.gz: 47cede3258fc1e0cf1a3e2211f7a599c88d2f083953a9153807596d06dee773078d5c768ca78a4573ff171b7b3fddbfc7b7cefc1876e267c5dab759b2d52ecff
7
- data.tar.gz: 3555d2e7a37e4e2294d0291122c49107d4affa9195fb08a6555f7ee681ff18c475fc601281e4da7f1683356ba318e433a974b36f5b5b51ab5a6a86ca8a5133cb
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.4)
4
+ helmsnap (2.1.0)
5
5
  colorize (~> 1.1)
6
6
 
7
7
  GEM
@@ -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.4"
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.4
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Smirnov