You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by Sam Ruby <ru...@intertwingly.net> on 2020/09/26 23:01:58 UTC

Re: [whimsy] branch master updated: Can't have _json in same script as _html

Why was this removed?

Wunderbar will select which of the two blocks to execute based on the
"ACCEPT" header.

- Sam Ruby

On Sat, Sep 26, 2020 at 6:40 PM <se...@apache.org> wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> sebb 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 5aae43a  Can't have _json in same script as _html
> 5aae43a is described below
>
> commit 5aae43a40e866099885a8a6072135a98a96ed379
> Author: Sebb <se...@apache.org>
> AuthorDate: Sat Sep 26 23:39:56 2020 +0100
>
>     Can't have _json in same script as _html
>
>     _json block does not execute
> ---
>  www/members/nominations.cgi | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
> index 2ed4788..c6945f6 100755
> --- a/www/members/nominations.cgi
> +++ b/www/members/nominations.cgi
> @@ -142,12 +142,3 @@ _html do
>      end
>    end
>  end
> -
> -# produce JSON output of reports
> -_json do
> -  _ reports do |mail|
> -    _subject mail.subject
> -    _link MBOX + URI.escape('<' + mail.message_id + '>')
> -    _missing missing.any? {|title| mail.subject.downcase =~ /\b#{title}\b/}
> -  end
> -end
>

Re: [whimsy] branch master updated: Can't have _json in same script as _html

Posted by sebb <se...@gmail.com>.
Just tried sending a request, and I get:

{
  "exception": "#<NameError: undefined local variable or method
`reports' for #<Wunderbar::JsonBuilder:0x000055898c2a7d10>>",
  "backtrace": [
    "/x1/srv/whimsy/www/members/nominations.cgi:148:in `block in <main>'"
  ]
}

I suspect the code has not been used (yet)

On Sun, 27 Sep 2020 at 12:46, sebb <se...@gmail.com> wrote:
>
> On Sun, 27 Sep 2020 at 00:02, Sam Ruby <ru...@intertwingly.net> wrote:
> >
> > Why was this removed?
> >
> > Wunderbar will select which of the two blocks to execute based on the
> > "ACCEPT" header.
>
> OK, did not know that.
>
> Where is 'reports' defined?
>
> > - Sam Ruby
> >
> > On Sat, Sep 26, 2020 at 6:40 PM <se...@apache.org> wrote:
> > >
> > > This is an automated email from the ASF dual-hosted git repository.
> > >
> > > sebb 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 5aae43a  Can't have _json in same script as _html
> > > 5aae43a is described below
> > >
> > > commit 5aae43a40e866099885a8a6072135a98a96ed379
> > > Author: Sebb <se...@apache.org>
> > > AuthorDate: Sat Sep 26 23:39:56 2020 +0100
> > >
> > >     Can't have _json in same script as _html
> > >
> > >     _json block does not execute
> > > ---
> > >  www/members/nominations.cgi | 9 ---------
> > >  1 file changed, 9 deletions(-)
> > >
> > > diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
> > > index 2ed4788..c6945f6 100755
> > > --- a/www/members/nominations.cgi
> > > +++ b/www/members/nominations.cgi
> > > @@ -142,12 +142,3 @@ _html do
> > >      end
> > >    end
> > >  end
> > > -
> > > -# produce JSON output of reports
> > > -_json do
> > > -  _ reports do |mail|
> > > -    _subject mail.subject
> > > -    _link MBOX + URI.escape('<' + mail.message_id + '>')
> > > -    _missing missing.any? {|title| mail.subject.downcase =~ /\b#{title}\b/}
> > > -  end
> > > -end
> > >

Re: [whimsy] branch master updated: Can't have _json in same script as _html

Posted by sebb <se...@gmail.com>.
On Sun, 27 Sep 2020 at 00:02, Sam Ruby <ru...@intertwingly.net> wrote:
>
> Why was this removed?
>
> Wunderbar will select which of the two blocks to execute based on the
> "ACCEPT" header.

OK, did not know that.

Where is 'reports' defined?

> - Sam Ruby
>
> On Sat, Sep 26, 2020 at 6:40 PM <se...@apache.org> wrote:
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > sebb 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 5aae43a  Can't have _json in same script as _html
> > 5aae43a is described below
> >
> > commit 5aae43a40e866099885a8a6072135a98a96ed379
> > Author: Sebb <se...@apache.org>
> > AuthorDate: Sat Sep 26 23:39:56 2020 +0100
> >
> >     Can't have _json in same script as _html
> >
> >     _json block does not execute
> > ---
> >  www/members/nominations.cgi | 9 ---------
> >  1 file changed, 9 deletions(-)
> >
> > diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
> > index 2ed4788..c6945f6 100755
> > --- a/www/members/nominations.cgi
> > +++ b/www/members/nominations.cgi
> > @@ -142,12 +142,3 @@ _html do
> >      end
> >    end
> >  end
> > -
> > -# produce JSON output of reports
> > -_json do
> > -  _ reports do |mail|
> > -    _subject mail.subject
> > -    _link MBOX + URI.escape('<' + mail.message_id + '>')
> > -    _missing missing.any? {|title| mail.subject.downcase =~ /\b#{title}\b/}
> > -  end
> > -end
> >