This project is archived and is in readonly mode.

#926 ✓resolved
Matthew M. Boedicker

Add support for xml processing instructions in atom_feed_helper

Reported by Matthew M. Boedicker | August 28th, 2008 @ 05:36 PM | in 2.x

Add the ability to put XML processing instructions at the top of XML generated by atom feed helper.

Comments and changes to this ticket

  • Pratik

    Pratik August 30th, 2008 @ 04:41 PM

    • Title changed from “add support for xml processing instructions in atom_feed_helper” to “Add support for xml processing instructions in atom_feed_helper”
    • Tag changed from patch to actionpack, enhancement, patch, tests

    I think it should be use hash format :

    
    :instruct => { :target => {attribute => value} }
    
  • Deleted User

    Deleted User August 31st, 2008 @ 04:19 AM

    I've never done this, but there might be a case where you would want two processing instructions with the same target.

  • DHH

    DHH September 10th, 2008 @ 05:48 AM

    • State changed from “new” to “incomplete”

    In that case, the array should be at the target level, not the instruct level. target => [{attribute => value}, {attribute => value}]. Both forms should be taken, though. Since the normal way is not to have two targets.

  • Deleted User

    Deleted User September 10th, 2008 @ 07:45 AM

    New patch that takes :instruct argument as

    {target => {attribute => value}}

    or

    {target => [{attribute => value}, {attribute => value}]}

  • Deleted User
  • Pratik

    Pratik September 27th, 2008 @ 08:45 PM

    • State changed from “incomplete” to “open”
    • Assigned user set to “Pratik”
  • Pratik

    Pratik October 4th, 2008 @ 03:15 PM

    • State changed from “open” to “incomplete”

    Looks nice. But I'm getting one test failure :

    
      1) Failure:
    test_feed_xml_processing_instructions_duplicate_targets(AtomFeedTest)
        [template/atom_feed_helper_test.rb:244:in `test_feed_xml_processing_instructions_duplicate_targets'
         template/atom_feed_helper_test.rb:254:in `with_restful_routing'
         ./../lib/action_controller/test_process.rb:508:in `with_routing'
         template/atom_feed_helper_test.rb:250:in `with_restful_routing'
         template/atom_feed_helper_test.rb:241:in `test_feed_xml_processing_instructions_duplicate_targets'
         ./../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
         ./../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run']:
    <"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<?target1 a=\"1\" b=\"2\"?>\n<?target1 d=\"4\" c=\"3\"?>\n<feed xml:lang=\"en-US\" xmlns=\"http://www.w3.org/2005/Atom\">\n  <id>tag:www.nextangle.com,2008:/scrolls?id=feed_with_xml_processing_instructions_duplicate_targets</id>\n  <link type=\"text/html\" rel=\"alternate\" href=\"http://www.nextangle.com\"/>\n  <link type=\"application/atom+xml\" rel=\"self\" href=\"http://www.nextangle.com/scrolls?id=feed_with_xml_processing_instructions_duplicate_targets\"/>\n  <title>My great blog!</title>\n  <updated>2007-12-12T15:00:00Z</updated>\n  <entry>\n    <id>tag:www.nextangle.com,2008:Scroll/1</id>\n    <published>2007-12-12T15:00:00Z</published>\n    <updated>2007-12-12T15:00:00Z</updated>\n    <link type=\"text/html\" rel=\"alternate\" href=\"http://www.nextangle.com/scrolls/1\"/>\n    <title>Hello One</title>\n    <content type=\"html\">Something &lt;i&gt;COOL!&lt;/i&gt;</content>\n    <author>\n      <name>DHH</name>\n    </author>\n  </entry>\n  <entry>\n    <id>tag:www.nextangle.com,2008:Scroll/2</id>\n    <updated>2007-12-12T15:00:00Z</updated>\n    <link type=\"text/html\" rel=\"alternate\" href=\"http://www.nextangle.com/scrolls/2\"/>\n    <title>Hello Two</title>\n    <content type=\"html\">Something Boring</content>\n    <author>\n      <name>DHH</name>\n    </author>\n  </entry>\n</feed>\n"> expected to be =~
    </<\?target1 c="3" d="4"\?>/>.
    
  • Deleted User

    Deleted User October 4th, 2008 @ 06:57 PM

    Fixed. I was relying on the order of the hash in the test.

  • Repository

    Repository October 13th, 2008 @ 05:48 PM

    • State changed from “incomplete” to “resolved”

    (from [42cbd710bb116998f92029adacb45698905a2e3b]) Add support for xml processing instructions in atom_feed_helper [#926 state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages