diver_down 0.0.1.alpha6 → 0.0.1.alpha8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d4a5bb567f1141aaa13b3d6aaf7e4201b005988a072cfd5c4de2e11a180c480
4
- data.tar.gz: 5cf5455488b8944830f2f25fb7f26a1b4d21ed2d42ee1c2ea755138ba3aa40e3
3
+ metadata.gz: 0b6dec73d4653351d9d352e2576d572e3e16617d4b93b7fac88d1f92346f0d6d
4
+ data.tar.gz: '0429bc45357cdf12327e0960b379d65df8ffe6d345c23b99600b3ab9e9d02f98'
5
5
  SHA512:
6
- metadata.gz: 79b39d0ecc4569ce41d26c24ae03d903c431a7cdc55c9c9fecbcbbfadc807edbdcab3c34481fde3b6d728791b780951ef1923afb37414f6403a3daa415537d73
7
- data.tar.gz: '0800be880d27a2c61c8e7153bbea2c02ab8573d347a5b5cccd9325549e7284f2d8c4316b3fb794c9fa0c42ee47e9fa9d7df9d9a24efe4d106ba5d767c2d3c0a3'
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.alpha6'
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
@@ -285,7 +285,6 @@ module DiverDown
285
285
 
286
286
  sources.each do |source|
287
287
  insert_source(source)
288
- insert_dependencies(source)
289
288
  end
290
289
  else
291
290
  buf = swap_io do
@@ -303,7 +302,6 @@ module DiverDown
303
302
  sources = (by_modules[module_names] || []).sort_by(&:source_name)
304
303
  sources.each do |source|
305
304
  insert_source(source)
306
- insert_dependencies(source)
307
305
  end
308
306
 
309
307
  next_proc&.call
@@ -315,6 +313,10 @@ module DiverDown
315
313
  io.write buf.string
316
314
  end
317
315
  end
316
+
317
+ definition.sources.sort_by(&:source_name).each do |source|
318
+ insert_dependencies(source)
319
+ end
318
320
  end
319
321
 
320
322
  def insert_source(source)
@@ -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 = {}