This file is indexed.

/usr/share/doc/ruby-ramaze/examples/app/whywiki/start.rb is in ruby-ramaze 2012.12.08-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# written as an example of how to implement the minimal _why wiki

require 'rubygems'
require 'ramaze'
require 'bluecloth'

Db = Ramaze::YAMLStoreCache.new('wiki.yaml') unless defined?(Db)

class WikiController < Ramaze::Controller
  map :/

  def index
    redirect R(:show, 'Home')
  end

  def show page = 'Home'
    @page = url_decode(page)
    @text = Db[page].to_s
    @edit_link = "/edit/#{page}"

    @text.gsub!(/\[\[(.*?)\]\]/) do |m|
      exists = Db[$1] ? 'exists' : 'nonexists'
      A($1, :href => Rs(:show, url_encode($1)), :class => exists)
    end

    @text = BlueCloth.new(@text).to_html
  end

  def edit page = 'Home'
    @page = url_decode(page)
    @text = Db[page]
  end

  def save
    redirect_referer unless request.post?

    page = request['page'].to_s
    text = request['text'].to_s

    Db[page] = text

    redirect Rs(:show, url_encode(page))
  end
end

Ramaze.start :adapter => :mongrel