tork 19.0.2 → 19.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.markdown CHANGED
@@ -1,3 +1,17 @@
1
+ ## Version 19.1.0 (2012-12-12)
2
+
3
+ Minor:
4
+
5
+ * tork-driver: don't run overhead files as test files
6
+
7
+ Patch:
8
+
9
+ * rails: run dependent tests when `app/views/*` change
10
+
11
+ * Clear FactoryGirl sequences and traits on fork (Ryan Ahearn)
12
+
13
+ * server: fix clean up of socket files upon exit
14
+
1
15
  ## Version 19.0.2 (2012-11-07)
2
16
 
3
17
  Patch:
data/LICENSE CHANGED
@@ -20,6 +20,7 @@ Thanks to 2012 NagaChaitanya Vellanki <https://github.com/chaitanyav>
20
20
  Thanks to 2012 Ohno Shin'ichi <https://github.com/shin1ohno>
21
21
  Thanks to 2012 Adam Grant <https://github.com/harmon>
22
22
  Thanks to 2012 Kyle Peyton <https://github.com/weexpectedthis>
23
+ Thanks to 2012 Ryan Ahearn <https://github.com/rahearn>
23
24
 
24
25
  Permission to use, copy, modify, and/or distribute this software for any
25
26
  purpose with or without fee is hereby granted, provided that the above
data/bin/tork CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # TORK 1 2012-11-07 19.0.2
4
+ # TORK 1 2012-12-12 19.1.0
5
5
 
6
6
  ## NAME
7
7
 
data/bin/tork-driver CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # TORK-DRIVER 1 2012-11-07 19.0.2
4
+ # TORK-DRIVER 1 2012-12-12 19.1.0
5
5
 
6
6
  ## NAME
7
7
 
data/bin/tork-engine CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # TORK-ENGINE 1 2012-11-07 19.0.2
4
+ # TORK-ENGINE 1 2012-12-12 19.1.0
5
5
 
6
6
  ## NAME
7
7
 
data/bin/tork-herald CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # TORK-HERALD 1 2012-11-07 19.0.2
4
+ # TORK-HERALD 1 2012-12-12 19.1.0
5
5
 
6
6
  ## NAME
7
7
 
data/bin/tork-master CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # TORK-MASTER 1 2012-11-07 19.0.2
4
+ # TORK-MASTER 1 2012-12-12 19.1.0
5
5
 
6
6
  ## NAME
7
7
 
data/bin/tork-notify CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # TORK-NOTIFY 1 2012-11-07 19.0.2
4
+ # TORK-NOTIFY 1 2012-12-12 19.1.0
5
5
 
6
6
  ## NAME
7
7
 
@@ -1,2 +1,4 @@
1
1
  require 'factory_girl'
2
2
  FactoryGirl.factories.clear
3
+ FactoryGirl.sequences.clear
4
+ FactoryGirl.traits.clear
@@ -1,9 +1,9 @@
1
1
  require 'active_support/inflector'
2
2
 
3
3
  Tork::Driver::REABSORB_FILE_GREPS.push(
4
- %r{^config/.+\.(rb|yml)$},
5
- %r{^db/schema\.rb$},
6
- %r{^Gemfile\.lock$}
4
+ %r{^config/.+\.(rb|ya?ml)$},
5
+ 'db/schema.rb',
6
+ 'Gemfile.lock'
7
7
  )
8
8
 
