dash 3.2.0 → 3.2.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.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/dash +2 -2
  4. data/lib/{kamal → dash}/cli/accessory.rb +24 -24
  5. data/lib/dash/cli/alias/command.rb +10 -0
  6. data/lib/{kamal → dash}/cli/app/assets.rb +2 -2
  7. data/lib/{kamal → dash}/cli/app/boot.rb +15 -15
  8. data/lib/{kamal → dash}/cli/app/error_pages.rb +6 -6
  9. data/lib/{kamal → dash}/cli/app/rollout_boot.rb +6 -6
  10. data/lib/{kamal → dash}/cli/app/ssl_certificates.rb +3 -3
  11. data/lib/{kamal → dash}/cli/app.rb +86 -86
  12. data/lib/{kamal → dash}/cli/base.rb +71 -47
  13. data/lib/dash/cli/build/clone.rb +59 -0
  14. data/lib/{kamal → dash}/cli/build/port_forwarding.rb +1 -1
  15. data/lib/{kamal → dash}/cli/build.rb +45 -45
  16. data/lib/{kamal → dash}/cli/doctor/config_checks.rb +3 -3
  17. data/lib/{kamal → dash}/cli/doctor/endpoint_checks.rb +25 -7
  18. data/lib/{kamal → dash}/cli/doctor/host_checks.rb +18 -18
  19. data/lib/{kamal → dash}/cli/doctor.rb +9 -9
  20. data/lib/{kamal → dash}/cli/healthcheck/barrier.rb +2 -2
  21. data/lib/{kamal → dash}/cli/healthcheck/drift_error.rb +2 -2
  22. data/lib/dash/cli/healthcheck/error.rb +2 -0
  23. data/lib/{kamal → dash}/cli/healthcheck/poller.rb +7 -7
  24. data/lib/{kamal → dash}/cli/lock.rb +1 -1
  25. data/lib/dash/cli/main/migrate.rb +77 -0
  26. data/lib/{kamal → dash}/cli/main.rb +77 -66
  27. data/lib/{kamal → dash}/cli/proxy/drift.rb +3 -3
  28. data/lib/{kamal → dash}/cli/proxy/loadbalancer_claim.rb +3 -3
  29. data/lib/{kamal → dash}/cli/proxy/loadbalancer_reboot.rb +22 -22
  30. data/lib/{kamal → dash}/cli/proxy/reboot.rb +15 -15
  31. data/lib/{kamal → dash}/cli/proxy.rb +166 -154
  32. data/lib/{kamal → dash}/cli/prune.rb +10 -10
  33. data/lib/{kamal → dash}/cli/registry.rb +11 -11
  34. data/lib/{kamal → dash}/cli/secrets.rb +3 -3
  35. data/lib/{kamal → dash}/cli/server.rb +14 -14
  36. data/lib/{kamal → dash}/cli/templates/deploy.yml +4 -4
  37. data/lib/dash/cli/templates/sample_hooks/docker-setup.sample +3 -0
  38. data/lib/dash/cli/templates/sample_hooks/post-app-boot.sample +3 -0
  39. data/lib/dash/cli/templates/sample_hooks/post-app-stop.sample +9 -0
  40. data/lib/dash/cli/templates/sample_hooks/post-deploy.sample +14 -0
  41. data/lib/dash/cli/templates/sample_hooks/post-proxy-deploy.sample +3 -0
  42. data/lib/dash/cli/templates/sample_hooks/post-proxy-reboot.sample +3 -0
  43. data/lib/dash/cli/templates/sample_hooks/pre-app-boot.sample +3 -0
  44. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-app-stop.sample +2 -2
  45. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-build.sample +8 -8
  46. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-connect.sample +8 -8
  47. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-deploy.sample +9 -9
  48. data/lib/dash/cli/templates/sample_hooks/pre-proxy-deploy.sample +3 -0
  49. data/lib/dash/cli/templates/sample_hooks/pre-proxy-reboot.sample +3 -0
  50. data/lib/{kamal → dash}/cli/templates/secrets +6 -6
  51. data/lib/{kamal → dash}/cli.rb +2 -2
  52. data/lib/{kamal → dash}/commander/specifics.rb +2 -2
  53. data/lib/{kamal → dash}/commander.rb +31 -23
  54. data/lib/{kamal → dash}/commands/accessory/proxy.rb +1 -1
  55. data/lib/{kamal → dash}/commands/accessory.rb +2 -2
  56. data/lib/{kamal → dash}/commands/app/assets.rb +1 -1
  57. data/lib/{kamal → dash}/commands/app/containers.rb +1 -1
  58. data/lib/{kamal → dash}/commands/app/error_pages.rb +2 -2
  59. data/lib/{kamal → dash}/commands/app/execution.rb +1 -1
  60. data/lib/{kamal → dash}/commands/app/images.rb +1 -1
  61. data/lib/{kamal → dash}/commands/app/logging.rb +1 -1
  62. data/lib/{kamal → dash}/commands/app/proxy.rb +1 -1
  63. data/lib/{kamal → dash}/commands/app.rb +1 -1
  64. data/lib/{kamal → dash}/commands/auditor.rb +3 -7
  65. data/lib/{kamal → dash}/commands/base.rb +39 -3
  66. data/lib/{kamal → dash}/commands/builder/base.rb +2 -2
  67. data/lib/{kamal → dash}/commands/builder/clone.rb +3 -3
  68. data/lib/{kamal → dash}/commands/builder/cloud.rb +1 -1
  69. data/lib/{kamal → dash}/commands/builder/hybrid.rb +1 -1
  70. data/lib/{kamal → dash}/commands/builder/local.rb +1 -1
  71. data/lib/{kamal → dash}/commands/builder/pack.rb +1 -1
  72. data/lib/{kamal → dash}/commands/builder/remote.rb +1 -1
  73. data/lib/{kamal → dash}/commands/builder.rb +7 -7
  74. data/lib/{kamal → dash}/commands/docker.rb +1 -1
  75. data/lib/{kamal → dash}/commands/hook.rb +1 -1
  76. data/lib/{kamal → dash}/commands/loadbalancer.rb +9 -8
  77. data/lib/{kamal → dash}/commands/lock.rb +2 -2
  78. data/lib/{kamal → dash}/commands/proxy/cert_transfer.rb +2 -2
  79. data/lib/{kamal → dash}/commands/proxy.rb +20 -10
  80. data/lib/{kamal → dash}/commands/prune.rb +1 -1
  81. data/lib/dash/commands/registry.rb +44 -0
  82. data/lib/{kamal → dash}/commands/server.rb +1 -5
  83. data/lib/dash/commands.rb +2 -0
  84. data/lib/{kamal → dash}/configuration/accessory.rb +11 -11
  85. data/lib/{kamal → dash}/configuration/alias.rb +3 -3
  86. data/lib/{kamal → dash}/configuration/boot.rb +2 -2
  87. data/lib/{kamal → dash}/configuration/builder.rb +7 -7
  88. data/lib/{kamal → dash}/configuration/docs/builder.yml +3 -3
  89. data/lib/{kamal → dash}/configuration/docs/configuration.yml +12 -5
  90. data/lib/{kamal → dash}/configuration/docs/env.yml +10 -10
  91. data/lib/{kamal → dash}/configuration/docs/proxy.yml +31 -8
  92. data/lib/{kamal → dash}/configuration/docs/registry.yml +5 -5
  93. data/lib/{kamal → dash}/configuration/env/tag.rb +2 -2
  94. data/lib/{kamal → dash}/configuration/env.rb +5 -5
  95. data/lib/{kamal → dash}/configuration/loadbalancer.rb +3 -3
  96. data/lib/{kamal → dash}/configuration/logging.rb +3 -3
  97. data/lib/{kamal → dash}/configuration/output.rb +4 -4
  98. data/lib/{kamal → dash}/configuration/proxy/acme.rb +4 -3
  99. data/lib/{kamal → dash}/configuration/proxy/boot.rb +7 -7
  100. data/lib/{kamal → dash}/configuration/proxy/run.rb +11 -11
  101. data/lib/{kamal → dash}/configuration/proxy.rb +15 -15
  102. data/lib/{kamal → dash}/configuration/registry.rb +3 -3
  103. data/lib/{kamal → dash}/configuration/role/healthcheck.rb +3 -3
  104. data/lib/{kamal → dash}/configuration/role.rb +12 -12
  105. data/lib/{kamal → dash}/configuration/servers.rb +4 -4
  106. data/lib/{kamal → dash}/configuration/ssh.rb +2 -2
  107. data/lib/{kamal → dash}/configuration/sshkit.rb +2 -2
  108. data/lib/{kamal → dash}/configuration/validation.rb +2 -2
  109. data/lib/{kamal → dash}/configuration/validator/accessory.rb +1 -1
  110. data/lib/{kamal → dash}/configuration/validator/alias.rb +2 -2
  111. data/lib/{kamal → dash}/configuration/validator/builder.rb +1 -1
  112. data/lib/dash/configuration/validator/configuration.rb +6 -0
  113. data/lib/{kamal → dash}/configuration/validator/env.rb +2 -2
  114. data/lib/{kamal → dash}/configuration/validator/proxy.rb +8 -8
  115. data/lib/{kamal → dash}/configuration/validator/registry.rb +1 -1
  116. data/lib/{kamal → dash}/configuration/validator/role.rb +1 -1
  117. data/lib/{kamal → dash}/configuration/validator/servers.rb +1 -1
  118. data/lib/{kamal → dash}/configuration/validator.rb +4 -4
  119. data/lib/{kamal → dash}/configuration/volume.rb +2 -2
  120. data/lib/{kamal → dash}/configuration.rb +39 -29
  121. data/lib/{kamal → dash}/docker.rb +1 -1
  122. data/lib/{kamal → dash}/env_file.rb +1 -1
  123. data/lib/{kamal → dash}/git.rb +1 -1
  124. data/lib/{kamal → dash}/otel_shipper.rb +3 -3
  125. data/lib/{kamal → dash}/output/base_logger.rb +1 -1
  126. data/lib/{kamal → dash}/output/file_logger.rb +1 -1
  127. data/lib/{kamal → dash}/output/formatter.rb +1 -1
  128. data/lib/{kamal → dash}/output/otel_logger.rb +3 -3
  129. data/lib/dash/project_directory.rb +28 -0
  130. data/lib/{kamal → dash}/secrets/adapters/aws_secrets_manager.rb +1 -1
  131. data/lib/{kamal → dash}/secrets/adapters/base.rb +2 -2
  132. data/lib/{kamal → dash}/secrets/adapters/bitwarden.rb +1 -1
  133. data/lib/{kamal → dash}/secrets/adapters/bitwarden_secrets_manager.rb +1 -1
  134. data/lib/{kamal → dash}/secrets/adapters/doppler.rb +1 -1
  135. data/lib/{kamal → dash}/secrets/adapters/enpass.rb +1 -1
  136. data/lib/{kamal → dash}/secrets/adapters/gcp_secret_manager.rb +1 -1
  137. data/lib/{kamal → dash}/secrets/adapters/last_pass.rb +1 -1
  138. data/lib/{kamal → dash}/secrets/adapters/one_password.rb +2 -2
  139. data/lib/{kamal → dash}/secrets/adapters/passbolt.rb +1 -1
  140. data/lib/{kamal → dash}/secrets/adapters/test.rb +1 -1
  141. data/lib/{kamal → dash}/secrets/adapters.rb +2 -2
  142. data/lib/{kamal → dash}/secrets/dotenv/inline_command_substitution.rb +2 -2
  143. data/lib/{kamal → dash}/secrets.rb +6 -6
  144. data/lib/{kamal → dash}/tags.rb +8 -3
  145. data/lib/{kamal → dash}/utils/sensitive.rb +1 -1
  146. data/lib/{kamal → dash}/utils.rb +15 -5
  147. data/lib/dash/version.rb +3 -0
  148. data/lib/{kamal.rb → dash.rb} +4 -4
  149. metadata +156 -154
  150. data/lib/kamal/cli/alias/command.rb +0 -10
  151. data/lib/kamal/cli/build/clone.rb +0 -59
  152. data/lib/kamal/cli/healthcheck/error.rb +0 -2
  153. data/lib/kamal/cli/templates/sample_hooks/docker-setup.sample +0 -3
  154. data/lib/kamal/cli/templates/sample_hooks/post-app-boot.sample +0 -3
  155. data/lib/kamal/cli/templates/sample_hooks/post-app-stop.sample +0 -9
  156. data/lib/kamal/cli/templates/sample_hooks/post-deploy.sample +0 -14
  157. data/lib/kamal/cli/templates/sample_hooks/post-proxy-deploy.sample +0 -3
  158. data/lib/kamal/cli/templates/sample_hooks/post-proxy-reboot.sample +0 -3
  159. data/lib/kamal/cli/templates/sample_hooks/pre-app-boot.sample +0 -3
  160. data/lib/kamal/cli/templates/sample_hooks/pre-proxy-deploy.sample +0 -3
  161. data/lib/kamal/cli/templates/sample_hooks/pre-proxy-reboot.sample +0 -3
  162. data/lib/kamal/commands/registry.rb +0 -38
  163. data/lib/kamal/commands.rb +0 -2
  164. data/lib/kamal/configuration/validator/configuration.rb +0 -6
  165. data/lib/kamal/version.rb +0 -3
  166. /data/lib/{kamal → dash}/configuration/docs/accessory.yml +0 -0
  167. /data/lib/{kamal → dash}/configuration/docs/alias.yml +0 -0
  168. /data/lib/{kamal → dash}/configuration/docs/boot.yml +0 -0
  169. /data/lib/{kamal → dash}/configuration/docs/logging.yml +0 -0
  170. /data/lib/{kamal → dash}/configuration/docs/output.yml +0 -0
  171. /data/lib/{kamal → dash}/configuration/docs/role.yml +0 -0
  172. /data/lib/{kamal → dash}/configuration/docs/servers.yml +0 -0
  173. /data/lib/{kamal → dash}/configuration/docs/ssh.yml +0 -0
  174. /data/lib/{kamal → dash}/configuration/docs/sshkit.yml +0 -0
  175. /data/lib/{kamal → dash}/sshkit_with_ext.rb +0 -0
