tork 19.1.0 → 19.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/HISTORY.markdown CHANGED
@@ -1,3 +1,19 @@
1
+ ## Version 19.2.0 (2012-12-30)
2
+
3
+ Minor:
4
+
5
+ * Add "devise" configuration helper that adds support for testing Rails
6
+ applications that use the Devise authentication framework. Thanks to Ryan
7
+ Ahearn for this contribution.
8
+
9
+ Patch:
10
+
11
+ * gemspec: upgrade to *listen* 0.7.0 to fix issue #43. Thanks to Ryan
12
+ Ahearn for reporting this issue and helping debug it, and to Thibaud
13
+ Guillaume-Gentil for fixing this issue upstream in the *listen* library.
14
+
15
+ * Fix `undefined method 'path' for nil` error on socket file removal.
16
+
1
17
  ## Version 19.1.0 (2012-12-12)
2
18
 
3
19
  Minor:
@@ -8,7 +24,8 @@ Patch:
8
24
 
9
25
  * rails: run dependent tests when `app/views/*` change
10
26
 
11
- * Clear FactoryGirl sequences and traits on fork (Ryan Ahearn)
27
+ * Clear FactoryGirl sequences and traits on fork in the `factory_girl`
28
+ configuration helper. Thanks to Ryan Ahearn for this contribution.
12
29
 
13
30
  * server: fix clean up of socket files upon exit
14
31
 
data/LICENSE CHANGED
@@ -21,6 +21,7 @@ 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
23
  Thanks to 2012 Ryan Ahearn <https://github.com/rahearn>
24
+ Thanks to 2012 Thibaud Guillaume-Gentil <https://github.com/thibaudgg>
24
25
 
25
26
  Permission to use, copy, modify, and/or distribute this software for any
26
27
  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-12-12 19.1.0
4
+ # TORK 1 2012-12-30 19.2.0
5
5
 
6
6
  ## NAME
7
7
 
@@ -61,6 +61,7 @@ This program can be controlled remotely by multiple tork-remote(1) instances.
61
61
  > See below for complete descriptions of these configuration helpers.
62
62
  >
63
63
  > * rails
64
+ > * devise
64
65
  > * test
65
66
  > * spec
66
67
  > * cucumber
@@ -99,6 +100,9 @@ This program can be controlled remotely by multiple tork-remote(1) instances.
99
100
  > `rails`
100
101
  > Supports the [Ruby on Rails] web framework.
101
102
  >
103
+ > `devise`
104
+ > Supports the [Devise] authentication framework.
105
+ >
102
106
  > `factory_girl`
103
107
  > Supports the [factory_girl] testing library.
104
108
  >
@@ -115,6 +119,7 @@ tork(1), tork-driver(1), tork-master(1)
115
119
  [Ruby on Rails]: http://rubyonrails.org
116
120
  [Cucumber]: https://cukes.info
117
121
  [RSpec]: http://rspec.info
122
+ [Devise]: https://github.com/plataformatec/devise
118
123
 
119
124
  =end =========================================================================
120
125
 
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-12-12 19.1.0
4
+ # TORK-DRIVER 1 2012-12-30 19.2.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-12-12 19.1.0
4
+ # TORK-ENGINE 1 2012-12-30 19.2.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-12-12 19.1.0
4
+ # TORK-HERALD 1 2012-12-30 19.2.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-12-12 19.1.0
4
+ # TORK-MASTER 1 2012-12-30 19.2.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-12-12 19.1.0
4
+ # TORK-NOTIFY 1 2012-12-30 19.2.0
5
5
 
6
6
  ## NAME
7
7
 
@@ -1,4 +1,5 @@
1
1
  ENV['TORK_CONFIGS'] += ':rails' if Dir['script/{rails,console}'].any?
2
+ ENV['TORK_CONFIGS'] += ':devise' if File.exist? 'config/initializers/devise.rb'
2
3
  ENV['TORK_CONFIGS'] += ':test' if File.directory? 'test'
3
4
  ENV['TORK_CONFIGS'] += ':spec' if File.directory? 'spec'
4
5
  ENV['TORK_CONFIGS'] += ':cucumber' if File.directory? 'features'
@@ -0,0 +1,6 @@
1
+ # uncache Rails classes accessed by devise_for() calls in config/routes.rb
2
+ Devise.mappings.each_value do |mapping|
3
+ ActiveSupport::Dependencies.remove_constant mapping.class_name
4
+ ActiveSupport::Dependencies.loaded.delete ActiveSupport::Dependencies.
5
+ search_for_file(mapping.class_name.underscore).gsub(/\.rb\z/, '')
6
+ end
@@ -0,0 +1,5 @@
1
+ # restore Rails classes accessed by devise_for() calls in config/routes.rb
2
+ Devise.mappings.each_value do |mapping|
3
+ # NOTE: constantize() makes Rails find and load misssing class definitions
4
+ mapping.instance_variable_set :@klass, Devise.ref(mapping.class_name.constantize)
5
+ end
@@ -14,8 +14,6 @@ if defined? ActiveRecord::Base
14
14
  {}
15
15
  end
16
16
 
17
- # in-memory databases are an exception; they are simply fork()ed along
18
- if info[:database] != ':memory:'
19
- base.connection.reconnect!
20
- end
17
+ # in-memory databases are private to each process so they're safely fork()ed
18
+ base.connection.reconnect! unless info[:database] == ':memory:'
21
19
  end
data/lib/tork/server.rb CHANGED
@@ -18,12 +18,12 @@ class Server
18
18
 
19
19
  @clients = Set.new.add(STDIN)
20
20
  @servers = Set.new
21
+ @address = Server.address
21
22
  end
22
23
 
23
24
  def loop
24
- server = UNIXServer.open(Server.address)
25
- @servers.add server
26
25
  catch :quit do
26
+ @servers.add server = UNIXServer.open(@address)
27
27
  while @clients.include? STDIN
28
28
  IO.select((@servers + @clients).to_a).first.each do |stream|
29
29
  @client = stream
@@ -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
45
+ File.delete @address if File.socket? @address
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.1.0"
2
+ VERSION = "19.2.0"
3
3
  end
@@ -1,4 +1,4 @@
1
- .TH TORK\-DRIVER 1 2012\-12\-12 19.1.0
1
+ .TH TORK\-DRIVER 1 2012\-12\-30 19.2.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork\-driver \- drives
@@ -1,4 +1,4 @@
1
- .TH TORK\-ENGINE 1 2012\-12\-12 19.1.0
1
+ .TH TORK\-ENGINE 1 2012\-12\-30 19.2.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork\-engine \- wraps
@@ -1,4 +1,4 @@
1
- .TH TORK\-HERALD 1 2012\-12\-12 19.1.0
1
+ .TH TORK\-HERALD 1 2012\-12\-30 19.2.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\-12\-12 19.1.0
1
+ .TH TORK\-MASTER 1 2012\-12\-30 19.2.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\-12\-12 19.1.0
1
+ .TH TORK\-NOTIFY 1 2012\-12\-30 19.2.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\-12\-12 19.1.0
1
+ .TH TORK 1 2012\-12\-30 19.2.0
2
2
  .SH NAME
3
3
  .PP
4
4
  tork \- Continuous testing tool for Ruby
@@ -61,6 +61,8 @@ See below for complete descriptions of these configuration helpers.
61
61
  .IP \(bu 2
62
62
  rails
63
63
  .IP \(bu 2
64
+ devise
65
+ .IP \(bu 2
64
66
  test
65
67
  .IP \(bu 2
66
68
  spec
@@ -115,6 +117,12 @@ testing framework.
115
117
  .UE
116
118
  web framework.
117
119
  .PP
120
+ \fB\fCdevise\fR
121
+ Supports the Devise
122
+ .UR https://github.com/plataformatec/devise
123
+ .UE
124
+ authentication framework.
125
+ .PP
118
126
  \fB\fCfactory_girl\fR
119
127
  Supports the factory_girl
120
128
  .UR https://github.com/thoughtbot/factory_girl
data/tork.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_runtime_dependency 'binman', '~> 3.0'
22
22
  s.add_runtime_dependency 'json', '~> 1.6'
23
- s.add_runtime_dependency 'listen', '~> 0.5'
23
+ s.add_runtime_dependency 'listen', '~> 0.7'
24
24
  s.add_runtime_dependency 'diff-lcs', '~> 1.1'
25
25
  s.add_development_dependency 'md2man', '~> 1.4'
26
26
  s.add_development_dependency 'rake', '~> 0.9.2.2'
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.1.0
4
+ version: 19.2.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-12-12 00:00:00.000000000 Z
13
+ date: 2012-12-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: binman
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '0.5'
54
+ version: '0.7'
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: '0.5'
62
+ version: '0.7'
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: diff-lcs
65
65
  requirement: !ruby/object:Gem::Requirement
@@ -143,6 +143,8 @@ files:
143
143
  - lib/tork/config/cucumber/driver.rb
144
144
  - lib/tork/config/cucumber/worker.rb
145
145
  - lib/tork/config/default/config.rb
146
+ - lib/tork/config/devise/onfork.rb
147
+ - lib/tork/config/devise/worker.rb
146
148
  - lib/tork/config/dotlog/onfork.rb
147
149
  - lib/tork/config/factory_girl/onfork.rb
148
150
  - lib/tork/config/factory_girl/worker.rb
@@ -184,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
186
  version: '0'
185
187
  segments:
186
188
  - 0
187
- hash: -3346903555723443999
189
+ hash: 1540708500099086553
188
190
  required_rubygems_version: !ruby/object:Gem::Requirement
189
191
  none: false
190
192
  requirements:
@@ -193,10 +195,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
195
  version: '0'
194
196
  segments:
195
197
  - 0
196
- hash: -3346903555723443999
198
+ hash: 1540708500099086553
197
199
  requirements: []
198
200
  rubyforge_project:
199
- rubygems_version: 1.8.23
201
+ rubygems_version: 1.8.24
200
202
  signing_key:
201
203
  specification_version: 3
202
204
  summary: test with fork