kamal 1.5.0 → 1.5.2

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: d8429a6060103f16d9aadb517e77fbb32fc6c6d2e6b9b3cf2989c8a9309e0067
4
- data.tar.gz: e997f3c5765639c4b14aad08a81344c5af182904e3d80f4867792ed55a9fc25b
3
+ metadata.gz: 63594154afe8efc69b08fd2a27b1efb4ff6604d1bd62f345dc8d24df7903b649
4
+ data.tar.gz: d8e8cb819aeea4212bc576e2b8a5bcd2cc6fcd67c6186ba0e04b2250999985c1
5
5
  SHA512:
6
- metadata.gz: 575353b6ea9e9d429a6c6e6b89013fd36f0b371b4edbffbf3ab33f707a9637191872d7463fb670dbe45f9a36bc7a1792335fa9c0709e31d2339b1549c4da32ff
7
- data.tar.gz: 6a71437092b0ce21cce12a6d127098e2aba2a0b18846026b6df1c9bb1d33f60d27da3ac1c3b553490a2f4daa76a7ae2e725b4f2ee7918d4cc808bc29b556e8f3
6
+ metadata.gz: 9da318bbc1fe8e5dac2b09cc8c89682417653de15b72567378a6998e0992fad999a1a8bca4b32f8eb2a7147f774d59efb4850b50ea15bfcde32d8426b50303fe
7
+ data.tar.gz: ca156878b11110b0bc7092790565bfbf5b3cdf9206a2faf210c805856dab0aef9e57b883c09f86422c6c0821f6c281a7ed892ccf061101750dc8507326ba53d3
@@ -107,8 +107,9 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
107
107
  if name == "all"
108
108
  KAMAL.accessory_names.each { |accessory_name| details(accessory_name) }
109
109
  else
110
+ type = "Accessory #{name}"
110
111
  with_accessory(name) do |accessory, hosts|
111
- on(hosts) { puts capture_with_info(*accessory.info) }
112
+ on(hosts) { puts_by_host host, capture_with_info(*accessory.info), type: type }
112
113
  end
113
114
  end
114
115
  end
@@ -30,7 +30,7 @@ class Kamal::Cli::Build < Kamal::Cli::Base
30
30
  end
31
31
  rescue SSHKit::Command::Failed => e
32
32
  if e.message =~ /(no builder)|(no such file or directory)/
33
- error "Missing compatible builder, so creating a new one first"
33
+ warn "Missing compatible builder, so creating a new one first"
34
34
 
35
35
  if cli.create
36
36
  KAMAL.with_verbosity(:debug) { execute *KAMAL.builder.push }
@@ -19,7 +19,7 @@ class Kamal::Commander::Specifics
19
19
  end
20
20
 
21
21
  def traefik_hosts
22
- specific_hosts || config.traefik_hosts
22
+ config.traefik_hosts & specified_hosts
23
23
  end
24
24
 
25
25
  def accessory_hosts
@@ -18,7 +18,7 @@ module Kamal::Commands
18
18
  elsif config.ssh.proxy && config.ssh.proxy.is_a?(Net::SSH::Proxy::Command)
19
19
  cmd << " -o ProxyCommand='#{config.ssh.proxy.command_line_template}'"
20
20
  end
21
- cmd << " -t #{config.ssh.user}@#{host} -p #{config.ssh.port} '#{command.join(" ")}'"
21
+ cmd << " -t #{config.ssh.user}@#{host} -p #{config.ssh.port} '#{command.join(" ").gsub("'", "'\\\\''")}'"
22
22
  end
23
23
  end
24
24
 
data/lib/kamal/utils.rb CHANGED
@@ -66,13 +66,12 @@ module Kamal::Utils
66
66
  Array(filters).select do |filter|
67
67
  matches += Array(items).select do |item|
68
68
  # Only allow * for a wildcard
69
- pattern = Regexp.escape(filter).gsub('\*', ".*")
70
69
  # items are roles or hosts
71
- (item.respond_to?(:name) ? item.name : item).match(/^#{pattern}$/)
70
+ File.fnmatch(filter, item.to_s, File::FNM_EXTGLOB)
72
71
  end
73
72
  end
74
73
 
75
- matches
74
+ matches.uniq
76
75
  end
77
76
 
78
77
  def stable_sort!(elements, &block)
data/lib/kamal/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kamal
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.2"
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.5.0
4
+ version: 1.5.2
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-04-25 00:00:00.000000000 Z
11
+ date: 2024-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport