whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject [whimsy] branch master updated: WHIMSY-98 - Use dedicated repo for podlings. Better null handling.
Date Sat, 10 Jun 2017 14:20:18 GMT
This is an automated email from the ASF dual-hosted git repository.

johndament 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 70ad3b5  WHIMSY-98 - Use dedicated repo for podlings.  Better null handling.
70ad3b5 is described below

commit 70ad3b59f9a35e9fb29adb05fadab015095d6af9
Author: John D. Ament <johndament@apache.org>
AuthorDate: Sat Jun 10 10:20:09 2017 -0400

    WHIMSY-98 - Use dedicated repo for podlings.  Better null handling.
---
 lib/whimsy/asf/podlings.rb | 8 ++++----
 repository.yml             | 4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/lib/whimsy/asf/podlings.rb b/lib/whimsy/asf/podlings.rb
index da235c5..609f42f 100644
--- a/lib/whimsy/asf/podlings.rb
+++ b/lib/whimsy/asf/podlings.rb
@@ -211,8 +211,8 @@ module ASF
     def podlingStatus
       # resource can contain '-'
       @resource.untaint if @resource =~ /\A[-\w]+\z/
-      incubator_content = ASF::SVN['asf/incubator/public/trunk/content']
-      resource_yml = "#{incubator_content}/podlings/#{@resource}.yml"
+      incubator_content = ASF::SVN['asf/incubator/public/trunk/content/podlings']
+      resource_yml = "#{incubator_content}/#{@resource}.yml"
       if File.exist?(resource_yml)
         rawYaml = Psych.load_file(resource_yml)
         hash = { }
@@ -234,7 +234,7 @@ module ASF
         end if rawYaml[:news]
         hash
       else
-        nil
+        {news:[]}
       end
     end
 
@@ -273,7 +273,7 @@ module ASF
       enddate = Date.parse(@enddate) if @enddate
 
       hash[:duration] = (enddate - Date.parse(@startdate)).to_i
-      hash[:podlingStatus] = podlingStatus || []
+      hash[:podlingStatus] = podlingStatus
       hash
     end
 
diff --git a/repository.yml b/repository.yml
index 70535b1..49084f4 100644
--- a/repository.yml
+++ b/repository.yml
@@ -46,6 +46,10 @@
   iclas:
     url: private/documents/iclas
 
+  incubator-podlings:
+    url: asf/incubator/public/trunk/content/podlings
+    depth: files
+
   incubator-content:
     url: asf/incubator/public/trunk/content
     depth: files

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

Mime
View raw message