automotive-ecu 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ecu/labels/label_list.rb +11 -21
- data/lib/ecu/labels/label_list_comparison.rb +9 -3
- data/lib/ecu/labels/value_comparison.rb +6 -8
- data/lib/ecu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51844ad0a25505269ac79efbd189a0af6182ab3d38e6c3200a92050bee274c3a
|
4
|
+
data.tar.gz: ba14d641e740fdd0cd524cfa1d0ab3b921417d39c8d6a38bf14abea048c295eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 260d43e46983a2cc88e8ab2ec8c268235445c5a0f40c3a5957925fab22ecd324a52a58c7467f7812664967e91e1d556842c809b36b7987a13c03a4dfacb2da2a
|
7
|
+
data.tar.gz: b345da9c3c4d4bb5774cb186fe9c694835c1603b29f347428bb98927151295cee80a58fe5b4163405986395931f4d6f58e733d86643751075637e9ee426cb6d0
|
@@ -89,6 +89,10 @@ class Ecu
|
|
89
89
|
self.class.new(@labels.reject(&blk), @headers, @subheaders)
|
90
90
|
end
|
91
91
|
|
92
|
+
def with(headers: [], subheaders: [])
|
93
|
+
self.class.new(@labels, headers, subheaders)
|
94
|
+
end
|
95
|
+
|
92
96
|
def delete_if(&blk)
|
93
97
|
@labels.delete_if(&blk)
|
94
98
|
end
|
@@ -112,27 +116,13 @@ class Ecu
|
|
112
116
|
@subheaders = merged.subheaders
|
113
117
|
end
|
114
118
|
|
115
|
-
def +(other)
|
116
|
-
|
117
|
-
def
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
def
|
122
|
-
@labels.empty?
|
123
|
-
end
|
124
|
-
|
125
|
-
def contains?(name)
|
126
|
-
map(&:name).include?(name)
|
127
|
-
end
|
128
|
-
|
129
|
-
def to_s
|
130
|
-
"[#{@labels.map(&:to_s).join(", ")}]"
|
131
|
-
end
|
132
|
-
|
133
|
-
def size; count end
|
134
|
-
|
135
|
-
def inspect; to_s end
|
119
|
+
def +(other) = merge(other)
|
120
|
+
def to_s = "[#{@labels.map(&:to_s).join(", ")}]"
|
121
|
+
def inspect = to_s
|
122
|
+
def size = count
|
123
|
+
def empty? = @labels.empty?
|
124
|
+
def contains?(name) = map(&:name).include?(name)
|
125
|
+
def to_a = @labels
|
136
126
|
|
137
127
|
end
|
138
128
|
end
|
@@ -26,15 +26,21 @@ class Ecu
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def left_exclusive
|
29
|
-
names(:left_exclusive).map {
|
29
|
+
names(:left_exclusive).map { left.fetch(_1) }
|
30
30
|
end
|
31
31
|
|
32
32
|
def right_exclusive
|
33
|
-
names(:right_exclusive).map {
|
33
|
+
names(:right_exclusive).map { right.fetch(_1) }
|
34
34
|
end
|
35
35
|
|
36
36
|
def differences
|
37
|
-
names(:nonequal).map {
|
37
|
+
names(:nonequal).map { [ left.fetch(_1), right.fetch(_1) ] }
|
38
|
+
end
|
39
|
+
|
40
|
+
def identical?
|
41
|
+
names(:left_exclusive).empty? &&
|
42
|
+
names(:right_exclusive).empty? &&
|
43
|
+
names(:nonequal).empty?
|
38
44
|
end
|
39
45
|
|
40
46
|
def merge(priority: :right)
|
@@ -7,14 +7,12 @@ class Ecu
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def eql?
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
else
|
17
|
-
fail "Unkown value class: #{@left.class}"
|
10
|
+
case [@left, @right]
|
11
|
+
in [NilClass, NilClass] then @left == @right
|
12
|
+
in [String, String] then @left == @right
|
13
|
+
in [Numeric, Numeric] then @left == @right
|
14
|
+
in [Array, Array] then arrays_eql?(@left, @right)
|
15
|
+
in [_, _] then false
|
18
16
|
end
|
19
17
|
end
|
20
18
|
|
data/lib/ecu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: automotive-ecu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Mueller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: terminal-table
|