codersdojo 1.1.16 → 1.1.17
Sign up to get free protection for your applications and to get access to all the features.
- data/app/argument_parser.rb +2 -0
- data/app/console_view.rb +23 -2
- data/app/controller.rb +3 -3
- metadata +4 -4
data/app/argument_parser.rb
CHANGED
@@ -16,6 +16,8 @@ class ArgumentParser
|
|
16
16
|
@controller.generate params[1], params[2]
|
17
17
|
elsif command == "upload" then
|
18
18
|
@controller.upload params[1]
|
19
|
+
elsif command == "upload-no-open" then
|
20
|
+
@controller.upload params[1], false
|
19
21
|
elsif command == "upload-with-framework" then
|
20
22
|
@controller.upload_with_framework params[1], params[2]
|
21
23
|
elsif command == "start" then
|
data/app/console_view.rb
CHANGED
@@ -25,7 +25,8 @@ Commands:
|
|
25
25
|
help, -h, --help Print this help text.
|
26
26
|
help <command> See the details of the command.
|
27
27
|
setup <framework> <kata_file> Setup the environment for running the kata.
|
28
|
-
upload [<session_dir>] Upload the kata to http://www.codersdojo.org
|
28
|
+
upload [<session_dir>] Upload the kata to http://www.codersdojo.org and open the kata in a browser.
|
29
|
+
upload-no-open [<session_dir>] Upload the kata to http://www.codersdojo.org
|
29
30
|
upload-with-framework <framework> [<session_dir>]
|
30
31
|
Upload the kata to http://www.codersdojo.org
|
31
32
|
!!! This command exists for compatibility reasons only.
|
@@ -44,6 +45,8 @@ helptext
|
|
44
45
|
show_help_start
|
45
46
|
elsif command == 'upload' then
|
46
47
|
show_help_upload
|
48
|
+
elsif command == 'upload-no-open' then
|
49
|
+
show_help_upload_no_open
|
47
50
|
elsif command == 'upload-with-framework' then
|
48
51
|
show_help_upload_with_framework
|
49
52
|
else
|
@@ -79,6 +82,7 @@ helptext
|
|
79
82
|
show <<-helptext
|
80
83
|
|
81
84
|
upload Upload the newest kata session in .codersdojo to codersdojo.com.
|
85
|
+
After the kata is uploaded the browser is started with the URL of the uploaded kata.
|
82
86
|
|
83
87
|
upload <session_directory> Upload the kata <session_directory> to codersdojo.com.
|
84
88
|
<session_directory> is relative to the working directory.
|
@@ -91,16 +95,33 @@ Examples:
|
|
91
95
|
helptext
|
92
96
|
end
|
93
97
|
|
98
|
+
def show_help_upload_no_open
|
99
|
+
show <<-helptext
|
100
|
+
|
101
|
+
upload-no-open Upload the newest kata session in .codersdojo to codersdojo.com.
|
102
|
+
|
103
|
+
upload-no-opem <session_directory> Upload the kata <session_directory> to codersdojo.com.
|
104
|
+
<session_directory> is relative to the working directory.
|
105
|
+
|
106
|
+
Examples:
|
107
|
+
:%/%dojo%/%my_kata$ #{current_command_path} upload-no-open
|
108
|
+
Upload the newest kata located in directory ".codersdojo" to codersdojo.com.
|
109
|
+
:%/%dojo%/%my_kata$ #{current_command_path} upload-no-open .codersdojo%/%2010-11-02_16-21-53
|
110
|
+
Upload the kata located in directory ".codersdojo%/%2010-11-02_16-21-53" to codersdojo.com.
|
111
|
+
helptext
|
112
|
+
end
|
113
|
+
|
94
114
|
def show_help_upload_with_framework
|
95
115
|
templates = @scaffolder.list_templates
|
96
116
|
show <<-helptext
|
97
117
|
|
98
|
-
upload-with-framework <framework> [<session_directory>]
|
118
|
+
upload-with-framework <framework> [<session_directory>]
|
99
119
|
Upload the kata written with <framework> in <session_directory> to codersdojo.com.
|
100
120
|
<session_directory> is relative to the working directory.
|
101
121
|
If you don't specify a <session_directory> the newest session in .codersdojo is uploaded.
|
102
122
|
By now <framework> is one of #{templates}.
|
103
123
|
If you used another framework, use ??? and send an email to codersdojo@it-agile.de
|
124
|
+
After the kata is uploaded the browser is started with the URL of the uploaded kata.
|
104
125
|
|
105
126
|
Example:
|
106
127
|
:%/%dojo%/%my_kata$ #{current_command_path} upload-with-framework ruby.test-unit .codersdojo%/%2010-11-02_16-21-53
|
data/app/controller.rb
CHANGED
@@ -51,13 +51,13 @@ class Controller
|
|
51
51
|
end
|
52
52
|
|
53
53
|
# merge with 'upload_with_framework' when the framework parameter is removed
|
54
|
-
def upload session_directory
|
55
|
-
upload_with_framework framework_property, session_directory
|
54
|
+
def upload session_directory, open_browser
|
55
|
+
upload_with_framework framework_property, session_directory, open_browser=true
|
56
56
|
end
|
57
57
|
|
58
58
|
# framework parameter is obsolete since client version 1.1.08 (08-feb-2011)
|
59
59
|
# it stays here for compatibility reasons and will be removed in the near future
|
60
|
-
def upload_with_framework framework, session_directory
|
60
|
+
def upload_with_framework framework, session_directory , open_browser=true
|
61
61
|
formatter = FilenameFormatter.new
|
62
62
|
if not session_directory then
|
63
63
|
session_directory = formatter.session_dir @shell.newest_dir_entry(FilenameFormatter.codersdojo_workspace)
|
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:
|
4
|
+
hash: 49
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 17
|
10
|
+
version: 1.1.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- CodersDojo-Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-12 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|