tork 15.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,38 @@
1
+ require 'json'
2
+
3
+ module Tork
4
+ module Server
5
+
6
+ def quit
7
+ throw :tork_server_quit
8
+ end
9
+
10
+ def loop
11
+ (@client = STDOUT.dup).sync = true
12
+ STDOUT.reopen(STDERR).sync = true
13
+
14
+ catch :tork_server_quit do
15
+ while line = STDIN.gets
16
+ warn "#{caller[2]} RECV #{line.chomp}" if $DEBUG
17
+
18
+ command = JSON.load(line)
19
+ method = command.first
20
+
21
+ if respond_to? method and method != __method__ # prevent loops
22
+ @command, @command_line = command, line
23
+ __send__(*command)
24
+ else
25
+ warn "#{self}: bad command: #{method}"
26
+ end
27
+ end
28
+ end
29
+ rescue Interrupt
30
+ # forced quit
31
+ end
32
+
33
+ def self.extended server
34
+ trap(:SIGTERM){ server.quit }
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,3 @@
1
+ module Tork
2
+ VERSION = "15.0.0"
3
+ end
@@ -0,0 +1,70 @@
1
+ .TH TORK\-DRIVER 1 2012\-01\-23 15.0.0
2
+ .SH NAME
3
+ .PP
4
+ tork\-driver \- drives
5
+ .BR tork\-master (1)
6
+ and does bookkeeping
7
+ .SH SYNOPSIS
8
+ .PP
9
+ \fB\fCtork-driver\fR [\fIOPTION\fP]...
10
+ .SH DESCRIPTION
11
+ .PP
12
+ This program reads the following single\-line commands (JSON arrays) from its
13
+ standard input stream and performs the respective actions as described below.
14
+ It also funnels the standard output stream of
15
+ .BR tork\-master (1)
16
+ into its own.
17
+ .TP
18
+ \fB\fC["run_all_test_files"]\fR
19
+ Runs all test files found within and beneath the current working directory.
20
+ .TP
21
+ \fB\fC["stop_running_test_files"]\fR
22
+ Stops any test files that are currently running.
23
+ .TP
24
+ \fB\fC["rerun_passed_test_files"]\fR
25
+ Runs all test files that have passed during their most recent run.
26
+ .TP
27
+ \fB\fC["reabsorb_overhead_files"]\fR
28
+ Stops any test files that are currently running, reabsorbs the test
29
+ execution overhead, and resumes running those interrupted test files.
30
+ .TP
31
+ \fB\fC["quit"]\fR
32
+ Stops all tests that are currently running and exits.
33
+ .PP
34
+ When
35
+ .BR tork\-herald (1)
36
+ reports that a file belonging to the test execution
37
+ overhead has been modified, this program replaces
38
+ .BR tork\-master (1)
39
+ with a new
40
+ instance, which then absorbs the modified test execution overhead into itself.
41
+ .PP
42
+ This program emits the following single\-line status messages (JSON arrays) on
43
+ its standard output stream to provide notifications about its activity:
44
+ .TP
45
+ \fB\fC["over",\fR \fIoverhead_file\fP\fB\fC]\fR
46
+ The test execution overhead is currently being reabsorbed, by replacing
47
+ .BR tork\-master (1)
48
+ with a new instance, because \fIoverhead_file\fP has changed.
49
+ .SH OPTIONS
50
+ .TP
51
+ \fB\fC-h\fR, \fB\fC--help\fR
52
+ Display this help manual using
53
+ .BR man (1).
54
+ .SH FILES
55
+ .TP
56
+ \fI.tork.rb\fP
57
+ Optional Ruby script for configuring
58
+ .BR tork (1).
59
+ .SH ENVIRONMENT
60
+ .TP
61
+ \fB\fCTORK_CONFIGS\fR
62
+ A single\-line JSON array containing paths to actual files or names of
63
+ helper libraries in the tork/config/ namespace of Ruby's load path.
64
+ These configuration files are loaded just before \fI.tork.rb\fP is loaded.
65
+ .SH SEE ALSO
66
+ .PP
67
+ .BR tork (1),
68
+ .BR tork\-driver (1),
69
+ .BR tork\-master (1),
70
+ .BR tork\-herald (1)
@@ -0,0 +1,22 @@
1
+ .TH TORK\-HERALD 1 2012\-01\-23 15.0.0
2
+ .SH NAME
3
+ .PP
4
+ tork\-herald \- reports modified files
5
+ .SH SYNOPSIS
6
+ .PP
7
+ \fB\fCtork-herald\fR [\fIOPTION\fP]...
8
+ .SH DESCRIPTION
9
+ .PP
10
+ This program monitors the current working directory and prints relative paths
11
+ of modified files, one per line, to the standard output stream.
12
+ .SH OPTIONS
13
+ .TP
14
+ \fB\fC-h\fR, \fB\fC--help\fR
15
+ Display this help manual using
16
+ .BR man (1).
17
+ .SH SEE ALSO
18
+ .PP
19
+ .BR tork (1),
20
+ .BR tork\-driver (1),
21
+ .BR tork\-master (1),
22
+ .BR tork\-herald (1)
@@ -0,0 +1,61 @@
1
+ .TH TORK\-MASTER 1 2012\-01\-23 15.0.0
2
+ .SH NAME
3
+ .PP
4
+ tork\-master \- absorbs overhead and runs tests
5
+ .SH SYNOPSIS
6
+ .PP
7
+ \fB\fCtork-master\fR [\fIOPTION\fP]...
8
+ .SH DESCRIPTION
9
+ .PP
10
+ This program reads the following single\-line commands (JSON arrays) from its
11
+ standard input stream and performs the respective actions as described below.
12
+ .TP
13
+ \fB\fC["load",\fR \fIpaths\fP\fB\fC,\fR \fIfiles\fP\fB\fC]\fR
14
+ Adds the given array of \fIpaths\fP to Ruby's $LOAD_PATH, loads the given array
15
+ of \fIfiles\fP after removing their ".rb" file extension if present, and prints
16
+ the given command line to the standard output stream.
17
+ .TP
18
+ \fB\fC["test",\fR \fItest_file\fP\fB\fC,\fR \fItest_names\fP\fB\fC]\fR
19
+ Runs the given \fItest_file\fP in a forked child process while instructing your
20
+ chosen unit testing framework (loaded by your test execution overhead) to
21
+ only run those tests that are named in the given array of \fItest_names\fP.
22
+ .IP
23
+ Prints the given command line to the standard output stream immediately
24
+ after forking the child process.
25
+ .IP
26
+ Prints the given command line, modified with \fB\fC"pass"\fR (if the test passed)
27
+ or \fB\fC"fail"\fR (if the test failed) in place of \fB\fC"test"\fR, to the standard
28
+ output stream after the forked child process finishes.
29
+ .IP
30
+ The standard output and error streams of the forked child process are
31
+ redirected to a file whose path and name are the same as that of the test
32
+ file being run by the forked child process but with ".log" appended.
33
+ .TP
34
+ \fB\fC["stop"]\fR
35
+ Stops all tests that are currently running and prints the given command line
36
+ to the standard output stream.
37
+ .TP
38
+ \fB\fC["quit"]\fR
39
+ Stops all tests that are currently running and exits.
40
+ .SH OPTIONS
41
+ .TP
42
+ \fB\fC-h\fR, \fB\fC--help\fR
43
+ Display this help manual using
44
+ .BR man (1).
45
+ .SH FILES
46
+ .TP
47
+ \fI.tork.rb\fP
48
+ Optional Ruby script for configuring
49
+ .BR tork (1).
50
+ .SH ENVIRONMENT
51
+ .TP
52
+ \fB\fCTORK_CONFIGS\fR
53
+ A single\-line JSON array containing paths to actual files or names of
54
+ helper libraries in the tork/config/ namespace of Ruby's load path.
55
+ These configuration files are loaded just before \fI.tork.rb\fP is loaded.
56
+ .SH SEE ALSO
57
+ .PP
58
+ .BR tork (1),
59
+ .BR tork\-driver (1),
60
+ .BR tork\-master (1),
61
+ .BR tork\-herald (1)
@@ -0,0 +1,27 @@
1
+ .TH TORK 1 2012\-01\-23 15.0.0
2
+ .SH NAME
3
+ .PP
4
+ tork \- Continuous testing tool for Ruby
5
+ .SH SYNOPSIS
6
+ .PP
7
+ \fB\fCtork\fR [\fIOPTION\fP]... [\fICONFIG\fP]...
8
+ .SH DESCRIPTION
9
+ .PP
10
+ This program is a simple command\-line user interface for
11
+ .BR tork\-driver (1).
12
+ It
13
+ loads the given \fICONFIG\fP files (which are either paths to actual files or
14
+ names of helper libraries in the tork/config/ namespace of Ruby's load path)
15
+ and then waits for you to supply interactive commands on its stdin. You may
16
+ press the ENTER key (supplying no command) to see a menu of accepted commands.
17
+ .SH OPTIONS
18
+ .TP
19
+ \fB\fC-h\fR, \fB\fC--help\fR
20
+ Display this help manual using
21
+ .BR man (1).
22
+ .SH SEE ALSO
23
+ .PP
24
+ .BR tork (1),
25
+ .BR tork\-driver (1),
26
+ .BR tork\-master (1),
27
+ .BR tork\-herald (1)
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "tork/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "tork"
7
+ s.version = Tork::VERSION
8
+ s.authors,
9
+ s.email = File.read('LICENSE').scan(/Copyright \d+ (.+) <(.+?)>/).transpose
10
+ s.homepage = "http://github.com/sunaku/tork"
11
+ s.summary = "Continuous testing tool for Ruby"
12
+ s.description = nil
13
+
14
+ s.files = `git ls-files`.split("\n") + Dir["man/**/*"]
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_runtime_dependency 'binman', '~> 3'
20
+ s.add_runtime_dependency 'json', '>= 1.6.1', '< 2'
21
+ s.add_runtime_dependency 'guard', '>= 0.9.0', '< 1'
22
+ s.add_runtime_dependency 'diff-lcs', '>= 1.1.2', '< 2'
23
+ end
metadata ADDED
@@ -0,0 +1,138 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tork
3
+ version: !ruby/object:Gem::Version
4
+ version: 15.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Suraj N. Kurapati
9
+ - Brian D. Burns
10
+ - Daniel Pittman
11
+ - Jacob Helwig
12
+ - Corné Verbruggen
13
+ - Jose Pablo Barrantes
14
+ - Spencer Steffen
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+ date: 2012-01-23 00:00:00.000000000 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: binman
22
+ requirement: &16374880 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: '3'
28
+ type: :runtime
29
+ prerelease: false
30
+ version_requirements: *16374880
31
+ - !ruby/object:Gem::Dependency
32
+ name: json
33
+ requirement: &11501340 !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: 1.6.1
39
+ - - <
40
+ - !ruby/object:Gem::Version
41
+ version: '2'
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: *11501340
45
+ - !ruby/object:Gem::Dependency
46
+ name: guard
47
+ requirement: &11499600 !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: 0.9.0
53
+ - - <
54
+ - !ruby/object:Gem::Version
55
+ version: '1'
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *11499600
59
+ - !ruby/object:Gem::Dependency
60
+ name: diff-lcs
61
+ requirement: &11496820 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: 1.1.2
67
+ - - <
68
+ - !ruby/object:Gem::Version
69
+ version: '2'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: *11496820
73
+ description: ''
74
+ email:
75
+ - sunaku@gmail.com
76
+ - burns180@gmail.com
77
+ - daniel@rimspace.net
78
+ - jacob@technosorcery.net
79
+ - corne@g-majeur.nl
80
+ - xjpablobrx@gmail.com
81
+ - spencer@citrusme.com
82
+ executables:
83
+ - tork
84
+ - tork-driver
85
+ - tork-herald
86
+ - tork-master
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - .gitignore
91
+ - Gemfile
92
+ - HISTORY.markdown
93
+ - LICENSE
94
+ - README.markdown
95
+ - Rakefile
96
+ - bin/tork
97
+ - bin/tork-driver
98
+ - bin/tork-herald
99
+ - bin/tork-master
100
+ - lib/tork/client.rb
101
+ - lib/tork/config.rb
102
+ - lib/tork/config/parallel_tests.rb
103
+ - lib/tork/config/rails.rb
104
+ - lib/tork/driver.rb
105
+ - lib/tork/master.rb
106
+ - lib/tork/server.rb
107
+ - lib/tork/version.rb
108
+ - tork.gemspec
109
+ - man/man1/tork-herald.1
110
+ - man/man1/tork-master.1
111
+ - man/man1/tork-driver.1
112
+ - man/man1/tork.1
113
+ homepage: http://github.com/sunaku/tork
114
+ licenses: []
115
+ post_install_message:
116
+ rdoc_options: []
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ none: false
127
+ requirements:
128
+ - - ! '>='
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ requirements: []
132
+ rubyforge_project:
133
+ rubygems_version: 1.8.11
134
+ signing_key:
135
+ specification_version: 3
136
+ summary: Continuous testing tool for Ruby
137
+ test_files: []
138
+ has_rdoc: