kamal 1.7.2 → 1.7.3

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: 88a235b000a74c9b34e55924be1c372ebd7e59b0c0bde140f0b8c8b311614e96
4
- data.tar.gz: 7193b72065b8eeab2dbe761ae93383d9c44663104d46b37f93b32fbef00be84a
3
+ metadata.gz: b854d1899fd480cb305709662f0db5baa42021cb30c800cc465bca4fb0641b19
4
+ data.tar.gz: 908e6b78735b170123847a5b89b71fc5020442a34bcc40371afad58d3d27484f
5
5
  SHA512:
6
- metadata.gz: 58d4e970cd573e766a1580eb5f4d343941d2bf68518fc43840776422ba9d04c89210ad25b4f72b07268920e79c483f1f2ab57c2cb440ad96c372c0447775a0ab
7
- data.tar.gz: 98e87cc46ad4e88fadb38257c5cc48b7a71c4b87121a75aa8f6bfcac290e97c7cc357351564f6b0167e35f6a2472b4a20e9e27ed21721a285c794dc7b9ab5cbe
6
+ metadata.gz: '07691f14dba098e98ed17b91bb4a1529d04a75a9ca895c2d24e35ffd508c9e06f448a3536aa3c9d1b94742c49035861dc17068fba2f2e21e6aabb623589ed868'
7
+ data.tar.gz: a2da79ca3d4bfbc873838809051569621aa54be6a60edbb0d37eae4ab4610612653a8ce7dddb0ebc70e3f2906b28d431929cdd815c413bcdbdeeb52f030d92bc
@@ -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.2"
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.2
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-24 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