config_skeleton 0.4.0 → 0.4.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: 065e0e44c1b485dc5b32c9466cb68bd9f3c8c3af8704489a0f747951b714347c
4
- data.tar.gz: 48518976b9d43abc868a0f1f8b6cb1a2ecefca7274f11d0be6578f035e7e1400
3
+ metadata.gz: 20798a914f83d1ab8531eb66259f202816e40ade371172102058536cf2fa3af7
4
+ data.tar.gz: 5f742b8f777496e322f845eccc9c641eb7bad0815c8853cd1eea26bbddd2080c
5
5
  SHA512:
6
- metadata.gz: 7985e2e04988415a4435d25b233d4515256ca7c352fe9a2df9038d912e8448f1bc26ac582de28f7d39400936165856b31c4a914e7a872ea999dd53ed5debf1dc
7
- data.tar.gz: 5a684bf24de1bcc0a8d2fc85b34a335c33c997f747787b02d870b8b5b0b19b87200d362d804752865377b75ec21352a8bd4fc655bf95d95e5d6f16628fb22e05
6
+ metadata.gz: 9873af5655630b61a5833a58d6203836a78d4e11218802608fbcde86ada691e6e38ae2a52dd088037e00be1721aed145c6c057cd3c0175ad4279995d3da7d91e
7
+ data.tar.gz: a9e1d788d30246ee436a452076fd157d03864123b3b1eca420c26cb5d6c0684752a5028e4930f81195e2e47e6a8253f468564d525eb3bff8738bf61299d8658a
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "config_skeleton"
3
3
 
4
- s.version = "0.4.0"
4
+ s.version = "0.4.1"
5
5
 
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
@@ -371,7 +371,7 @@ class ConfigSkeleton < ServiceSkeleton
371
371
  #
372
372
  # @note this can optionally be implemented by subclasses.
373
373
  #
374
- def before_regenerate_config(force_reload:, existing_config_hash:); end
374
+ def before_regenerate_config(force_reload:, existing_config_hash:, existing_config_data:); end
375
375
 
376
376
  # Run code after the config is regenerated and potentially a new file is written.
377
377
  #
@@ -465,8 +465,13 @@ class ConfigSkeleton < ServiceSkeleton
465
465
  # @return [void]
466
466
  #
467
467
  def regenerate_config(force_reload: false)
468
- existing_config_hash = Digest::MD5.hexdigest(File.read(config_file))
469
- before_regenerate_config(force_reload: force_reload, existing_config_hash: existing_config_hash)
468
+ data = File.read(config_file)
469
+ existing_config_hash = Digest::MD5.hexdigest(data)
470
+ before_regenerate_config(
471
+ force_reload: force_reload,
472
+ existing_config_hash: existing_config_hash,
473
+ existing_config_data: data
474
+ )
470
475
 
471
476
  logger.debug(logloc) { "force? #{force_reload.inspect}" }
472
477
  tmpfile = Tempfile.new(service_name, File.dirname(config_file))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_skeleton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Palmer