You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/07/24 12:54:33 UTC
[whimsy] branch master updated: Switch to standard library
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 0938dae Switch to standard library
0938dae is described below
commit 0938dae177d532157dbadcb0185a6de78f6bf85e
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jul 24 13:54:24 2020 +0100
Switch to standard library
---
www/secretary/workbench/tasks.rb | 2 ++
.../workbench/views/actions/emeritus-request.json.rb | 13 ++++++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/www/secretary/workbench/tasks.rb b/www/secretary/workbench/tasks.rb
index 90ab4ef..df69171 100644
--- a/www/secretary/workbench/tasks.rb
+++ b/www/secretary/workbench/tasks.rb
@@ -63,6 +63,8 @@ class Wunderbar::JsonBuilder
_.system! 'svn', *args
end
+ # alternate version using library method
+ # assumes correct ordering of parameters
def svn!(command,path,options={})
options[:env] = env if env.password and %(checkout update commit).include?(command)
ASF::SVN.svn_!(command,path,_,options)
diff --git a/www/secretary/workbench/views/actions/emeritus-request.json.rb b/www/secretary/workbench/views/actions/emeritus-request.json.rb
index d55a0ec..e9ffd22 100644
--- a/www/secretary/workbench/views/actions/emeritus-request.json.rb
+++ b/www/secretary/workbench/views/actions/emeritus-request.json.rb
@@ -41,15 +41,14 @@ task "svn commit documents/emeritus-requests-received/#{emeritus_request}" do
end
complete do |dir|
- dest = "#{dir}/emeritus-requests-received"
# checkout empty directory
- svn 'checkout', '--depth', 'empty',
- ASF::SVN.svnurl('emeritus-requests-received'),
- dest
- message.write_svn(dest, @filename, @selected, @signature)
+ svn! 'checkout', [ASF::SVN.svnurl('emeritus-requests-received'), dir], {depth: 'empty'}
- svn 'status', dest
- svn 'commit', "#{dest}/#{emeritus_request}", '-m', summary
+ # extract the attachments and add to the workspace
+ message.write_svn(dir, @filename, @selected, @signature)
+
+ svn! 'status', dir
+ svn! 'commit', dir, {msg: summary}
end
end