You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/09/10 15:36:00 UTC

[whimsy] branch master updated: add file extension

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

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  cbb5eea   add file extension
cbb5eea is described below

commit cbb5eeae27301c60c5b60f08dca6a1c5d6e83cc1
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat Sep 10 11:34:45 2016 -0400

    add file extension
---
 www/secmail/views/actions/icla.json.rb | 5 ++++-
 www/secmail/views/forms/icla.js.rb     | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/www/secmail/views/actions/icla.json.rb b/www/secmail/views/actions/icla.json.rb
index c7db8ed..0c16d1b 100644
--- a/www/secmail/views/actions/icla.json.rb
+++ b/www/secmail/views/actions/icla.json.rb
@@ -5,8 +5,11 @@
 message = Mailbox.find(@message)
 iclas = ASF::SVN['private/documents/iclas']
 
+# extract file extension
+fileext = File.extname(@selected) if @signature.empty?
+
 # write attachment (+ signature, if present) to the documents/iclas directory
-_task "svn commit documents/iclas/#@filename" do
+_task "svn commit documents/iclas/#@filename#{fileext}" do
   svn_reset iclas
   dest = message.write_svn(iclas, @filename, @selected, @signature)
 end
diff --git a/www/secmail/views/forms/icla.js.rb b/www/secmail/views/forms/icla.js.rb
index 7351a90..9b7bbb2 100644
--- a/www/secmail/views/forms/icla.js.rb
+++ b/www/secmail/views/forms/icla.js.rb
@@ -11,6 +11,7 @@ class ICLA < React
     _form method: 'post', action: '../../tasklist/icla', target: 'content' do
       _input type: 'hidden', name: 'message'
       _input type: 'hidden', name: 'selected'
+      _input type: 'hidden', name: 'signature', value: @@signature
 
       _table.form do
         _tr do

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].