This file is indexed.

/usr/lib/ruby/1.9.1/ramaze/spec.rb is in libramaze-ruby1.9.1 2010.06.18-2.

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
require File.expand_path('../', __FILE__) unless defined?(Ramaze)

def spec_requires(*libs)
  spec_precondition 'require' do
    libs.each{|lib| require(lib) }
  end
end
alias spec_require spec_requires

def spec_precondition(name)
  yield
rescue LoadError => ex
  puts "Spec require: %p failed: %p" % [name, ex.message]
  exit 0
rescue Exception => ex
  puts "Spec precondition: %p failed: %p" % [name, ex.message]
  exit 0
end

module Ramaze
  Mock::OPTIONS[:app] = Ramaze

  middleware!(:spec){|m| m.run(AppMap) }
end

# FIXME: will remove that in 2009.07, and then we can offer integration with
#        any other test-framework we like and they can share this code.
#        Then Ramaze can be:
#          Any ruby, any ORM, any templating-engine, any test-framework
unless defined?(Bacon)
  Ramaze.deprecated "require('ramaze/spec')", "require('ramaze/spec/bacon')"
  require 'ramaze/spec/bacon'
end