You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Doug Davies <da...@oclc.org> on 2014/12/05 15:46:54 UTC

Review Request 28756: RENDER_DEBUG is set incorrectly in the sample container

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28756/
-----------------------------------------------------------

Review request for shindig.


Bugs: SHINDIG-1989
    https://issues.apache.org/jira/browse/SHINDIG-1989


Repository: shindig


Description
-------

In commoncontainer renderDebug is set as follows

testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = '0';

and then in container.js it does this

this.renderDebug_ = (typeof param === 'undefined') ?
Boolean(osapi.container.util.getSafeJsonValue(config,
osapi.container.ContainerConfig.RENDER_DEBUG, false)) :
(param === '1');

which sets this.renderDebug_ to TRUE (incorrectly). I think the creation of the Boolean is only caring that the string has a value and setting to TRUE.  I'm fixing the container/documentation rather than having container.js interpret both a string and boolean.


Diffs
-----

  trunk/content/README 1642996 
  trunk/content/containers/commoncontainer/assembler.js 1642996 
  trunk/content/containers/embeddedexperiences/EEContainer.js 1642996 

Diff: https://reviews.apache.org/r/28756/diff/


Testing
-------


Thanks,

Doug Davies


Re: Review Request 28756: RENDER_DEBUG is set incorrectly in the sample container

Posted by Ryan Baxter <rb...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28756/#review64155
-----------------------------------------------------------

Ship it!


I think you can also just set it to the number 1 and it would work as well, but true is more obvious to me.

- Ryan Baxter


On Dec. 5, 2014, 6:52 p.m., Doug Davies wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28756/
> -----------------------------------------------------------
> 
> (Updated Dec. 5, 2014, 6:52 p.m.)
> 
> 
> Review request for shindig.
> 
> 
> Bugs: SHINDIG-1989
>     https://issues.apache.org/jira/browse/SHINDIG-1989
> 
> 
> Repository: shindig
> 
> 
> Description
> -------
> 
> In commoncontainer if I set renderDebug as follows
> 
> testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = '0';
> 
> and then in container.js it does this
> 
> this.renderDebug_ = (typeof param === 'undefined') ?
> Boolean(osapi.container.util.getSafeJsonValue(config,
> osapi.container.ContainerConfig.RENDER_DEBUG, false)) :
> (param === '1');
> 
> which sets this.renderDebug_ to TRUE (incorrectly). I think the creation of the Boolean is only caring that the string has a value and setting to TRUE.  I'm fixing the container/documentation rather than having container.js interpret both a string and boolean.
> 
> I noticed that https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container shows RENDER_DEBUG being set as a boolean, but I'm pretty sure I've seen documentation that specifies it as a 'String'.  It seems like the intent is that it's boolean, so I'm sticking with chaning the code to use boolean so if anyone ever changes it to false it works as expected.
> 
> Core Container Specification 2.5.0 shows it as a 'String'... hmmm... http://opensocial-resources.googlecode.com/svn/spec/2.5/Core-Container.xml
> 
> 
> Diffs
> -----
> 
>   trunk/content/README 1642996 
>   trunk/content/containers/commoncontainer/assembler.js 1642996 
>   trunk/content/containers/embeddedexperiences/EEContainer.js 1642996 
> 
> Diff: https://reviews.apache.org/r/28756/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Doug Davies
> 
>


Re: Review Request 28756: RENDER_DEBUG is set incorrectly in the sample container

Posted by Stanton Sievers <si...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28756/#review64165
-----------------------------------------------------------

Ship it!


Ship It!

- Stanton Sievers


On Dec. 5, 2014, 6:52 p.m., Doug Davies wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28756/
> -----------------------------------------------------------
> 
> (Updated Dec. 5, 2014, 6:52 p.m.)
> 
> 
> Review request for shindig.
> 
> 
> Bugs: SHINDIG-1989
>     https://issues.apache.org/jira/browse/SHINDIG-1989
> 
> 
> Repository: shindig
> 
> 
> Description
> -------
> 
> In commoncontainer if I set renderDebug as follows
> 
> testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = '0';
> 
> and then in container.js it does this
> 
> this.renderDebug_ = (typeof param === 'undefined') ?
> Boolean(osapi.container.util.getSafeJsonValue(config,
> osapi.container.ContainerConfig.RENDER_DEBUG, false)) :
> (param === '1');
> 
> which sets this.renderDebug_ to TRUE (incorrectly). I think the creation of the Boolean is only caring that the string has a value and setting to TRUE.  I'm fixing the container/documentation rather than having container.js interpret both a string and boolean.
> 
> I noticed that https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container shows RENDER_DEBUG being set as a boolean, but I'm pretty sure I've seen documentation that specifies it as a 'String'.  It seems like the intent is that it's boolean, so I'm sticking with chaning the code to use boolean so if anyone ever changes it to false it works as expected.
> 
> Core Container Specification 2.5.0 shows it as a 'String'... hmmm... http://opensocial-resources.googlecode.com/svn/spec/2.5/Core-Container.xml
> 
> 
> Diffs
> -----
> 
>   trunk/content/README 1642996 
>   trunk/content/containers/commoncontainer/assembler.js 1642996 
>   trunk/content/containers/embeddedexperiences/EEContainer.js 1642996 
> 
> Diff: https://reviews.apache.org/r/28756/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Doug Davies
> 
>


