vanagon 0.28.0 → 0.29.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: 00034c4fe7b0e35639a03953d65d4ba132e471f2363d2f3e557a19f61c925054
4
- data.tar.gz: 262931385449e18763989f2e39ebb91e6f1d718de3350273d64de0064755d7cf
3
+ metadata.gz: 85733d41e3c9a2981c37db8b12e17ccbf3beb30b217fd7c575f2d02f7cfc8167
4
+ data.tar.gz: 2547ea591a28c8e78b6745dc4bb2782d797fd6a418685325b51145e8198b10d6
5
5
  SHA512:
6
- metadata.gz: 8a6d7230aff64e44af6d1bfdfe311494ae0fa5b346cbf38f537c62ce9472c0282ec78b19781eb40e441dc0e292eecf605d7c37bf3e64aaf45bae17aacfed7014
7
- data.tar.gz: 80e72898b8fdc9d5fba797b22749f73ddf23346038615f82a82132503e8b24aabf0a58134a825fed0f9aa932710976b3d6c00b1b4bfa10116de84294bb18546e
6
+ metadata.gz: 2d0dfd0cf748f471e75d2ddaefa8680d4ccfa77d65d578227de3a0c3bfe65a8b993a0c681522f97e3667fc920e4af9f4fa3a6e6e2414085f7a05faa7769caaaa
7
+ data.tar.gz: d55dc6da693eee3d063a01badceb19520c823229f2af1143f11fae0a7f4dd8deeca432de233d01676482d0110330df1d65397214c1d366e7ebe9601a8d526702
@@ -13,19 +13,21 @@ class Vanagon
13
13
  tempdir = Vanagon::Utilities::remote_ssh_command("#{project.signing_username}@#{project.signing_hostname}", "#{mktemp} 2>/dev/null", return_command_output: true)
14
14
  end
15
15
 
16
+ remote_host = "#{project.signing_username}@#{project.signing_hostname}"
17
+ remote_destination_directory = "#{remote_host}:#{tempdir}"
18
+ remote_signing_script_path = File.join(tempdir, File.basename('sign_extra_file'))
19
+
16
20
  project.extra_files_to_sign.each do |file|
17
- file_location = File.join(tempdir, File.basename(file))
21
+ remote_file_to_sign_path = File.join(tempdir, File.basename(file))
18
22
  local_source_path = File.join('$(tempdir)', source_dir, file)
19
- remote_host = "#{project.signing_username}@#{project.signing_hostname}"
20
- remote_destination_path = "#{remote_host}:#{tempdir}"
21
- remote_file_location = "#{remote_host}:#{file_location}"
22
- extra_flags = ''
23
- extra_flags = '--extended-attributes' if project.platform.is_macos?
23
+ remote_source_path = "#{remote_host}:#{remote_file_to_sign_path}"
24
+ local_destination_path = local_source_path
24
25
 
25
26
  commands += [
26
- "rsync -e '#{Vanagon::Utilities.ssh_command}' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group #{extra_flags} #{local_source_path} #{remote_destination_path}",
27
- "#{Vanagon::Utilities.ssh_command} #{remote_host} #{project.signing_command} #{file_location}",
28
- "rsync -e '#{Vanagon::Utilities.ssh_command}' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group #{extra_flags} #{remote_file_location} #{local_source_path}"
27
+ "#{Vanagon::Utilities.ssh_command} #{remote_host} \"echo '#{project.signing_command} #{remote_file_to_sign_path}' > #{remote_signing_script_path}\"",
28
+ "scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no #{local_source_path} #{remote_destination_directory}",
29
+ "#{Vanagon::Utilities.ssh_command} #{remote_host} /bin/bash #{remote_signing_script_path}",
30
+ "scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no #{remote_source_path} #{local_destination_path}"
29
31
  ]
30
32
  end
31
33
 
@@ -83,12 +83,14 @@ describe Vanagon::Utilities::ExtraFilesSigner do
83
83
  commands = Vanagon::Utilities::ExtraFilesSigner.commands(project._project, mktemp, source_dir)
84
84
  expect(commands).to match(
85
85
  [
86
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group --extended-attributes $(tempdir)/dir/source_dir/test1/a.rb test@abc:/tmp/xyz",
87
- "/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc codesign /tmp/xyz/a.rb",
88
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group --extended-attributes test@abc:/tmp/xyz/a.rb $(tempdir)/dir/source_dir/test1/a.rb",
89
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group --extended-attributes $(tempdir)/dir/source_dir/test2/b.rb test@abc:/tmp/xyz",
90
- "/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc codesign /tmp/xyz/b.rb",
91
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group --extended-attributes test@abc:/tmp/xyz/b.rb $(tempdir)/dir/source_dir/test2/b.rb"
86
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc "echo 'codesign /tmp/xyz/a.rb' > /tmp/xyz/sign_extra_file"),
87
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $(tempdir)/dir/source_dir/test1/a.rb test@abc:/tmp/xyz),
88
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc /bin/bash /tmp/xyz/sign_extra_file),
89
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc:/tmp/xyz/a.rb $(tempdir)/dir/source_dir/test1/a.rb),
90
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc "echo 'codesign /tmp/xyz/b.rb' > /tmp/xyz/sign_extra_file"),
91
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $(tempdir)/dir/source_dir/test2/b.rb test@abc:/tmp/xyz),
92
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc /bin/bash /tmp/xyz/sign_extra_file),
93
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc:/tmp/xyz/b.rb $(tempdir)/dir/source_dir/test2/b.rb)
92
94
  ]
93
95
  )
94
96
  end
@@ -107,12 +109,14 @@ describe Vanagon::Utilities::ExtraFilesSigner do
107
109
  commands = Vanagon::Utilities::ExtraFilesSigner.commands(project._project, mktemp, source_dir)
108
110
  expect(commands).to match(
109
111
  [
110
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group $(tempdir)/dir/source_dir/test1/a.rb test@abc:/tmp/xyz",
111
- "/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc codesign /tmp/xyz/a.rb",
112
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group test@abc:/tmp/xyz/a.rb $(tempdir)/dir/source_dir/test1/a.rb",
113
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group $(tempdir)/dir/source_dir/test2/b.rb test@abc:/tmp/xyz",
114
- "/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc codesign /tmp/xyz/b.rb",
115
- "rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group test@abc:/tmp/xyz/b.rb $(tempdir)/dir/source_dir/test2/b.rb"
112
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc "echo 'codesign /tmp/xyz/a.rb' > /tmp/xyz/sign_extra_file"),
113
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $(tempdir)/dir/source_dir/test1/a.rb test@abc:/tmp/xyz),
114
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc /bin/bash /tmp/xyz/sign_extra_file),
115
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc:/tmp/xyz/a.rb $(tempdir)/dir/source_dir/test1/a.rb),
116
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc "echo 'codesign /tmp/xyz/b.rb' > /tmp/xyz/sign_extra_file"),
117
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $(tempdir)/dir/source_dir/test2/b.rb test@abc:/tmp/xyz),
118
+ %q(/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc /bin/bash /tmp/xyz/sign_extra_file),
119
+ %q(scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc:/tmp/xyz/b.rb $(tempdir)/dir/source_dir/test2/b.rb)
116
120
  ]
117
121
  )
118
122
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-27 00:00:00.000000000 Z
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt