openc3 5.4.0 → 5.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c51fd2722cde933052c2bf5941c3a111a14ae995de868bb6371faf9f32f708e
4
- data.tar.gz: 0a1684b608df0335f485e59b29e55e66a1307cb62c7ab76586989a4566096946
3
+ metadata.gz: ba92696b60117db745207ad94efe543da2db11f25212f70269a6305cb8445295
4
+ data.tar.gz: ac3d2cc21a962434b478f708644bb33b702858c770a4c93c0017529bcb5b7b05
5
5
  SHA512:
6
- metadata.gz: c36db608db41b6f0c1edc8ae6b83293d71eb37984e115d86a9ca9ff1e6aa4f124c3e0d645b1ac01b329d3fd490ef6a3b281ddc2754344bbdc1c78a702258522c
7
- data.tar.gz: 754bc2ce9f0fd0066e47731bc5b50279ac5ce166f20752bb5be42d2ce4ab09698212ee82abcfd1ab353aa1e85029f47e5b766b4bfdba60823682c23148754837
6
+ metadata.gz: cca2d57593526f75888406d0b7946f22ce53823d6e2a45e5204a0856948b6b752b9a7a9612f417d973a6a50c55bf46b16800f4e9295cbeb451d48600d1ae71d0
7
+ data.tar.gz: 37cb6cf7247cc6956172641d95755145e409ef09ee35dc08d7bae7650e422961c7d17caf83ee7affb428da84057a94625c4484e5b11165bf50db7d692d72a0f2
@@ -30,8 +30,13 @@ module OpenC3
30
30
  # and can implement setup and teardown methods. Script groups are added via add_group(Group)
31
31
  # and individual scripts added via add_script(Group, script_method).
32
32
  class Suite
33
- attr_reader :scripts
34
- attr_reader :plans
33
+ def scripts
34
+ @scripts ||= {}
35
+ end
36
+
37
+ def plans
38
+ @plans ||= []
39
+ end
35
40
 
36
41
  ###########################################################################
37
42
  # START PUBLIC API
@@ -17,7 +17,7 @@
17
17
  # All changes Copyright 2022, OpenC3, Inc.
18
18
  # All Rights Reserved
19
19
  #
20
- # This file may also be used under the terms of a commercial license
20
+ # This file may also be used under the terms of a commercial license
21
21
  # if purchased from OpenC3, Inc.
22
22
 
23
23
  require 'openc3/script/suite'
@@ -122,7 +122,6 @@ module OpenC3
122
122
  # Build list of Suites and Groups
123
123
  def self.build_suites
124
124
  @@suites = []
125
- # @@suites = @@suites.select { |my_suite| my_suite.name == 'CustomSuite' }
126
125
  suites = {}
127
126
  groups = []
128
127
  ObjectSpace.each_object(Class) do |object|
@@ -144,7 +143,6 @@ module OpenC3
144
143
  if object.methods(false).include?(:name)
145
144
  raise FatalError.new("#{object} redefined the 'self.name' method. Delete the 'self.name' method and try again.")
146
145
  end
147
-
148
146
  groups << object
149
147
  end
150
148
  end
@@ -153,15 +151,18 @@ module OpenC3
153
151
  return "No Suite or no Group classes found"
154
152
  end
155
153
 
156
- # Create Suite for unassigned Groups
154
+ # Remove assigned Groups from the array of groups
157
155
  @@suites.each do |suite|
156
+ next if suite.class == UnassignedSuite
158
157
  groups_to_delete = []
159
158
  groups.each { |group| groups_to_delete << group if suite.scripts[group] }
160
159
  groups_to_delete.each { |group| groups.delete(group) }
161
160
  end
162
161
  if groups.empty?
162
+ # If there are no unassigned group we simply remove the UnassignedSuite
163
163
  @@suites = @@suites.select { |suite| suite.class != UnassignedSuite }
164
164
  else
165
+ # unassigned groups should be added to the UnassignedSuite
165
166
  unassigned_suite = @@suites.select { |suite| suite.class == UnassignedSuite }[0]
166
167
  groups.each { |group| unassigned_suite.add_group(group) }
167
168
  end
@@ -1,14 +1,14 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- OPENC3_VERSION = '5.4.0'
3
+ OPENC3_VERSION = '5.4.1'
4
4
  module OpenC3
5
5
  module Version
6
6
  MAJOR = '5'
7
7
  MINOR = '4'
8
- PATCH = '0'
8
+ PATCH = '1'
9
9
  OTHER = ''
10
- BUILD = 'f10d7e7ecbe3c6917e4f87eeac1f5eb0ddcf3d67'
10
+ BUILD = 'b347f2b134ad7f7ea4ae0f57c7b53c5acde4b648'
11
11
  end
12
- VERSION = '5.4.0'
13
- GEM_VERSION = '5.4.0'
12
+ VERSION = '5.4.1'
13
+ GEM_VERSION = '5.4.1'
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openc3
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
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: 2023-02-02 00:00:00.000000000 Z
12
+ date: 2023-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler