multitest 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,9 @@ If you depend on fixture data in your database, you may have data inconsistency
10
10
 
11
11
  == Installation
12
12
 
13
- gem install ngauthier-multitest
13
+ You will need to have Gemcutter[http://gemcutter.org/] in your list of gem sources.
14
+
15
+ gem install multitest
14
16
 
15
17
  == Usage
16
18
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
@@ -1,2 +1 @@
1
1
  require File.join(File.dirname(__FILE__), 'multitest', 'multitest.rb')
2
- #require File.join(File.dirname(__FILE__), 'multitest', 'tasks.rb')
@@ -17,7 +17,9 @@ class Multitest
17
17
  # :files => files to test
18
18
  # :cores => number of cores to use
19
19
  def initialize(files, cores = Multitest.cores)
20
- @files = files
20
+ @files = files.sort do |a,b|
21
+ File.size(b) <=> File.size(a)
22
+ end
21
23
  @cores = cores
22
24
  @children = []
23
25
  @threads = []
@@ -1,8 +1,19 @@
1
1
  module Multitest::Tasks
2
2
  desc "Test all your code in parallel"
3
- task :multitest => ['multitest:units', 'multitest:functionals', 'multitest:integration']
3
+ task :multitest => ['multitest:all']
4
4
 
5
5
  namespace :multitest do
6
+ desc "Test all your code in parallel"
7
+ task :all => [:environment] do
8
+ files = []
9
+ files += Dir.glob('test/unit/**/*_test.rb')
10
+ files += Dir.glob('test/functional/**/*_test.rb')
11
+ files += Dir.glob('test/integration/**/*_test.rb')
12
+ $stderr.write "Running multitest:all\n"
13
+ Multitest.new(files).run
14
+ $stderr.write "Completed multitest:all\n\n"
15
+ end
16
+
6
17
  desc "Multi-core test:units"
7
18
  task :units => [:environment] do
8
19
  pattern = 'test/unit/**/*_test.rb'
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{multitest}
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Gauthier"]
12
- s.date = %q{2009-09-25}
12
+ s.date = %q{2010-01-18}
13
13
  s.description = %q{Run your tests across multiple cores automatically.}
14
14
  s.email = %q{nick@smartlogicsolutions.com}
15
15
  s.extra_rdoc_files = [
@@ -24,14 +24,9 @@ Gem::Specification.new do |s|
24
24
  "Rakefile",
25
25
  "VERSION",
26
26
  "lib/multitest.rb",
27
- "lib/multitest.rb",
28
- "lib/multitest/multitest.rb",
29
27
  "lib/multitest/multitest.rb",
30
28
  "lib/multitest/pipe_dream.rb",
31
- "lib/multitest/pipe_dream.rb",
32
29
  "lib/multitest/safe_fork.rb",
33
- "lib/multitest/safe_fork.rb",
34
- "lib/multitest/tasks.rb",
35
30
  "lib/multitest/tasks.rb",
36
31
  "multitest.gemspec",
37
32
  "test/multitest_test.rb",
@@ -64,3 +59,4 @@ Gem::Specification.new do |s|
64
59
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
65
60
  end
66
61
  end
62
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Gauthier
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-25 00:00:00 -04:00
12
+ date: 2010-01-18 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency