cosmos 3.6.2 → 3.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/crc.txt +19 -19
- data/lib/cosmos/core_ext/array.rb +4 -1
- data/lib/cosmos/core_ext/matrix.rb +3 -0
- data/lib/cosmos/gui/dialogs/find_replace_dialog.rb +42 -35
- data/lib/cosmos/gui/line_graph/line_graph.rb +3 -0
- data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +3 -1
- data/lib/cosmos/gui/opengl/gl_viewer.rb +115 -127
- data/lib/cosmos/gui/utilities/script_module_gui.rb +2 -5
- data/lib/cosmos/interfaces/linc_interface.rb +207 -147
- data/lib/cosmos/io/win32_serial_driver.rb +1 -1
- data/lib/cosmos/script/scripting.rb +2 -2
- data/lib/cosmos/script/tools.rb +8 -1
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +12 -17
- data/lib/cosmos/tools/launcher/launcher_config.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner.rb +9 -4
- data/lib/cosmos/tools/table_manager/table_manager.rb +3 -1
- data/lib/cosmos/tools/tlm_grapher/plot_editors/linegraph_plot_editor.rb +11 -1
- data/lib/cosmos/tools/tlm_grapher/plot_gui_objects/linegraph_plot_gui_object.rb +1 -0
- data/lib/cosmos/tools/tlm_grapher/plots/linegraph_plot.rb +8 -0
- data/lib/cosmos/version.rb +4 -4
- data/spec/core_ext/array_spec.rb +62 -1
- data/spec/core_ext/matrix_spec.rb +61 -0
- data/spec/interfaces/linc_interface_spec.rb +0 -9
- data/spec/script/script_spec.rb +7 -3
- data/spec/script/scripting_spec.rb +2 -2
- data/spec/script/tools_spec.rb +2 -0
- data/spec/spec_helper.rb +10 -1
- data/spec/tools/launcher/launcher_config_spec.rb +21 -11
- data/spec/top_level/top_level_spec.rb +1 -1
- metadata +2 -2
@@ -419,7 +419,7 @@ module Cosmos
|
|
419
419
|
|
420
420
|
it "raises an error if the script can't be found" do
|
421
421
|
class ScriptRunnerFrame; def self.instance; false; end; end
|
422
|
-
expect { start("unknown_script.rb") }.to raise_error(
|
422
|
+
expect { start("unknown_script.rb") }.to raise_error(LoadError)
|
423
423
|
end
|
424
424
|
|
425
425
|
it "starts a script within ScriptRunnerFrame" do
|
@@ -439,7 +439,7 @@ module Cosmos
|
|
439
439
|
describe "load_utility" do
|
440
440
|
it "requires a script" do
|
441
441
|
class ScriptRunnerFrame; def self.instance; false; end; end;
|
442
|
-
expect { load_utility("example.rb") }.to raise_error(
|
442
|
+
expect { load_utility("example.rb") }.to raise_error(LoadError, /Procedure not found/)
|
443
443
|
end
|
444
444
|
|
445
445
|
it "requires a script within ScriptRunnerFrame" do
|
data/spec/script/tools_spec.rb
CHANGED
@@ -61,6 +61,7 @@ module Cosmos
|
|
61
61
|
it "complains if unable to start telemetry viewer" do
|
62
62
|
# Avoid the needless delay by stubbing sleep
|
63
63
|
allow_any_instance_of(Object).to receive(:sleep)
|
64
|
+
allow_any_instance_of(Object).to receive(:cosmos_script_sleep).and_return(true)
|
64
65
|
allow(Cosmos).to receive(:run_process)
|
65
66
|
expect { display("HI") }.to raise_error(RuntimeError, /HI could not be displayed/)
|
66
67
|
end
|
@@ -80,6 +81,7 @@ module Cosmos
|
|
80
81
|
it "complains if unable to start telemetry viewer" do
|
81
82
|
# Avoid the needless delay by stubbing sleep
|
82
83
|
allow_any_instance_of(Object).to receive(:sleep)
|
84
|
+
allow_any_instance_of(Object).to receive(:cosmos_script_sleep).and_return(true)
|
83
85
|
allow(Cosmos).to receive(:run_process)
|
84
86
|
expect { clear("HI") }.to raise_error(RuntimeError, /HI could not be cleared/)
|
85
87
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -8,6 +8,15 @@
|
|
8
8
|
# as published by the Free Software Foundation; version 3 with
|
9
9
|
# attribution addendums as found in the LICENSE.txt
|
10
10
|
|
11
|
+
# Redefine Object.load so simplecov doesn't overwrite the results after
|
12
|
+
# re-loading a file during test.
|
13
|
+
def load(file, wrap = false)
|
14
|
+
SimpleCov.start do
|
15
|
+
command_name "#{command_name}1"
|
16
|
+
end
|
17
|
+
Kernel.load(file, wrap)
|
18
|
+
end
|
19
|
+
|
11
20
|
# NOTE: You MUST require simplecov before anything else!
|
12
21
|
unless ENV['COSMOS_NO_SIMPLECOV']
|
13
22
|
require 'simplecov'
|
@@ -18,7 +27,7 @@ unless ENV['COSMOS_NO_SIMPLECOV']
|
|
18
27
|
Coveralls::SimpleCov::Formatter
|
19
28
|
]
|
20
29
|
SimpleCov.start do
|
21
|
-
merge_timeout
|
30
|
+
merge_timeout 12 * 60 * 60 # merge the last 12 hours of results
|
22
31
|
add_filter '/spec/'
|
23
32
|
add_filter '/autohotkey/'
|
24
33
|
|
@@ -12,6 +12,7 @@ require 'spec_helper'
|
|
12
12
|
require 'cosmos'
|
13
13
|
require 'cosmos/tools/launcher/launcher_config'
|
14
14
|
require 'tempfile'
|
15
|
+
require 'ostruct'
|
15
16
|
|
16
17
|
module Cosmos
|
17
18
|
|
@@ -446,19 +447,28 @@ module Cosmos
|
|
446
447
|
tf.unlink
|
447
448
|
end
|
448
449
|
end
|
449
|
-
end
|
450
450
|
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
451
|
+
describe "AUTO_GEM_TOOLS" do
|
452
|
+
it "loads a tool from a gem" do
|
453
|
+
spec1 = OpenStruct.new
|
454
|
+
spec1.name = "cosmos-test"
|
455
|
+
spec1.gem_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','..'))
|
456
|
+
allow(Bundler).to receive_message_chain(:load, :specs).and_return([spec1])
|
457
|
+
|
458
|
+
tf = Tempfile.new('mylauncher.txt')
|
459
|
+
tf.puts 'AUTO_GEM_TOOLS'
|
460
|
+
tf.close
|
461
461
|
|
462
|
+
lc = LauncherConfig.new(tf.path)
|
463
|
+
expect(lc.items[0][0]).to eq :TOOL
|
464
|
+
expect(lc.items[0][1]).to eq 'cmd_tlm_server'
|
465
|
+
expect(lc.items[0][2]).to match('cmd_tlm_server')
|
466
|
+
expect(lc.items[0][3]).to be true
|
467
|
+
expect(lc.items[0][5]).to be_nil
|
468
|
+
tf.unlink
|
469
|
+
end
|
470
|
+
end
|
471
|
+
end
|
462
472
|
end
|
463
473
|
end
|
464
474
|
|
@@ -158,7 +158,7 @@ module Cosmos
|
|
158
158
|
it "returns a Thread" do
|
159
159
|
if Kernel.is_windows?
|
160
160
|
capture_io do |stdout|
|
161
|
-
thread = Cosmos.run_process("ping
|
161
|
+
thread = Cosmos.run_process("ping google.com -n 2 -w 1000 > nul")
|
162
162
|
sleep 0.1
|
163
163
|
expect(thread).to be_a Thread
|
164
164
|
expect(thread.alive?).to be true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cosmos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|