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/16 14:08:38 UTC

[whimsy] branch master updated (e06e030 -> 0c4d311)

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

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


    from e06e030  special exception for establish position resolutions
     new c5d871d  make test server work again
     new 0c4d311  refresh issues approve, queue

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/Gemfile                     |  1 +
 www/board/agenda/Rakefile                    |  2 ++
 www/board/agenda/views/buttons/approve.js.rb | 15 +++++----
 www/board/agenda/views/pages/queue.js.rb     | 47 +++++++++++++++-------------
 4 files changed, 35 insertions(+), 30 deletions(-)

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

[whimsy] 01/02: make test server work again

Posted by ru...@apache.org.
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 c5d871d7e7d0d20beffa17a7154888d300f8b348
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Oct 16 10:08:10 2017 -0400

    make test server work again
---
 www/board/agenda/Gemfile  | 1 +
 www/board/agenda/Rakefile | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index f5a468d..918fc49 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -32,6 +32,7 @@ gem 'rubyXL'
 
 group :test do
   gem 'rspec'
+  gem 'puma'
   gem 'capybara'
   gem 'poltergeist'
 end
diff --git a/www/board/agenda/Rakefile b/www/board/agenda/Rakefile
index 6cd910e..8e66bf1 100644
--- a/www/board/agenda/Rakefile
+++ b/www/board/agenda/Rakefile
@@ -31,6 +31,8 @@ namespace :server do
   task :test => :work do
     ENV['RACK_ENV']='test'
     ENV['USER']='test'
+    require 'bundler'
+    Bundler.require(:default, :test)
     require 'wunderbar/listen'
   end
 end

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

[whimsy] 02/02: refresh issues approve, queue

Posted by ru...@apache.org.
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 0c4d311081774bece0ba62c81f19d2289fc99a7e
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Oct 16 10:08:24 2017 -0400

    refresh issues approve, queue
---
 www/board/agenda/views/buttons/approve.js.rb | 15 +++++----
 www/board/agenda/views/pages/queue.js.rb     | 47 +++++++++++++++-------------
 2 files changed, 32 insertions(+), 30 deletions(-)

diff --git a/www/board/agenda/views/buttons/approve.js.rb b/www/board/agenda/views/buttons/approve.js.rb
index 94e5fed..4b7318b 100644
--- a/www/board/agenda/views/buttons/approve.js.rb
+++ b/www/board/agenda/views/buttons/approve.js.rb
@@ -4,25 +4,24 @@
 class Approve < Vue
   def initialize
     @disabled = false
-    @request = 'approve'
   end
 
   # render a single button
   def render
-    _button.btn.btn_primary @request, onClick: self.click, disabled: @disabled
+    _button.btn.btn_primary request, onClick: self.click, disabled: @disabled
   end
 
   # set request (and button text) depending on whether or not the
   # not this items was previously approved
-  def created()
+  def request
     if Pending.approved.include? @@item.attach
-      @request = 'unapprove'
+      'unapprove'
     elsif Pending.unapproved.include? @@item.attach
-      @request = 'approve'
+      'approve'
     elsif @@item.approved and @@item.approved.include? Server.initials
-      @request = 'unapprove'
+      'unapprove'
     else
-      @request = 'approve'
+      'approve'
     end
   end
 
@@ -32,7 +31,7 @@ class Approve < Vue
       agenda: Agenda.file,
       initials: Server.initials,
       attach: @@item.attach,
-      request: @request
+      request: request
     }
 
     @disabled = true
diff --git a/www/board/agenda/views/pages/queue.js.rb b/www/board/agenda/views/pages/queue.js.rb
index c8903ff..fac438c 100644
--- a/www/board/agenda/views/pages/queue.js.rb
+++ b/www/board/agenda/views/pages/queue.js.rb
@@ -17,16 +17,16 @@ class Queue < Vue
         # Approvals
         _h4 'Approvals'
         _p.col_xs_12 do
-          @approvals.each_with_index do |item, index|
+          pending.approvals.each_with_index do |item, index|
             _span ', ' if index > 0
             _Link text: item.title, href: "queue/#{item.href}"
           end
-          _em 'None.' if @approvals.empty?
+          _em 'None.' if pending.approvals.empty?
         end
 
         # Unapproved
         %w(Unapprovals Flagged Unflagged).each do |section|
-          list = $data[section.downcase()]
+          list = pending[section.downcase()]
           unless list.empty?
             _h4 section
             _p.col_xs_12 do
@@ -41,10 +41,10 @@ class Queue < Vue
 
       # Comments
       _h4 'Comments'
-      if @comments.empty?
-        _p.col_xs_12 {_em 'None.'} 
+      if pending.comments.empty?
+        _p.col_xs_12 {_em 'None.'}
       else
-        _dl.dl_horizontal(@comments) do |item|
+        _dl.dl_horizontal(pending.comments) do |item|
           _dt do
             _Link text: item.title, href: item.href
           end
@@ -73,12 +73,12 @@ class Queue < Vue
       end
 
       # Ready
-      if Server.role == :director and not @ready.empty?
+      if Server.role == :director and not pending.ready.empty?
         _div.row.col_xs_12 { _hr }
 
         _h4 'Ready for review'
         _p.col_xs_12 do
-          @ready.each_with_index do |item, index|
+          pending.ready.each_with_index do |item, index|
             _span ', ' if index > 0
             _Link text: item.title, href: "queue/#{item.href}",
               class: ('default' if index == 0)
@@ -89,45 +89,48 @@ class Queue < Vue
   end
 
   # determine approvals, rejected, comments, and ready
-  def created()
-  console.log('created')
-    @approvals = []
-    @unapprovals = []
-    @flagged = []
-    @unflagged = []
-    @comments = []
-    @ready = []
+  def pending
+    result = {
+      approvals: [],
+      unapprovals: [],
+      flagged: [],
+      unflagged: [],
+      comments: [],
+      ready: []
+    }
 
     Agenda.index.each do |item|
       if Pending.comments[item.attach]
-        @comments << item
+        result.comments << item
       end
 
       action = false
 
       if Pending.approved.include? item.attach
-        @approvals << item   
+        result.approvals << item
         action = true
       end
 
       if Pending.unapproved.include? item.attach
-        @unapprovals << item 
+        result.unapprovals << item
         action = true
       end
 
       if Pending.flagged.include? item.attach
-        @flagged << item     
+        result.flagged << item
         action = true
       end
 
       if Pending.unflagged.include? item.attach
-        @unflagged << item   
+        result.unflagged << item
         action = true
       end
 
       if not action and item.ready_for_review(Server.initials)
-        @ready << item       
+        result.ready << item 
       end
     end
+
+    return result
   end
 end

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