tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1796968 - in /tomee/site/trunk/generators/site-tomee-ng/src/main: java/org/apache/tomee/website/ jbake/assets/img/ jbake/content/community/ jbake/templates/
Date Wed, 31 May 2017 03:38:15 GMT
Author: dblevins
Date: Wed May 31 03:38:15 2017
New Revision: 1796968

URL: http://svn.apache.org/viewvc?rev=1796968&view=rev
Log:
Add all committers to the contributor page

Added:
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/gdamour.jpg   (with
props)
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/genspring.jpg   (with
props)
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/jgenender.jpg   (with
props)
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/manugeorge.jpg   (with
props)
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/mnour.jpg   (with
props)
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/noimg.png   (with
props)
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/rickmcguire.jpg  
(with props)
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/xuhaihong.jpg   (with
props)
Modified:
    tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/Contributors.java
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/content/community/contributors.adoc
    tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/templates/contributors.gsp

Modified: tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/Contributors.java
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/Contributors.java?rev=1796968&r1=1796967&r2=1796968&view=diff
==============================================================================
--- tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/Contributors.java
(original)
+++ tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/Contributors.java
Wed May 31 03:38:15 2017
@@ -52,8 +52,32 @@ public class Contributors {
     }
 
     public static Contributor singleLoad(final WebTarget target, final String input) throws
IOException {
-        final boolean committer = input.endsWith("*");
-        final String mail = committer ? input.substring(0, input.length() - 1) : input;
+        try {
+            return ofNullable(loadGravatar(target, input)).orElse(loadStatic(input));
+        } catch (Exception e) {
+            e.printStackTrace();
+            return loadStatic(input);
+        }
+    }
+
+    public static Contributor loadStatic(final String input) {
+        final String[] strings = input.split(" *\\| *");
+        final String mail = strings[0].replaceAll("\\*$", "");
+        final boolean committer = strings[0].endsWith("*");
+        final String name = strings.length > 1 ? strings[1] : mail.replaceAll("@.*", "");
+        final String picture = strings.length > 2 ? strings[2] : "../img/noimg.png";
+        return Contributor.builder()
+                .name(name)
+                .id(mail)
+                .committer(committer)
+                .gravatar(picture)
+                .build();
+    }
+
+    public static Contributor loadGravatar(final WebTarget target, final String input) throws
IOException {
+        final String[] strings = input.split(" *\\| *");
+        final boolean committer = strings[0].endsWith("*");
+        final String mail = committer ? strings[0].substring(0, strings[0].length() - 1)
: strings[0];
         final String hash = gravatarHash(mail);
         final Response gravatar = target.path(hash + ".json").request(MediaType.APPLICATION_JSON_TYPE).get();
         if (gravatar.getStatus() != HttpsURLConnection.HTTP_OK) {
@@ -78,7 +102,7 @@ public class Contributors {
                                                 .map(a -> Stream.of(a).map(l -> Link.builder().name(l.getTitle()).url(l.getValue()).build()).collect(toList()))
                                                 .orElse(emptyList()).stream())
                                         .collect(toList()))
-                        .gravatar("http://www.gravatar.com/avatar/" + hash)
+                        .gravatar("http://www.gravatar.com/avatar/" + hash + "?s=140")
                         .build())
                 .orElse(Contributor.builder().name(mail).id(mail).build());
         contributor.setCommitter(committer);

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/gdamour.jpg
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/gdamour.jpg?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/gdamour.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/genspring.jpg
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/genspring.jpg?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/genspring.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/jgenender.jpg
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/jgenender.jpg?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/jgenender.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/manugeorge.jpg
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/manugeorge.jpg?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/manugeorge.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/mnour.jpg
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/mnour.jpg?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/mnour.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/noimg.png
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/noimg.png?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/noimg.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/rickmcguire.jpg
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/rickmcguire.jpg?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/rickmcguire.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/xuhaihong.jpg
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/xuhaihong.jpg?rev=1796968&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/assets/img/xuhaihong.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Modified: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/content/community/contributors.adoc
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/content/community/contributors.adoc?rev=1796968&r1=1796967&r2=1796968&view=diff
==============================================================================
--- tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/content/community/contributors.adoc
(original)
+++ tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/content/community/contributors.adoc
Wed May 31 03:38:15 2017
@@ -4,32 +4,32 @@
 :jbake-status: published
 
 ----