@@ -1,5 +1,5 @@
1
- class Kamal::Secrets::Adapters::Base
2
- delegate :optionize, to: Kamal::Utils
1
+ class Dash::Secrets::Adapters::Base
2
+ delegate :optionize, to: Dash::Utils
3
3
 
4
4
  def fetch(secrets, account: nil, from: nil)
5
5
  raise RuntimeError, "Missing required option '--account'" if requires_account? && account.blank?
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Adapters::Bitwarden < Kamal::Secrets::Adapters::Base
1
+ class Dash::Secrets::Adapters::Bitwarden < Dash::Secrets::Adapters::Base
2
2
  private
3
3
  def login(account)
4
4
  status = run_command("status")
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Adapters::BitwardenSecretsManager < Kamal::Secrets::Adapters::Base
1
+ class Dash::Secrets::Adapters::BitwardenSecretsManager < Dash::Secrets::Adapters::Base
2
2
  def requires_account?
3
3
  false
4
4
  end
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Adapters::Doppler < Kamal::Secrets::Adapters::Base
1
+ class Dash::Secrets::Adapters::Doppler < Dash::Secrets::Adapters::Base
2
2
  def requires_account?
3
3
  false
4
4
  end
@@ -8,7 +8,7 @@
8
8
  #
9
9
  # Fetch only DB_PASSWORD from FooBar item
