You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by sebb <se...@gmail.com> on 2017/06/10 13:57:56 UTC

Re: [whimsy] branch master updated: WHIMSY-98 - Adding some safe handling?

On 10 June 2017 at 14:11,  <jo...@apache.org> wrote:
> 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 3a28eab  WHIMSY-98 - Adding some safe handling?
> 3a28eab is described below
>
> commit 3a28eab785410d2bba30538c4a942e9d0de3c706
> Author: John D. Ament <jo...@apache.org>
> AuthorDate: Sat Jun 10 09:10:47 2017 -0400
>
>     WHIMSY-98 - Adding some safe handling?
> ---
>  lib/whimsy/asf/podlings.rb | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/whimsy/asf/podlings.rb b/lib/whimsy/asf/podlings.rb
> index 0f219e2..da235c5 100644
> --- a/lib/whimsy/asf/podlings.rb
> +++ b/lib/whimsy/asf/podlings.rb
> @@ -231,7 +231,7 @@ module ASF
>            newsItem[:date] = ni[:date].strftime('%Y-%m-%d')
>            newsItem[:note] = ni[:note]
>            hash[:news].push(newsItem)
> -        end if  rawYaml[:news]
> +        end if rawYaml[:news]
>          hash
>        else
>          nil
> @@ -273,7 +273,7 @@ module ASF
>        enddate = Date.parse(@enddate) if @enddate
>
>        hash[:duration] = (enddate - Date.parse(@startdate)).to_i
> -      hash[:podlingStatus] = podlingStatus if podlingStatus
> +      hash[:podlingStatus] = podlingStatus || []

That's an array; surely it should be a hash?

Also a better place to fix this might be in the podlingStatus method
so it always returns a hash?

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