sipp 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sipp/code.rb +46 -23
- data/lib/sipp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a759acbd50e83cfbc4294f476ca21048c42286fb
|
4
|
+
data.tar.gz: 91df79cf3188f78777c1495002445c540e60d031
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e699be1f95b5075a45b4b8b54fc1e1ea1c418c32e88e1a202e9659d4e5e1ec4dfa3bfd00ef803ff79555d858cb1acd831e767249381cae6a3dda4748905e3465
|
7
|
+
data.tar.gz: fbe654d6c318cbc133c7a43d60614a800135d093b62a3524eeaa26747f60e33183e108475925961e5048b8e754683f35a2a8560b38e50a2ec50c26217a0f863f
|
data/lib/sipp/code.rb
CHANGED
@@ -26,57 +26,80 @@ module SIPP
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def category
|
29
|
-
|
29
|
+
validate_category
|
30
|
+
CATEGORY[code[0]]
|
31
|
+
rescue CategoryError => e
|
32
|
+
nil
|
30
33
|
end
|
31
34
|
|
32
35
|
def type
|
33
|
-
|
36
|
+
validate_type
|
37
|
+
TYPE[code[1]]
|
38
|
+
rescue TypeError => e
|
39
|
+
nil
|
34
40
|
end
|
35
41
|
|
36
42
|
def transmission_drive
|
37
|
-
|
43
|
+
validate_transmission_drive
|
44
|
+
TRANSMISSION_DRIVE[code[2]]
|
45
|
+
rescue TransmissionDriveError => e
|
46
|
+
nil
|
38
47
|
end
|
39
48
|
|
40
49
|
def transmission
|
41
|
-
|
50
|
+
validate_transmission_drive
|
51
|
+
TRANSMISSION[code[2]]
|
52
|
+
rescue TransmissionDriveError => e
|
53
|
+
nil
|
42
54
|
end
|
43
55
|
|
44
56
|
def transmission_manual?
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
57
|
+
validate_transmission_drive
|
58
|
+
'Manual' == transmission ? true : false # TODO fix magic string
|
59
|
+
rescue TransmissionDriveError => e
|
60
|
+
nil
|
50
61
|
end
|
62
|
+
|
51
63
|
def transmission_auto?
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
end
|
64
|
+
validate_transmission_drive
|
65
|
+
'Auto' == transmission ? true : false # TODO fix magic string
|
66
|
+
rescue TransmissionDriveError => e
|
67
|
+
nil
|
57
68
|
end
|
69
|
+
|
58
70
|
def drive
|
59
|
-
|
71
|
+
validate_transmission_drive
|
72
|
+
DRIVE[code[2]]
|
73
|
+
rescue TransmissionDriveError => e
|
74
|
+
nil
|
60
75
|
end
|
61
76
|
|
62
77
|
def fuel_ac
|
63
|
-
|
78
|
+
validate_fuel_ac
|
79
|
+
FUEL_AC[code[3]]
|
80
|
+
rescue FuelACError => e
|
81
|
+
nil
|
64
82
|
end
|
65
83
|
|
66
84
|
def fuel
|
67
|
-
|
85
|
+
validate_fuel_ac
|
86
|
+
FUEL[code[3]]
|
87
|
+
rescue FuelACError => e
|
88
|
+
nil
|
68
89
|
end
|
69
90
|
|
70
91
|
def ac
|
71
|
-
|
92
|
+
validate_fuel_ac
|
93
|
+
AC[code[3]]
|
94
|
+
rescue FuelACError => e
|
95
|
+
nil
|
72
96
|
end
|
73
97
|
|
74
98
|
def ac?
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
end
|
99
|
+
validate_fuel_ac
|
100
|
+
'Air' == ac ? true : false # TODO fix magic string
|
101
|
+
rescue FuelACError => e
|
102
|
+
nil
|
80
103
|
end
|
81
104
|
|
82
105
|
def to_s
|
data/lib/sipp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sipp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Buslaev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|