codersdojo 1.1.10 → 1.1.11

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.
Files changed (3) hide show
  1. data/app/console_view.rb +10 -6
  2. data/app/scheduler.rb +4 -1
  3. metadata +4 -4
data/app/console_view.rb CHANGED
@@ -19,7 +19,7 @@ helptext
19
19
 
20
20
  def show_usage
21
21
  show <<-helptext
22
- Usage: #{$0} command [options]
22
+ Usage: #{current_command_path} command [options]
23
23
  Commands:
24
24
  help, -h, --help Print this help text.
25
25
  help <command> See the details of the command.
@@ -60,7 +60,7 @@ setup <framework> <kata_file_no_ext> Setup the environment for the kata for the
60
60
  Use ??? as framework if your framework isn't in the list.
61
61
 
62
62
  Example:
63
- :%/%dojo%/%my_kata$ #{$0} setup ruby.test-unit prime
63
+ :%/%dojo%/%my_kata$ #{current_command_path} setup ruby.test-unit prime
64
64
  Show the instructions how to setup the environment for kata execution with Ruby and test/unit.
65
65
  helptext
66
66
  end
@@ -84,9 +84,9 @@ upload <session_directory> Upload the kata <session_directory> to codersdojo.co
84
84
  <session_directory> is relative to the working directory.
85
85
 
86
86
  Examples:
87
- :%/%dojo%/%my_kata$ #{$0} upload
87
+ :%/%dojo%/%my_kata$ #{current_command_path} upload
88
88
  Upload the newest kata located in directory ".codersdojo" to codersdojo.com.
89
- :%/%dojo%/%my_kata$ #{$0} upload .codersdojo%/%2010-11-02_16-21-53
89
+ :%/%dojo%/%my_kata$ #{current_command_path} upload .codersdojo%/%2010-11-02_16-21-53
90
90
  Upload the kata located in directory ".codersdojo%/%2010-11-02_16-21-53" to codersdojo.com.
91
91
  helptext
92
92
  end
@@ -103,14 +103,14 @@ upload-with-framework <framework> [<session_directory>]
103
103
  If you used another framework, use ??? and send an email to codersdojo@it-agile.de
104
104
 
105
105
  Example:
106
- :%/%dojo%/%my_kata$ #{$0} upload-with-framework ruby.test-unit .codersdojo%/%2010-11-02_16-21-53
106
+ :%/%dojo%/%my_kata$ #{current_command_path} upload-with-framework ruby.test-unit .codersdojo%/%2010-11-02_16-21-53
107
107
  Upload the kata (written in Ruby with the test/unit framework) located in directory ".codersdojo%/%2010-11-02_16-21-53" to codersdojo.com.
108
108
  helptext
109
109
  end
110
110
 
111
111
  def show_help_unknown command
112
112
  show <<-helptext
113
- Command #{command} not known. Try '#{$0} help' to list the supported commands.
113
+ Command #{command} not known. Try '#{current_command_path} help' to list the supported commands.
114
114
  helptext
115
115
  end
116
116
 
@@ -138,5 +138,9 @@ helptext
138
138
  def show text
139
139
  puts @template_machine.render(text)
140
140
  end
141
+
142
+ def current_command_path
143
+ $0.gsub '/', '%/%'
144
+ end
141
145
 
142
146
  end
data/app/scheduler.rb CHANGED
@@ -5,7 +5,10 @@ class Scheduler
5
5
  end
6
6
 
7
7
  def start
8
- trap("INT") { puts; exit }
8
+ trap("INT") {
9
+ puts "\nYou finished your kata. Now upload it with 'codersdojo upload'."
10
+ exit
11
+ }
9
12
  @runner.start
10
13
  while true do
11
14
  sleep 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codersdojo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 10
10
- version: 1.1.10
9
+ - 11
10
+ version: 1.1.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - CodersDojo-Team
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: 1.6.1
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
- description: Client executes tests in an endless loop and logs source code and test result.
37
+ description: Client executes tests in an endless loop and logs source code and test result for later uplaod.
38
38
  email: codersdojo@it-agile.de
39
39
  executables:
40
40
  - codersdojo