kamal 1.7.1 → 1.7.3

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: a33d6d0c371102cfe47ba0b15f51059aa1d955667edbfbad137d7a5a56865893
4
- data.tar.gz: 065db28e7bfcd285142aa493b4c7cb70a706dfdd58ec504e6f9e4884c35320e3
3
+ metadata.gz: b854d1899fd480cb305709662f0db5baa42021cb30c800cc465bca4fb0641b19
4
+ data.tar.gz: 908e6b78735b170123847a5b89b71fc5020442a34bcc40371afad58d3d27484f
5
5
  SHA512:
6
- metadata.gz: 73a6ce6d0d408024c96b84656958847044c477a9447a12d6861af7a8589f354060b4465100a1873aefa9b4141831751867de7b5181bb71e0353940291712b18d
7
- data.tar.gz: 5c3deef19e9759abf5dc7b11a04799c53372097b32055e95543fd68a444e79056c48507646c7c1dfbc6c098a45655983d9791237a68a1c944f3c86ec7361990b
6
+ metadata.gz: '07691f14dba098e98ed17b91bb4a1529d04a75a9ca895c2d24e35ffd508c9e06f448a3536aa3c9d1b94742c49035861dc17068fba2f2e21e6aabb623589ed868'
7
+ data.tar.gz: a2da79ca3d4bfbc873838809051569621aa54be6a60edbb0d37eae4ab4610612653a8ce7dddb0ebc70e3f2906b28d431929cdd815c413bcdbdeeb52f030d92bc
@@ -43,8 +43,8 @@ class Kamal::Cli::Build < Kamal::Cli::Base
43
43
  cli.create
44
44
  end
45
45
  rescue SSHKit::Command::Failed => e
46
- warn "Missing compatible builder, so creating a new one first"
47
- if e.message =~ /(context not found|no builder)/
46
+ if e.message =~ /(context not found|no builder|does not exist)/
47
+ warn "Missing compatible builder, so creating a new one first"
48
48
  cli.create
49
49
  else
50
50
  raise
@@ -1,7 +1,13 @@
1
- #!/bin/sh
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  # A sample docker-setup hook
4
4
  #
5
- # Sets up a Docker network which can then be used by the application’s containers
5
+ # Sets up a Docker network on defined hosts which can then be used by the application’s containers
6
6
 
7
- ssh user@example.com docker network create kamal
7
+ hosts = ENV["KAMAL_HOSTS"].split(",")
8
+
9
+ hosts.each do |ip|
10
+ destination = "root@#{ip}"
11
+ puts "Creating a Docker network \"kamal\" on #{destination}"
12
+ `ssh #{destination} docker network create kamal`
13
+ end
@@ -31,9 +31,9 @@ class Kamal::Configuration::Validator
31
31
  validate_array_of! value, example_value.first.class
32
32
  elsif example_value.is_a?(Hash)
33
33
  case key.to_s
34
- when "options"
34
+ when "options", "args"
35
35
  validate_type! value, Hash
36
- when "args", "labels"
36
+ when "labels"
37
37
  validate_hash_of! value, example_value.first[1].class
38
38
  else
39
39
  validate_against_example! value, example_value
data/lib/kamal/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kamal
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-20 00:00:00.000000000 Z
11
+ date: 2024-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -314,7 +314,6 @@ files:
314
314
  - lib/kamal/configuration/validation.rb
315
315
  - lib/kamal/configuration/validator.rb
316
316
  - lib/kamal/configuration/validator/accessory.rb
317
- - lib/kamal/configuration/validator/alias.rb
318
317
  - lib/kamal/configuration/validator/builder.rb
319
318
  - lib/kamal/configuration/validator/env.rb
320
319
  - lib/kamal/configuration/validator/registry.rb
@@ -1,19 +0,0 @@
1
- class Kamal::Configuration::Validator::Alias < Kamal::Configuration::Validator
2
- def validate!
3
- super
4
-
5
- name = context.delete_prefix("aliases/")
6
-
7
- if name !~ /\A[a-z0-9_-]+\z/
8
- error "Invalid alias name: '#{name}'. Must only contain lowercase letters, alphanumeric, hyphens and underscores."
9
- end
10
-
11
- if Kamal::Cli::Main.original_commands.include?(name)
12
- error "Alias '#{name}' conflicts with a built-in command."
13
- end
14
-
15
- if config["command"].empty?
16
- error "Alias '#{name}': command is required."
17
- end
18
- end
19
- end