codersdojo 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,8 +29,6 @@ class ArgumentParser
29
29
  def expand_run_command command
30
30
  if command.end_with?(".sh") then
31
31
  "bash #{command}"
32
- elsif command.end_with?(".bat") or command.end_with?(".cmd") then
33
- "start #{command}"
34
32
  else
35
33
  command
36
34
  end
data/app/runner.rb CHANGED
@@ -26,7 +26,7 @@ class Runner
26
26
  if change_time == @previous_change_time then
27
27
  return
28
28
  end
29
- result = @shell.execute "#{@run_command} #{@file}"
29
+ result = @shell.execute @run_command
30
30
  state_dir = @filename_formatter.state_dir @session_id, @step
31
31
  @shell.mkdir state_dir
32
32
  @shell.cp @file, state_dir
@@ -30,13 +30,13 @@ describe ArgumentParser do
30
30
  @parser.parse ["start", "aCommand.sh","aFile"]
31
31
  end
32
32
 
33
- it "should prepend *.bat start scripts with 'start'" do
34
- @controller_mock.should_receive(:start).with "start aCommand.bat", "aFile"
33
+ it "should not prepend *.bat start scripts with anything" do
34
+ @controller_mock.should_receive(:start).with "aCommand.bat", "aFile"
35
35
  @parser.parse ["start", "aCommand.bat","aFile"]
36
36
  end
37
37
 
38
- it "should prepend *.cmd start scripts with 'start'" do
39
- @controller_mock.should_receive(:start).with "start aCommand.cmd", "aFile"
38
+ it "should not prepend *.cmd start scripts with anything" do
39
+ @controller_mock.should_receive(:start).with "aCommand.cmd", "aFile"
40
40
  @parser.parse ["start", "aCommand.cmd","aFile"]
41
41
  end
42
42
 
data/spec/runner_spec.rb CHANGED
@@ -13,7 +13,7 @@ describe Runner, "in run mode" do
13
13
  @session_id_provider_mock.should_receive(:generate_id).and_return SESSION_ID
14
14
  @runner = Runner.new @shell_mock, @session_id_provider_mock
15
15
  @runner.file = "my_file.rb"
16
- @runner.run_command = "ruby"
16
+ @runner.run_command = "run-once.sh"
17
17
  end
18
18
 
19
19
  it "should create codersdojo directory if it doesn't exist with session sub-directory" do
@@ -22,7 +22,7 @@ describe Runner, "in run mode" do
22
22
  end
23
23
 
24
24
  it "should run ruby command on kata file given as argument" do
25
- @shell_mock.should_receive(:execute).with "ruby my_file.rb"
25
+ @shell_mock.should_receive(:execute).with "run-once.sh"
26
26
  @runner.start
27
27
  end
28
28
 
@@ -1 +1 @@
1
- codersdojo start run-once.sh %kata_file%
1
+ codersdojo start run-once.%sh% %kata_file%
@@ -1,2 +1,2 @@
1
- codersdojo start run-once.sh %kata_file%.clj
1
+ codersdojo start run-once.%sh% %kata_file%.clj
2
2
 
@@ -1 +1 @@
1
- codersdojo start run-once.sh %Kata_file%Test.java
1
+ codersdojo start run-once.%sh% %Kata_file%Test.java
@@ -1 +1 @@
1
- codersdojo start run-once.sh %kata_file%.py
1
+ codersdojo start run-once.%sh% %kata_file%.py
@@ -1 +1 @@
1
- codersdojo start run-once.sh %kata_file%.rb
1
+ codersdojo start run-once.%sh% %kata_file%.rb
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
  - 0
9
- - 8
10
- version: 1.0.8
9
+ - 9
10
+ version: 1.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - CodersDojo-Team