hub_kernel 0.12.0 → 0.13.0
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/README.md +3 -0
- data/lib/hub_kernel/conformance/crossings.rb +5 -0
- data/lib/hub_kernel/crossings.rb +2 -0
- data/lib/hub_kernel/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: d68f714812e20170c2ee5c5317e29b64c8ebbae25431492f457ae4b53263d50e
|
|
4
|
+
data.tar.gz: bae431b97f2e98ff2a28ed9712ab415a3e3b2dfe18753e46d93be5acfa86a9f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1035694fa2c676b368938c61ecc21d1403fe8b68f151dba1ef80e9fc7b9166460f09a0e9c6aa275dcd005b615fd66c08dce5ae5f6b6b4f02421241ff266f8ca1
|
|
7
|
+
data.tar.gz: cb84d351c30f19dd86c7351351ec29ffd01e930f21ba2aece3061724ed1c7cc2a0ca3d43ec8ea0335a0741ada0debf683d379f8fa48eb12c521a2ba057fa66d8
|
data/README.md
CHANGED
|
@@ -199,6 +199,9 @@ end
|
|
|
199
199
|
- It also fails naming each class defined in the files it reads that no hub owns, such as
|
|
200
200
|
"No hub owns Shop::Refund", and each class the map gives to two hubs, such as "Two hubs
|
|
201
201
|
own Shop::Receipt".
|
|
202
|
+
- It fails naming each class the map names that no longer exists in the app, such as "The
|
|
203
|
+
map names Shop::Ghost, which does not exist", so a renamed or removed class does not
|
|
204
|
+
stay in the map.
|
|
202
205
|
|
|
203
206
|
## Installation
|
|
204
207
|
Add this line to your application's Gemfile:
|
|
@@ -34,6 +34,11 @@ module HubKernel
|
|
|
34
34
|
twice = the_crossings.claimed_twice
|
|
35
35
|
assert twice.empty?, twice.map { |name| "Two hubs own #{name}" }.join("\n")
|
|
36
36
|
end
|
|
37
|
+
|
|
38
|
+
test "every class the map names exists" do
|
|
39
|
+
missing = the_crossings.missing_classes
|
|
40
|
+
assert missing.empty?, missing.map { |name| "The map names #{name}, which does not exist" }.join("\n")
|
|
41
|
+
end
|
|
37
42
|
end
|
|
38
43
|
|
|
39
44
|
def crossing_paths = (Dir.glob(crossing_files, base: crossing_root) - crossing_exceptions).sort
|
data/lib/hub_kernel/crossings.rb
CHANGED
|
@@ -22,6 +22,8 @@ module HubKernel
|
|
|
22
22
|
|
|
23
23
|
def claimed_twice = @owners.values.flatten.tally.select { |_name, hubs| hubs > 1 }.keys
|
|
24
24
|
|
|
25
|
+
def missing_classes = @owners.values.flatten.uniq.reject(&:safe_constantize)
|
|
26
|
+
|
|
25
27
|
private
|
|
26
28
|
|
|
27
29
|
def class_of(path) = path.sub(%r{\Aapp/[^/]+/}, "").delete_suffix(".rb").camelize
|
data/lib/hub_kernel/version.rb
CHANGED