tomo 1.14.1 → 1.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/tomo/plugin/nodenv/tasks.rb +2 -0
- data/lib/tomo/plugin/rbenv/tasks.rb +2 -4
- data/lib/tomo/ssh.rb +5 -1
- data/lib/tomo/templates/config.rb.erb +1 -0
- data/lib/tomo/testing/docker_image.rb +1 -11
- data/lib/tomo/testing/host_extensions.rb +2 -0
- data/lib/tomo/testing/local.rb +1 -1
- data/lib/tomo/testing/ssh_extensions.rb +6 -0
- data/lib/tomo/testing/ubuntu_setup.sh +21 -2
- data/lib/tomo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e08c46b7da961cb96428f331a4d87af1fbf268c5a59b1dc129a55e469aca235d
|
4
|
+
data.tar.gz: 856bc5e3e24a905d464a50f8af236992aa85d5e8f024a0b17fbb59991db815f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 050dfde517f1372eceaa32244e40f61dc689476ee2722b6b0e0cd3b52faa8a78df5c487a3c97753c6cb754696617b0ac4249b71218a7abbaa3f42ae270f902e2
|
7
|
+
data.tar.gz: '0589328cb0d63507ca917b69b298a50c0969b517e8eff3ccbab64b37bb18d81cd079f092a3c65b3993b1712a0e63b646a6b16514dd9ea1e12683106b3042f0d8'
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Tomo
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/tomo.svg)](https://rubygems.org/gems/tomo)
|
4
|
-
[![
|
4
|
+
[![Build Status](https://mattbrictson.semaphoreci.com/badges/tomo/branches/main.svg?style=shields)](https://mattbrictson.semaphoreci.com/projects/tomo)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/mattbrictson/tomo/badges/gpa.svg)](https://codeclimate.com/github/mattbrictson/tomo)
|
6
6
|
|
7
7
|
Tomo is a friendly command-line tool for deploying Rails apps.
|
@@ -62,6 +62,8 @@ module Tomo::Plugin::Nodenv
|
|
62
62
|
version = remote.capture("cat", path, raise_on_error: false).strip
|
63
63
|
return version unless version.empty?
|
64
64
|
|
65
|
+
return "DRY_RUN_PLACEHOLDER" if dry_run?
|
66
|
+
|
65
67
|
die <<~REASON
|
66
68
|
Could not guess node version from .node-version file.
|
67
69
|
Use the :nodenv_node_version setting to specify the version of node to install.
|
@@ -34,10 +34,8 @@ module Tomo::Plugin::Rbenv
|
|
34
34
|
ruby_version = version_setting || extract_ruby_ver_from_version_file
|
35
35
|
|
36
36
|
unless ruby_installed?(ruby_version)
|
37
|
-
logger.info(
|
38
|
-
|
39
|
-
)
|
40
|
-
remote.run "CFLAGS=-O3 rbenv install #{ruby_version.shellescape}"
|
37
|
+
logger.info("Installing ruby #{ruby_version} -- this may take several minutes")
|
38
|
+
remote.run "CFLAGS=-O3 rbenv install #{ruby_version.shellescape} --verbose"
|
41
39
|
end
|
42
40
|
remote.run "rbenv global #{ruby_version.shellescape}"
|
43
41
|
end
|
data/lib/tomo/ssh.rb
CHANGED
@@ -17,13 +17,17 @@ module Tomo
|
|
17
17
|
options = Options.new(options) unless options.is_a?(Options)
|
18
18
|
|
19
19
|
Tomo.logger.connect(host)
|
20
|
-
return
|
20
|
+
return build_dry_run_connection(host, options) if Tomo.dry_run?
|
21
21
|
|
22
22
|
build_connection(host, options)
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
26
26
|
|
27
|
+
def build_dry_run_connection(host, options)
|
28
|
+
Connection.dry_run(host, options)
|
29
|
+
end
|
30
|
+
|
27
31
|
def build_connection(host, options)
|
28
32
|
conn = Connection.new(host, options)
|
29
33
|
validator = ConnectionValidator.new(options.executable, conn)
|
@@ -44,8 +44,6 @@ module Tomo
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def puma_port
|
47
|
-
return 3000 if ENV["_TOMO_CONTAINER"]
|
48
|
-
|
49
47
|
Local.capture("docker port #{container_id} 3000")[/:(\d+)/, 1].to_i
|
50
48
|
end
|
51
49
|
|
@@ -88,13 +86,7 @@ module Tomo
|
|
88
86
|
end
|
89
87
|
|
90
88
|
def start_container
|
91
|
-
|
92
|
-
args = "--detach --init #{image_id}"
|
93
|
-
if host_container
|
94
|
-
args.prepend("--network=container:#{host_container} ")
|
95
|
-
else
|
96
|
-
args.prepend("--publish-all ")
|
97
|
-
end
|
89
|
+
args = "--publish-all --detach --init #{image_id}"
|
98
90
|
Local.capture("docker run #{args}")[/\S+/].tap do
|
99
91
|
# Allow some time for the container to finish booting
|
100
92
|
sleep 0.1
|
@@ -102,8 +94,6 @@ module Tomo
|
|
102
94
|
end
|
103
95
|
|
104
96
|
def find_ssh_port
|
105
|
-
return 22 if ENV["_TOMO_CONTAINER"]
|
106
|
-
|
107
97
|
Local.capture("docker port #{container_id} 22")[/:(\d+)/, 1].to_i
|
108
98
|
end
|
109
99
|
|
data/lib/tomo/testing/local.rb
CHANGED
@@ -3,6 +3,12 @@ module Tomo
|
|
3
3
|
module SSHExtensions
|
4
4
|
private
|
5
5
|
|
6
|
+
def build_dry_run_connection(host, options)
|
7
|
+
return super if Testing.ssh_enabled
|
8
|
+
|
9
|
+
Testing::Connection.new(host, options)
|
10
|
+
end
|
11
|
+
|
6
12
|
def build_connection(host, options)
|
7
13
|
return super if Testing.ssh_enabled
|
8
14
|
|
@@ -17,8 +17,27 @@ touch /var/lib/systemd/linger/deployer
|
|
17
17
|
|
18
18
|
# Packages needed for ruby, etc.
|
19
19
|
apt-get -y update
|
20
|
-
apt-get -y install
|
21
|
-
|
20
|
+
apt-get -y install autoconf \
|
21
|
+
bison \
|
22
|
+
build-essential \
|
23
|
+
curl \
|
24
|
+
git-core \
|
25
|
+
libdb-dev \
|
26
|
+
libffi-dev \
|
27
|
+
libgdbm-dev \
|
28
|
+
libgdbm6 \
|
29
|
+
libgmp-dev \
|
30
|
+
libncurses5-dev \
|
31
|
+
libreadline6-dev \
|
32
|
+
libsqlite3-dev \
|
33
|
+
libssl-dev \
|
34
|
+
libyaml-dev \
|
35
|
+
locales \
|
36
|
+
patch \
|
37
|
+
pkg-config \
|
38
|
+
rustc \
|
39
|
+
uuid-dev \
|
40
|
+
zlib1g-dev
|
22
41
|
|
23
42
|
apt-get -y install tzdata \
|
24
43
|
-o DPkg::options::="--force-confdef" \
|
data/lib/tomo/version.rb
CHANGED
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.
|
4
|
+
version: 1.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-11 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.4.
|
192
|
+
rubygems_version: 3.4.10
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: A friendly CLI for deploying Rails apps ✨
|