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/06/17 20:43:28 UTC

[whimsy] branch master updated: No need for chdir here

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 1cf7b1a  No need for chdir here
1cf7b1a is described below

commit 1cf7b1a946cb8780985a4a541415812810bb46e1
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jun 17 21:43:19 2020 +0100

    No need for chdir here
---
 www/board/publish_minutes.cgi                                   | 5 +++--
 www/secretary/workbench/views/actions/rotate-attachment.json.rb | 6 ++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/www/board/publish_minutes.cgi b/www/board/publish_minutes.cgi
index 0831852..45ec3a0 100755
--- a/www/board/publish_minutes.cgi
+++ b/www/board/publish_minutes.cgi
@@ -31,8 +31,9 @@ _html do
   end
   _body? do
     # update from svn
-    [MINUTES, BOARD_SITE, BOARD_PRIVATE].each do |dir| 
-      Dir.chdir(dir) {`svn cleanup`; `svn up`}
+    [MINUTES, BOARD_SITE, BOARD_PRIVATE].each do |dir|
+      ASF::SVN.svn('cleanup', dir)
+      ASF::SVN.svn('update', dir) # TODO does this need auth?
     end
 
     calendar = File.read(CALENDAR)
diff --git a/www/secretary/workbench/views/actions/rotate-attachment.json.rb b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
index d1189b1..d91fc70 100644
--- a/www/secretary/workbench/views/actions/rotate-attachment.json.rb
+++ b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
@@ -1,5 +1,5 @@
 #
-# drop part of drag and drop
+# pdf rotations
 #
 
 message = Mailbox.find(@message)
@@ -13,9 +13,7 @@ begin
 
   raise "Invalid direction #{@direction}" unless tool
 
-  Dir.chdir File.dirname(selected.path) do
-    Kernel.system tool, '--quiet', '--suffix', 'rotated', selected.path
-  end
+  Kernel.system tool, '--quiet', '--suffix', 'rotated', selected.path, {chdir: File.dirname(selected.path)}
 
   output = selected.path.sub(/\.pdf$/, '-rotated.pdf')