piko-tools 1.0.1 → 1.0.2
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/CHANGELOG.md +8 -0
- data/lib/piko_tools/state.rb +2 -2
- data/lib/piko_tools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c9ae4a74e5273b80eaf96c47b449628d39ab61150bf92bfd9e2dbda159ec90c
|
4
|
+
data.tar.gz: 8907d0f6812d7ddbd609322325e285502610a034cc2c95272414090f638c00b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26f14abc9c411d268ebb72413be66b5a9e7deaade3bc936c37eb1ee6d961264bc0c3161e84f577e3fdcf33d3fdb580dd80cc0590de4c2b399074f5841f852178
|
7
|
+
data.tar.gz: 4de4b2b6990eb2c983c703d5be91ce190e53a7120498090f6c518fc749bb4f87425726188c1cf217b585551b0940d522e87b6dfadbecb785ef56736a75c3d486
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.0.1] - 2025-09-02
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- Add exception for starting undefined keys
|
8
|
+
|
3
9
|
## [1.0.0] - 2025-07-07
|
4
10
|
|
5
11
|
Init
|
@@ -8,6 +14,8 @@ Init
|
|
8
14
|
|
9
15
|
- Init
|
10
16
|
|
17
|
+
[1.0.1]: https://gitlab.com/skopciewski/piko-tools/-/compare/1.0.0...1.0.1
|
18
|
+
|
11
19
|
[1.0.0]: https://gitlab.com/skopciewski/piko-tools/-/compare/0.0.0...1.0.0
|
12
20
|
|
13
21
|
[0.0.0]: https://gitlab.com/skopciewski/piko-tools
|
data/lib/piko_tools/state.rb
CHANGED
@@ -17,13 +17,13 @@ module PikoTools
|
|
17
17
|
|
18
18
|
def start(key)
|
19
19
|
return @instances[key] if started?(key)
|
20
|
+
raise KeyError, "Key not defined: '#{key}'" unless define?(key)
|
20
21
|
# puts "[system] starting #{key}"
|
21
22
|
@instances[key] = @definitions[key][:start].call
|
22
23
|
end
|
23
24
|
|
24
25
|
def stop(key)
|
25
26
|
return unless started?(key)
|
26
|
-
raise KeyError, "Key not defined: '#{key}'" unless defined?(key)
|
27
27
|
# puts "[system] stopping #{key}"
|
28
28
|
@definitions[key][:stop]&.call(@instances[key])
|
29
29
|
@instances.delete(key)
|
@@ -37,7 +37,7 @@ module PikoTools
|
|
37
37
|
@instances.key?(key)
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
40
|
+
def define?(key)
|
41
41
|
@definitions.key?(key)
|
42
42
|
end
|
43
43
|
|
data/lib/piko_tools/version.rb
CHANGED