mrsk 0.8.0 → 0.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bea897e88c4f7c2220fe37bc9ab2ee98b9b7e3a6e321eebfa75bcb6238cce4bf
4
- data.tar.gz: c481c5c2b8a9d4bf8f2e38902f6f60eb01af78173bb49ee1e2a08c41b5a2e96c
3
+ metadata.gz: 0a560b5048509237f8c8440a41b35d674915ac493bcf0176256b1006a6aef004
4
+ data.tar.gz: d69f0682c43e62fd0574d626456bcb62452ec972b8dd1182b1780958a65aadbd
5
5
  SHA512:
6
- metadata.gz: b25f7b82c28809194794ed573f23895067a996e4f5511f17dc813a35066f7e0795d245ac63a920f4c960b75bf247c57638af2b50ecc109cd5591c25525de4142
7
- data.tar.gz: 96f1b53a8b72c47a81d55274b4a739ec605d8a67e95811ab3b288c202bf4b756583d4b449ee26c4d3b5014bd3abcd410ffea45934ec86e57fd530b124b786d34
6
+ metadata.gz: d670dd54f94d64b2e35f5082f3a5cd78100780b0e0c5d51d050dc25f00ca4cdca26d0a4d797c01860d04205a2cd0fa4285089a944f72977d287e1c6fd313845e
7
+ data.tar.gz: 6d28b436a2a0d33da1e32af340e5cd80972b57b946b6b51ec6481b5c832020867075ac53f24dd53f0d86e0d1738a78fb233986530a4ad0d9be1e83e73136522b
@@ -58,7 +58,7 @@ class Mrsk::Configuration::Role
58
58
  def traefik_labels
59
59
  if running_traefik?
60
60
  {
61
- "traefik.http.routers.#{config.service}.rule" => "'PathPrefix(`/`)'",
61
+ "traefik.http.routers.#{config.service}.rule" => "PathPrefix(`/`)",
62
62
  "traefik.http.services.#{config.service}.loadbalancer.healthcheck.path" => config.healthcheck["path"],
63
63
  "traefik.http.services.#{config.service}.loadbalancer.healthcheck.interval" => "1s",
64
64
  "traefik.http.middlewares.#{config.service}.retry.attempts" => "3",
data/lib/mrsk/utils.rb CHANGED
@@ -1,13 +1,14 @@
1
1
  module Mrsk::Utils
2
2
  extend self
3
3
 
4
- # Return a list of shell arguments using the same named argument against the passed attributes (hash or array).
4
+ # Return a list of escaped shell arguments using the same named argument against the passed attributes (hash or array).
5
5
  def argumentize(argument, attributes, redacted: false)
6
- Array(attributes).flat_map do |k, v|
7
- if v.present?
8
- [ argument, redacted ? redact("#{k}=#{v}") : "#{k}=#{v}" ]
6
+ Array(attributes).flat_map do |key, value|
7
+ if value.present?
8
+ escaped_pair = [ key, value.to_s.dump.gsub(/`/, '\\\\`') ].join("=")
9
+ [ argument, redacted ? redact(escaped_pair) : escaped_pair ]
9
10
  else
10
- [ argument, k ]
11
+ [ argument, key ]
11
12
  end
12
13
  end
13
14
  end
data/lib/mrsk/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mrsk
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mrsk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson