codersdojo 1.5.07 → 1.5.08
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/lib/commands/command_configuration.rb +3 -3
- data/lib/commands/start_command.rb +1 -1
- metadata +16 -4
- data/lib/run/runner.rb +0 -41
- data/lib/run/scheduler.rb +0 -31
@@ -1,9 +1,9 @@
|
|
1
|
+
require 'shellutils/shell_argument_exception'
|
2
|
+
require 'shellutils/shell_wrapper'
|
3
|
+
require 'flote/runner'
|
1
4
|
require 'record/session_id_generator'
|
2
5
|
require 'record/state_recorder'
|
3
|
-
require 'run/runner'
|
4
6
|
require 'state_reader'
|
5
|
-
require 'shellutils/shell_argument_exception'
|
6
|
-
require 'shellutils/shell_wrapper'
|
7
7
|
require 'console_view'
|
8
8
|
require 'commands/help_command'
|
9
9
|
require 'commands/xhelp_command'
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 1.5.
|
8
|
+
- 8
|
9
|
+
version: 1.5.08
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- CodersDojo-Team
|
@@ -73,6 +73,20 @@ dependencies:
|
|
73
73
|
version: 0.0.9
|
74
74
|
type: :runtime
|
75
75
|
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: flote
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
segments:
|
84
|
+
- 0
|
85
|
+
- 0
|
86
|
+
- 1
|
87
|
+
version: 0.0.1
|
88
|
+
type: :runtime
|
89
|
+
version_requirements: *id005
|
76
90
|
description: Client executes tests in an endless loop and logs source code and test result for later uplaod.
|
77
91
|
email: codersdojo@it-agile.de
|
78
92
|
executables:
|
@@ -103,8 +117,6 @@ files:
|
|
103
117
|
- lib/record/session_id_generator.rb
|
104
118
|
- lib/record/state_recorder.rb
|
105
119
|
- lib/record/text_converter.rb
|
106
|
-
- lib/run/runner.rb
|
107
|
-
- lib/run/scheduler.rb
|
108
120
|
- lib/run/scheduler_interrupt_listener.rb
|
109
121
|
- lib/scaffold/scaffolder.rb
|
110
122
|
- lib/scaffold/text_template_machine.rb
|
data/lib/run/runner.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
class Runner
|
2
|
-
|
3
|
-
attr_accessor :source_files, :run_command, :init_session_callback, :execute_callback
|
4
|
-
|
5
|
-
WORKING_DIR = '.'
|
6
|
-
|
7
|
-
def initialize shell, view
|
8
|
-
@shell = shell
|
9
|
-
@view = view
|
10
|
-
end
|
11
|
-
|
12
|
-
def start
|
13
|
-
if @init_session_callback then @init_session_callback.call end
|
14
|
-
execute
|
15
|
-
end
|
16
|
-
|
17
|
-
def execute
|
18
|
-
files = @shell.files_in_dir_tree WORKING_DIR, @source_files
|
19
|
-
newest_dir_entry = @shell.newest_dir_entry WORKING_DIR, files
|
20
|
-
change_time = @shell.modification_time newest_dir_entry
|
21
|
-
if change_time == @previous_change_time then
|
22
|
-
Progress.next
|
23
|
-
return
|
24
|
-
end
|
25
|
-
Progress.end
|
26
|
-
@view.show_run_once_message newest_dir_entry, change_time
|
27
|
-
execute_once files
|
28
|
-
@previous_change_time = change_time
|
29
|
-
end
|
30
|
-
|
31
|
-
def execute_once files
|
32
|
-
process = @shell.execute @run_command
|
33
|
-
if @execute_callback then @execute_callback.call(files, process) end
|
34
|
-
end
|
35
|
-
|
36
|
-
def run_command= command
|
37
|
-
@run_command = @shell.expand_run_command command
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
|
data/lib/run/scheduler.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
class Scheduler
|
2
|
-
|
3
|
-
attr_accessor :interrupt_listener
|
4
|
-
|
5
|
-
def initialize runner
|
6
|
-
@runner = runner
|
7
|
-
end
|
8
|
-
|
9
|
-
def start
|
10
|
-
@continue = true
|
11
|
-
register_interrupt_listener
|
12
|
-
@runner.start
|
13
|
-
while @continue do
|
14
|
-
sleep 1
|
15
|
-
@runner.execute
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def register_interrupt_listener
|
22
|
-
trap("INT") {
|
23
|
-
interrupt
|
24
|
-
}
|
25
|
-
end
|
26
|
-
|
27
|
-
def interrupt
|
28
|
-
if @interrupt_listener then @continue = @interrupt_listener.interrupt end
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|