home, index, New :: testEdit | Delete

Linking is good: bold Here's a bold snip: Snip2 in da house!

[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:

  1. testing lists
  2. because lists are common things

monkey

what the hell are you looking at?

Beyotch

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?

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: #"interblah_servers", "rack.url_scheme"=>"http", "HTTP_ACCEPT_ENCODING"=>"gzip", "HTTP_USER_AGENT"=>"CCBot/1.0 (+http://www.commoncrawl.org/bot.html)", "PATH_INFO"=>"/test", "rack.run_once"=>false, "rack.input"=>#, "SCRIPT_NAME"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "HTTP_CACHE_CONTROL"=>"no-cache", "HTTP_ACCEPT_LANGUAGE"=>"en-us,en;q=0.5", "HTTP_HOST"=>"interblah_servers", "rack.errors"=>#, "REMOTE_ADDR"=>"38.103.63.57", "REQUEST_PATH"=>"/test", "SERVER_SOFTWARE"=>"thin 0.8.1 codename Rebel Porpoise", "rack.request.form_input"=>#, "rack.request.query_hash"=>{}, "HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.7", "HTTP_VERSION"=>"HTTP/1.0", "rack.multithread"=>false, "rack.version"=>[0, 3], "rack.request.form_vars"=>"", "REQUEST_URI"=>"/test", "rack.multiprocess"=>false, "SERVER_PORT"=>"80", "rack.request.form_hash"=>{}, "rack.request.query_string"=>"", "rack.session.options"=>{:path=>"/", :domain=>nil, :key=>"vanilla.session", :expire_after=>2592000}, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.2", "HTTP_PRAGMA"=>"no-cache", "rack.session"=>{}, "HTTP_ACCEPT"=>"Accept: application/xhtml+xml,text/html;q=0.9,text/plain;", "HTTP_X_FORWARDED_FOR"=>"38.103.63.57", "HTTP_CONNECTION"=>"close", "HTTP_X_REAL_IP"=>"38.103.63.57", "REQUEST_METHOD"=>"GET"}>, @part=nil, @symbolised_params={}, @snip_name="test">

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

  1. James (2008-06-03 22:49:44)

    test comment
  2. Not Logged In (2008-06-03 22:50:32)

    I'm not logged in, but I can still comment.

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