10
10
  # `dash secrets fetch --adapter enpass --from /Users/YOUR_USERNAME/Library/Containers/in.sinew.Enpass-Desktop/Data/Documents/Vaults/primary FooBar/DB_PASSWORD`
11
- class Kamal::Secrets::Adapters::Enpass < Kamal::Secrets::Adapters::Base
11
+ class Dash::Secrets::Adapters::Enpass < Dash::Secrets::Adapters::Base
12
12
  def requires_account?
13
13
  false
14
14
  end
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Adapters::GcpSecretManager < Kamal::Secrets::Adapters::Base
1
+ class Dash::Secrets::Adapters::GcpSecretManager < Dash::Secrets::Adapters::Base
2
2
  private
3
3
  def login(account)
4
4
  # Since only the account option is passed from the cli, we'll use it for both account and service account
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Adapters::LastPass < Kamal::Secrets::Adapters::Base
1
+ class Dash::Secrets::Adapters::LastPass < Dash::Secrets::Adapters::Base
2
2
  private
3
3
  def login(account)
4
4
  unless loggedin?(account)
@@ -1,5 +1,5 @@
1
- class Kamal::Secrets::Adapters::OnePassword < Kamal::Secrets::Adapters::Base
2
- delegate :optionize, to: Kamal::Utils
1
+ class Dash::Secrets::Adapters::OnePassword < Dash::Secrets::Adapters::Base
2
+ delegate :optionize, to: Dash::Utils
3
3
 
4
4
  private
