codersdojo 0.9.11 → 1.0.0
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/app/scaffolder.rb +5 -4
- data/app/shell_wrapper.rb +1 -1
- data/templates/clojure.is-test/%kata_file%.clj +11 -0
- data/templates/java.junit/%Kata_file%Test.java +18 -0
- data/templates/java.junit/run-endless.sh +1 -1
- data/templates/java.junit/run-once.sh +1 -1
- data/templates/python.pyunit/%kata_file%.py +18 -0
- data/templates/ruby.test-unit/%kata_file%.rb +20 -0
- metadata +12 -9
- data/templates/java.junit/src/place_your_source_files_here +0 -0
- /data/templates/{python.unittest → python.pyunit}/README +0 -0
- /data/templates/{python.unittest → python.pyunit}/run-endless.sh +0 -0
- /data/templates/{python.unittest → python.pyunit}/run-once.sh +0 -0
data/app/scaffolder.rb
CHANGED
@@ -41,11 +41,12 @@ class Scaffolder
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
def transform_file
|
45
|
-
if file
|
46
|
-
content = @shell.read_file
|
44
|
+
def transform_file filename
|
45
|
+
if File.file?(filename)
|
46
|
+
content = @shell.read_file filename
|
47
47
|
content = @template_machine.render content
|
48
|
-
@
|
48
|
+
new_filename = @template_machine.render filename
|
49
|
+
@shell.write_file new_filename, content
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
data/app/shell_wrapper.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
// Adapt the code to your code kata %kata_file%.
|
2
|
+
|
3
|
+
import org.junit.*;
|
4
|
+
import static org.junit.Assert.*;
|
5
|
+
|
6
|
+
public class %Kata_file%Test {
|
7
|
+
|
8
|
+
@Test
|
9
|
+
public void testFoo() {
|
10
|
+
assertEquals("foo", foo());
|
11
|
+
}
|
12
|
+
|
13
|
+
public void foo() {
|
14
|
+
return "fixme";
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
codersdojo start run-once.sh
|
1
|
+
codersdojo start run-once.sh %Kata_file%Test.java
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Adapt the code to your code kata %kata_file%.
|
2
|
+
|
3
|
+
import unittest
|
4
|
+
|
5
|
+
class %Kata_file%:
|
6
|
+
|
7
|
+
def foo(self):
|
8
|
+
return "fixme"
|
9
|
+
|
10
|
+
|
11
|
+
class Test%Kata_file%(unittest.TestCase):
|
12
|
+
|
13
|
+
def test_foo(self):
|
14
|
+
object_under_test = %Kata_file%()
|
15
|
+
self.assertEqual("foo", object_under_test.foo())
|
16
|
+
|
17
|
+
if __name__ == '__main__':
|
18
|
+
unittest.main()
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Adapt the code to your code kata %kata_file%.
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
class %Kata_file%Test < Test::Unit::TestCase
|
6
|
+
|
7
|
+
def test_foo
|
8
|
+
object_under_test = %Kata_file%.new
|
9
|
+
assert_equal("foo", object_under_test.bar)
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
class %Kata_file%
|
15
|
+
|
16
|
+
def foo
|
17
|
+
"fixme"
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
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: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.9.11
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
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: 2010-12-
|
18
|
+
date: 2010-12-27 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -60,19 +60,22 @@ files:
|
|
60
60
|
- templates/any/README
|
61
61
|
- templates/any/run-endless.sh
|
62
62
|
- templates/any/run-once.sh
|
63
|
+
- templates/clojure.is-test/%kata_file%.clj
|
63
64
|
- templates/clojure.is-test/lib/place_your_libs_here
|
64
65
|
- templates/clojure.is-test/README
|
65
66
|
- templates/clojure.is-test/run-endless.sh
|
66
67
|
- templates/clojure.is-test/run-once.sh
|
68
|
+
- templates/java.junit/%Kata_file%Test.java
|
67
69
|
- templates/java.junit/bin/place_your_class_files_here
|
68
70
|
- templates/java.junit/lib/place_your_libs_here
|
69
71
|
- templates/java.junit/README
|
70
72
|
- templates/java.junit/run-endless.sh
|
71
73
|
- templates/java.junit/run-once.sh
|
72
|
-
- templates/
|
73
|
-
- templates/python.
|
74
|
-
- templates/python.
|
75
|
-
- templates/python.
|
74
|
+
- templates/python.pyunit/%kata_file%.py
|
75
|
+
- templates/python.pyunit/README
|
76
|
+
- templates/python.pyunit/run-endless.sh
|
77
|
+
- templates/python.pyunit/run-once.sh
|
78
|
+
- templates/ruby.test-unit/%kata_file%.rb
|
76
79
|
- templates/ruby.test-unit/README
|
77
80
|
- templates/ruby.test-unit/run-endless.sh
|
78
81
|
- templates/ruby.test-unit/run-once.sh
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|