diver_down 0.0.1.alpha7 → 0.0.1.alpha8

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: 3749e5acb9fae2d27b5267f30897c328b2a121fa1b25f89ab2dd0263af685492
4
- data.tar.gz: 841226072e1c60faaacabcadabcf66c94bde318d7479d8090c064128be5556fe
3
+ metadata.gz: 0b6dec73d4653351d9d352e2576d572e3e16617d4b93b7fac88d1f92346f0d6d
4
+ data.tar.gz: '0429bc45357cdf12327e0960b379d65df8ffe6d345c23b99600b3ab9e9d02f98'
5
5
  SHA512:
6
- metadata.gz: 80753b14f48811fa05d84b75f303d17335701f82fc04ead701c8e8b53473f0d9860bf7e78a25201e0c9bc9c58af89764350f023c3ea4310c7b3cb6c6b0ab93a9
7
- data.tar.gz: 5ec6ec0814d825864fb062ec0db92f3f7d6df8949795ac5c4f6299b302219e5f50f6ba9f8f8590b8ac123c268f8a04ac268a95e0af6638084ff13b62859d603a
6
+ metadata.gz: 012d06bc87393013c42a7b6033507845c7efe36f654058a8afcde1e7b2f229d6b33e45e66e4465ac770c07b69a500adec6ef80e8da98c9ea2414f40f79a8ebc4
7
+ data.tar.gz: 391c6a56bc9440b60b59eab6a05dfca33095d41a4c1ed7353661ff387f4f227c80865504c51e961c5d512e6cd2caec4d7147547b3ab7dcf54cd7f4d5f250d056
@@ -91,13 +91,7 @@ module DiverDown
91
91
 
92
92
  # Search is a heavy process and should be terminated early.
93
93
  # The position of the most recently found caller or the start of trace is used as the maximum value.
94
- maximum_back_stack_size = if call_stack.empty_context_stack?
95
- call_stack.stack_size
96
- else
97
- call_stack.stack_size - call_stack.context_stack_size[-1]
98
- end
99
-
100
- caller_location = find_neast_caller_location(maximum_back_stack_size)
94
+ caller_location = find_neast_caller_location(call_stack.stack_size)
101
95
 
102
96
  # `caller_location` is nil if it is filtered by caller_paths
103
97
  if caller_location
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DiverDown
4
- VERSION = '0.0.1.alpha7'
4
+ VERSION = '0.0.1.alpha8'
5
5
  end
@@ -131,6 +131,7 @@ module DiverDown
131
131
  definition_group: definition.definition_group,
132
132
  title: definition.title,
133
133
  sources_count: definition.sources.size,
134
+ unclassified_sources_count: definition.sources.reject { @module_store.include?(_1.source_name) }.size,
134
135
  }
135
136
  end,
136
137
  pagination: pagination.to_h
@@ -29,6 +29,12 @@ module DiverDown
29
29
  @store[source_name] || BLANK_ARRAY
30
30
  end
31
31
 
32
+ # @param source_name [String]
33
+ # @return [Boolean]
34
+ def include?(source_name)
35
+ get(source_name).any?
36
+ end
37
+
32
38
  # @return [Hash]
33
39
  def to_h
34
40
  sorted_store = {}