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 2017/10/11 16:15:52 UTC

[whimsy] 01/02: rename data directory to be more descriptive

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

commit d08fa2381183cae304622f55bd249abbeda44d52
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Oct 11 09:12:11 2017 -0400

    rename data directory to be more descriptive
---
 www/board/agenda/routes.rb                           | 2 +-
 www/board/agenda/{data => templates}/agenda.erb      | 0
 www/board/agenda/{data => templates}/reminder1.txt   | 0
 www/board/agenda/{data => templates}/reminder2.txt   | 0
 www/board/agenda/views/actions/reminder-text.json.rb | 2 +-
 5 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index be6a065..9805570 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -366,7 +366,7 @@ get '/new' do
     reject {|date| date >= @meeting.to_date}.
     reject {|date| draft[date.strftime('%B %d, %Y')] == 'approved'}
 
-  template = File.read('data/agenda.erb')
+  template = File.read('templates/agenda.erb')
   @disabled = dir("board_agenda_*.txt").
     include? @meeting.strftime("board_agenda_%Y_%m_%d.txt")
   @agenda = Erubis::Eruby.new(template).result(binding)
diff --git a/www/board/agenda/data/agenda.erb b/www/board/agenda/templates/agenda.erb
similarity index 100%
rename from www/board/agenda/data/agenda.erb
rename to www/board/agenda/templates/agenda.erb
diff --git a/www/board/agenda/data/reminder1.txt b/www/board/agenda/templates/reminder1.txt
similarity index 100%
rename from www/board/agenda/data/reminder1.txt
rename to www/board/agenda/templates/reminder1.txt
diff --git a/www/board/agenda/data/reminder2.txt b/www/board/agenda/templates/reminder2.txt
similarity index 100%
rename from www/board/agenda/data/reminder2.txt
rename to www/board/agenda/templates/reminder2.txt
diff --git a/www/board/agenda/views/actions/reminder-text.json.rb b/www/board/agenda/views/actions/reminder-text.json.rb
index 24bfe70..bffbc86 100644
--- a/www/board/agenda/views/actions/reminder-text.json.rb
+++ b/www/board/agenda/views/actions/reminder-text.json.rb
@@ -3,7 +3,7 @@ require 'active_support/core_ext/integer/inflections.rb'
 
 # read template for the reminders
 @reminder.untaint if @reminder =~ /^reminder\d$/
-template = File.read("data/#@reminder.txt")
+template = File.read("templates/#@reminder.txt")
 
 # find the latest agenda
 agenda = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].sort.last.untaint

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