Re: Review Request 28756: RENDER_DEBUG is set incorrectly in the sample container

Posted by Doug Davies <da...@oclc.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28756/
-----------------------------------------------------------

(Updated Dec. 5, 2014, 6:52 p.m.)


Review request for shindig.


Bugs: SHINDIG-1989
    https://issues.apache.org/jira/browse/SHINDIG-1989


Repository: shindig


Description (updated)
-------

In commoncontainer if I set renderDebug as follows

testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = '0';

and then in container.js it does this

this.renderDebug_ = (typeof param === 'undefined') ?
Boolean(osapi.container.util.getSafeJsonValue(config,
osapi.container.ContainerConfig.RENDER_DEBUG, false)) :
(param === '1');

which sets this.renderDebug_ to TRUE (incorrectly). I think the creation of the Boolean is only caring that the string has a value and setting to TRUE.  I'm fixing the container/documentation rather than having container.js interpret both a string and boolean.

I noticed that https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container shows RENDER_DEBUG being set as a boolean, but I'm pretty sure I've seen documentation that specifies it as a 'String'.  It seems like the intent is that it's boolean, so I'm sticking with chaning the code to use boolean so if anyone ever changes it to false it works as expected.

Core Container Specification 2.5.0 shows it as a 'String'... hmmm... http://opensocial-resources.googlecode.com/svn/spec/2.5/Core-Container.xml


Diffs
-----

  trunk/content/README 1642996 
  trunk/content/containers/commoncontainer/assembler.js 1642996 
  trunk/content/containers/embeddedexperiences/EEContainer.js 1642996 

Diff: https://reviews.apache.org/r/28756/diff/


Testing
-------


Thanks,

Doug Davies


Re: Review Request 28756: RENDER_DEBUG is set incorrectly in the sample container

Posted by Doug Davies <da...@oclc.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28756/
-----------------------------------------------------------

(Updated Dec. 5, 2014, 6:50 p.m.)


Review request for shindig.


Bugs: SHINDIG-1989
    https://issues.apache.org/jira/browse/SHINDIG-1989


Repository: shindig


Description (updated)
-------

In commoncontainer if I set renderDebug as follows

testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = '0';

and then in container.js it does this

this.renderDebug_ = (typeof param === 'undefined') ?
Boolean(osapi.container.util.getSafeJsonValue(config,
osapi.container.ContainerConfig.RENDER_DEBUG, false)) :
(param === '1');

which sets this.renderDebug_ to TRUE (incorrectly). I think the creation of the Boolean is only caring that the string has a value and setting to TRUE.  I'm fixing the container/documentation rather than having container.js interpret both a string and boolean.

I noticed that https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container shows RENDER_DEBUG being set as a boolean, but I'm pretty sure I've seen documentation that specifies it as a 'String'.  It seems like the intent is that it's boolean, so I'm sticking with chaning the code to use boolean so if anyone ever changes it to false it works as expected.


Diffs
-----

  trunk/content/README 1642996 
  trunk/content/containers/commoncontainer/assembler.js 1642996 
  trunk/content/containers/embeddedexperiences/EEContainer.js 1642996 

Diff: https://reviews.apache.org/r/28756/diff/


Testing
-------


Thanks,

Doug Davies


Re: Review Request 28756: RENDER_DEBUG is set incorrectly in the sample container

Posted by Doug Davies <da...@oclc.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28756/
-----------------------------------------------------------

(Updated Dec. 5, 2014, 4 p.m.)


Review request for shindig.


Bugs: SHINDIG-1989
    https://issues.apache.org/jira/browse/SHINDIG-1989


Repository: shindig


Description (updated)
-------

In commoncontainer if I set renderDebug as follows

testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = '0';

and then in container.js it does this

this.renderDebug_ = (typeof param === 'undefined') ?
Boolean(osapi.container.util.getSafeJsonValue(config,
osapi.container.ContainerConfig.RENDER_DEBUG, false)) :
(param === '1');

which sets this.renderDebug_ to TRUE (incorrectly). I think the creation of the Boolean is only caring that the string has a value and setting to TRUE.  I'm fixing the container/documentation rather than having container.js interpret both a string and boolean.


Diffs
-----

  trunk/content/README 1642996 
  trunk/content/containers/commoncontainer/assembler.js 1642996 
  trunk/content/containers/embeddedexperiences/EEContainer.js 1642996 

Diff: https://reviews.apache.org/r/28756/diff/


Testing
-------


Thanks,

Doug Davies