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/12 23:36:50 UTC

[whimsy] branch master updated (e6bf679 -> 8948d51)

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git.


    from e6bf679  Eliminate unnecessary chdirs
     new d046cb8  Revert "No need for chdir"
     new 8948d51  Revert "Eliminate unnecessary chdirs"

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 www/board/agenda/routes.rb                                     | 10 ++++++----
 www/board/agenda/views/actions/draft.json.rb                   |  4 +++-
 www/board/agenda/views/actions/publish.json.rb                 |  5 ++---
 .../workbench/views/actions/rotate-attachment.json.rb          |  4 +++-
 4 files changed, 14 insertions(+), 9 deletions(-)


[whimsy] 01/02: Revert "No need for chdir"

Posted by se...@apache.org.
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

commit d046cb8222022f3a9a18b04f67011df906efe413
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jun 13 00:35:49 2020 +0100

    Revert "No need for chdir"
    
    This reverts commit 75fc2988f52a7ec5d770a6d028a24fab6aa7c9d4.
---
 www/board/agenda/views/actions/draft.json.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/draft.json.rb b/www/board/agenda/views/actions/draft.json.rb
index b8a71d7..74258f5 100644
--- a/www/board/agenda/views/actions/draft.json.rb
+++ b/www/board/agenda/views/actions/draft.json.rb
@@ -21,4 +21,6 @@ ASF::SVN.update minutes_file, @message, env, _ do |tmpdir, old_contents|
   end
 end
 
-Dir['board_minutes_*.txt', base: FOUNDATION_BOARD].sort
+drafts = Dir.chdir(FOUNDATION_BOARD) {Dir['board_minutes_*.txt'].sort}
+
+drafts


[whimsy] 02/02: Revert "Eliminate unnecessary chdirs"

Posted by se...@apache.org.
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

commit 8948d51aaa8fb1964baa751f1be71f21cdca19fc
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jun 13 00:35:57 2020 +0100

    Revert "Eliminate unnecessary chdirs"
    
    This reverts commit e6bf67984c2c465386149760e3e154f9484b101c.
---
 www/board/agenda/routes.rb                                     | 10 ++++++----
 www/board/agenda/views/actions/publish.json.rb                 |  5 ++---
 .../workbench/views/actions/rotate-attachment.json.rb          |  4 +++-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 98bf5c0..c209e40 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -499,10 +499,12 @@ get '/text/draft/:file' do |file|
     agenda.sub('_agenda_','_minutes_').sub('.txt','.yml')
 
   _text do
-    if Dir['board_agenda_*.txt', base: FOUNDATION_BOARD].include?(agenda)
-      _ Minutes.draft(agenda, minutes)
-    else
-      halt 404
+    Dir.chdir(FOUNDATION_BOARD) do
+      if Dir['board_agenda_*.txt'].include?(agenda)
+        _ Minutes.draft(agenda, minutes)
+      else
+        halt 404
+      end
     end
   end
 end
diff --git a/www/board/agenda/views/actions/publish.json.rb b/www/board/agenda/views/actions/publish.json.rb
index 841766d..2b31e8b 100755
--- a/www/board/agenda/views/actions/publish.json.rb
+++ b/www/board/agenda/views/actions/publish.json.rb
@@ -12,8 +12,7 @@ CALENDAR = File.join(BOARD_SITE, 'calendar.mdtext')
 
 # update from svn
 [MINUTES, BOARD_SITE, BOARD_PRIVATE].each do |dir| 
-  ASF::SVN.svn('cleanup', dir)
-  ASF::SVN.svn('update', dir) # TODO does this need auth?
+  Dir.chdir(dir) {`svn cleanup`; `svn up`}
 end
 
 calendar = File.read(CALENDAR)
@@ -86,4 +85,4 @@ ASF::SVN.update BOARD_PRIVATE, @message, env, _ do |tmpdir|
   end
 end
 
-Dir['board_minutes_*.txt', base: BOARD_PRIVATE].sort
+Dir.chdir(BOARD_PRIVATE) {Dir['board_minutes_*.txt'].sort}
diff --git a/www/secretary/workbench/views/actions/rotate-attachment.json.rb b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
index 48f04bc..d1189b1 100644
--- a/www/secretary/workbench/views/actions/rotate-attachment.json.rb
+++ b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
@@ -13,7 +13,9 @@ begin
 
   raise "Invalid direction #{@direction}" unless tool
 
-  Kernel.system tool, '--quiet', '--suffix', 'rotated', selected.path, chdir: File.dirname(selected.path)
+  Dir.chdir File.dirname(selected.path) do
+    Kernel.system tool, '--quiet', '--suffix', 'rotated', selected.path
+  end
 
   output = selected.path.sub(/\.pdf$/, '-rotated.pdf')