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 2018/07/05 23:27:40 UTC

[whimsy] branch master updated: Calling documentation

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 6e274a7  Calling documentation
6e274a7 is described below

commit 6e274a70583637ae9d39e21ff2a2ad8bfd2edaeb
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jul 6 00:27:38 2018 +0100

    Calling documentation
---
 www/project/icla/views/actions/discuss.json.rb    | 22 ++++++++++++++++++++++
 www/project/icla/views/actions/draft-icla.json.rb | 21 +++++++++++++++++++++
 www/project/icla/views/actions/update.json.rb     | 18 +++++++++++++++++-
 www/project/icla/views/actions/validate.json.rb   | 16 ++++++++++++++++
 www/project/icla/views/actions/vote.json.rb       | 23 +++++++++++++++++++++++
 5 files changed, 99 insertions(+), 1 deletion(-)

diff --git a/www/project/icla/views/actions/discuss.json.rb b/www/project/icla/views/actions/discuss.json.rb
index 0a0f766..5f26860 100644
--- a/www/project/icla/views/actions/discuss.json.rb
+++ b/www/project/icla/views/actions/discuss.json.rb
@@ -5,6 +5,28 @@ require 'json'
 require 'mail'
 require 'whimsy/lockfile'
 
+# creates the discussion phase JSON file
+# sends an email to the originator with the link 
+
+# Called from invite.js.rb POST
+# expects the following variables to be set:
+#  @pmc
+#  @iclaemail
+#  @iclaname
+#  @proposalText
+#  @discussComment
+#  @proposer
+
+# returns the following keys:
+#  error
+#  focus
+#  token
+#  userEmail
+#  pmcEmail
+#  subject
+#  discussion
+#  message
+
 # find pmc and user information
 # all ppmcs are also pmcs but not all pmcs are ppmcs
 
diff --git a/www/project/icla/views/actions/draft-icla.json.rb b/www/project/icla/views/actions/draft-icla.json.rb
index b213da2..274d536 100644
--- a/www/project/icla/views/actions/draft-icla.json.rb
+++ b/www/project/icla/views/actions/draft-icla.json.rb
@@ -1,3 +1,24 @@
+#
+# Creates the draft ICLA form
+#
+
+# Called from forms.js.rb POST
+# expects the following variables to be set:
+# @address
+# @apacheid
+# @country
+# @email
+# @fullname
+# @publicname
+# @pmc
+# @telephone
+
+# returns the following keys:
+# error
+# focus
+# ipadddr
+# draft
+
 if not @apacheid.empty? and ASF::Person.find(@apacheid).icla?
   _error "Apache ID #{@apacheid} already in use"
   _focus :apacheId
diff --git a/www/project/icla/views/actions/update.json.rb b/www/project/icla/views/actions/update.json.rb
index 5ac2784..9e040e3 100644
--- a/www/project/icla/views/actions/update.json.rb
+++ b/www/project/icla/views/actions/update.json.rb
@@ -1,9 +1,25 @@
 #
 # Common methods to update the progress file
 #
-# Called from JS pages using POST
+# Called from discuss.js.rb and vote.js.rb using POST
 #
 
+# Expects the following variables to be provided as part of post data:
+# - action
+# - comment (possibly absent)
+# - expectedPhase
+# - member
+# - newPhase (possibly absent)
+# - token
+# - vote (possibly absent)
+
+# Returns the following hash keys:
+# body_text (debug)
+# rewrite (debug)
+# error
+# backtrace
+# contents
+
 $LOAD_PATH.unshift '/srv/whimsy/lib'
 
 require 'json'
diff --git a/www/project/icla/views/actions/validate.json.rb b/www/project/icla/views/actions/validate.json.rb
index eefb352..8d531ea 100644
--- a/www/project/icla/views/actions/validate.json.rb
+++ b/www/project/icla/views/actions/validate.json.rb
@@ -2,6 +2,22 @@ require 'socket'
 require 'net/http'
 require 'pathname'
 
+# Validates and prepares invitations
+
+# Called from invite.js.rb POST
+# expects the following variables to be set:
+# @pmc
+# @iclaemail
+# @iclaname
+# @votelink
+# @noticelink
+
+# returns the following keys:
+#  error
+#  focus
+#  token
+#  invitation
+
 # find pmc and user information
 # all ppmcs are also pmcs but not all pmcs are ppmcs
 
diff --git a/www/project/icla/views/actions/vote.json.rb b/www/project/icla/views/actions/vote.json.rb
index 6729e6b..a68cc91 100644
--- a/www/project/icla/views/actions/vote.json.rb
+++ b/www/project/icla/views/actions/vote.json.rb
@@ -5,6 +5,29 @@ require 'json'
 require 'mail'
 require 'whimsy/lockfile'
 
+# creates the vote phase JSON file
+# sends an email to the originator with the link 
+
+# Called from invite.js.rb POST
+# expects the following variables to be set:
+#  @pmc
+#  @iclaemail
+#  @iclaname
+#  @proposalText
+#  @voteComment
+#  @proposer
+#  @subject
+
+# returns the following keys:
+#  error
+#  focus
+#  userEmail
+#  pmcEmail
+#  token
+#  subject
+#  discussion
+#  message
+
 # find pmc and user information
 # all ppmcs are also pmcs but not all pmcs are ppmcs