dlss-capistrano 5.0.0 → 5.0.2

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: 567a3f876085fa1cdc2de7ed0d79b874ca479674a82d158a32dece1d66316a92
4
- data.tar.gz: 2cabff7242f8966857e68d05a27dfec7664192c094bbacf007b4bea605b7cab3
3
+ metadata.gz: 7d2be7ee14246b985ddc27517e14b9a50d3657f5ab2d2cefc71e12ab56463478
4
+ data.tar.gz: cdf05f64d3afe15292784235fb420da1e9ac2f9ae30cc954c6f88671af966aac
5
5
  SHA512:
6
- metadata.gz: fca3a41b870e3b4050847bc283481a55066fc32ae36719ebed145f4771fe2ef9d70b76494bc5b44e43e372322a5f5df8dd9ee59b2c0bdefaead5a58ac2c0078d
7
- data.tar.gz: 93dfc1d74b6de88f4a9d69bcac565faa5ad4262f694dbfef1f0ca5d77ab89a2ebcd016ca4898d826cb1076d882bba879797171d587ea5e277e6c32954e23d172
6
+ metadata.gz: 44071af75e21fd81b4bb17a14def12eda881694716d107860a1ccc44d94e52cfc8af895d29c82645009b6fc9c3e50fc6a16b8936495c5662a627044eba2b1a4a
7
+ data.tar.gz: 0c49339f0cca3ad096e4d5b0fb1c3a887c76a949c8d532a58899760cd95998b3f152386d07c3d17fda5ef540f3abbbbf88b81b85d710665ae19f12bcfe30b7a1
data/README.md CHANGED
@@ -6,6 +6,8 @@ This gem provides Capistrano deployment tasks used by Stanford Libraries' Digita
6
6
 
7
7
  ## Necessary setup
8
8
 
9
+ To use controlmaster, you need to opt-in by setting the environment variable `USE_CAPISTRANO_CONTROLMASTER=true` (in e.g. your `~/.zshenv` file or similar for your particular shell).
10
+
9
11
  If you use values other than the defaults for `CONTROLMASTER_HOST` (`dlss-jump`) or `CONTROLMASTER_SOCKET` (`"~/.ssh/%r@%h:%p"`), you'll want to set these environment variables locally to the values you use (in e.g. your `~/.zshenv` file or similar for your particular shell). Otherwise, the gem will fail to connect to the appropriate host and/or won't be able to properly check the status of the control master process.
10
12
 
11
13
  The control master host is the value of the `ProxyJump` directive in your SSH config, and the control master socket is the value of the `ControlPath` directive in your SSH config.
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "dlss-capistrano"
7
- s.version = '5.0.0'
7
+ s.version = '5.0.2'
8
8
 
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ["Chris Beer", 'Mike Giarlo']
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency "capistrano", "~> 3.0"
22
22
  s.add_dependency "capistrano-bundle_audit", ">= 0.3.0"
23
23
  s.add_dependency "capistrano-shared_configs"
24
- s.add_dependency "net-ssh-krb"
25
24
  # support for MacOS 14.4+ usage of ed25519 SSH keys
26
25
  s.add_dependency "ed25519"
27
26
  s.add_dependency "bcrypt_pbkdf"
@@ -2,8 +2,13 @@
2
2
 
3
3
  require 'open3'
4
4
 
5
- CONTROLMASTER_HOST = ENV.fetch('CONTROLMASTER_HOST', 'dlss-jump')
6
- CONTROLMASTER_SOCKET = ENV.fetch('CONTROLMASTER_SOCKET', "~/.ssh/%r@%h:%p")
5
+ namespace :load do
6
+ task :defaults do
7
+ set :use_controlmaster, ENV.fetch('USE_CAPISTRANO_CONTROLMASTER', false) == 'true'
8
+ set :controlmaster_host, ENV.fetch('CONTROLMASTER_HOST', 'dlss-jump')
9
+ set :controlmaster_socket, ENV.fetch('CONTROLMASTER_SOCKET', "~/.ssh/%r@%h:%p")
10
+ end
11
+ end
7
12
 
8
13
  # Integrate hook into Capistrano
9
14
  namespace :deploy do
@@ -15,12 +20,14 @@ end
15
20
  namespace :controlmaster do
16
21
  desc 'set up an SSH controlmaster process if missing'
17
22
  task :setup do
23
+ next unless fetch(:use_controlmaster)
24
+
18
25
  if fetch(:log_level) == :debug
19
- puts "checking if controlmaster process exists (#{CONTROLMASTER_SOCKET}) for #{CONTROLMASTER_HOST}"
26
+ puts "checking if controlmaster process exists (#{fetch(:controlmaster_socket)}) for #{fetch(:controlmaster_host)}"
20
27
  end
21
28
 
22
29
  status, output = Open3.popen2e(
23
- "ssh -O check -S #{CONTROLMASTER_SOCKET} #{CONTROLMASTER_HOST}"
30
+ "ssh -O check -S #{CONTROLMASTER_SOCKET} #{fetch(:controlmaster_host)}"
24
31
  ) { |_, outerr, wait_thr| next wait_thr.value, outerr.read }
25
32
 
26
33
  if status.success?
@@ -34,12 +41,14 @@ namespace :controlmaster do
34
41
 
35
42
  # NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
36
43
  task :start do
44
+ next unless fetch(:use_controlmaster)
45
+
37
46
  if fetch(:log_level) == :debug
38
- puts "creating new controlmaster process for #{CONTROLMASTER_HOST} at #{CONTROLMASTER_SOCKET}"
47
+ puts "creating new controlmaster process for #{fetch(:controlmaster_host)} at #{fetch(:controlmaster_socket)}"
39
48
  end
40
49
 
41
50
  status, output = Open3.popen2e(
42
- "ssh -f -N -S #{CONTROLMASTER_SOCKET} #{CONTROLMASTER_HOST}"
51
+ "ssh -f -N -S #{fetch(:controlmaster_socket)} #{fetch(:controlmaster_host)}"
43
52
  ) { |_, outerr, wait_thr| next wait_thr.value, outerr.read }
44
53
 
45
54
  if status.success?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dlss-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-06-14 00:00:00.000000000 Z
12
+ date: 2024-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -53,20 +53,6 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: net-ssh-krb
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :runtime
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
56
  - !ruby/object:Gem::Dependency
71
57
  name: ed25519
72
58
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
130
  - !ruby/object:Gem::Version
145
131
  version: 1.3.6
146
132
  requirements: []
147
- rubygems_version: 3.5.11
133
+ rubygems_version: 3.5.9
148
134
  signing_key:
149
135
  specification_version: 4
150
136
  summary: Capistrano recipes for use in SUL/DLSS projects