fast_spork_runner 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc ADDED
@@ -0,0 +1,6 @@
1
+ == Fast Spork Runner
2
+
3
+ Run rspec more faster.
4
+
5
+ Inspired by @jugyo
6
+ http://blog.twiwt.org/e/cafcfe
data/bin/spork_runner CHANGED
@@ -17,8 +17,28 @@ rescue DRb::DRbConnError
17
17
  err.puts "No DRb server is running. Running in local process instead ..."
18
18
  end
19
19
 
20
+ RSPEC_CONFIG_FILE = ".rspec"
21
+ def config
22
+ if File.exist?(RSPEC_CONFIG_FILE)
23
+ result = []
24
+ open(RSPEC_CONFIG_FILE) do |f|
25
+ while line = f.gets
26
+ result << to_argument(line)
27
+ end
28
+ end
29
+ result.flatten
30
+ else
31
+ ["--color", "--debug", "--format", "s"]
32
+ end
33
+ end
34
+ def to_argument(line)
35
+ return line.chomp.split(" ") if line =~ /^(--format)/
36
+ return line.chomp
37
+ end
38
+
39
+
20
40
  def rspec(file)
21
- $spec_server.run(["--color", "--format", "s", file], STDERR, STDOUT)
41
+ $spec_server.run(config << file, STDERR, STDOUT)
22
42
  end
23
43
 
24
44
  puts <<DESC
@@ -28,4 +48,4 @@ Example:
28
48
 
29
49
  DESC
30
50
 
31
- IRB.start
51
+ IRB.start
@@ -1,3 +1,3 @@
1
1
  module FastSporkRunner
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_spork_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-01 00:00:00.000000000 +09:00
12
+ date: 2012-01-06 00:00:00.000000000 +09:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: Exec rspec more faster
@@ -22,6 +22,7 @@ extra_rdoc_files: []
22
22
  files:
23
23
  - .gitignore
24
24
  - Gemfile
25
+ - README.rdoc
25
26
  - Rakefile
26
27
  - bin/spork_runner
27
28
  - fast_spork_runner.gemspec