chagall 0.0.1.beta8 → 0.0.1.beta9

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: 39a3ec571dfa82c816310a2001d8272f3287651defad0695b9d3141392a73182
4
- data.tar.gz: 2bc8ea9a4a7cfbc95abf74a3b0fa6f11dde77c73cd8531f8030589e2b089a342
3
+ metadata.gz: 3b71d4dc675330a21d335828083d5df59f2185c162da6ff7f148cf892d5e1c02
4
+ data.tar.gz: e36708f4106e520c05b012ad217e730af13e641e6cbd60fab27dcd325ed2a05e
5
5
  SHA512:
6
- metadata.gz: 9d17e12ed9746b9cc15614aed4fb666c47779565a279a46cba8589af6ee5e1ca48f66c564838f04b5d49826e13388dc4949449c193fd2582c7ae0e01c40d0ad8
7
- data.tar.gz: 828c9ca246db41df0bfc8a8cc9d3c76fb2e8e18d98483bde7d7410a5aaeda1ffdb246e56afe333316e78fdf8d442a96850b2ec843042c52da5005a687e3abd71
6
+ metadata.gz: 29e65ddb06d27576d2783ec7ab77e580e15e55198cf57dced7df01e573b6c0280ed81017382708d68cfb32028aa1947dc6d7b752bc81917d3f0cdb9d835c62f8
7
+ data.tar.gz: 6ae10fbadb652749a53493cd42d3f997c446f5bcfdab8b8ac59c3df76cdc4b1b58f4de03d4b7577093e561840ff495902f712eb5cdb37cd2824d54000160682c
data/lib/chagall/base.rb CHANGED
@@ -27,7 +27,7 @@ module Chagall
27
27
  end
28
28
 
29
29
  def ssh
30
- @ssh ||= SSH.new(logger: logger)
30
+ @ssh ||= Chagall::Ssh.new(logger: logger)
31
31
  end
32
32
  end
33
33
  end
@@ -5,8 +5,6 @@ module Chagall
5
5
  class Compose < Base
6
6
  attr_reader :command, :arguments
7
7
 
8
-
9
- # Override parse method to handle all arguments after the subcommand
10
8
  def parse(arguments)
11
9
  if arguments.empty?
12
10
  puts "ERROR: Missing required arguments"
@@ -14,13 +12,10 @@ module Chagall
14
12
  exit(1)
15
13
  end
16
14
 
17
- # Extract the first argument as command
18
15
  @command = arguments.shift
19
16
 
20
- # Store the rest as raw args
21
17
  @raw_args = arguments
22
18
 
23
- # Validate required arguments
24
19
  if @command.nil? || @command.empty?
25
20
  puts "ERROR: Command is required"
26
21
  puts "Usage: chagall compose COMMAND [OPTIONS]"
@@ -32,7 +27,6 @@ module Chagall
32
27
  cmd = "cd #{Settings.instance.project_folder_path} && #{build_docker_compose_command} #{@command}"
33
28
  cmd << " #{@raw_args.join(" ")}" unless @raw_args.empty?
34
29
 
35
- logger.debug "Executing: #{cmd}"
36
30
  ssh.execute(cmd, tty: true)
37
31
  end
38
32
 
@@ -82,10 +82,10 @@ module Chagall
82
82
  def format_time(seconds)
83
83
  minutes, secs = seconds.abs.divmod(60)
84
84
  hours, mins = minutes.divmod(60)
85
- [[hours, 'h'], [mins, 'm'], [secs.round(2), 's']]
86
- .reject { |n, _| n.zero? && !(_=='s') }
85
+ [ [ hours, "h" ], [ mins, "m" ], [ secs.round(2), "s" ] ]
86
+ .reject { |n, _| n.zero? && !(_=="s") }
87
87
  .map { |n, u| "#{n}#{u}" }
88
- .join(' ')
88
+ .join(" ")
89
89
  end
90
90
 
91
91
  def print_total_time
@@ -181,9 +181,9 @@ module Chagall
181
181
  args.push(Settings[:docker_context])
182
182
 
183
183
  args = args.map { |arg| " #{arg}" }
184
- .join(" \\\n")
184
+ .join(" \\\n")
185
185
 
186
- cmd = "docker build \\\n#{args}"
186
+ cmd = "docker buildx build \\\n#{args}"
187
187
  if Settings[:remote]
188
188
  ssh.command(cmd)
189
189
  else
@@ -9,7 +9,6 @@ module Chagall
9
9
 
10
10
  attr_accessor :options, :missing_options, :missing_compose_files
11
11
  CHAGALL_PROJECTS_FOLDER = "~/projects"
12
- TMP_CACHE_FOLDER = "tmp"
13
12
 
14
13
  OPTIONS = [
15
14
  {
@@ -105,7 +104,7 @@ module Chagall
105
104
  {
106
105
  key: :cache_from,
107
106
  type: :string,
108
- default: "#{TMP_CACHE_FOLDER}/.buildx-cache",
107
+ default: "tmp/.buildx-cache",
109
108
  flags: [ "--cache-from" ],
110
109
  environment_variable: "CHAGALL_CACHE_FROM",
111
110
  description: "Cache from"
@@ -113,7 +112,7 @@ module Chagall
113
112
  {
114
113
  key: :cache_to,
115
114
  type: :string,
116
- default: "#{TMP_CACHE_FOLDER}/.buildx-cache-new",
115
+ default: "tmp/.buildx-cache-new",
117
116
  flags: [ "--cache-to" ],
118
117
  environment_variable: "CHAGALL_CACHE_TO",
119
118
  description: "Cache to"
data/lib/chagall/ssh.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "English"
2
2
 
3
3
  module Chagall
4
- class SSH
4
+ class Ssh
5
5
  attr_reader :server, :ssh_args, :logger
6
6
 
7
7
  DEFAULT_SSH_ARGS = "-o StrictHostKeyChecking=no -o ServerAliveInterval=60".freeze
@@ -1,3 +1,3 @@
1
1
  module Chagall
2
- VERSION = "0.0.1.beta8"
2
+ VERSION = "0.0.1.beta9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chagall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta8
4
+ version: 0.0.1.beta9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Klevtsov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-12 00:00:00.000000000 Z
11
+ date: 2025-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp