tork 19.0.0 → 19.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.markdown +24 -1
- data/LICENSE +20 -19
- data/bin/tork +1 -1
- data/bin/tork-driver +1 -1
- data/bin/tork-engine +2 -2
- data/bin/tork-herald +1 -1
- data/bin/tork-master +1 -1
- data/bin/tork-notify +1 -1
- data/bin/tork-remote +9 -5
- data/lib/tork/config/spec/master.rb +1 -0
- data/lib/tork/config/spec/worker.rb +4 -2
- data/lib/tork/config/test/master.rb +1 -0
- data/lib/tork/config/test/worker.rb +1 -1
- data/lib/tork/server.rb +16 -24
- data/lib/tork/version.rb +1 -1
- data/man/man1/tork-driver.1 +1 -1
- data/man/man1/tork-engine.1 +2 -2
- data/man/man1/tork-herald.1 +1 -1
- data/man/man1/tork-master.1 +1 -1
- data/man/man1/tork-notify.1 +1 -1
- data/man/man1/tork.1 +1 -1
- metadata +10 -10
data/HISTORY.markdown
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
## Version 19.0.1 (2012-10-26)
|
2
|
+
|
3
|
+
Patch:
|
4
|
+
|
5
|
+
* Support testing projects that have both test/ and spec/ directories.
|
6
|
+
|
7
|
+
I assumed that users would only have either test/ or spec/ but not both.
|
8
|
+
Do you know what happens when a test/ is run by RSpec or vice versa? :-)
|
9
|
+
|
10
|
+
Thanks to Kyle Peyton for reporting this issue.
|
11
|
+
|
12
|
+
* Automatically load the "autorun" helpers for RSpec and MiniTest.
|
13
|
+
|
14
|
+
RSpec users are accustomed to not having `require "rspec/autorun"` in
|
15
|
+
their spec/spec_helper.rb file because they use the rspec(1) executable
|
16
|
+
to run their tests. This commit makes things Just Work for them again.
|
17
|
+
|
18
|
+
Other:
|
19
|
+
|
20
|
+
* test whether input is JSON by actually parsing it
|
21
|
+
|
22
|
+
* server: use Set instead of Array for faster lookup
|
23
|
+
|
1
24
|
## Version 19.0.0 (2012-10-17)
|
2
25
|
|
3
26
|
Major:
|
@@ -68,7 +91,7 @@ Other:
|
|
68
91
|
Other:
|
69
92
|
|
70
93
|
* GH-39: upgrade listen gem version to fix a bug in OSX.
|
71
|
-
Thanks to
|
94
|
+
Thanks to Adam Grant for reporting this issue.
|
72
95
|
|
73
96
|
## Version 18.2.3 (2012-09-26)
|
74
97
|
|
data/LICENSE
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
(the ISC license)
|
2
2
|
|
3
|
-
Copyright 2010 Suraj N. Kurapati <
|
4
|
-
Copyright 2011 Brian D. Burns <
|
5
|
-
Thanks to 2011 Daniel Pittman <daniel
|
6
|
-
Thanks to 2011 Jacob Helwig <
|
7
|
-
Thanks to 2011 Corné Verbruggen <
|
8
|
-
Thanks to 2011 Luke Wendling <
|
9
|
-
Thanks to 2012 Jose Pablo Barrantes <
|
10
|
-
Thanks to 2012 Spencer Steffen <
|
11
|
-
Thanks to 2012 Jesse Cooke <
|
12
|
-
Thanks to 2012 Benjamin Quorning <
|
13
|
-
Thanks to 2012 Nicolas Fouché <
|
14
|
-
Thanks to 2012 Mark Hayes <
|
15
|
-
Thanks to 2012 Gumaro Melendez <
|
16
|
-
Thanks to 2012 Scott Radcliff <
|
17
|
-
Thanks to 2012 David Burrows <
|
18
|
-
Thanks to 2012 Bjørn Trondsen <
|
19
|
-
Thanks to 2012 NagaChaitanya Vellanki <
|
20
|
-
Thanks to 2012
|
21
|
-
Thanks to 2012
|
3
|
+
Copyright 2010 Suraj N. Kurapati <https://github.com/sunaku>
|
4
|
+
Copyright 2011 Brian D. Burns <https://github.com/burns>
|
5
|
+
Thanks to 2011 Daniel Pittman <https://github.com/daniel-pittman>
|
6
|
+
Thanks to 2011 Jacob Helwig <https://github.com/jhelwig>
|
7
|
+
Thanks to 2011 Corné Verbruggen <https://github.com/corneverbruggen>
|
8
|
+
Thanks to 2011 Luke Wendling <https://github.com/lukewendling>
|
9
|
+
Thanks to 2012 Jose Pablo Barrantes <https://github.com/jpablobr>
|
10
|
+
Thanks to 2012 Spencer Steffen <https://github.com/citrus>
|
11
|
+
Thanks to 2012 Jesse Cooke <https://github.com/jc00ke>
|
12
|
+
Thanks to 2012 Benjamin Quorning <https://github.com/bquorning>
|
13
|
+
Thanks to 2012 Nicolas Fouché <https://github.com/nfo>
|
14
|
+
Thanks to 2012 Mark Hayes <https://github.com/mhayes>
|
15
|
+
Thanks to 2012 Gumaro Melendez <https://github.com/clouder>
|
16
|
+
Thanks to 2012 Scott Radcliff <https://github.com/ScottRadcliff>
|
17
|
+
Thanks to 2012 David Burrows <https://github.com/dburrows>
|
18
|
+
Thanks to 2012 Bjørn Trondsen <https://github.com/Sharagoz>
|
19
|
+
Thanks to 2012 NagaChaitanya Vellanki <https://github.com/chaitanyav>
|
20
|
+
Thanks to 2012 Ohno Shin'ichi <https://github.com/shin1ohno>
|
21
|
+
Thanks to 2012 Adam Grant <https://github.com/harmon>
|
22
|
+
Thanks to 2012 Kyle Peyton <https://github.com/weexpectedthis>
|
22
23
|
|
23
24
|
Permission to use, copy, modify, and/or distribute this software for any
|
24
25
|
purpose with or without fee is hereby granted, provided that the above
|
data/bin/tork
CHANGED
data/bin/tork-driver
CHANGED
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-10-
|
4
|
+
# TORK-ENGINE 1 2012-10-26 19.0.1
|
5
5
|
|
6
6
|
## NAME
|
7
7
|
|
@@ -32,7 +32,7 @@ from stdin and performs the actions described respectively.
|
|
32
32
|
that have changed since the last run of *test_file* will be substituted.
|
33
33
|
If any *line_numbers* are zero, then the entire *test_file* will be run.
|
34
34
|
|
35
|
-
`["run_test_files"`, *
|
35
|
+
`["run_test_files"`, *test\_files\_with\_optional\_line\_numbers*`]`
|
36
36
|
Calls the `run_test_file` command once for each item in the given array.
|
37
37
|
|
38
38
|
`["stop_running_test_files"`, *signal*`]`
|
data/bin/tork-herald
CHANGED
data/bin/tork-master
CHANGED
data/bin/tork-notify
CHANGED
data/bin/tork-remote
CHANGED
@@ -59,7 +59,13 @@ begin
|
|
59
59
|
# messages to remote from server
|
60
60
|
Thread.new do
|
61
61
|
while input = socket.gets
|
62
|
-
stream =
|
62
|
+
stream =
|
63
|
+
begin
|
64
|
+
JSON.load input
|
65
|
+
STDOUT
|
66
|
+
rescue JSON::ParserError
|
67
|
+
STDERR
|
68
|
+
end
|
63
69
|
stream.puts input
|
64
70
|
stream.flush
|
65
71
|
end
|
@@ -72,9 +78,7 @@ begin
|
|
72
78
|
socket.puts output
|
73
79
|
end
|
74
80
|
end
|
75
|
-
|
76
|
-
|
77
|
-
warn "#{$0}: could not connect to #{program}"
|
78
|
-
warn "#{error}#{address.inspect}"
|
81
|
+
rescue Errno::ENOENT => error
|
82
|
+
warn "#{$0}: could not connect to #{program}: #{error}"
|
79
83
|
exit 1
|
80
84
|
end
|
data/lib/tork/server.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'socket'
|
2
|
-
require 'thread'
|
3
2
|
require 'json'
|
4
3
|
require 'shellwords'
|
4
|
+
require 'set'
|
5
5
|
|
6
6
|
module Tork
|
7
7
|
class Server
|
@@ -16,20 +16,20 @@ class Server
|
|
16
16
|
@stdout = STDOUT.dup
|
17
17
|
STDOUT.reopen STDERR
|
18
18
|
|
19
|
-
@clients =
|
20
|
-
@servers =
|
19
|
+
@clients = Set.new.add(STDIN)
|
20
|
+
@servers = Set.new
|
21
21
|
end
|
22
22
|
|
23
23
|
def loop
|
24
24
|
server = UNIXServer.open(Server.address)
|
25
|
-
@servers
|
25
|
+
@servers.add server
|
26
26
|
catch :quit do
|
27
27
|
while @clients.include? STDIN
|
28
|
-
IO.select(@servers + @clients).first.each do |stream|
|
28
|
+
IO.select((@servers + @clients).to_a).first.each do |stream|
|
29
29
|
@client = stream
|
30
30
|
|
31
31
|
if stream == server
|
32
|
-
@clients
|
32
|
+
@clients.add stream.accept
|
33
33
|
|
34
34
|
elsif (stream.eof? rescue true)
|
35
35
|
@clients.delete stream
|
@@ -51,32 +51,24 @@ class Server
|
|
51
51
|
|
52
52
|
protected
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
# On failure to decode the message, warns the sender and returns nil.
|
54
|
+
# Returns nil if the message received was not meant for processing.
|
57
55
|
def hear sender, message
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
elsif @clients.include? sender
|
56
|
+
JSON.load message
|
57
|
+
rescue JSON::ParserError => error
|
58
|
+
if @clients.include? sender
|
59
|
+
# accept non-JSON "command lines" from clients
|
63
60
|
Shellwords.split message
|
64
|
-
|
65
|
-
|
66
|
-
elsif @servers.include? sender
|
61
|
+
else
|
62
|
+
# forward tell() output from servers to clients
|
67
63
|
tell @clients, message, false
|
68
64
|
nil
|
69
65
|
end
|
70
|
-
rescue JSON::ParserError => error
|
71
|
-
tell sender, error
|
72
|
-
nil
|
73
66
|
end
|
74
67
|
|
75
68
|
def recv client, command
|
76
69
|
__send__(*command)
|
77
70
|
rescue => error
|
78
71
|
tell client, error
|
79
|
-
nil
|
80
72
|
end
|
81
73
|
|
82
74
|
def send one_or_more_clients, message
|
@@ -108,19 +100,19 @@ protected
|
|
108
100
|
|
109
101
|
def popen command
|
110
102
|
child = IO.popen(command, 'r+')
|
111
|
-
@servers
|
103
|
+
@servers.add child
|
112
104
|
child
|
113
105
|
end
|
114
106
|
|
115
107
|
def pclose child
|
116
|
-
return unless @servers.delete child
|
108
|
+
return unless @servers.delete? child
|
117
109
|
|
118
110
|
# this should be enough to stop programs that use Tork::Server#loop
|
119
111
|
# because their IO.select() loop terminates on the closing of STDIN
|
120
112
|
child.close_write
|
121
113
|
|
122
114
|
# but some programs like tork-herald(1) need to be killed explicitly
|
123
|
-
# because they do not follow
|
115
|
+
# because they do not follow our convention of exiting on STDIN close
|
124
116
|
Process.kill :SIGTERM, child.pid
|
125
117
|
Process.waitpid child.pid
|
126
118
|
|
data/lib/tork/version.rb
CHANGED
data/man/man1/tork-driver.1
CHANGED
data/man/man1/tork-engine.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH TORK\-ENGINE 1 2012\-10\-
|
1
|
+
.TH TORK\-ENGINE 1 2012\-10\-26 19.0.1
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
tork\-engine \- wraps
|
@@ -31,7 +31,7 @@ given \fItest_file\fP. If no \fIline_numbers\fP are given, then only those line
|
|
31
31
|
that have changed since the last run of \fItest_file\fP will be substituted.
|
32
32
|
If any \fIline_numbers\fP are zero, then the entire \fItest_file\fP will be run.
|
33
33
|
.TP
|
34
|
-
\fB\fC["run_test_files"\fR, \
|
34
|
+
\fB\fC["run_test_files"\fR, \fItest_files_with_optional_line_numbers\fP\fB\fC]\fR
|
35
35
|
Calls the \fB\fCrun_test_file\fR command once for each item in the given array.
|
36
36
|
.TP
|
37
37
|
\fB\fC["stop_running_test_files"\fR, \fIsignal\fP\fB\fC]\fR
|
data/man/man1/tork-herald.1
CHANGED
data/man/man1/tork-master.1
CHANGED
data/man/man1/tork-notify.1
CHANGED
data/man/man1/tork.1
CHANGED
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.
|
4
|
+
version: 19.0.1
|
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-10-
|
13
|
+
date: 2012-10-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: binman
|
@@ -110,8 +110,8 @@ dependencies:
|
|
110
110
|
version: 0.9.2.2
|
111
111
|
description: Runs your tests as they change, in parallel.
|
112
112
|
email:
|
113
|
-
-
|
114
|
-
-
|
113
|
+
- https://github.com/sunaku
|
114
|
+
- https://github.com/burns
|
115
115
|
executables:
|
116
116
|
- tork
|
117
117
|
- tork-driver
|
@@ -164,12 +164,12 @@ files:
|
|
164
164
|
- lib/tork/version.rb
|
165
165
|
- tork.gemspec
|
166
166
|
- man/man1/tork-notify.1
|
167
|
-
- man/man1/tork-remote.1
|
168
|
-
- man/man1/tork-herald.1
|
169
|
-
- man/man1/tork-engine.1
|
170
167
|
- man/man1/tork-master.1
|
171
|
-
- man/man1/tork-driver.1
|
172
168
|
- man/man1/tork.1
|
169
|
+
- man/man1/tork-engine.1
|
170
|
+
- man/man1/tork-herald.1
|
171
|
+
- man/man1/tork-driver.1
|
172
|
+
- man/man1/tork-remote.1
|
173
173
|
homepage: http://github.com/sunaku/tork
|
174
174
|
licenses: []
|
175
175
|
post_install_message:
|
@@ -184,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
184
|
version: '0'
|
185
185
|
segments:
|
186
186
|
- 0
|
187
|
-
hash:
|
187
|
+
hash: -245551711122952859
|
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:
|
196
|
+
hash: -245551711122952859
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
199
|
rubygems_version: 1.8.23
|