appmap 0.94.0 → 0.94.1

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: f15bcc9505431c7f47af59305eb18a7c8472f119396ab4cd2441114cbf95a0ca
4
- data.tar.gz: affc5aaad8304d3a0e6b4f372934a1d38b9b6372ce2280d22a157d62c6156d8d
3
+ metadata.gz: ca46315eb8aa31221cee8a1d656187a4e4355e63f6b2be1d591829dddb76f7e0
4
+ data.tar.gz: d038130a2827f01f573bf69dbe32ab837d7ff68b28dce7a6076a80eee2f4550e
5
5
  SHA512:
6
- metadata.gz: fe56e37f042cac25f53612f4489762e42cb02ce231270fac02dda746abf73ed3e79febfc60a30829b25e7c7d395bb14f01398c62226e28a0bf795af751e33aae
7
- data.tar.gz: f045b85390e4a335f9d1b62cdcefb2f45466e2d24f9009b3a31b990cfed5ffafdd475166b93a73889209f8959d60d51dcf91f80a7835bcdcc2a01dfe659f1752
6
+ metadata.gz: 58a84ec34e17b22acf37fd0b9f964fb93f82531cb7f800721d33214b1bc434b81e47cbf7202f87ddeade990644d4cc512898125bc59851e82f035f9093c31eb2
7
+ data.tar.gz: a8a0bfa9cf83dc59d6e3848228f602bf8030c01601755a853a55ee4b452a970e2de1c823649da1fc0b557b8b9b6ba24c142f324975a20a222aadc239d37958b1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.94.1](https://github.com/getappmap/appmap-ruby/compare/v0.94.0...v0.94.1) (2022-11-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Handle properties of mixed content and repeated values ([4e14eb8](https://github.com/getappmap/appmap-ruby/commit/4e14eb8f4650368b3fdcb3f30be2969df3998e05))
7
+
1
8
  # [0.94.0](https://github.com/getappmap/appmap-ruby/compare/v0.93.5...v0.94.0) (2022-11-22)
2
9
 
3
10
 
@@ -14,25 +14,26 @@ module AppMap
14
14
  def detect_schema(value, max_depth: MAX_DEPTH, type_info: {}, observed_values: Set.new(), depth: 0)
15
15
  return type_info if depth == max_depth
16
16
 
17
- begin
18
- if value.respond_to?(:keys)
19
- properties = value.keys.select { |key| key != '' && !key.nil? }.map do |key|
20
- next_value = value[key]
21
- next if observed_values.include?(next_value)
22
-
23
- observed_values << next_value
24
- { name: key, class: best_class_name(next_value) }.tap do |schema|
25
- detect_schema(next_value, **{ max_depth: max_depth, type_info: schema, observed_values: observed_values, depth: depth + 1 })
17
+ if value.respond_to?(:keys)
18
+ return if observed_values.include?(value.object_id)
19
+
20
+ observed_values << value.object_id
21
+
22
+ properties = value.keys.select { |key| key != "" && !key.nil? }.map do |key|
23
+ next_value = value[key]
24
+
25
+ value_schema = begin
26
+ { name: key, class: best_class_name(next_value) }
27
+ rescue
28
+ warn "Error in add_schema(#{next_value.class})", $!
29
+ raise
26
30
  end
27
- end.compact
28
- type_info[:properties] = properties unless properties.empty?
29
- elsif value.respond_to?(:first) && !observed_values.include?(value.first)
30
- observed_values << value.first
31
- detect_schema(value.first, **{ max_depth: max_depth, type_info: type_info, observed_values: observed_values, depth: depth + 1 })
32
- end
33
- rescue
34
- warn "Error in add_schema(#{value.class})", $!
35
- raise
31
+
32
+ detect_schema(next_value, **{ max_depth: max_depth, type_info: value_schema, observed_values: observed_values, depth: depth + 1 })
33
+ end.compact
34
+ type_info[:properties] = properties unless properties.empty?
35
+ elsif value.respond_to?(:first)
36
+ detect_schema(value.first, **{ max_depth: max_depth, type_info: type_info, observed_values: observed_values, depth: depth + 1 })
36
37
  end
37
38
  type_info
38
39
  end
@@ -43,7 +44,7 @@ module AppMap
43
44
  while value_cls && value_cls.name.nil?
44
45
  value_cls = value_cls.superclass
45
46
  end
46
- value_cls&.name || 'unknown'
47
+ value_cls&.name || "unknown"
47
48
  end
48
49
  end
49
50
  end
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.94.0'
6
+ VERSION = '0.94.1'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.10.0'
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.94.0
4
+ version: 0.94.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-22 00:00:00.000000000 Z
11
+ date: 2022-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source