helmsnap 2.0.4 → 2.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: b974ad37d29fcabe95c2bb2c49b40603833d69a5431a5495b704912133c73c1f
4
- data.tar.gz: 2d4d76110745821ba5cc9db6d8507799f1dd0580368e623e0e7757a6ba42b537
3
+ metadata.gz: 134cce8d5f91b94af2dbd9732af2adf6d6ebb7efb05b87432ec4c988e3daab88
4
+ data.tar.gz: cf9efa208a10c3108a174908a0401a2b6b9f1c30e7dae858896dd3a4b842452a
5
5
  SHA512:
6
- metadata.gz: 47cede3258fc1e0cf1a3e2211f7a599c88d2f083953a9153807596d06dee773078d5c768ca78a4573ff171b7b3fddbfc7b7cefc1876e267c5dab759b2d52ecff
7
- data.tar.gz: 3555d2e7a37e4e2294d0291122c49107d4affa9195fb08a6555f7ee681ff18c475fc601281e4da7f1683356ba318e433a974b36f5b5b51ab5a6a86ca8a5133cb
6
+ metadata.gz: 66b422d0e5d1dc6931bfdde666c8a916e11c0e8e7e1b63832fdea15653dee521cefb44e92f9a6ab473911fd241119ff20cc273202befb3ef387bc1feee51507e
7
+ data.tar.gz: f6f565fb2b0f8b1fbd99f05e1187283cff8d8fb04f4bd503cb13b98f3b4b29a64a3742786bf38461ddb7c6f92a6d551eb1826f79c8bdeade0778402a8eb06c4b
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.1)
5
5
  colorize (~> 1.1)
6
6
 
7
7
  GEM
@@ -34,15 +34,19 @@ 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[ \t]*)+---/, "\n---")
49
+ content.gsub!(/(\n[ \t]*)+\z/, "\n")
50
+ path.write(content)
51
+ end
48
52
  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.1"
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Smirnov