cosmos 4.5.1-java → 4.5.2-java
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.
- checksums.yaml +4 -4
- data/.github/workflows/build_v4.yml +33 -0
- data/Dockerfile +4 -3
- data/Gemfile +1 -1
- data/Manifest.txt +1 -2
- data/README.md +0 -1
- data/Rakefile +20 -12
- data/cosmos.gemspec +4 -10
- data/data/crc.txt +5 -5
- data/ext/cosmos/ext/packet/packet.c +0 -6
- data/lib/cosmos/io/json_drb.rb +0 -8
- data/lib/cosmos/packets/packet_item_limits.rb +2 -14
- data/lib/cosmos/packets/structure_item.rb +4 -21
- data/lib/cosmos/system/system.rb +4 -1
- data/lib/cosmos/version.rb +4 -4
- data/make_gems.sh +1 -1
- data/spec/gui/qt_spec.rb +1 -1
- data/spec/gui/utilities/script_module_gui_spec.rb +1 -1
- data/spec/io/posix_serial_driver_spec.rb +7 -1
- data/spec/packets/packet_item_limits_spec.rb +6 -33
- data/spec/packets/structure_item_spec.rb +3 -21
- data/spec/top_level/top_level_spec.rb +2 -2
- metadata +24 -5
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 060701167ddcf37501a5f9bc029704f2f15d0a663b11041bf3320df5826e29f9
|
4
|
+
data.tar.gz: d71a10cd853c7eeb475408fa0d8a27d3e7971b907969b2250e8ae38d5d6decb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45c398e9bb54f33c71d238cd55413ce629ee4e79ab135723e5cf5f8a7dcf0aefcd5039c902c332f6387b3cec441369c5d750f4203fe5454253bc5bd845072487
|
7
|
+
data.tar.gz: cd8f4305482c575341a94c18f357f43ecd365f3624c4f3acb79849b0f6a1eee5410baab288dbda1ef85ce3e2cb4d6ce29db9450f1dfe233b5159562c75de2865
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
# Reference environment variables: https://docs.github.com/en/actions/reference/environment-variables
|
9
|
+
|
10
|
+
name: Cosmos 4 Tests
|
11
|
+
|
12
|
+
on:
|
13
|
+
push:
|
14
|
+
branches: [cosmos4]
|
15
|
+
pull_request:
|
16
|
+
branches: [cosmos4]
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
test:
|
20
|
+
runs-on: ubuntu-18.04
|
21
|
+
strategy:
|
22
|
+
matrix:
|
23
|
+
ruby-version: ["2.5", "2.6"]
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: ${{ matrix.ruby-version }}
|
29
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
30
|
+
- name: Run tests
|
31
|
+
run: bundle exec rake build spec
|
32
|
+
env:
|
33
|
+
COSMOS_DEVEL: ${GITHUB_WORKSPACE}\.
|
data/Dockerfile
CHANGED
@@ -54,8 +54,7 @@ ARG COSMOS_REPO=https://github.com/BallAerospace/COSMOS.git
|
|
54
54
|
# Download and setup COSMOS devel area
|
55
55
|
RUN gem install bundler --no-document
|
56
56
|
RUN cd /devel \
|
57
|
-
&& git clone ${COSMOS_REPO} COSMOS \
|
58
|
-
&& git checkout cosmos4 \
|
57
|
+
&& git clone -b cosmos4 ${COSMOS_REPO} COSMOS \
|
59
58
|
&& cd /devel/COSMOS \
|
60
59
|
&& bundle install
|
61
60
|
|
@@ -66,5 +65,7 @@ RUN cd /devel \
|
|
66
65
|
&& git clone ${COSMOS_DOCKER_REPO}
|
67
66
|
|
68
67
|
ENV COSMOS_DEVEL /devel/COSMOS
|
68
|
+
ENV COSMOS_NO_SIMPLECOV 1
|
69
|
+
ENV DOCKER 1
|
69
70
|
WORKDIR /devel/COSMOS
|
70
|
-
CMD bash
|
71
|
+
CMD bash
|
data/Gemfile
CHANGED
@@ -8,4 +8,4 @@ gem 'ruby-termios', '>= 0.9' if RbConfig::CONFIG['target_os'] !~ /mswin|mingw|cy
|
|
8
8
|
# gem 'wdm', '>= 0.1.0', :platforms => [:mswin, :mingw]
|
9
9
|
#end
|
10
10
|
gemspec
|
11
|
-
instance_eval File.read(File.join(__dir__, 'install/config/dart/Gemfile'))
|
11
|
+
instance_eval File.read(File.join(__dir__, 'install/config/dart/Gemfile')) unless ENV['CI']
|
data/Manifest.txt
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
.coveralls.yml
|
2
1
|
.dockerignore
|
3
2
|
.gitattributes
|
4
3
|
.github/ISSUE_TEMPLATE/bug_report.md
|
5
4
|
.github/ISSUE_TEMPLATE/feature_request.md
|
6
5
|
.github/ISSUE_TEMPLATE/help---usage---general-question.md
|
6
|
+
.github/workflows/build_v4.yml
|
7
7
|
.gitignore
|
8
8
|
.rubocop.yml
|
9
|
-
.travis.yml
|
10
9
|
.yardopts
|
11
10
|
CONTRIBUTING.txt
|
12
11
|
Dockerfile
|
data/README.md
CHANGED
@@ -111,7 +111,6 @@ If you discover a security vulnerability in COSMOS, please do not disclose to an
|
|
111
111
|
|
112
112
|
## Code Status
|
113
113
|
|
114
|
-
* [](https://travis-ci.org/BallAerospace/COSMOS)
|
115
114
|
* [](https://ci.appveyor.com/project/jasonatball/cosmos)
|
116
115
|
* [](https://codeclimate.com/github/BallAerospace/COSMOS)
|
117
116
|
* [](https://codecov.io/gh/BallAerospace/COSMOS)
|
data/Rakefile
CHANGED
@@ -300,6 +300,14 @@ end
|
|
300
300
|
task :release => [:require_version, :git_checkout, :build, :spec, :manifest, :version, :install_crc, :gem]
|
301
301
|
task :commit_release => [:commit_release_ticket, :tag_release]
|
302
302
|
|
303
|
+
# HOW-TO: Performing a COSMOS 4 build
|
304
|
+
# 1. rake docker_build
|
305
|
+
# 2. rake docker_run
|
306
|
+
# 3. Follow the individual steps printed out
|
307
|
+
# NOTE: When doing git push you will be asked for password
|
308
|
+
# You will need to enter a Github access token value
|
309
|
+
# Create one on Github, User -> Settings -> Developer settings -> Personal access tokens
|
310
|
+
|
303
311
|
task :docker_build do
|
304
312
|
_, platform, *_ = RUBY_PLATFORM.split("-")
|
305
313
|
if (platform == 'mswin32' or platform == 'mingw32') and which('winpty')
|
@@ -312,18 +320,17 @@ end
|
|
312
320
|
task :docker_run do
|
313
321
|
STDOUT.puts "Note, this is not automated on purpose to ensure each step is successful (with user entry of credentials for github/rubygems.org)"
|
314
322
|
STDOUT.puts "Steps to perform a COSMOS release:"
|
315
|
-
STDOUT.puts "
|
316
|
-
STDOUT.puts "
|
317
|
-
STDOUT.puts "
|
318
|
-
STDOUT.puts "
|
319
|
-
STDOUT.puts "
|
320
|
-
STDOUT.puts "
|
321
|
-
STDOUT.puts "
|
322
|
-
STDOUT.puts "
|
323
|
-
STDOUT.puts "
|
324
|
-
STDOUT.puts "
|
325
|
-
STDOUT.puts "
|
326
|
-
STDOUT.puts "10. /usr/bin/gem push cosmos-X.X.X-java.gem"
|
323
|
+
STDOUT.puts "1. git config --global user.name \"Last, First\""
|
324
|
+
STDOUT.puts "2. git config --global user.email \"me@ball.com\""
|
325
|
+
STDOUT.puts "3. git checkout cosmos4"
|
326
|
+
STDOUT.puts "4. git pull"
|
327
|
+
STDOUT.puts "5. export VERSION=X.X.X"
|
328
|
+
STDOUT.puts "6. rake release"
|
329
|
+
STDOUT.puts "7. rake commit_release"
|
330
|
+
STDOUT.puts "8. export PATH=/opt/jruby/bin:$PATH"
|
331
|
+
STDOUT.puts "9. rake gem"
|
332
|
+
STDOUT.puts "10a. /usr/bin/gem push cosmos-X.X.X.gem"
|
333
|
+
STDOUT.puts "10b. /usr/bin/gem push cosmos-X.X.X-java.gem"
|
327
334
|
STDOUT.puts "11. cd /devel/cosmos-docker"
|
328
335
|
STDOUT.puts "12. git pull"
|
329
336
|
STDOUT.puts "13. Update COSMOS_VERSION in all Dockerfiles. Also update README.md"
|
@@ -332,6 +339,7 @@ task :docker_run do
|
|
332
339
|
STDOUT.puts "16. git checkout -b vX.X.X"
|
333
340
|
STDOUT.puts "17. git push --set-upstream origin vX.X.X"
|
334
341
|
STDOUT.puts "18. Update release notes on github.com and cosmosrb.com"
|
342
|
+
STDOUT.puts " https://github.com/BallAerospace/COSMOS/pulls?q=is%3Apr+is%3Aclosed+base%3Acosmos4+no%3Amilestone"
|
335
343
|
|
336
344
|
system('docker run -it --rm cosmos-dev')
|
337
345
|
end
|
data/cosmos.gemspec
CHANGED
@@ -73,10 +73,11 @@ spec = Gem::Specification.new do |s|
|
|
73
73
|
files
|
74
74
|
else [] end
|
75
75
|
|
76
|
-
s.required_ruby_version = '~> 2.
|
76
|
+
s.required_ruby_version = '~> 2.4'
|
77
77
|
|
78
78
|
# Runtime Dependencies
|
79
79
|
s.add_runtime_dependency 'bundler', '>= 1.3'
|
80
|
+
s.add_runtime_dependency 'psych', '~> 3.3'
|
80
81
|
s.add_runtime_dependency 'rdoc', '>= 4' # qtbindings doesn't parse in 6.0.0, fixed in 6.0.1
|
81
82
|
s.add_runtime_dependency 'rake', '>= 10.0' # 10.0 released Nov 12, 2012
|
82
83
|
s.add_runtime_dependency 'json', '>= 1.5', '< 3' # 2.0+ works with COSMOS
|
@@ -86,20 +87,13 @@ spec = Gem::Specification.new do |s|
|
|
86
87
|
s.add_runtime_dependency 'uuidtools', '~> 2.1'
|
87
88
|
s.add_runtime_dependency 'snmp', '~> 1.0'
|
88
89
|
s.add_runtime_dependency 'rubyzip', '~> 1.2'
|
89
|
-
s.add_runtime_dependency 'nokogiri', '~> 1.10'
|
90
|
+
s.add_runtime_dependency 'nokogiri', ['~> 1.10', '< 1.13'] # Nokogiri 1.13 doesn't support Ruby 2.5
|
90
91
|
s.add_runtime_dependency 'opengl-bindings', '~> 1.6' if RUBY_ENGINE == 'ruby' # MRI Only
|
91
|
-
s.add_runtime_dependency 'qtbindings', '~> 4.8.6', '>= 4.8.6.2' if RUBY_ENGINE == 'ruby' # MRI Only
|
92
|
+
s.add_runtime_dependency 'qtbindings', '~> 4.8.6', '>= 4.8.6.2' if RUBY_ENGINE == 'ruby' && !ENV['CI'] # MRI Only, not Github
|
92
93
|
s.add_runtime_dependency 'puma', '~> 3.10'
|
93
94
|
s.add_runtime_dependency 'rack', '~> 2.0'
|
94
95
|
s.add_runtime_dependency 'httpclient', '~> 2.8'
|
95
96
|
|
96
|
-
# From http://www.rubydoc.info/gems/puma#Known_Bugs :
|
97
|
-
# "For MRI versions 2.2.7, 2.2.8, 2.2.9, 2.2.10, 2.3.4 and 2.4.1, you may see stream closed in
|
98
|
-
# another thread (IOError). It may be caused by a Ruby bug. It can be
|
99
|
-
# fixed with the gem https://rubygems.org/gems/stopgap_13632"
|
100
|
-
# This is commented out because the gemspec is only evaluated at gem build time
|
101
|
-
# s.add_runtime_dependency 'stopgap_13632', '~> 1.2.0' if RUBY_ENGINE == 'ruby' and %w(2.2.7 2.2.8 2.3.4 2.4.1).include? RUBY_VERSION # MRI Only
|
102
|
-
|
103
97
|
# Development Dependencies
|
104
98
|
s.add_development_dependency 'diff-lcs', '~> 1.3' if RUBY_ENGINE == 'ruby' # Get latest for MRI
|
105
99
|
s.add_development_dependency 'rspec', '~> 3.5'
|
data/data/crc.txt
CHANGED
@@ -221,7 +221,7 @@
|
|
221
221
|
"lib/cosmos/io/buffered_file.rb" 0x031BC078
|
222
222
|
"lib/cosmos/io/cosmos_snmp.rb" 0x64541158
|
223
223
|
"lib/cosmos/io/io_multiplexer.rb" 0x526F4CB6
|
224
|
-
"lib/cosmos/io/json_drb.rb"
|
224
|
+
"lib/cosmos/io/json_drb.rb" 0xFA1D3D3D
|
225
225
|
"lib/cosmos/io/json_drb_object.rb" 0x4603769D
|
226
226
|
"lib/cosmos/io/json_drb_rack.rb" 0xE3191B55
|
227
227
|
"lib/cosmos/io/json_rpc.rb" 0x918384D3
|
@@ -245,7 +245,7 @@
|
|
245
245
|
"lib/cosmos/packets/packet.rb" 0x8AA6A556
|
246
246
|
"lib/cosmos/packets/packet_config.rb" 0x73BC0FFF
|
247
247
|
"lib/cosmos/packets/packet_item.rb" 0xE0789E45
|
248
|
-
"lib/cosmos/packets/packet_item_limits.rb"
|
248
|
+
"lib/cosmos/packets/packet_item_limits.rb" 0x1C49C06C
|
249
249
|
"lib/cosmos/packets/parsers/format_string_parser.rb" 0x8015C5E3
|
250
250
|
"lib/cosmos/packets/parsers/limits_parser.rb" 0xD680A7A1
|
251
251
|
"lib/cosmos/packets/parsers/limits_response_parser.rb" 0x05979119
|
@@ -257,7 +257,7 @@
|
|
257
257
|
"lib/cosmos/packets/parsers/xtce_converter.rb" 0x58820221
|
258
258
|
"lib/cosmos/packets/parsers/xtce_parser.rb" 0x33A79E5D
|
259
259
|
"lib/cosmos/packets/structure.rb" 0x9C7730B4
|
260
|
-
"lib/cosmos/packets/structure_item.rb"
|
260
|
+
"lib/cosmos/packets/structure_item.rb" 0x4181D978
|
261
261
|
"lib/cosmos/packets/telemetry.rb" 0xAE95A294
|
262
262
|
"lib/cosmos/processors.rb" 0x5241327D
|
263
263
|
"lib/cosmos/processors/new_packet_log_processor.rb" 0x8BFC2259
|
@@ -280,7 +280,7 @@
|
|
280
280
|
"lib/cosmos/streams/tcpip_client_stream.rb" 0xD4F3E5AE
|
281
281
|
"lib/cosmos/streams/tcpip_socket_stream.rb" 0xAC1077D0
|
282
282
|
"lib/cosmos/system.rb" 0x735DFB42
|
283
|
-
"lib/cosmos/system/system.rb"
|
283
|
+
"lib/cosmos/system/system.rb" 0xC2C1D75F
|
284
284
|
"lib/cosmos/system/target.rb" 0x67DCFB35
|
285
285
|
"lib/cosmos/tools/cmd_extractor/cmd_extractor.rb" 0x4BDD539F
|
286
286
|
"lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb" 0xA5AA99F7
|
@@ -464,7 +464,7 @@
|
|
464
464
|
"lib/cosmos/utilities/ruby_lex_utils.rb" 0x00EEFAE2
|
465
465
|
"lib/cosmos/utilities/simulated_target.rb" 0xB251C94B
|
466
466
|
"lib/cosmos/utilities/sleeper.rb" 0x650C3CEB
|
467
|
-
"lib/cosmos/version.rb"
|
467
|
+
"lib/cosmos/version.rb" 0xB78479FB
|
468
468
|
"lib/cosmos/win32/excel.rb" 0x72BFBAC2
|
469
469
|
"lib/cosmos/win32/win32.rb" 0xBCECA922
|
470
470
|
"lib/cosmos/win32/win32_main.rb" 0x722DDE0D
|
@@ -118,15 +118,9 @@ static VALUE received_time_equals(VALUE self, VALUE received_time) {
|
|
118
118
|
* received */
|
119
119
|
static VALUE received_count_equals(VALUE self, VALUE received_count) {
|
120
120
|
volatile VALUE read_conversion_cache = rb_ivar_get(self, id_ivar_read_conversion_cache);
|
121
|
-
#ifdef RUBY_INTEGER_UNIFICATION /* Ruby 2.4.0 unified Fixnum and Bignum into Integer. This check allows the code to build pre- and post-2.4.0. */
|
122
121
|
if (rb_funcall(received_count, id_method_class, 0) != rb_cInteger) {
|
123
122
|
rb_raise(rb_eArgError, "received_count must be an Integer but is a %s", RSTRING_PTR(rb_funcall(rb_funcall(received_count, id_method_class, 0), id_method_to_s, 0)));
|
124
123
|
}
|
125
|
-
#else
|
126
|
-
if ((rb_funcall(received_count, id_method_class, 0) != rb_cFixnum) && (rb_funcall(received_count, id_method_class, 0) != rb_cBignum)) {
|
127
|
-
rb_raise(rb_eArgError, "received_count must be an Integer but is a %s", RSTRING_PTR(rb_funcall(rb_funcall(received_count, id_method_class, 0), id_method_to_s, 0)));
|
128
|
-
}
|
129
|
-
#endif
|
130
124
|
rb_ivar_set(self, id_ivar_received_count, received_count);
|
131
125
|
if (RTEST(read_conversion_cache)) {
|
132
126
|
rb_funcall(read_conversion_cache, id_method_clear, 0);
|
data/lib/cosmos/io/json_drb.rb
CHANGED
@@ -17,14 +17,6 @@ require 'set'
|
|
17
17
|
require 'cosmos/io/json_rpc'
|
18
18
|
require 'cosmos/io/json_drb_rack'
|
19
19
|
require 'rack/handler/puma'
|
20
|
-
if RUBY_ENGINE == 'ruby' and %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION
|
21
|
-
begin
|
22
|
-
require 'stopgap_13632'
|
23
|
-
rescue Exception => err
|
24
|
-
msg = "Error loading stopgap. Make sure gem install stopgap_13632 succeeds: #{err.message}"
|
25
|
-
raise $!, msg, $!.backtrace
|
26
|
-
end
|
27
|
-
end
|
28
20
|
|
29
21
|
# Add methods to the Puma::Launcher and Puma::Single class so we can tell
|
30
22
|
# if the server has been started.
|
@@ -91,24 +91,12 @@ module Cosmos
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def persistence_setting=(persistence_setting)
|
94
|
-
|
95
|
-
# Ruby version >= 2.4.0
|
96
|
-
raise ArgumentError, "persistence_setting must be an Integer but is a #{persistence_setting.class}" unless Integer === persistence_setting
|
97
|
-
else
|
98
|
-
# Ruby version < 2.4.0
|
99
|
-
raise ArgumentError, "persistence_setting must be a Fixnum but is a #{persistence_setting.class}" unless Fixnum === persistence_setting
|
100
|
-
end
|
94
|
+
raise ArgumentError, "persistence_setting must be an Integer but is a #{persistence_setting.class}" unless Integer === persistence_setting
|
101
95
|
@persistence_setting = persistence_setting
|
102
96
|
end
|
103
97
|
|
104
98
|
def persistence_count=(persistence_count)
|
105
|
-
|
106
|
-
# Ruby version >= 2.4.0
|
107
|
-
raise ArgumentError, "persistence_count must be an Integer but is a #{persistence_count.class}" unless Integer === persistence_count
|
108
|
-
else
|
109
|
-
# Ruby version < 2.4.0
|
110
|
-
raise ArgumentError, "persistence_count must be a Fixnum but is a #{persistence_count.class}" unless Fixnum === persistence_count
|
111
|
-
end
|
99
|
+
raise ArgumentError, "persistence_count must be an Integer but is a #{persistence_count.class}" unless Integer === persistence_count
|
112
100
|
@persistence_count = persistence_count
|
113
101
|
end
|
114
102
|
|
@@ -112,13 +112,7 @@ module Cosmos
|
|
112
112
|
end
|
113
113
|
|
114
114
|
def bit_offset=(bit_offset)
|
115
|
-
|
116
|
-
# Ruby version >= 2.4.0
|
117
|
-
raise ArgumentError, "#{@name}: bit_offset must be an Integer" unless Integer === bit_offset
|
118
|
-
else
|
119
|
-
# Ruby version < 2.4.0
|
120
|
-
raise ArgumentError, "#{@name}: bit_offset must be a Fixnum" unless Fixnum === bit_offset
|
121
|
-
end
|
115
|
+
raise ArgumentError, "#{@name}: bit_offset must be an Integer" unless Integer === bit_offset
|
122
116
|
|
123
117
|
byte_aligned = ((bit_offset % 8) == 0)
|
124
118
|
if (@data_type == :FLOAT or @data_type == :STRING or @data_type == :BLOCK) and !byte_aligned
|
@@ -133,13 +127,8 @@ module Cosmos
|
|
133
127
|
end
|
134
128
|
|
135
129
|
def bit_size=(bit_size)
|
136
|
-
|
137
|
-
|
138
|
-
raise ArgumentError, "#{name}: bit_size must be an Integer" unless Integer === bit_size
|
139
|
-
else
|
140
|
-
# Ruby version < 2.4.0
|
141
|
-
raise ArgumentError, "#{name}: bit_size must be a Fixnum" unless Fixnum === bit_size
|
142
|
-
end
|
130
|
+
raise ArgumentError, "#{name}: bit_size must be an Integer" unless Integer === bit_size
|
131
|
+
|
143
132
|
byte_multiple = ((bit_size % 8) == 0)
|
144
133
|
if bit_size <= 0 and (@data_type == :INT or @data_type == :UINT or @data_type == :FLOAT)
|
145
134
|
raise ArgumentError, "#{@name}: bit_size cannot be negative or zero for :INT, :UINT, and :FLOAT items: #{bit_size}"
|
@@ -171,13 +160,7 @@ module Cosmos
|
|
171
160
|
|
172
161
|
def array_size=(array_size)
|
173
162
|
if array_size
|
174
|
-
|
175
|
-
# Ruby version >= 2.4.0
|
176
|
-
raise ArgumentError, "#{@name}: array_size must be an Integer" unless Integer === array_size
|
177
|
-
else
|
178
|
-
# Ruby version < 2.4.0
|
179
|
-
raise ArgumentError, "#{@name}: array_size must be a Fixnum" unless Fixnum === array_size
|
180
|
-
end
|
163
|
+
raise ArgumentError, "#{@name}: array_size must be an Integer" unless Integer === array_size
|
181
164
|
raise ArgumentError, "#{@name}: array_size must be a multiple of bit_size" unless (@bit_size == 0 or (array_size % @bit_size == 0) or array_size < 0)
|
182
165
|
raise ArgumentError, "#{@name}: bit_size cannot be negative or zero for array items" if @bit_size <= 0
|
183
166
|
end
|
data/lib/cosmos/system/system.rb
CHANGED
@@ -992,7 +992,10 @@ module Cosmos
|
|
992
992
|
cmd_meta.disabled = true
|
993
993
|
tlm_meta = @telemetry.packet('SYSTEM', 'META')
|
994
994
|
tlm_meta.sorted_items.each do |item|
|
995
|
-
|
995
|
+
# Ignore reserved items as these are all DERIVED and thus will throw an exception
|
996
|
+
# in CommandSender since they don't have write conversions due to:
|
997
|
+
# commands.build_cmd -> packet.restore_defaults -> packet.write_item
|
998
|
+
next if Packet::RESERVED_ITEM_NAMES.include?(item.name)
|
996
999
|
cmd_meta.define(item.clone)
|
997
1000
|
end
|
998
1001
|
@config.commands['SYSTEM'] ||= {}
|
data/lib/cosmos/version.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
COSMOS_VERSION = '4.5.
|
3
|
+
COSMOS_VERSION = '4.5.2'
|
4
4
|
module Cosmos
|
5
5
|
module Version
|
6
6
|
MAJOR = '4'
|
7
7
|
MINOR = '5'
|
8
|
-
PATCH = '
|
9
|
-
BUILD = '
|
8
|
+
PATCH = '2'
|
9
|
+
BUILD = 'a516d4699e4de74066155c12194c9286adcde9ea'
|
10
10
|
end
|
11
|
-
VERSION = '4.5.
|
11
|
+
VERSION = '4.5.2'
|
12
12
|
end
|
data/make_gems.sh
CHANGED
data/spec/gui/qt_spec.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
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
|
-
if RUBY_ENGINE == 'ruby'
|
11
|
+
if RUBY_ENGINE == 'ruby' && !ENV['CI']
|
12
12
|
require 'spec_helper'
|
13
13
|
require 'cosmos/gui/qt'
|
14
14
|
require 'cosmos/script'
|
@@ -8,7 +8,13 @@
|
|
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
|
-
|
11
|
+
# NOTE: !ENV['DOCKER'] because of the following error while in container:
|
12
|
+
# Failure/Error: @handle = Kernel.open(port_name, File::RDWR | File::NONBLOCK)
|
13
|
+
# Errno::ENOENT:
|
14
|
+
# No such file or directory @ rb_sysopen - /dev/ttyS0
|
15
|
+
# ./lib/cosmos/io/posix_serial_driver.rb:48:in `initialize'
|
16
|
+
|
17
|
+
if RbConfig::CONFIG['target_os'] !~ /mswin|mingw|cygwin/i and RUBY_ENGINE == 'ruby' and !ENV['CI'] and !ENV['DOCKER']
|
12
18
|
|
13
19
|
require 'spec_helper'
|
14
20
|
require 'cosmos/io/posix_serial_driver'
|
@@ -84,25 +84,11 @@ module Cosmos
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it "complains about persistence_setting = nil" do
|
87
|
-
|
88
|
-
# Ruby version >= 2.4.0
|
89
|
-
expect { @l.persistence_setting = nil}.to raise_error(ArgumentError, "persistence_setting must be an Integer but is a NilClass")
|
90
|
-
else
|
91
|
-
# Ruby version < 2.4.0
|
92
|
-
expect { @l.persistence_setting = nil}.to raise_error(ArgumentError, "persistence_setting must be a Fixnum but is a NilClass")
|
93
|
-
end
|
87
|
+
expect { @l.persistence_setting = nil}.to raise_error(ArgumentError, "persistence_setting must be an Integer but is a NilClass")
|
94
88
|
end
|
95
89
|
|
96
|
-
|
97
|
-
|
98
|
-
it "complains about persistence_setting that aren't Integer" do
|
99
|
-
expect { @l.persistence_setting = 5.5}.to raise_error(ArgumentError, "persistence_setting must be an Integer but is a Float")
|
100
|
-
end
|
101
|
-
else
|
102
|
-
# Ruby version < 2.4.0
|
103
|
-
it "complains about persistence_setting that aren't Fixnum" do
|
104
|
-
expect { @l.persistence_setting = 5.5}.to raise_error(ArgumentError, "persistence_setting must be a Fixnum but is a Float")
|
105
|
-
end
|
90
|
+
it "complains about persistence_setting that aren't Integer" do
|
91
|
+
expect { @l.persistence_setting = 5.5}.to raise_error(ArgumentError, "persistence_setting must be an Integer but is a Float")
|
106
92
|
end
|
107
93
|
end
|
108
94
|
|
@@ -114,24 +100,11 @@ module Cosmos
|
|
114
100
|
end
|
115
101
|
|
116
102
|
it "complains about persistence_count = nil" do
|
117
|
-
|
118
|
-
# Ruby version >= 2.4.0
|
119
|
-
expect { @l.persistence_count = nil}.to raise_error(ArgumentError, "persistence_count must be an Integer but is a NilClass")
|
120
|
-
else
|
121
|
-
# Ruby version < 2.4.0
|
122
|
-
expect { @l.persistence_count = nil}.to raise_error(ArgumentError, "persistence_count must be a Fixnum but is a NilClass")
|
123
|
-
end
|
103
|
+
expect { @l.persistence_count = nil}.to raise_error(ArgumentError, "persistence_count must be an Integer but is a NilClass")
|
124
104
|
end
|
125
105
|
|
126
|
-
|
127
|
-
|
128
|
-
expect { @l.persistence_count = 5.5}.to raise_error(ArgumentError, "persistence_count must be an Integer but is a Float")
|
129
|
-
end
|
130
|
-
else
|
131
|
-
# Ruby version < 2.4.0
|
132
|
-
it "complains about persistence_count that aren't Fixnum" do
|
133
|
-
expect { @l.persistence_count = 5.5}.to raise_error(ArgumentError, "persistence_count must be a Fixnum but is a Float")
|
134
|
-
end
|
106
|
+
it "complains about persistence_count that aren't Integer" do
|
107
|
+
expect { @l.persistence_count = 5.5}.to raise_error(ArgumentError, "persistence_count must be an Integer but is a Float")
|
135
108
|
end
|
136
109
|
end
|
137
110
|
|
@@ -69,13 +69,7 @@ module Cosmos
|
|
69
69
|
|
70
70
|
describe "bit_offset=" do
|
71
71
|
it "compains about bad bit offsets types" do
|
72
|
-
|
73
|
-
# Ruby version >= 2.4.0
|
74
|
-
expect { StructureItem.new("test", nil, 8, :UINT, :BIG_ENDIAN, nil) }.to raise_error(ArgumentError, "TEST: bit_offset must be an Integer")
|
75
|
-
else
|
76
|
-
# Ruby version < 2.4.0
|
77
|
-
expect { StructureItem.new("test", nil, 8, :UINT, :BIG_ENDIAN, nil) }.to raise_error(ArgumentError, "TEST: bit_offset must be a Fixnum")
|
78
|
-
end
|
72
|
+
expect { StructureItem.new("test", nil, 8, :UINT, :BIG_ENDIAN, nil) }.to raise_error(ArgumentError, "TEST: bit_offset must be an Integer")
|
79
73
|
end
|
80
74
|
|
81
75
|
it "complains about unaligned bit offsets" do
|
@@ -91,13 +85,7 @@ module Cosmos
|
|
91
85
|
|
92
86
|
describe "bit_size=" do
|
93
87
|
it "complains about bad bit sizes types" do
|
94
|
-
|
95
|
-
# Ruby version >= 2.4.0
|
96
|
-
expect { StructureItem.new("test", 0, nil, :UINT, :BIG_ENDIAN, nil) }.to raise_error(ArgumentError, "TEST: bit_size must be an Integer")
|
97
|
-
else
|
98
|
-
# Ruby version < 2.4.0
|
99
|
-
expect { StructureItem.new("test", 0, nil, :UINT, :BIG_ENDIAN, nil) }.to raise_error(ArgumentError, "TEST: bit_size must be a Fixnum")
|
100
|
-
end
|
88
|
+
expect { StructureItem.new("test", 0, nil, :UINT, :BIG_ENDIAN, nil) }.to raise_error(ArgumentError, "TEST: bit_size must be an Integer")
|
101
89
|
end
|
102
90
|
|
103
91
|
it "complains about 0 size INT, UINT, and FLOAT" do
|
@@ -122,13 +110,7 @@ module Cosmos
|
|
122
110
|
|
123
111
|
describe "array_size=" do
|
124
112
|
it "complains about bad array size types" do
|
125
|
-
|
126
|
-
# Ruby version >= 2.4.0
|
127
|
-
expect { StructureItem.new("test", 0, 8, :UINT, :BIG_ENDIAN, "") }.to raise_error(ArgumentError, "TEST: array_size must be an Integer")
|
128
|
-
else
|
129
|
-
# Ruby version < 2.4.0
|
130
|
-
expect { StructureItem.new("test", 0, 8, :UINT, :BIG_ENDIAN, "") }.to raise_error(ArgumentError, "TEST: array_size must be a Fixnum")
|
131
|
-
end
|
113
|
+
expect { StructureItem.new("test", 0, 8, :UINT, :BIG_ENDIAN, "") }.to raise_error(ArgumentError, "TEST: array_size must be an Integer")
|
132
114
|
end
|
133
115
|
|
134
116
|
it "complains about array size != multiple of bit size" do
|
@@ -520,7 +520,7 @@ module Cosmos
|
|
520
520
|
|
521
521
|
describe "open_file_browser" do
|
522
522
|
it "opens a file browser" do
|
523
|
-
unless ENV['
|
523
|
+
unless ENV['CI']
|
524
524
|
expect(Cosmos).to receive(:system).with(/#{Dir.pwd}/)
|
525
525
|
Cosmos.open_file_browser(Dir.pwd)
|
526
526
|
end
|
@@ -529,7 +529,7 @@ module Cosmos
|
|
529
529
|
|
530
530
|
describe "open_in_text_editor" do
|
531
531
|
it "opens the file in a text editor" do
|
532
|
-
unless ENV['
|
532
|
+
unless ENV['CI']
|
533
533
|
expect(Cosmos).to receive(:system).with(/#{File.basename(__FILE__)}/)
|
534
534
|
Cosmos.open_in_text_editor(__FILE__)
|
535
535
|
end
|
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: 4.5.
|
4
|
+
version: 4.5.2
|
5
5
|
platform: java
|
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:
|
12
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.3'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.3'
|
34
|
+
name: psych
|
35
|
+
prerelease: false
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '3.3'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
@@ -163,6 +177,9 @@ dependencies:
|
|
163
177
|
- - "~>"
|
164
178
|
- !ruby/object:Gem::Version
|
165
179
|
version: '1.10'
|
180
|
+
- - "<"
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '1.13'
|
166
183
|
name: nokogiri
|
167
184
|
prerelease: false
|
168
185
|
type: :runtime
|
@@ -171,6 +188,9 @@ dependencies:
|
|
171
188
|
- - "~>"
|
172
189
|
- !ruby/object:Gem::Version
|
173
190
|
version: '1.10'
|
191
|
+
- - "<"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '1.13'
|
174
194
|
- !ruby/object:Gem::Dependency
|
175
195
|
requirement: !ruby/object:Gem::Requirement
|
176
196
|
requirements:
|
@@ -400,15 +420,14 @@ executables:
|
|
400
420
|
extensions: []
|
401
421
|
extra_rdoc_files: []
|
402
422
|
files:
|
403
|
-
- ".coveralls.yml"
|
404
423
|
- ".dockerignore"
|
405
424
|
- ".gitattributes"
|
406
425
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
407
426
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
408
427
|
- ".github/ISSUE_TEMPLATE/help---usage---general-question.md"
|
428
|
+
- ".github/workflows/build_v4.yml"
|
409
429
|
- ".gitignore"
|
410
430
|
- ".rubocop.yml"
|
411
|
-
- ".travis.yml"
|
412
431
|
- ".yardopts"
|
413
432
|
- CONTRIBUTING.txt
|
414
433
|
- Dockerfile
|
@@ -2205,7 +2224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2205
2224
|
requirements:
|
2206
2225
|
- - "~>"
|
2207
2226
|
- !ruby/object:Gem::Version
|
2208
|
-
version: '2.
|
2227
|
+
version: '2.4'
|
2209
2228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2210
2229
|
requirements:
|
2211
2230
|
- - ">="
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
data/.travis.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
env: JRUBY_OPTS=--debug
|
2
|
-
dist: trusty
|
3
|
-
language: ruby
|
4
|
-
cache: bundler
|
5
|
-
services:
|
6
|
-
- postgresql
|
7
|
-
rvm:
|
8
|
-
- jruby-9.2.9.0
|
9
|
-
- 2.6.5
|
10
|
-
- 2.5.7
|
11
|
-
- 2.4.9
|
12
|
-
before_install:
|
13
|
-
- sudo apt-get install -y libgl1-mesa-dev
|
14
|
-
- gem update --system
|
15
|
-
- gem install bundler
|
16
|
-
script: bundle exec rake build spec
|