5
5
  def login(account)
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Adapters::Passbolt < Kamal::Secrets::Adapters::Base
1
+ class Dash::Secrets::Adapters::Passbolt < Dash::Secrets::Adapters::Base
2
2
  def requires_account?
3
3
  false
4
4
  end
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Adapters::Test < Kamal::Secrets::Adapters::Base
1
+ class Dash::Secrets::Adapters::Test < Dash::Secrets::Adapters::Base
2
2
  private
3
3
  def login(account)
4
4
  true
@@ -1,5 +1,5 @@
1
1
  require "active_support/core_ext/string/inflections"
2
- module Kamal::Secrets::Adapters
2
+ module Dash::Secrets::Adapters
3
3
  def self.lookup(name)
4
4
  name = "one_password" if name.downcase == "1password"
5
5
  name = "last_pass" if name.downcase == "lastpass"
@@ -9,7 +9,7 @@ module Kamal::Secrets::Adapters
9
9
  end
10
10
 
11
11
  def self.adapter_class(name)
12
- Object.const_get("Kamal::Secrets::Adapters::#{name.camelize}").new
12
+ Object.const_get("Dash::Secrets::Adapters::#{name.camelize}").new
13
13
  rescue NameError => e
14
14
  raise RuntimeError, "Unknown secrets adapter: #{name}"
15
15
  end
@@ -1,4 +1,4 @@
1
- class Kamal::Secrets::Dotenv::InlineCommandSubstitution
1
+ class Dash::Secrets::Dotenv::InlineCommandSubstitution
2
2
  # Unlike dotenv, this regex does not match escaped
3
3
  # parentheses when looking for command substitutions.
4
4
  INTERPOLATED_SHELL_COMMAND = /
@@ -43,7 +43,7 @@ class Kamal::Secrets::Dotenv::InlineCommandSubstitution
43
43
  end
44
44
 
45
45
  def inline_secrets_command(command)
46
- Kamal::Cli::Main.start(command.shellsplit[1..] + [ "--inline" ]).chomp
46
+ Dash::Cli::Main.start(command.shellsplit[1..] + [ "--inline" ]).chomp
47
47
  end
48
48
  end
49
49
  end
@@ -1,11 +1,11 @@
1
1
  require "dotenv"
2
2
 
3
- class Kamal::Secrets
4
- Kamal::Secrets::Dotenv::InlineCommandSubstitution.install!
3
+ class Dash::Secrets
4
+ Dash::Secrets::Dotenv::InlineCommandSubstitution.install!
5
5
 
6
- def initialize(destination: nil, secrets_path: ".kamal/secrets")
6
+ def initialize(destination: nil, secrets_path: nil)
7
7
  @destination = destination
8
- @secrets_path = secrets_path
8
+ @secrets_path = secrets_path || Dash::ProjectDirectory.join("secrets")
9
9
  @mutex = Mutex.new
10
10
  end
11
11
 
@@ -13,9 +13,9 @@ class Kamal::Secrets
13
13
  synchronized_fetch(key)
14
14
  rescue KeyError
15
15
  if secrets_files.present?
16
- raise Kamal::ConfigurationError, "Secret '#{key}' not found in #{secrets_files.join(", ")}"
16
+ raise Dash::ConfigurationError, "Secret '#{key}' not found in #{secrets_files.join(", ")}"
17
17
  else
18
- raise Kamal::ConfigurationError, "Secret '#{key}' not found, no secret files (#{secrets_filenames.join(", ")}) provided"
18
+ raise Dash::ConfigurationError, "Secret '#{key}' not found, no secret files (#{secrets_filenames.join(", ")}) provided"
19
19
  end
20
20
  end
21
21
 
@@ -1,6 +1,6 @@
1
1
  require "time"
2
2
 
3
- class Kamal::Tags
3
+ class Dash::Tags
4
4
  attr_reader :config, :tags
5
5
 
6
6
  class << self
@@ -10,7 +10,7 @@ class Kamal::Tags
10
10
 
11
11
  def default_tags(config)
12
12
  { recorded_at: Time.now.utc.iso8601,
13
- performer: Kamal::Git.email.presence || `whoami`.chomp,
13
+ performer: Dash::Git.email.presence || `whoami`.chomp,
14
14
  destination: config.destination,
15
15
  version: config.version,
16
16
  service_version: service_version(config),
@@ -26,8 +26,13 @@ class Kamal::Tags
26
26
  @tags = tags.compact
27
27
  end
28
28
 
29
+ # Both prefixes carry the same value: hooks are operator-written and apps read
30
+ # these at runtime, so the old names stay until 5.0 (zoolutions/dash#118).
29
31
  def env
30
- tags.transform_keys { |detail| "KAMAL_#{detail.upcase}" }
32
+ tags.each_with_object({}) do |(detail, value), env|
33
+ env["DASH_#{detail.upcase}"] = value
34
+ env["KAMAL_#{detail.upcase}"] = value
35
+ end
31
36
  end
32
37
 
33
38
  def to_s
@@ -1,7 +1,7 @@
1
1
  require "active_support/core_ext/module/delegation"
2
2
  require "sshkit"
3
3
 
4
- class Kamal::Utils::Sensitive
4
+ class Dash::Utils::Sensitive
5
5
  # So SSHKit knows to redact these values.
6
6
  include SSHKit::Redaction
7
7
 
@@ -1,6 +1,6 @@
1
1
  require "active_support/core_ext/object/try"
2
2
 
3
- module Kamal::Utils
3
+ module Dash::Utils
4
4
  extend self
5
5
 
6
6
  DOLLAR_SIGN_WITHOUT_SHELL_EXPANSION_REGEX = /\$(?!{[^\}]*\})/
@@ -31,13 +31,13 @@ module Kamal::Utils
31
31
  "--#{key}"
32
32
  else
33
33
  rendered = "--#{key}#{with}#{escape ? escape_shell_value(value) : value}"
34
- value.is_a?(Kamal::Utils::Sensitive) ? sensitive(rendered, redaction: "--#{key}#{with}#{value.redaction}") : rendered
34
+ value.is_a?(Dash::Utils::Sensitive) ? sensitive(rendered, redaction: "--#{key}#{with}#{value.redaction}") : rendered
35
35
  end
36
36
  end
37
37
  else
38
38
  flatten_args(args).collect do |(key, value)|
39
39
  rendered = value == true ? nil : escape ? escape_shell_value(value) : value
40
- rendered = sensitive(rendered, redaction: value.redaction) if value.is_a?(Kamal::Utils::Sensitive)
40
+ rendered = sensitive(rendered, redaction: value.redaction) if value.is_a?(Dash::Utils::Sensitive)
41
41
  [ "--#{key}", rendered ]
42
42
  end
43
43
  end
@@ -47,8 +47,18 @@ module Kamal::Utils
47
47
 
48
48
  # kamal-proxy takes durations as Go duration strings; deploy.yml takes plain
49
49
  # seconds. Zero is a real value (it disables the timeout), so only nil drops out.
50
+ #
51
+ # A value that already carries a unit is passed through untouched. Appending
52
+ # "s" to it would not just be redundant, it would change the meaning: "5m"
53
+ # would become "5ms", which Go parses happily as five milliseconds. An
54
+ # operator who writes a Go duration should get the duration they wrote or an
55
+ # error from the proxy, never a silently different one.
56
+ NUMERIC_DURATION = /\A-?\d+(\.\d+)?\z/
57
+
50
58
  def seconds_duration(value)
51
- "#{value}s" if value
59
+ return if value.nil?
60
+
61
+ value.to_s.match?(NUMERIC_DURATION) ? "#{value}s" : value.to_s
52
62
  end
53
63
 
54
64
  # Flattens a one-to-many structure into an array of two-element arrays each containing a key-value pair
@@ -60,7 +70,7 @@ module Kamal::Utils
60
70
  # Pass `redaction:` to change the default `"[REDACTED]"` redaction, e.g.
61
71
  # `sensitive "#{arg}=#{secret}", redaction: "#{arg}=xxxx"
62
72
  def sensitive(...)
63
- Kamal::Utils::Sensitive.new(...)
73
+ Dash::Utils::Sensitive.new(...)
64
74
  end
65
75
 
66
76
  def redacted(value)
@@ -0,0 +1,3 @@
1
+ module Dash
2
+ VERSION = "3.2.1"
3
+ end
@@ -1,4 +1,4 @@
1
- module Kamal
1
+ module Dash
2
2
  class ConfigurationError < StandardError; end
3
3
  end
4
4
 
@@ -8,7 +8,7 @@ require "yaml"
8
8
  require "tmpdir"
9
9
  require "pathname"
10
10
  require "uri"
11
- # Proxy::Run.digest reaches for Digest::SHA256 from inside `on(KAMAL.proxy_hosts)`,
11
+ # Proxy::Run.digest reaches for Digest::SHA256 from inside `on(DASH.proxy_hosts)`,
12
12
  # so the first reference happens in several SSHKit threads at once. Digest defines
13
13
  # SHA256 lazily — `Digest.const_missing(:SHA256)` runs `require "digest/sha2"`, and
14
14
  # that path is not mutex-guarded — so the threads race it and one loses with
@@ -21,6 +21,6 @@ require "uri"
21
21
  require "digest/sha2"
22
22
 
23
23
  loader = Zeitwerk::Loader.for_gem
24
- loader.ignore(File.join(__dir__, "kamal", "sshkit_with_ext.rb"))
24
+ loader.ignore(File.join(__dir__, "dash", "sshkit_with_ext.rb"))
25
25
  loader.setup
26
- loader.eager_load_namespace(Kamal::Cli) # We need all commands loaded.
26
+ loader.eager_load_namespace(Dash::Cli) # We need all commands loaded.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dash
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
@@ -176,159 +176,161 @@ files:
176
176
  - MIT-LICENSE
177
177
  - README.md
178
178
  - bin/dash
