public
Description: Gitorious aims to provide a great way of doing distributed opensource code collaboration.
Homepage: http://gitorious.org/projects/gitorious
Clone URL: git://github.com/dysinger/gitorious.git
Search Repo:
added spec dirs +files
Johan Sørensen (author)
Tue Aug 14 14:51:28 -0700 2007
commit  79298a5679a708bc2e950acd301b41898efedc78
tree    e757e33a3ab7a76884c83ea97e798b35d217d7df
parent  7456e876c1f7dddf4e5457d8470fe781171b31a3
...
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
0
@@ -0,0 +1,7 @@
0
+# This file is autogenerated. Instead of editing this file, please use the
0
+# migrations feature of ActiveRecord to incrementally modify your database, and
0
+# then regenerate this schema definition.
0
+
0
+ActiveRecord::Schema.define() do
0
+
0
+end
...
 
 
 
 
...
1
2
3
4
0
@@ -0,0 +1,4 @@
0
+#!/usr/bin/env ruby
0
+$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib"))
0
+require 'spec'
0
+::Spec::Runner::CommandLine.run(ARGV, STDERR, STDOUT, true, true)
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
0
@@ -0,0 +1,86 @@
0
+#!/usr/bin/env ruby
0
+$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../rspec/lib' # For svn
0
+$LOAD_PATH.unshift File.dirname(__FILE__) + '/../vendor/plugins/rspec/lib' # For rspec installed as plugin
0
+require 'rubygems'
0
+require 'drb/drb'
0
+require 'rbconfig'
0
+require 'spec'
0
+require 'optparse'
0
+specmate = ENV['HOME'] + "/Library/Application\ Support/TextMate/Bundles/RSpec.tmbundle/Support/lib"
0
+if File.directory?(specmate)
0
+ $LOAD_PATH.unshift(specmate)
0
+ require 'text_mate_formatter'
0
+end
0
+
0
+# This is based on Florian Weber's TDDMate
0
+
0
+module Spec
0
+ module Runner
0
+ class RailsSpecServer
0
+ def run(args, stderr, stdout)
0
+   $stdout = stdout
0
+   $stderr = stderr
0
+
0
+ ::Dispatcher.reset_application!
0
+ ::Dependencies.mechanism = :load
0
+ require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)
0
+ load File.dirname(__FILE__) + '/../spec/spec_helper.rb'
0
+
0
+ ::Spec::Runner::CommandLine.run(args, stderr, stdout, false, true)
0
+ end
0
+ end
0
+ end
0
+end
0
+puts "Loading Rails environment"
0
+
0
+ENV["RAILS_ENV"] = "test"
0
+require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
0
+require 'dispatcher'
0
+
0
+def restart_test_server
0
+ puts "restarting"
0
+ config = ::Config::CONFIG
0
+ ruby = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT']
0
+ command_line = [ruby, $0, ARGV].flatten.join(' ')
0
+ exec(command_line)
0
+end
0
+
0
+def daemonize(pid_file = nil)
0
+ return yield if $DEBUG
0
+ pid = Process.fork{
0
+ Process.setsid
0
+ Dir.chdir(RAILS_ROOT)
0
+ trap("SIGINT"){ exit! 0 }
0
+ trap("SIGTERM"){ exit! 0 }
0
+ trap("SIGHUP"){ restart_test_server }
0
+ File.open("/dev/null"){|f|
0
+ STDERR.reopen f
0
+ STDIN.reopen f
0
+ STDOUT.reopen f
0
+ }
0
+ yield
0
+ }
0
+ puts "spec_server launched. (PID: %d)" % pid
0
+ File.open(pid_file,"w"){|f| f.puts pid } if pid_file
0
+ exit! 0
0
+end
0
+
0
+options = Hash.new
0
+opts = OptionParser.new
0
+opts.on("-d", "--daemon"){|v| options[:daemon] = true }
0
+opts.on("-p", "--pid PIDFILE"){|v| options[:pid] = v }
0
+opts.parse!(ARGV)
0
+
0
+puts "Ready"
0
+exec_server = lambda {
0
+ trap("USR2") { restart_test_server } if Signal.list.has_key?("USR2")
0
+ DRb.start_service("druby://localhost:8989", Spec::Runner::RailsSpecServer.new)
0
+ DRb.thread.join
0
+}
0
+
0
+if options[:daemon]
0
+ daemonize(options[:pid], &exec_server)
0
+else
0
+ exec_server.call
0
+end
0
+
...
 
 
 
 
 
 
...
1
2
3
4
5
6
0
@@ -0,0 +1,6 @@
0
+--colour
0
+--format
0
+progress
0
+--loadby
0
+mtime
0
+--reverse
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0
@@ -0,0 +1,23 @@
0
+# This file is copied to ~/spec when you run 'ruby script/generate rspec'
0
+# from the project root directory.
0
+ENV["RAILS_ENV"] = "test"
0
+require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
0
+require 'spec/rails'
0
+
0
+Spec::Runner.configure do |config|
0
+ config.use_transactional_fixtures = true
0
+ config.use_instantiated_fixtures = false
0
+ config.fixture_path = RAILS_ROOT + '/spec/fixtures'
0
+
0
+ # You can declare fixtures for each behaviour like this:
0
+ # describe "...." do
0
+ # fixtures :table_a, :table_b
0
+ #
0
+ # Alternatively, if you prefer to declare them only once, you can
0
+ # do so here, like so ...
0
+ #
0
+ # config.global_fixtures = :table_a, :table_b
0
+ #
0
+ # If you declare global fixtures, be aware that they will be declared
0
+ # for all of your examples, even those that don't use them.
0
+end

Comments

    No one has commented yet.