tomo 1.12.1 → 1.14.0

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: 9142456e11c3c6f0f98da45c6b25f72ffb9e3e1f82c17dff873e1c089e1a109e
4
- data.tar.gz: a696e761b09568dd567fdbf02ed12cc135affe4fcf0bea27a28994a3133a9f5b
3
+ metadata.gz: 2da243b8f639993407cdb09d1bd13a5fadfa783e05b341432769149e4121a9d4
4
+ data.tar.gz: c194f68b4700a9b1ed3883e20c75ea36c5353a2a19b3db92644af1fdbbba7860
5
5
  SHA512:
6
- metadata.gz: 949eb42bc30edb68b82e7f2a352f80eb19519faaef9935f9c910984cc2e915241ce85e9602e28e26fd9cbdae99b215094d2932a02462e379c7ea2674b591eb32
7
- data.tar.gz: 7525b76d9ee72a93b511ff815167a5188fe818b17f004c4236f1620ddded762e08b0bb215af709c23ce96df8f4992239c34ec778a269f7685d45a663e67d141d
6
+ metadata.gz: 9c547b318e37b40b47737a097a15b7bbacda5bfcb446c285f91045a87f234ab8a7a3033cf1433cb8a99ce564a4463b3445be298d721dd6c8734c1e2cd8a26c97
7
+ data.tar.gz: 7342081977edf2ae5f98fe9f0b1cd39b9451a5a4ce870f2f713541041427088c830ae1ed3d975dab1eeb688362540369b1d550958b50ab91a7d9f2b4a62e776f
data/lib/tomo/cli.rb CHANGED
@@ -36,6 +36,10 @@ module Tomo
36
36
  "completion-script" => Tomo::Commands::CompletionScript
37
37
  }.freeze
38
38
 
39
+ COMMAND_ALIASES = {
40
+ "-T" => Tomo::Commands::Tasks
41
+ }.freeze
42
+
39
43
  def call(argv)
40
44
  prepare_completions(argv)
41
45
  command, command_name = lookup_command(argv)
@@ -56,12 +60,14 @@ module Tomo
56
60
  end
57
61
 
58
62
  def lookup_command(argv)
63
+ commands = COMMANDS.merge(COMMAND_ALIASES)
64
+
59
65
  command_name = argv.first unless Completions.active? && argv.length == 1
60
- command_name = Abbrev.abbrev(COMMANDS.keys)[command_name]
66
+ command_name = Abbrev.abbrev(commands.keys)[command_name]
61
67
  argv.shift if command_name
62
68
 
63
69
  command_name = "run" if command_name.nil? && task_format?(argv.first)
64
- command = COMMANDS[command_name] || Tomo::Commands::Default
70
+ command = commands[command_name] || Tomo::Commands::Default
65
71
  [command, command_name]
66
72
  end
67
73
 
data/lib/tomo/colors.rb CHANGED
@@ -23,7 +23,7 @@ module Tomo
23
23
  def determine_color_support
24
24
  if ENV["CLICOLOR_FORCE"] == "1"
25
25
  true
26
- elsif ENV["TERM"] == "dumb"
26
+ elsif ENV["TERM"] == "dumb" || !ENV["NO_COLOR"].to_s.empty?
27
27
  false
28
28
  else
29
29
  tty?($stdout) && tty?($stderr)
@@ -24,7 +24,7 @@ module Tomo
24
24
 
25
25
  groups = tasks.group_by { |task| task[/^([^:]+):/, 1].to_s }
26
26
  groups.keys.sort.each do |group|
27
- puts groups[group].sort.join("\n")
27
+ logger.info(groups[group].sort.join("\n"))
28
28
  end
29
29
  end
30
30
  end
@@ -51,10 +51,7 @@ module Tomo::Plugin::Bundler
51
51
  end
52
52
 
53
53
  def extract_bundler_ver_from_lockfile
54
- lockfile_tail = remote.capture(
55
- "tail", "-n", "10", paths.release.join("Gemfile.lock"),
56
- raise_on_error: false
57
- )
54
+ lockfile_tail = remote.capture("tail", "-n", "10", paths.release.join("Gemfile.lock"), raise_on_error: false)
58
55
  version = lockfile_tail[/BUNDLED WITH\n (\S+)$/, 1]
59
56
  return version if version || dry_run?
60
57
 
@@ -16,5 +16,11 @@ module Tomo::Plugin::Rails
16
16
  result = rake(*args, **opts.merge(raise_on_error: false))
17
17
  result.success?
18
18
  end
19
+
20
+ def thor(*args, **opts)
21
+ prepend("exec", "thor") do
22
+ bundle(*args, **opts)
23
+ end
24
+ end
19
25
  end
20
26
  end
@@ -21,9 +21,10 @@ module Tomo
21
21
  return if failure?
22
22
 
23
23
  promises << future_on(executor, *args, &block)
24
- .on_rejection_using(executor) do |reason|
25
- self.failure = reason
26
- end
24
+ .on_rejection_using(executor) do |reason|
25
+ self.failure = reason
26
+ end
27
+
27
28
  nil
28
29
  end
29
30
 
data/lib/tomo/runtime.rb CHANGED
@@ -70,9 +70,9 @@ module Tomo
70
70
 
71
71
  def new_task_runner(release_type, args)
72
72
  run_settings = { release_path: release_path_for(release_type) }
73
- .merge(local_user: Runtime.local_user)
74
- .merge(settings)
75
- .merge(run_args: args)
73
+ .merge(local_user: Runtime.local_user)
74
+ .merge(settings)
75
+ .merge(run_args: args)
76
76
 
77
77
  TaskRunner.new(plugins_registry: plugins_registry, settings: run_settings)
78
78
  end
@@ -41,8 +41,10 @@ module Tomo
41
41
 
42
42
  def control_opts(path, verbose)
43
43
  opts = [
44
- "-o", "ControlMaster=auto",
45
- "-o", "ControlPath=#{path}",
44
+ "-o",
45
+ "ControlMaster=auto",
46
+ "-o",
47
+ "ControlPath=#{path}",
46
48
  "-o"
47
49
  ]
48
50
  opts << (verbose ? "ControlPersist=1s" : "ControlPersist=30s")
@@ -43,6 +43,7 @@ set linked_dirs: %w[
43
43
  node_modules
44
44
  public/assets
45
45
  public/packs
46
+ public/vite
46
47
  tmp/cache
47
48
  tmp/pids
48
49
  tmp/sockets
@@ -57,8 +57,10 @@ module Tomo
57
57
  hosts_file = File.join(Dir.tmpdir, "tomo_#{SecureRandom.hex(8)}_hosts")
58
58
  {
59
59
  ssh_extra_opts: [
60
- "-o", "UserKnownHostsFile=#{hosts_file}",
61
- "-o", "IdentityFile=#{private_key_path}"
60
+ "-o",
61
+ "UserKnownHostsFile=#{hosts_file}",
62
+ "-o",
63
+ "IdentityFile=#{private_key_path}"
62
64
  ],
63
65
  ssh_strict_host_key_checking: false
64
66
  }
data/lib/tomo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tomo
2
- VERSION = "1.12.1".freeze
2
+ VERSION = "1.14.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-29 00:00:00.000000000 Z
11
+ date: 2022-10-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Tomo is a feature-rich deployment tool that contains everything you need
14
14
  to deploy a basic Rails app out of the box. It has an opinionated, production-tested
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.3.18
192
+ rubygems_version: 3.3.21
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: A friendly CLI for deploying Rails apps ✨