179
- - lib/kamal.rb
180
- - lib/kamal/cli.rb
181
- - lib/kamal/cli/accessory.rb
182
- - lib/kamal/cli/alias/command.rb
183
- - lib/kamal/cli/app.rb
184
- - lib/kamal/cli/app/assets.rb
185
- - lib/kamal/cli/app/boot.rb
186
- - lib/kamal/cli/app/error_pages.rb
187
- - lib/kamal/cli/app/rollout_boot.rb
188
- - lib/kamal/cli/app/ssl_certificates.rb
189
- - lib/kamal/cli/base.rb
190
- - lib/kamal/cli/build.rb
191
- - lib/kamal/cli/build/clone.rb
192
- - lib/kamal/cli/build/port_forwarding.rb
193
- - lib/kamal/cli/doctor.rb
194
- - lib/kamal/cli/doctor/config_checks.rb
195
- - lib/kamal/cli/doctor/endpoint_checks.rb
196
- - lib/kamal/cli/doctor/host_checks.rb
197
- - lib/kamal/cli/healthcheck/barrier.rb
198
- - lib/kamal/cli/healthcheck/drift_error.rb
199
- - lib/kamal/cli/healthcheck/error.rb
200
- - lib/kamal/cli/healthcheck/poller.rb
201
- - lib/kamal/cli/lock.rb
202
- - lib/kamal/cli/main.rb
203
- - lib/kamal/cli/proxy.rb
204
- - lib/kamal/cli/proxy/drift.rb
205
- - lib/kamal/cli/proxy/loadbalancer_claim.rb
206
- - lib/kamal/cli/proxy/loadbalancer_reboot.rb
207
- - lib/kamal/cli/proxy/reboot.rb
208
- - lib/kamal/cli/prune.rb
209
- - lib/kamal/cli/registry.rb
210
- - lib/kamal/cli/secrets.rb
211
- - lib/kamal/cli/server.rb
212
- - lib/kamal/cli/templates/deploy.yml
213
- - lib/kamal/cli/templates/sample_hooks/docker-setup.sample
214
- - lib/kamal/cli/templates/sample_hooks/post-app-boot.sample
215
- - lib/kamal/cli/templates/sample_hooks/post-app-stop.sample
216
- - lib/kamal/cli/templates/sample_hooks/post-deploy.sample
217
- - lib/kamal/cli/templates/sample_hooks/post-proxy-deploy.sample
218
- - lib/kamal/cli/templates/sample_hooks/post-proxy-reboot.sample
219
- - lib/kamal/cli/templates/sample_hooks/pre-app-boot.sample
220
- - lib/kamal/cli/templates/sample_hooks/pre-app-stop.sample
221
- - lib/kamal/cli/templates/sample_hooks/pre-build.sample
222
- - lib/kamal/cli/templates/sample_hooks/pre-connect.sample
223
- - lib/kamal/cli/templates/sample_hooks/pre-deploy.sample
224
- - lib/kamal/cli/templates/sample_hooks/pre-proxy-deploy.sample
225
- - lib/kamal/cli/templates/sample_hooks/pre-proxy-reboot.sample
226
- - lib/kamal/cli/templates/secrets
227
- - lib/kamal/commander.rb
228
- - lib/kamal/commander/specifics.rb
229
- - lib/kamal/commands.rb
230
- - lib/kamal/commands/accessory.rb
231
- - lib/kamal/commands/accessory/proxy.rb
232
- - lib/kamal/commands/app.rb
233
- - lib/kamal/commands/app/assets.rb
234
- - lib/kamal/commands/app/containers.rb
235
- - lib/kamal/commands/app/error_pages.rb
236
- - lib/kamal/commands/app/execution.rb
237
- - lib/kamal/commands/app/images.rb
238
- - lib/kamal/commands/app/logging.rb
239
- - lib/kamal/commands/app/proxy.rb
240
- - lib/kamal/commands/auditor.rb
241
- - lib/kamal/commands/base.rb
242
- - lib/kamal/commands/builder.rb
243
- - lib/kamal/commands/builder/base.rb
244
- - lib/kamal/commands/builder/clone.rb
245
- - lib/kamal/commands/builder/cloud.rb
246
- - lib/kamal/commands/builder/hybrid.rb
247
- - lib/kamal/commands/builder/local.rb
248
- - lib/kamal/commands/builder/pack.rb
249
- - lib/kamal/commands/builder/remote.rb
250
- - lib/kamal/commands/docker.rb
251
- - lib/kamal/commands/hook.rb
252
- - lib/kamal/commands/loadbalancer.rb
253
- - lib/kamal/commands/lock.rb
254
- - lib/kamal/commands/proxy.rb
255
- - lib/kamal/commands/proxy/cert_transfer.rb
256
- - lib/kamal/commands/prune.rb
257
- - lib/kamal/commands/registry.rb
258
- - lib/kamal/commands/server.rb
259
- - lib/kamal/configuration.rb
260
- - lib/kamal/configuration/accessory.rb
261
- - lib/kamal/configuration/alias.rb
262
- - lib/kamal/configuration/boot.rb
263
- - lib/kamal/configuration/builder.rb
264
- - lib/kamal/configuration/docs/accessory.yml
265
- - lib/kamal/configuration/docs/alias.yml
266
- - lib/kamal/configuration/docs/boot.yml
267
- - lib/kamal/configuration/docs/builder.yml
268
- - lib/kamal/configuration/docs/configuration.yml
269
- - lib/kamal/configuration/docs/env.yml
270
- - lib/kamal/configuration/docs/logging.yml
271
- - lib/kamal/configuration/docs/output.yml
272
- - lib/kamal/configuration/docs/proxy.yml
273
- - lib/kamal/configuration/docs/registry.yml
274
- - lib/kamal/configuration/docs/role.yml
275
- - lib/kamal/configuration/docs/servers.yml
276
- - lib/kamal/configuration/docs/ssh.yml
277
- - lib/kamal/configuration/docs/sshkit.yml
278
- - lib/kamal/configuration/env.rb
279
- - lib/kamal/configuration/env/tag.rb
280
- - lib/kamal/configuration/loadbalancer.rb
281
- - lib/kamal/configuration/logging.rb
282
- - lib/kamal/configuration/output.rb
283
- - lib/kamal/configuration/proxy.rb
284
- - lib/kamal/configuration/proxy/acme.rb
285
- - lib/kamal/configuration/proxy/boot.rb
286
- - lib/kamal/configuration/proxy/run.rb
287
- - lib/kamal/configuration/registry.rb
288
- - lib/kamal/configuration/role.rb
289
- - lib/kamal/configuration/role/healthcheck.rb
290
- - lib/kamal/configuration/servers.rb
291
- - lib/kamal/configuration/ssh.rb
292
- - lib/kamal/configuration/sshkit.rb
293
- - lib/kamal/configuration/validation.rb
294
- - lib/kamal/configuration/validator.rb
295
- - lib/kamal/configuration/validator/accessory.rb
296
- - lib/kamal/configuration/validator/alias.rb
297
- - lib/kamal/configuration/validator/builder.rb
298
- - lib/kamal/configuration/validator/configuration.rb
299
- - lib/kamal/configuration/validator/env.rb
300
- - lib/kamal/configuration/validator/proxy.rb
301
- - lib/kamal/configuration/validator/registry.rb
302
- - lib/kamal/configuration/validator/role.rb
303
- - lib/kamal/configuration/validator/servers.rb
304
- - lib/kamal/configuration/volume.rb
305
- - lib/kamal/docker.rb
306
- - lib/kamal/env_file.rb
307
- - lib/kamal/git.rb
308
- - lib/kamal/otel_shipper.rb
309
- - lib/kamal/output/base_logger.rb
310
- - lib/kamal/output/file_logger.rb
311
- - lib/kamal/output/formatter.rb
312
- - lib/kamal/output/otel_logger.rb
313
- - lib/kamal/secrets.rb
314
- - lib/kamal/secrets/adapters.rb
315
- - lib/kamal/secrets/adapters/aws_secrets_manager.rb
316
- - lib/kamal/secrets/adapters/base.rb
317
- - lib/kamal/secrets/adapters/bitwarden.rb
318
- - lib/kamal/secrets/adapters/bitwarden_secrets_manager.rb
319
- - lib/kamal/secrets/adapters/doppler.rb
320
- - lib/kamal/secrets/adapters/enpass.rb
321
- - lib/kamal/secrets/adapters/gcp_secret_manager.rb
322
- - lib/kamal/secrets/adapters/last_pass.rb
323
- - lib/kamal/secrets/adapters/one_password.rb
324
- - lib/kamal/secrets/adapters/passbolt.rb
325
- - lib/kamal/secrets/adapters/test.rb
326
- - lib/kamal/secrets/dotenv/inline_command_substitution.rb
327
- - lib/kamal/sshkit_with_ext.rb
328
- - lib/kamal/tags.rb
329
- - lib/kamal/utils.rb
330
- - lib/kamal/utils/sensitive.rb
331
- - lib/kamal/version.rb
179
+ - lib/dash.rb
180
+ - lib/dash/cli.rb
181
+ - lib/dash/cli/accessory.rb
182
+ - lib/dash/cli/alias/command.rb
183
+ - lib/dash/cli/app.rb
184
+ - lib/dash/cli/app/assets.rb
185
+ - lib/dash/cli/app/boot.rb
186
+ - lib/dash/cli/app/error_pages.rb
187
+ - lib/dash/cli/app/rollout_boot.rb
188
+ - lib/dash/cli/app/ssl_certificates.rb
189
+ - lib/dash/cli/base.rb
190
+ - lib/dash/cli/build.rb
191
+ - lib/dash/cli/build/clone.rb
192
+ - lib/dash/cli/build/port_forwarding.rb
193
+ - lib/dash/cli/doctor.rb
194
+ - lib/dash/cli/doctor/config_checks.rb
195
+ - lib/dash/cli/doctor/endpoint_checks.rb
196
+ - lib/dash/cli/doctor/host_checks.rb
197
+ - lib/dash/cli/healthcheck/barrier.rb
198
+ - lib/dash/cli/healthcheck/drift_error.rb
199
+ - lib/dash/cli/healthcheck/error.rb
200
+ - lib/dash/cli/healthcheck/poller.rb
201
+ - lib/dash/cli/lock.rb
202
+ - lib/dash/cli/main.rb
203
+ - lib/dash/cli/main/migrate.rb
204
+ - lib/dash/cli/proxy.rb
205
+ - lib/dash/cli/proxy/drift.rb
206
+ - lib/dash/cli/proxy/loadbalancer_claim.rb
207
+ - lib/dash/cli/proxy/loadbalancer_reboot.rb
208
+ - lib/dash/cli/proxy/reboot.rb
209
+ - lib/dash/cli/prune.rb
210
+ - lib/dash/cli/registry.rb
211
+ - lib/dash/cli/secrets.rb
212
+ - lib/dash/cli/server.rb
213
+ - lib/dash/cli/templates/deploy.yml
214
+ - lib/dash/cli/templates/sample_hooks/docker-setup.sample
215
+ - lib/dash/cli/templates/sample_hooks/post-app-boot.sample
216
+ - lib/dash/cli/templates/sample_hooks/post-app-stop.sample
217
+ - lib/dash/cli/templates/sample_hooks/post-deploy.sample
218
+ - lib/dash/cli/templates/sample_hooks/post-proxy-deploy.sample
219
+ - lib/dash/cli/templates/sample_hooks/post-proxy-reboot.sample
220
+ - lib/dash/cli/templates/sample_hooks/pre-app-boot.sample
221
+ - lib/dash/cli/templates/sample_hooks/pre-app-stop.sample
222
+ - lib/dash/cli/templates/sample_hooks/pre-build.sample
223
+ - lib/dash/cli/templates/sample_hooks/pre-connect.sample
224
+ - lib/dash/cli/templates/sample_hooks/pre-deploy.sample
225
+ - lib/dash/cli/templates/sample_hooks/pre-proxy-deploy.sample
226
+ - lib/dash/cli/templates/sample_hooks/pre-proxy-reboot.sample
227
+ - lib/dash/cli/templates/secrets
228
+ - lib/dash/commander.rb
229
+ - lib/dash/commander/specifics.rb
230
+ - lib/dash/commands.rb
231
+ - lib/dash/commands/accessory.rb
232
+ - lib/dash/commands/accessory/proxy.rb
233
+ - lib/dash/commands/app.rb
234
+ - lib/dash/commands/app/assets.rb
235
+ - lib/dash/commands/app/containers.rb
236
+ - lib/dash/commands/app/error_pages.rb
237
+ - lib/dash/commands/app/execution.rb
238
+ - lib/dash/commands/app/images.rb
239
+ - lib/dash/commands/app/logging.rb
240
+ - lib/dash/commands/app/proxy.rb
241
+ - lib/dash/commands/auditor.rb
242
+ - lib/dash/commands/base.rb
243
+ - lib/dash/commands/builder.rb
244
+ - lib/dash/commands/builder/base.rb
245
+ - lib/dash/commands/builder/clone.rb
246
+ - lib/dash/commands/builder/cloud.rb
247
+ - lib/dash/commands/builder/hybrid.rb
248
+ - lib/dash/commands/builder/local.rb
249
+ - lib/dash/commands/builder/pack.rb
250
+ - lib/dash/commands/builder/remote.rb
251
+ - lib/dash/commands/docker.rb
252
+ - lib/dash/commands/hook.rb
253
+ - lib/dash/commands/loadbalancer.rb
254
+ - lib/dash/commands/lock.rb
255
+ - lib/dash/commands/proxy.rb
256
+ - lib/dash/commands/proxy/cert_transfer.rb
257
+ - lib/dash/commands/prune.rb
258
+ - lib/dash/commands/registry.rb
259
+ - lib/dash/commands/server.rb
260
+ - lib/dash/configuration.rb
261
+ - lib/dash/configuration/accessory.rb
262
+ - lib/dash/configuration/alias.rb
263
+ - lib/dash/configuration/boot.rb
264
+ - lib/dash/configuration/builder.rb
265
+ - lib/dash/configuration/docs/accessory.yml
266
+ - lib/dash/configuration/docs/alias.yml
267
+ - lib/dash/configuration/docs/boot.yml
268
+ - lib/dash/configuration/docs/builder.yml
269
+ - lib/dash/configuration/docs/configuration.yml
270
+ - lib/dash/configuration/docs/env.yml
271
+ - lib/dash/configuration/docs/logging.yml
272
+ - lib/dash/configuration/docs/output.yml
273
+ - lib/dash/configuration/docs/proxy.yml
274
+ - lib/dash/configuration/docs/registry.yml
275
+ - lib/dash/configuration/docs/role.yml
276
+ - lib/dash/configuration/docs/servers.yml
277
+ - lib/dash/configuration/docs/ssh.yml
278
+ - lib/dash/configuration/docs/sshkit.yml
279
+ - lib/dash/configuration/env.rb
280
+ - lib/dash/configuration/env/tag.rb
281
+ - lib/dash/configuration/loadbalancer.rb
282
+ - lib/dash/configuration/logging.rb
283
+ - lib/dash/configuration/output.rb
284
+ - lib/dash/configuration/proxy.rb
285
+ - lib/dash/configuration/proxy/acme.rb
286
+ - lib/dash/configuration/proxy/boot.rb
287
+ - lib/dash/configuration/proxy/run.rb
288
+ - lib/dash/configuration/registry.rb
289
+ - lib/dash/configuration/role.rb
290
+ - lib/dash/configuration/role/healthcheck.rb
291
+ - lib/dash/configuration/servers.rb
292
+ - lib/dash/configuration/ssh.rb
293
+ - lib/dash/configuration/sshkit.rb
294
+ - lib/dash/configuration/validation.rb
295
+ - lib/dash/configuration/validator.rb
296
+ - lib/dash/configuration/validator/accessory.rb
297
+ - lib/dash/configuration/validator/alias.rb
298
+ - lib/dash/configuration/validator/builder.rb
299
+ - lib/dash/configuration/validator/configuration.rb
300
+ - lib/dash/configuration/validator/env.rb
301
+ - lib/dash/configuration/validator/proxy.rb
302
+ - lib/dash/configuration/validator/registry.rb
303
+ - lib/dash/configuration/validator/role.rb
304
+ - lib/dash/configuration/validator/servers.rb
305
+ - lib/dash/configuration/volume.rb
306
+ - lib/dash/docker.rb
307
+ - lib/dash/env_file.rb
308
+ - lib/dash/git.rb
309
+ - lib/dash/otel_shipper.rb
310
+ - lib/dash/output/base_logger.rb
311
+ - lib/dash/output/file_logger.rb
312
+ - lib/dash/output/formatter.rb
313
+ - lib/dash/output/otel_logger.rb
314
+ - lib/dash/project_directory.rb
315
+ - lib/dash/secrets.rb
316
+ - lib/dash/secrets/adapters.rb
317
+ - lib/dash/secrets/adapters/aws_secrets_manager.rb
318
+ - lib/dash/secrets/adapters/base.rb
319
+ - lib/dash/secrets/adapters/bitwarden.rb
320
+ - lib/dash/secrets/adapters/bitwarden_secrets_manager.rb
321
+ - lib/dash/secrets/adapters/doppler.rb
322
+ - lib/dash/secrets/adapters/enpass.rb
323
+ - lib/dash/secrets/adapters/gcp_secret_manager.rb
324
+ - lib/dash/secrets/adapters/last_pass.rb
325
+ - lib/dash/secrets/adapters/one_password.rb
326
+ - lib/dash/secrets/adapters/passbolt.rb
327
+ - lib/dash/secrets/adapters/test.rb
328
+ - lib/dash/secrets/dotenv/inline_command_substitution.rb
329
+ - lib/dash/sshkit_with_ext.rb
330
+ - lib/dash/tags.rb
331
+ - lib/dash/utils.rb
332
+ - lib/dash/utils/sensitive.rb
333
+ - lib/dash/version.rb
332
334
  homepage: https://github.com/zoolutions/dash
333
335
  licenses:
334
336
  - MIT
@@ -1,10 +0,0 @@
1
- class Kamal::Cli::Alias::Command < Thor::DynamicCommand
2
- def run(instance, args = [])
3
- if (command = KAMAL.resolve_alias(name))
4
- KAMAL.reset
5
- Kamal::Cli::Main.start(Shellwords.split(command) + ARGV[1..-1])
6
- else
7
- super
8
- end
9
- end
10
- end