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 CHANGED
@@ -41,11 +41,12 @@ class Scaffolder
41
41
  end
42
42
  end
43
43
 
44
- def transform_file file
45
- if file == "README" or file.end_with?(".sh")
46
- content = @shell.read_file 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
- @shell.write_file file, content
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
@@ -65,7 +65,7 @@ class ShellWrapper
65
65
  end
66
66
 
67
67
  def remove_command_name
68
- windows? ? 'delete' : 'rm'
68
+ windows? ? 'del' : 'rm'
69
69
  end
70
70
 
71
71
  def shell_extension
@@ -0,0 +1,11 @@
1
+ ; Adapt the code to your code kata %kata_file%.
2
+
3
+ (use 'clojure.test)
4
+
5
+ (defn %kata_file% []
6
+ "fixme")
7
+
8
+ (deftest %kata_file%-test []
9
+ (is (= "foo" (%kata_file%))))
10
+
11
+ (run-tests)
@@ -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 src/%Kata_file%Test.java
1
+ codersdojo start run-once.sh %Kata_file%Test.java
@@ -1,3 +1,3 @@
1
1
  rm bin/%Kata_file%Test.class
2
- javac -cp lib/junit.jar -d bin src/%Kata_file%Test.java
2
+ javac -cp lib/junit.jar -d bin %Kata_file%Test.java
3
3
  java -cp lib/junit.jar:bin org.junit.runner.JUnitCore %Kata_file%Test
@@ -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: 45
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
+ - 1
7
8
  - 0
8
- - 9
9
- - 11
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-10 00:00:00 +01:00
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/java.junit/src/place_your_source_files_here
73
- - templates/python.unittest/README
74
- - templates/python.unittest/run-endless.sh
75
- - templates/python.unittest/run-once.sh
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