cl-magic 1.2.4 → 1.2.8

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: e703c8de1ae89f408ce6e63cc1815522c50cfaa2c8eb378a6c66da8fce474dc5
4
- data.tar.gz: 9f059bbe5db125cb443e5e3a460024efde164eaec3aa5b09beb1d353b3eed26e
3
+ metadata.gz: '097467f37492d3cd640f1dad7b870f7586101f40a2f2e5c3fc5379d0190b2eb0'
4
+ data.tar.gz: 71767bc1c9bcbcebaccd41b61c106a726aee70864ba34a634827e508083eac9f
5
5
  SHA512:
6
- metadata.gz: 242e2a6d1c7e455613e056144792ff941528f50592212435b495cc01dc335597d512617223a872a975ad062c9461ae3fb07226bf1079bd636cc7a4935d6ca31d
7
- data.tar.gz: 4430e08eaa1b4f312a29a26ac649b789337812b3301899eca78ecbf1c8e063486687947f8ebd84b5d02305ba7865d4e5c68b3f2f9576594f5682b07ac1712215
6
+ metadata.gz: 12e9003fd1e5693005b879025be7a22d35046cd4cb560f58b18e56e7f422776668514448db8a1be851e170bb745e59e79498c8ba8f5954fcf8c394b92672094e
7
+ data.tar.gz: 44a1961f5a58faf9bcce44ba818a0b626d6602587d7bb4aa9223e8a017cbb9fd8c42744fc38ec00aa086a50ee863590e69aa9ad4c69b6ae06131a98e4bfca20b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cl-magic (1.2.4)
4
+ cl-magic (1.2.8)
5
5
  activesupport
6
6
  baran
7
7
  concurrent-ruby
@@ -102,6 +102,10 @@ def prep_make_command(c, selected_parts)
102
102
  end
103
103
 
104
104
  def interpolate_parts_into_command(cmd, selected_parts)
105
+ # expand nested dk
106
+ cmd.gsub!(" dk ", " cl dk ")
107
+
108
+ # expand dk
105
109
  cmd = "cl #{cmd}" if cmd.start_with?("dk")
106
110
 
107
111
  # subcommands: don't need interpolated parts
@@ -53,11 +53,18 @@ class YamlArgMunger
53
53
  return hash ? hash : {}
54
54
  end
55
55
 
56
- def merge_world_files(compose_hash, show_help=false)
56
+ def merge_world_files(compose_hash, show_help=false)
57
57
  if @dk_proj_path
58
58
  print_dk_help_line("dk-project-path", "#{@dk_proj_path}") if show_help and $stdout.isatty
59
59
 
60
- Dir.glob("#{@dk_proj_path}/*.yml").sort.each do |filepath|
60
+ # sorted yaml files
61
+ sorted_files = Dir.glob("#{@dk_proj_path}/*.{yml,yaml}", File::FNM_DOTMATCH).sort
62
+
63
+ # apply .local.yml last
64
+ sorted_files.push(sorted_files.shift) if sorted_files.first == "#{@dk_proj_path}/.local.yml"
65
+
66
+ # merge each file
67
+ sorted_files.each do |filepath|
61
68
  print_dk_help_line("dk-world", "#{filepath}") if show_help and $stdout.isatty
62
69
 
63
70
  # read file and replace
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cl
4
4
  module Magic
5
- VERSION = "1.2.4"
5
+ VERSION = "1.2.8"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cl-magic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Najd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake