[Radiant] trouble packaging extension as gem
i'm at loss now for why it's not appearing in the drop down when loaded as a gem. no errors or anything unusual just a missing filter. I'm actually at a loss as to why it would appear when vendored if you're not explicitly loading that subclass. Radiant doesn't do any pre-loading of filter subclasses in the way that it automatically seeks out and loads Page subclasses. If you look at the textile and markdown extensions that ship within core, you'll see that both of them explicitly load the filter subclass within their #activate methods. It'll be safer to follow their example. j ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] trouble packaging extension as gem
On Tue, Jan 26, 2010 at 8:32 AM, Josh French j...@digitalpulp.com wrote: i'm at loss now for why it's not appearing in the drop down when loaded as a gem. no errors or anything unusual just a missing filter. I'm actually at a loss as to why it would appear when vendored if you're not explicitly loading that subclass. Radiant doesn't do any pre-loading of filter subclasses in the way that it automatically seeks out and loads Page subclasses. If you look at the textile and markdown extensions that ship within core, you'll see that both of them explicitly load the filter subclass within their #activate methods. It'll be safer to follow their example. huh? so you mean this: --- require 'kramdown' class KramdownFilterExtension Radiant::Extension version 1.0 description kramdown is a fast pure-Ruby Markdown converter. url http://kramdown.rubyforge.org/index.html; def activate KramdownFilter end end --- is not explicitly enough? i can't see how that is any different to what the markdown or textile extensions do but i guess it's not. could someone explain how to make it explicit enough for the gem loader? textile_filter --- class TextileFilterExtension Radiant::Extension version 1.0 description Allows you to compose page parts or snippets using the Textile text filter. url http://textism.com/tools/textile/; def activate TextileFilter Page.send :include, TextileTags end end --- markdown_filter --- class MarkdownFilterExtension Radiant::Extension version 1.0 description Allows you to compose page parts or snippets using the Markdown or SmartyPants text filters. url http://daringfireball.net/projects/markdown/; def activate MarkdownFilter SmartyPantsFilter Page.send :include, MarkdownTags end end --- ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] trouble packaging extension as gem
just noticed that extracting the textile_filter extension out into a gem also fails in the exact same ways that i've run into... On Tue, Jan 26, 2010 at 9:13 AM, john muhl johnm...@gmail.com wrote: On Tue, Jan 26, 2010 at 8:32 AM, Josh French j...@digitalpulp.com wrote: i'm at loss now for why it's not appearing in the drop down when loaded as a gem. no errors or anything unusual just a missing filter. I'm actually at a loss as to why it would appear when vendored if you're not explicitly loading that subclass. Radiant doesn't do any pre-loading of filter subclasses in the way that it automatically seeks out and loads Page subclasses. If you look at the textile and markdown extensions that ship within core, you'll see that both of them explicitly load the filter subclass within their #activate methods. It'll be safer to follow their example. or are you talking about this not being explicit enough? --- class KramdownFilter TextFilter description_file File.dirname(__FILE__) + /../markdown.html def filter(text) Kramdown::Document.new(RubyPants.new(text).to_html).to_html end end --- textile_filter --- class TextileFilter TextFilter description_file File.dirname(__FILE__) + /../textile.html def filter(text) RedCloth.new(text).to_html end end --- markdown_filter --- class MarkdownFilter TextFilter description_file File.dirname(__FILE__) + /../markdown.html def filter(text) if defined? RDiscount RDiscount.new(text, :smart).to_html else RubyPants.new(BlueCloth.new(text).to_html).to_html end end end --- again looks the same to me. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
[Radiant] Images in extension registry
Hi folks, I've just got round to posting images for each of my entries in the extension registry. You should do the same! http://ext.radiantcms.org/authors/18-drew-neil That's all. Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
[Radiant] comments and Nokogiri
I'm trying to use comments with radiant 0.8.1 and I get error when I post a comment. Not sure how to fix this: Processing CommentsController#create (for 70.184.255.186 at 2010-01-26 18:11:07) [POST] Parameters: {submit=Save Comment, url=[phxated, a-few- notes-about-the-arizona-republic], action=create, controller=comments, comment={filter_id=Markdown, author=steven Southard, valid_spam_answer=c395246f710b0e2c86b7ed82f7f56ce3, content=testing, author_email=stevensouth...@mac.com, spam_answer=thursday, author_url=}} NameError (uninitialized constant Nokogiri::HTML::DocumentFragment): sanitize (1.1.0) [v] lib/sanitize.rb:59:in `clean!' sanitize (1.1.0) [v] lib/sanitize.rb:53:in `clean' sanitize (1.1.0) [v] lib/sanitize.rb:147:in `clean' vendor/extensions/comments/app/models/comment.rb:82:in `apply_filter' vendor/extensions/comments/app/controllers/comments_controller.rb: 18:in `create' vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in `process' Rendering /users/home/stevenso/domains/phxated.com/radiant/public/ 500.html (500 Internal Server Error) ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
[Radiant] trouble packaging extension as gem
def activate KramdownFilter end is not explicitly enough? Sorry, misread your post. Yes, this is correct, and you shouldn't need to do anything else. just noticed that extracting the textile_filter extension out into a gem also fails in the exact same ways that i've run into... I'll investigate. Thanks for giving the new extension system a thorough test-drive! j ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] Images in extension registry
On 27/1/2010 2:05 AM, Andrew Neil wrote: Hi folks, I've just got round to posting images for each of my entries in the extension registry. You should do the same! http://ext.radiantcms.org/authors/18-drew-neil That's all. Drew IN response to this post, I went to the website to see what you meant... and it reminded me how useful your extensions are. Thanks! That's all. Cheers, Mohit. 27/1/2010 | 8:25 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] comments and Nokogiri
So does this mean that Nokogiri is required? That'd be fine because it's already loaded as a gem. Does it also have to be configured? What is going on here? Why was Sanitize added? Is this a problem using a modern version of comments with 0.8.1? Maybe I installed improperly? On Jan 26, 2010, at 12:20 PM, Steven Southard wrote: I'm trying to use comments with radiant 0.8.1 and I get error when I post a comment. Not sure how to fix this: Processing CommentsController#create (for 70.184.255.186 at 2010-01-26 18:11:07) [POST] Parameters: {submit=Save Comment, url=[phxated, a-few- notes-about-the-arizona-republic], action=create, controller=comments, comment={filter_id=Markdown, author=steven Southard, valid_spam_answer=c395246f710b0e2c86b7ed82f7f56ce3, content=testing, author_email=stevensouth...@mac.com, spam_answer=thursday, author_url=}} NameError (uninitialized constant Nokogiri::HTML::DocumentFragment): sanitize (1.1.0) [v] lib/sanitize.rb:59:in `clean!' sanitize (1.1.0) [v] lib/sanitize.rb:53:in `clean' sanitize (1.1.0) [v] lib/sanitize.rb:147:in `clean' vendor/extensions/comments/app/models/comment.rb:82:in `apply_filter' vendor/extensions/comments/app/controllers/comments_controller.rb: 18:in `create' vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in `process' Rendering /users/home/stevenso/domains/phxated.com/radiant/public/ 500.html (500 Internal Server Error) ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org