SimControl 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,10 +13,6 @@ module SimControl
13
13
  @script
14
14
  end
15
15
 
16
- def args(scenario)
17
- scenario.args
18
- end
19
-
20
16
  def execute(scenario)
21
17
  stdin, stout, stderr, thread = Open3.popen3 command(scenario), chdir: basedir
22
18
  thread.join
@@ -27,7 +23,7 @@ module SimControl
27
23
  end
28
24
 
29
25
  def command(scenario)
30
- [interpreter, script, args(scenario)].reject(&:nil?).reject(&:empty?).join " "
26
+ [interpreter, script, scenario].reject(&:nil?).reject(&:empty?).join " "
31
27
  end
32
28
 
33
29
  def interpreter
@@ -18,7 +18,7 @@ module SimControl
18
18
  end
19
19
 
20
20
  def args(other_options = {})
21
- [commands, options(other_options)].join(" ").strip
21
+ [options(other_options), commands].join(" ").strip
22
22
  end
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module SimControl
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -35,8 +35,7 @@ describe SimControl::PythonEnvironment do
35
35
 
36
36
  it "composes the command" do
37
37
  simulation = SimControl::PythonEnvironment.new script
38
- scenario = double("scenario")
39
- scenario.should_receive(:args).and_return("--args 1")
38
+ scenario = "--args 1"
40
39
  simulation.stub(:interpreter).and_return "/foo/jpython"
41
40
  expect(simulation.command(scenario)).to eq("/foo/jpython a-script --args 1")
42
41
  end
@@ -13,7 +13,7 @@ describe SimControl::Scenario do
13
13
 
14
14
  it "generates the complete arguments string" do
15
15
  scenario = SimControl::Scenario.new "foo", "bar", baz: "1", qux: 2
16
- expect(scenario.args).to eq("foo bar --baz 1 --qux 2")
16
+ expect(scenario.args).to eq("--baz 1 --qux 2 foo bar")
17
17
  end
18
18
 
19
19
  it "merges options passed to args in the options" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SimControl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-22 00:00:00.000000000 Z
12
+ date: 2013-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -189,18 +189,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
189
  - - ! '>='
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
- segments:
193
- - 0
194
- hash: 1705226376190038330
195
192
  required_rubygems_version: !ruby/object:Gem::Requirement
196
193
  none: false
197
194
  requirements:
198
195
  - - ! '>='
199
196
  - !ruby/object:Gem::Version
200
197
  version: '0'
201
- segments:
202
- - 0
203
- hash: 1705226376190038330
204
198
  requirements: []
205
199
  rubyforge_project:
206
200
  rubygems_version: 1.8.23