kamal-backup 0.3.0.beta2 → 0.3.0.beta3

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: 55945234709fcf743588fe6fadf7873ff43dcc832a2bc8303e42ba67e15c13db
4
- data.tar.gz: a3e05e3428bdcceafa37d2dc2f0cdea53d50e204f7c9345e38308be0085ba9ea
3
+ metadata.gz: a1361a5b9b6637aa96a0de2f2407bca63f2dd6d253cede1595c2ebac8f55b578
4
+ data.tar.gz: 74f156851335e88d5a36756fb43018e5f498b152cd2a00742cdd6eb425f623dd
5
5
  SHA512:
6
- metadata.gz: f23ce66cf13a8b420d6171e16489f2c4e2bc44c522b222637eac0ac809e1092e8634396589a1ea4b58c9f01e3ef446f57e4b8f38a157be3423e482cbe8bd2e9a
7
- data.tar.gz: 103ff0d7ffb950b7f6927a8c22591e7f91c8cc06d5456bb04a6b119eda21f7198aa949375d19e3689040db34c8c2a4dc8ed4b2ab6e59911672e4b9033b700fe5
6
+ metadata.gz: 43b1f8c585ddd0e4c9f0df96ea243d736ac5e9e565c12382816b6329ad3054746c47b42c72e269bc199daba7985af8d75efcfbeb5ec2bd09b54c2d9877b511aa
7
+ data.tar.gz: b08fe68ed2474db14330819700af6f6d499d2d53d27721becf92cf03cc59a7239fba2c30087bd3bc7bdc552de87ec3a4cad9411fbda71b148488b91a8aea7d23
@@ -592,6 +592,8 @@ module KamalBackup
592
592
  end
593
593
  end
594
594
 
595
+ env.merge!(normalize_yaml_restic_rest(hash["rest"], raw_env: raw_env, path: path)) if hash.key?("rest")
596
+
595
597
  {
596
598
  "init_if_missing" => "RESTIC_INIT_IF_MISSING",
597
599
  "check_after_backup" => "RESTIC_CHECK_AFTER_BACKUP",
@@ -635,6 +637,16 @@ module KamalBackup
635
637
  end
636
638
  end
637
639
 
640
+ def normalize_yaml_restic_rest(raw_value, raw_env:, path:)
641
+ hash = require_mapping(raw_value, "#{path} restic.rest")
642
+ env = {}
643
+ username = hash.key?("username") ? hash["username"] : hash["user"]
644
+
645
+ env["RESTIC_REST_USERNAME"] = resolve_yaml_value(username, raw_env: raw_env, context: "#{path} restic.rest.username") if username
646
+ env["RESTIC_REST_PASSWORD"] = resolve_yaml_value(hash["password"], raw_env: raw_env, context: "#{path} restic.rest.password") if hash.key?("password")
647
+ env.compact
648
+ end
649
+
638
650
  def normalize_yaml_backup(raw_value, path:)
639
651
  hash = require_mapping(raw_value, "#{path} backup")
640
652
  env = {}
@@ -1,3 +1,3 @@
1
1
  module KamalBackup
2
- VERSION = "0.3.0.beta2"
2
+ VERSION = "0.3.0.beta3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamal-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.beta2
4
+ version: 0.3.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - crmne