-adc@apache.org*
-ammulder@apache.org*
+adc@apache.org* | Alan Cabrera | https://twitter.com/maguro/profile_image?size=bigger
+ammulder@apache.org* | Aaron Mulder | ../img/ammulder.png
 agumbrecht@tomitribe.com*
-dain@apache.org*
+dain@iq80.com*
 dblevins@apache.org*
-djencks@apache.org*
-dsh@apache.org*
-gawor@apache.org*
-gdamour@apache.org*
-genspring@apache.org*
-hogstrom@apache.org*
-jgallimore@apache.org*
-jgenender@apache.org*
-jlaskowski@apache.org*
-jeanouii@gmail.com*
+djencks@apache.org* | David Jencks
+dsh@apache.org* | Daniel Stefan Haischt | https://twitter.com/uebermodean/profile_image?size=bigger
+gawor@apache.org* | Jarek Gawor | https://twitter.com/jgawor/profile_image?size=bigger
+gdamour@apache.org* | Gianny Damour | ../img/gdamour.jpg
+genspring@apache.org* | Lin Quan Jiang | ../img/genspring.jpg
+hogstrom@apache.org* | Matt Richard Hogstrom | https://twitter.com/hogstrom/profile_image?size=bigger
+jgallimore@apache.org* | Jonathan Gallimore | https://twitter.com/jongallimore/profile_image?size=bigger
+jgenender@apache.org* | Jeff Genender | ../img/jgenender.jpg
+jlaskowski@apache.org* | Jacek Laskowski | https://twitter.com/jaceklaskowski/profile_image?size=bigger
+jlmonteiro@apache.org* | Jean-Louis Monteiro | https://twitter.com/JLouisMonteiro/profile_image?size=bigger
 jvanzyl@apache.org*
 jwhitlock@apache.org*
-kevan@apache.org*
-kmalhi@apache.org*
-lajos@apache.org*
-manugeorge@apache.org*
-mnour@apache.org*
-rickmcguire@apache.org*
+kevan@apache.org* | Kevan Lee Miller | https://twitter.com/kevanmiller/profile_image?size=bigger
+kmalhi@apache.org* | Karan Singh Malhi | https://twitter.com/KrnMal/profile_image?size=bigger
+lajos@apache.org* | Lajos Moczar
+manugeorge@apache.org* | Manu George | ../img/manugeorge.jpg
+mnour@apache.org* | Mohammad Nour El-Din | ../img/mnour.jpg
+rickmcguire@apache.org* | Rick McGuire | ../img/rickmcguire.jpg
 rmannibucau@gmail.com*
 struberg@yahoo.de*
 tveronezi@apache.org*
-vishwanathk@apache.org*
-xuhaihong@apache.org*
+vishwanathk@apache.org* | Vishwanath | https://twitter.com/stratwine/profile_image?size=bigger
+xuhaihong@apache.org* | Haihong Xu | ../img/xuhaihong.jpg
 ----

Modified: tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/templates/contributors.gsp
URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/templates/contributors.gsp?rev=1796968&r1=1796967&r2=1796968&view=diff
==============================================================================
--- tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/templates/contributors.gsp (original)
+++ tomee/site/trunk/generators/site-tomee-ng/src/main/jbake/templates/contributors.gsp Wed
May 31 03:38:15 2017
@@ -23,12 +23,12 @@
                 %>
                   <div class="col-sm-4">
                     <div class="photo col-sm-5">
-                      <img alt="${contributor.name}" src="${contributor.gravatar}?s=140">
+                      <img alt="${contributor.name}" src="${contributor.gravatar}" style="width:140px">
                       <% if (contributor.committer){ %><i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i><% } %>
                     </div>
                     <div class="col-sm-7">
                       <h3 class="contributor-name" style="font-size:1.4em;">${contributor.name}</h3>
-                      <p>${contributor.description ? contributor.description : ''}</p>
+                      <p></p>
                       <ul class="list-inline">
                       <%contributor.link.each {l ->%>
                       <li><a href="${l.url}">${l.name}</a></li>



Mime
View raw message