You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Padraic Hannon (JIRA)" <ji...@apache.org> on 2007/10/30 18:18:50 UTC

[jira] Created: (SLING-90) Add support for creating Ruby templates

Add support for creating Ruby templates
---------------------------------------

                 Key: SLING-90
                 URL: https://issues.apache.org/jira/browse/SLING-90
             Project: Sling
          Issue Type: Improvement
          Components: microsling
            Reporter: Padraic Hannon


By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-90) Add support for creating Ruby templates

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-90.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

Ruby support has been added so this issue can be closed.

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>         Attachments: clean_up_ruby.patch, ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment: ruby_updated.patch

For some reason all the integration-tests fail for me.

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby.patch, ruby.patch, ruby_updated.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment: ruby_passed_int_tests.patch

just needed to update and rebuild the sling api

all integration tests pass

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-90:
-----------------------------------

    Component/s:     (was: microsling)
                 Scripting

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>         Attachments: clean_up_ruby.patch, ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-90) Add support for creating Ruby templates

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539923 ] 

Bertrand Delacretaz commented on SLING-90:
------------------------------------------

Patch committed in revision 591606, all tests pass.

Shawn, thanks very much for providing a complete patch with tests + docs, that makes the committer's life so much easier!

Two comments:

1) Having to write 

  resource.getItem().getProperty("text").getString()

in Ruby feels weird, I don't know JRuby well but I assume we could provide wrappers to make this more Ruby-like, like the ScriptableNode/ScriptableResource wrappers that Lars provided for javascript.

2) Is there a particular reason to create a PrintStream that eats Exceptions in ErbScriptEngine? All kinds of red lights start blinking in my head when I see this ;-)

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment:     (was: ruby.patch)

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment: clean_up_ruby.patch

cleaned up script syntax and handled swallowed exception

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: clean_up_ruby.patch, ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment: ruby.patch

added ruby support to microsling in the whiteboard repository.

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>         Attachments: ruby.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540222 ] 

ShawnAnderson commented on SLING-90:
------------------------------------

Sorry about the IOException swallowing, that should be changed to just: throw ex;
I can submit another patch for that if you'd like.

As for wrapping the calls, I can do that easily, but I didn't want to have to keep a wrapper up to date.  If you suggest what things to wrap, I can easily do so.  Right now I dynamically add all the keys of props to the ruby class as instance methods so they are accessible from the template.  Adding more is very simple.

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539755 ] 

shawn42 edited comment on SLING-90 at 11/2/07 5:51 PM:
-------------------------------------------------------------

For some reason all the integration-tests fail for me.  I added the file into this patch, I must have missed it when I moved it from whiteboard

      was (Author: shawn42):
    For some reason all the integration-tests fail for me.
  
> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby.patch, ruby.patch, ruby_updated.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment:     (was: ruby.patch)

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-90) Add support for creating Ruby templates

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539626 ] 

Felix Meschberger commented on SLING-90:
----------------------------------------

I applied the patch to my local checkout but the integration test fails because there is no ERB test script. I used the following one, but this did not work:

<%-- used by ScriptedRenderingTest --%>
<html>
	<body>
		Ruby template
		<p><span><%= resource.getItem().getProperty("text").getString() %></span></p>
	</body>
</html>

Could you please provide a script, which works, such that I can complete the integration and close this issue ? Thanks.

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby.patch, ruby.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-90) Add support for creating Ruby templates

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-90:
--------------------------------------

    Assignee: Felix Meschberger

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby.patch, ruby.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment: ruby.patch

updated for microsling-core repos location

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>         Attachments: ruby.patch, ruby.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-90) Add support for creating Ruby templates

Posted by "ShawnAnderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ShawnAnderson updated SLING-90:
-------------------------------

    Attachment:     (was: ruby_updated.patch)

> Add support for creating Ruby templates
> ---------------------------------------
>
>                 Key: SLING-90
>                 URL: https://issues.apache.org/jira/browse/SLING-90
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: ruby_passed_int_tests.patch
>
>
> By adding support for ruby scripted templates microsling could deal with adding dynamic mixins, which is something that java has a hard time with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.