interblah.net » conflagration over configuration
Linking is good: bold Here's a bold snip: Snip2 in da house!
- Here's a random number between 5 and 15: 10
- Here's a random number between 1 and 90 (the default min): 58
- Here's a random number between 1 and 100 (the default range): 23
[Error rendering 'random-line-from' - "undefined method `content' for nil:NilClass"] random-line-from:4:in `handle' ./lib/vanilla/renderers/ruby.rb:31:in `process_text' ./lib/vanilla/renderers/base.rb:62:in `render_without_including_snips' ./lib/vanilla/renderers/base.rb:51:in `render' ./lib/vanilla/app.rb:46:in `render' ./lib/vanilla/app.rb:68:in `rendering' ./lib/vanilla/app.rb:45:in `render' ./lib/vanilla/renderers/base.rb:41:in `include_snips' ./lib/vanilla/renderers/base.rb:31:in `gsub' ./lib/vanilla/renderers/base.rb:31:in `include_snips' ./lib/vanilla/renderers/base.rb:52:in `render' ./lib/vanilla/app.rb:46:in `render' ./lib/vanilla/app.rb:68:in `rendering' ./lib/vanilla/app.rb:45:in `render' ./lib/vanilla/dynasnips/current_snip.rb:25:in `handle' ./lib/vanilla/renderers/ruby.rb:31:in `process_text' ./lib/vanilla/renderers/base.rb:62:in `render_without_including_snips' ./lib/vanilla/renderers/base.rb:51:in `render' ./lib/vanilla/app.rb:46:in `render' ./lib/vanilla/app.rb:68:in `rendering' ./lib/vanilla/app.rb:45:in `render' ./lib/vanilla/renderers/base.rb:41:in `include_snips' ./lib/vanilla/renderers/base.rb:31:in `gsub' ./lib/vanilla/renderers/base.rb:31:in `include_snips' ./lib/vanilla/renderers/base.rb:52:in `render' ./lib/vanilla/app.rb:26:in `present' ./lib/vanilla/rack_app.rb:24:in `call' /usr/lib/ruby/gems/1.8/gems/rack-0.4.0/lib/rack/static.rb:33:in `call' /usr/lib/ruby/gems/1.8/gems/rack-0.4.0/lib/rack/session/cookie.rb:30:in `call' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/connection.rb:59:in `pre_process' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/connection.rb:50:in `process' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/connection.rb:35:in `receive_data' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:224:in `run_machine' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:224:in `run' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/backends/base.rb:45:in `start' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/server.rb:146:in `start' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/controllers/controller.rb:79:in `start' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:166:in `send' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:166:in `run_command' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:136:in `run!' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/bin/thin:6 /usr/bin/thin:19:in `load' /usr/bin/thin:19
And lets include some textile:
- testing lists
- because lists are common things
monkey
what the hell are you looking at?
The source for that was
# testing lists # because lists are common things monkey what the *hell* are __you__ looking at? "Beyotch":http://example.com
And lets include some markdown!:
testing header
so, how are you?
- item one
- item two
- item three
what the hell are looking at, beyotch?
The source for that was
# testing header so, how are you? - item one - item two - item three what the *hell* are _looking_ at, [beyotch](http://example.com)?
How about some debug information: #
What about a missing snip? Lets try to include one: [snip 'monkey' cannot be found]
And an error when running?
[Error rendering 'bad_dynasnip' - "Oh no"] bad_dynasnip:4:in `get' ./lib/vanilla/renderers/ruby.rb:29:in `send' ./lib/vanilla/renderers/ruby.rb:29:in `process_text' ./lib/vanilla/renderers/base.rb:62:in `render_without_including_snips' ./lib/vanilla/renderers/base.rb:51:in `render' ./lib/vanilla/app.rb:46:in `render' ./lib/vanilla/app.rb:68:in `rendering' ./lib/vanilla/app.rb:45:in `render' ./lib/vanilla/renderers/base.rb:41:in `include_snips' ./lib/vanilla/renderers/base.rb:31:in `gsub' ./lib/vanilla/renderers/base.rb:31:in `include_snips' ./lib/vanilla/renderers/base.rb:52:in `render' ./lib/vanilla/app.rb:46:in `render' ./lib/vanilla/app.rb:68:in `rendering' ./lib/vanilla/app.rb:45:in `render' ./lib/vanilla/dynasnips/current_snip.rb:25:in `handle' ./lib/vanilla/renderers/ruby.rb:31:in `process_text' ./lib/vanilla/renderers/base.rb:62:in `render_without_including_snips' ./lib/vanilla/renderers/base.rb:51:in `render' ./lib/vanilla/app.rb:46:in `render' ./lib/vanilla/app.rb:68:in `rendering' ./lib/vanilla/app.rb:45:in `render' ./lib/vanilla/renderers/base.rb:41:in `include_snips' ./lib/vanilla/renderers/base.rb:31:in `gsub' ./lib/vanilla/renderers/base.rb:31:in `include_snips' ./lib/vanilla/renderers/base.rb:52:in `render' ./lib/vanilla/app.rb:26:in `present' ./lib/vanilla/rack_app.rb:24:in `call' /usr/lib/ruby/gems/1.8/gems/rack-0.4.0/lib/rack/static.rb:33:in `call' /usr/lib/ruby/gems/1.8/gems/rack-0.4.0/lib/rack/session/cookie.rb:30:in `call' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/connection.rb:59:in `pre_process' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/connection.rb:50:in `process' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/connection.rb:35:in `receive_data' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:224:in `run_machine' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:224:in `run' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/backends/base.rb:45:in `start' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/server.rb:146:in `start' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/controllers/controller.rb:79:in `start' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:166:in `send' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:166:in `run_command' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:136:in `run!' /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/bin/thin:6 /usr/bin/thin:19:in `load' /usr/bin/thin:19
7 comments for test-commenting
Comments
And some sweet syntax highlighting!
# If we build our ActiveRecord objects from attributes that had *real* classes, we could
# define the validation, and any other behaviour, in that attribute class. Would this
# make things like "blog url", "name", and "address" reusable?
composed_of EditorialSummary, :called => :editorial_summary
composed_of Url, :called => :image_url
composed_of Address, :something => [:address_line_1, :address_line_2, :postcode, :country]
class EditorialSummary < Attribute
def initialize(string)
@string = string
end
def paragraphs
@string.split(/\n\s*\n/m)
end
def valid?
# whatever
end
end
def editorial_summary
EditorialSummary.new(super)
end
James (2008-06-03 22:49:44)
Not Logged In (2008-06-03 22:50:32)