tomo 0.9.0 → 0.10.0

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: 67815fa19818dc29ff1226179db8b2b364c4843eb03c3a507561dd105b480b9f
4
- data.tar.gz: 7119dc681c2e8e167712a1ee2a35bb7725d16f4f14b0438ec036abd7f30d42e5
3
+ metadata.gz: 95a51dfa2fc2b054bf4943e9f9e866c1d971e2892ac66996a8797c1e0deb4d50
4
+ data.tar.gz: c76b97ba395ee23fd4ebcd1342f18b3c30ef769dbb5ca424a7c6601b293c00aa
5
5
  SHA512:
6
- metadata.gz: 271bafaa1a657c3d5961629f07f64ff7e595ca38b20fc34abc3c747418e108dee5a2b50cc6b164ba0721a71e7779100e4af5544f3085d596d9397c8455c6c910
7
- data.tar.gz: e8a9dfd41c8226238add4a7dbddd5b212cff0953d9eb25b2cfbaf9c435d48e741bd806fbaec76b5c7591d0073e0cd0982885ab0b7a03b70f3628fb9f0eebef5f
6
+ metadata.gz: 237cc03097bd684f9e91916f302aa7fa1da182fc68a2751ceb02fd15a5a4f4ad4c07e401e1a8047e22c61eea6eb4a5056634b1bca15cd4b1f27e83718f2f3039
7
+ data.tar.gz: c7de49e06993a3dbfead0e89ddc2ff29cc6b3b0697ac8141a6cc667954680fed3b3e8e8e7742ffdf259831380839120d5e338ef920ed5f27ad946d8bfa50c21b
@@ -65,8 +65,10 @@ module Tomo::Plugin::Puma
65
65
  end
66
66
 
67
67
  def linger_must_be_enabled!
68
- loginctl_result = remote.run "loginctl", "user-status", remote.host.user
69
- return unless loginctl_result.stdout.match?(/^\s*Linger:\s*no\s*$/i)
68
+ linger_users = remote.list_files(
69
+ "/var/lib/systemd/linger", raise_on_error: false
70
+ )
71
+ return if dry_run? || linger_users.include?(remote.host.user)
70
72
 
71
73
  die <<~ERROR.strip
72
74
  Linger must be enabled for the #{remote.host.user} user in order for
@@ -7,8 +7,6 @@ COPY ./custom_setup.sh ./
7
7
  RUN ./custom_setup.sh
8
8
  COPY ./systemctl.rb /usr/local/bin/systemctl
9
9
  RUN chmod a+x /usr/local/bin/systemctl
10
- COPY ./loginctl.sh /usr/local/bin/loginctl
11
- RUN chmod a+x /usr/local/bin/loginctl
12
10
  EXPOSE 22
13
11
  EXPOSE 3000
14
12
  CMD ["/usr/sbin/sshd", "-D"]
@@ -11,7 +11,6 @@ module Tomo
11
11
  class DockerImage
12
12
  FILES_TO_COPY = %w[
13
13
  Dockerfile
14
- loginctl.sh
15
14
  systemctl.rb
16
15
  tomo_test_ed25519.pub
17
16
  ubuntu_setup.sh
@@ -12,6 +12,8 @@ chown -R deployer:deployer /home/deployer/.ssh
12
12
  chmod 600 /home/deployer/.ssh/authorized_keys
13
13
  mkdir -p /var/www
14
14
  chown deployer:deployer /var/www
15
+ mkdir -p /var/lib/systemd/linger
16
+ touch /var/lib/systemd/linger/deployer
15
17
 
16
18
  # Packages needed for ruby, etc.
17
19
  apt-get -y update
@@ -1,3 +1,3 @@
1
1
  module Tomo
2
- VERSION = "0.9.0".freeze
2
+ VERSION = "0.10.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: 0.9.0
4
+ version: 0.10.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: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -290,7 +290,6 @@ files:
290
290
  - lib/tomo/testing/host_extensions.rb
291
291
  - lib/tomo/testing/local.rb
292
292
  - lib/tomo/testing/log_capturing.rb
293
- - lib/tomo/testing/loginctl.sh
294
293
  - lib/tomo/testing/mock_plugin_tester.rb
295
294
  - lib/tomo/testing/mocked_exec_error.rb
296
295
  - lib/tomo/testing/mocked_exit_error.rb
@@ -1,6 +0,0 @@
1
- #!/bin/bash
2
-
3
- # THIS FILE IS FOR TESTING PURPOSES ONLY.
4
- #
5
- # The real loginctl command does not work in a Docker container, so this empty
6
- # script takes its place, allowing tomo to work during an E2E test.