codersdojo 1.2.17 → 1.2.18
Sign up to get free protection for your applications and to get access to all the features.
- data/app/console_view.rb +1 -1
- data/app/scaffolder.rb +8 -1
- metadata +4 -4
data/app/console_view.rb
CHANGED
@@ -65,7 +65,7 @@ setup <framework> <kata_file>
|
|
65
65
|
If <kata_file> does not have an extension it will be added automatically
|
66
66
|
- except if <framework> is ??? (see below).
|
67
67
|
By now <framework> is one of these:
|
68
|
-
#{templates}
|
68
|
+
#{templates}
|
69
69
|
Use ??? as framework if your framework isn't in the list.
|
70
70
|
|
71
71
|
Example:
|
data/app/scaffolder.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'text_template_machine'
|
2
|
+
require 'filename_formatter'
|
2
3
|
|
3
4
|
class Scaffolder
|
4
5
|
|
@@ -19,8 +20,14 @@ class Scaffolder
|
|
19
20
|
def list_templates_as_dotted_list indentation
|
20
21
|
templates = @shell.real_dir_entries template_path
|
21
22
|
templates.delete ANY_TEMPLATE
|
23
|
+
as_dotted_list indentation, templates
|
24
|
+
end
|
25
|
+
|
26
|
+
def as_dotted_list indentation, items
|
22
27
|
indent_string = ' '*indentation
|
23
|
-
|
28
|
+
grouped_items = items.group_by{|item| item.split('.').first}
|
29
|
+
group_strings = grouped_items.collect{|group| group.last.join ', '}
|
30
|
+
"#{indent_string}* " + group_strings.join("\n#{indent_string}* ")
|
24
31
|
end
|
25
32
|
|
26
33
|
def scaffold template, kata_file
|
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: 59
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 18
|
10
|
+
version: 1.2.18
|
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-05-
|
18
|
+
date: 2011-05-23 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|