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 2018/05/24 20:03:29 UTC
[whimsy] branch master updated: cleanup
This is an automated email from the ASF dual-hosted git repository.
rubys 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 4fecb01 cleanup
4fecb01 is described below
commit 4fecb019476e93cf74f2b1f6425e93ac8b0337f2
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu May 24 16:03:14 2018 -0400
cleanup
---
www/board/agenda/routes.rb | 1 +
www/board/agenda/templates/committers_report.text.erb | 2 +-
www/board/agenda/views/buttons/summary.js.rb | 6 +++---
www/board/agenda/views/committers_report.text.rb | 10 ++++++----
4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 8184bbd..5c7988d 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -287,6 +287,7 @@ end
# draft committers report
get %r{/text/summary/(\d\d\d\d-\d\d-\d\d)} do |date|
+ @date = date.gsub('-', '_')
_text :committers_report
end
diff --git a/www/board/agenda/templates/committers_report.text.erb b/www/board/agenda/templates/committers_report.text.erb
index 195d43f..013ce0d 100644
--- a/www/board/agenda/templates/committers_report.text.erb
+++ b/www/board/agenda/templates/committers_report.text.erb
@@ -1,4 +1,4 @@
-From: chairman@apache.org
+From: <%= @from %>
To: committers@apache.org
Reply-To: board@apache.org
Subject: ASF Board Meeting Summary - <%= @date.strftime('%B %d, %Y') %>
diff --git a/www/board/agenda/views/buttons/summary.js.rb b/www/board/agenda/views/buttons/summary.js.rb
index e007093..7af6447 100644
--- a/www/board/agenda/views/buttons/summary.js.rb
+++ b/www/board/agenda/views/buttons/summary.js.rb
@@ -6,7 +6,7 @@ class Summary < Vue
# default attributes for the button associated with this form
def self.button
{
- text: 'summary',
+ text: 'send summary',
class: 'btn_danger',
data_toggle: 'modal',
data_target: '#summary-form'
@@ -15,7 +15,7 @@ class Summary < Vue
def render
_ModalDialog.summary_form!.wide_form color: 'commented' do
- _h4.commented 'Send out summary of meeting'
+ _h4.commented 'Send out meeting summary to committers'
_textarea.summary_text!.form_control rows: 17, tabIndex: 1,
placeholder: 'committers summary', value: @summary, disabled: @disabled
@@ -29,7 +29,7 @@ class Summary < Vue
# autofocus on summary text; fetch summary
def mounted()
@summary = ''
- jQuery('#summary-form').on 'shown.bs.modal' do
+ jQuery('#summary-form').on 'show.bs.modal' do
retrieve "summary/#{Agenda.title}", :text do |summary|
document.getElementById("summary-text").focus()
@disabled = false
diff --git a/www/board/agenda/views/committers_report.text.rb b/www/board/agenda/views/committers_report.text.rb
index a3aacd0..5ca4052 100644
--- a/www/board/agenda/views/committers_report.text.rb
+++ b/www/board/agenda/views/committers_report.text.rb
@@ -4,10 +4,8 @@ require 'chronic'
# load agenda and minutes
board_svn = ASF::SVN['foundation_board']
-minutes_file = Dir[File.join(AGENDA_WORK, 'board_minutes_*.yml')].sort.
- last.untaint
-agenda_file = File.join(board_svn, File.basename(minutes_file).
- sub('_minutes_', '_agenda_').sub('.yml', '.txt'))
+minutes_file = File.join(AGENDA_WORK, "board_minutes_#@date.yml").untaint
+agenda_file = File.join(board_svn, "board_agenda_#@date.txt").untaint
minutes = YAML.load_file(minutes_file)
agenda = Agenda.parse(File.basename(agenda_file), :full)
@@ -73,6 +71,10 @@ next_meeting = ASF::Board.nextMeeting
@next_meeting = next_meeting.day.ordinalize + " of " +
next_meeting.strftime('%B')
+# author of the email
+sender = ASF::Person.find(env.user || ENV['USER'])
+@from = "#{sender.public_name.inspect} <#{...@apache.org>"
+
##### Write the report
template = File.read('templates/committers_report.text.erb').untaint
Erubis::Eruby.new(template).result(binding)
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.