9
9
  Tork::Driver::TEST_FILE_GLOBBERS.update(
@@ -11,5 +11,11 @@ Tork::Driver::TEST_FILE_GLOBBERS.update(
11
11
  single = matches[2]
12
12
  plural = ActiveSupport::Inflector.pluralize(single)
13
13
  "{test,spec}/**/{#{single},#{plural}_*}_{test,spec}.rb"
14
+ end,
15
+
16
+ %r{^app/views/(.+)/} => lambda do |matches|
17
+ plural = File.basename(matches[1])
18
+ single = ActiveSupport::Inflector.singularize(plural)
19
+ "{test,spec}/**/{#{single},#{plural}_*}_{test,spec}.rb"
14
20
  end
15
21
  )
data/lib/tork/driver.rb CHANGED
@@ -29,7 +29,7 @@ class Driver < Server
29
29
  if all_test_files.empty?
30
30
  tell @client, 'There are no test files to run.'
31
31
  else
32
- run_test_files all_test_files
32
+ run_non_overhead_test_files all_test_files
33
33
  end
34
34
  end
35
35
 
@@ -52,19 +52,11 @@ protected
52
52
  when @herald
53
53
  message.each do |changed_file|
54
54
  # reabsorb text execution overhead if overhead files changed
55
- overhead_changed = REABSORB_FILE_GREPS.any? do |pattern|
56
- if pattern.kind_of? Regexp
57
- pattern =~ changed_file
58
- else
59
- pattern == changed_file
60
- end
61
- end
62
-
63
- if overhead_changed
55
+ if overhead_file? changed_file
64
56
  send @clients, [:reabsorb, changed_file]
65
57
  reabsorb_overhead
66
58
  else
67
- run_test_files find_dependent_test_files(changed_file).to_a
59
+ run_non_overhead_test_files find_dependent_test_files(changed_file)
68
60
  end
69
61
  end
70
62
 
@@ -75,6 +67,20 @@ protected
75
67
 
76
68
  private
77
69
 
70
+ def run_non_overhead_test_files test_files
71
+ run_test_files test_files.reject {|f| overhead_file? f }
72
+ end
73
+
74
+ def overhead_file? file
75
+ REABSORB_FILE_GREPS.any? do |pattern|
76
+ if pattern.kind_of? Regexp
77
+ pattern =~ file
78
+ else
79
+ pattern == file
80
+ end
81
+ end
82
+ end
83
+
78
84
  def find_dependent_test_files source_file, results=Set.new
79
85
  TEST_FILE_GLOBBERS.each do |regexp, globber|
80
86
  if regexp =~ source_file and globs = globber.call($~)
data/lib/tork/server.rb CHANGED
@@ -42,7 +42,7 @@ class Server
42
42
  end
43
43
  ensure
44
44
  # UNIX domain socket files are not deleted automatically upon closing
45
- File.delete server.path if server
45
+ File.delete server.path
46
46
  end
47
47
 
48
48
  def quit
data/lib/tork/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tork
2
- VERSION = "19.0.2"
2
+ VERSION = "19.1.0"
3
3
  end
@@ -1,4 +1,4 @@
1
- .TH TORK\-DRIVER 1 2012\-11\-07 19.0.2
1
+ .TH TORK\-DRIVER 1 2012\-12\-12 19.1.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork\-driver \- drives
@@ -1,4 +1,4 @@
1
- .TH TORK\-ENGINE 1 2012\-11\-07 19.0.2
1
+ .TH TORK\-ENGINE 1 2012\-12\-12 19.1.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork\-engine \- wraps
@@ -1,4 +1,4 @@
1
- .TH TORK\-HERALD 1 2012\-11\-07 19.0.2
1
+ .TH TORK\-HERALD 1 2012\-12\-12 19.1.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork\-herald \- reports modified files
@@ -1,4 +1,4 @@
1
- .TH TORK\-MASTER 1 2012\-11\-07 19.0.2
1
+ .TH TORK\-MASTER 1 2012\-12\-12 19.1.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork\-master \- absorbs overhead and runs tests
@@ -1,4 +1,4 @@
1
- .TH TORK\-NOTIFY 1 2012\-11\-07 19.0.2
1
+ .TH TORK\-NOTIFY 1 2012\-12\-12 19.1.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork\-notify \- notifies you of test status changes
data/man/man1/tork.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH TORK 1 2012\-11\-07 19.0.2
1
+ .TH TORK 1 2012\-12\-12 19.1.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork \- Continuous testing tool for Ruby
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tork
3
3
  version: !ruby/object:Gem::Version
4
- version: 19.0.2
4
+ version: 19.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-07 00:00:00.000000000 Z
13
+ date: 2012-12-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: binman
@@ -184,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  segments:
186
186
  - 0
187
- hash: 4253367635986543475
187
+ hash: -3346903555723443999
188
188
  required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  none: false
190
190
  requirements:
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  segments:
195
195
  - 0
196
- hash: 4253367635986543475
196
+ hash: -3346903555723443999
197
197
  requirements: []
198
198
  rubyforge_project:
199
199
  rubygems_version: 1.8.23