appmap 0.19.0 → 0.20.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbd73ea1339788825987a09e80097ad54fcaf6297ae5a7bbe01aa39b5462a8bb
4
- data.tar.gz: 6338cbb3203543ce4db169fef9cfcf31acfd6ea44da94220bca5c00638368520
3
+ metadata.gz: e7b445cafb60cb09ec8ac53a47ce2a18983679f4c0b12d57d3296b95ad18e99b
4
+ data.tar.gz: 32bd5984db62f59553902802e6d21627470f664b049c7b4501e3522ce7ac3c73
5
5
  SHA512:
6
- metadata.gz: 6d0b9d851b266a230a40ac85e9991d183919c67b1c09e155009ffb3cd2de660e40521e6253534ae6a3e06867238810d6f5def1c9b10f094f81ed2498e79ee4ea
7
- data.tar.gz: 4a6f75650e36876086782f778eb1fbb90f7d15a9e35eb28f245ce942285b3cfd95c76c16e5d01a5c90867455668609e974a41dfd829a6e7a91487833ebee49c9
6
+ metadata.gz: 0a910eaf05acbcdc0d0c39ce1aacd992efc4ea85f725325557edcfb1b61df32dbcdec4f2ee614296a0c7d97248dca067259adf059b4e6a7390b4b64561247474
7
+ data.tar.gz: 6d5d2766f9b1b558349b25926c3dd23b6489e6991c3fa6cde6bd865de7db9d99470c1c1fe606abe1366d77f8995f4cde440626bce417baa2f2d512114dd835d0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # v0.20.0
2
+
3
+ Updated to [AppMap file format](https://github.com/applandinc/appmap) version 1.2.
4
+
5
+ * **Event `message`** is now an array of parameter objects.
6
+ * The value of each `appmap:` tags in an RSpec is recorded as a `label` in the AppMap file metadata.
7
+ * `layout` is removed from AppMap file metadata.
8
+
1
9
  # v0.19.0
2
10
 
3
11
  * **RSpec** feature and feature group names can be inferred from example group and example names.
data/README.md CHANGED
@@ -78,16 +78,15 @@ Each entry in the `packages` list is a YAML object which has the following keys:
78
78
 
79
79
  ## RSpec
80
80
 
81
- To instrument RSpec tests, follow these steps:
81
+ To instrument RSpec tests, follow these additional steps:
82
82
 
83
- 1) Include the `appmap` gem in your Gemfile.
84
- 2) Require `appmap/rspec` in your `spec_helper.rb`.
85
- 3) Add `appmap: true` to the tests you want to instrument.
86
- 4) Export the environment variable `APPMAP=true`.
87
- 5) *Optional* Add `feature: '<feature name>'` and `feature_group: '<feature group name>'` annotations to your
88
- examples.
83
+ 1) Require `appmap/rspec` in your `spec_helper.rb`.
84
+
85
+ ```ruby
86
+ require 'appmap/rspec'
87
+ ```
89
88
 
90
- Here's an example of an appmap-enabled RSpec test:
89
+ 2) Add `appmap: true` to the tests you want to instrument.
91
90
 
92
91
  ```ruby
93
92
  describe Hello, appmap: true do
@@ -99,7 +98,10 @@ describe Hello, appmap: true do
99
98
  end
100
99
  ```
101
100
 
102
- Run the tests like this:
101
+ 3) *Optional* Add `feature: '<feature name>'` and `feature_group: '<feature group name>'` annotations to your
102
+ examples.
103
+
104
+ 4) Run the tests with the environment variable `APPMAP=true`:
103
105
 
104
106
  ```sh-session
105
107
  $ APPMAP=true bundle exec rspec -t appmap
data/exe/appmap CHANGED
@@ -77,7 +77,8 @@ module AppMap
77
77
 
78
78
  require 'appmap/command/record'
79
79
  AppMap::Command::Record.new(@config, program).perform do |features, events|
80
- @output_file.write JSON.generate(classMap: features,
80
+ @output_file.write JSON.generate(version: AppMap::APPMAP_FORMAT_VERSION,
81
+ classMap: features,
81
82
  metadata: AppMap::Command::Record.detect_metadata,
82
83
  events: events)
83
84
  end
@@ -19,7 +19,6 @@ module AppMap
19
19
  name: 'rails',
20
20
  version: ::Rails.version
21
21
  }
22
- m[:layout] = 'rails'
23
22
  end
24
23
  m[:git] = git_metadata if git_available
25
24
  end
@@ -51,7 +51,7 @@ module AppMap
51
51
  appmap[:events] = events
52
52
  else
53
53
  class_map = prune(data)
54
- appmap = { "classMap": class_map, "events": [] }
54
+ appmap = { "version": AppMap::APPMAP_FORMAT_VERSION, "classMap": class_map, "events": [] }
55
55
  end
56
56
 
57
57
  upload_file = { user: user, org: org, data: appmap }.compact
@@ -70,7 +70,7 @@ module AppMap
70
70
  require 'appmap/command/record'
71
71
  metadata = AppMap::Command::Record.detect_metadata
72
72
 
73
- response = JSON.generate(classMap: @features, metadata: metadata, events: @events)
73
+ response = JSON.generate(version: AppMap::APPMAP_FORMAT_VERSION, classMap: @features, metadata: metadata, events: @events)
74
74
 
75
75
  [ true, response ]
76
76
  end
@@ -27,7 +27,17 @@ module AppMap
27
27
  request_method: payload[:method],
28
28
  path_info: payload[:path]
29
29
  }
30
- h[:message] = payload[:params]
30
+
31
+ params = payload[:params]
32
+ h[:message] = params.keys.map do |key|
33
+ val = params[key]
34
+ {
35
+ name: key,
36
+ class: val.class.name,
37
+ value: self.class.display_string(val),
38
+ object_id: val.__id__
39
+ }
40
+ end
31
41
  end
32
42
  end
33
43
  end
data/lib/appmap/rspec.rb CHANGED
@@ -45,7 +45,7 @@ module AppMap
45
45
  end
46
46
 
47
47
  appmap = {
48
- version: '1.1',
48
+ version: AppMap::APPMAP_FORMAT_VERSION,
49
49
  classMap: features,
50
50
  metadata: metadata,
51
51
  events: events
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppMap
4
- VERSION = '0.19.0'
4
+ VERSION = '0.20.0'
5
+
6
+ APPMAP_FORMAT_VERSION = '1.2'
5
7
  end
@@ -23,8 +23,17 @@ describe 'AbstractControllerBase' do
23
23
 
24
24
  expect(appmap).to include(<<-MESSAGE.strip)
25
25
  message:
26
- login: alice
27
- password: "[FILTERED]"
26
+ - name: login
27
+ class: String
28
+ value: alice
29
+ object_id:
30
+ MESSAGE
31
+
32
+ expect(appmap).to include(<<-MESSAGE.strip)
33
+ - name: password
34
+ class: String
35
+ value: "[FILTERED]"
36
+ object_id:
28
37
  MESSAGE
29
38
 
30
39
  expect(appmap).to include(<<-SERVER_REQUEST.strip)
@@ -23,8 +23,17 @@ describe 'AbstractControllerBase' do
23
23
 
24
24
  expect(appmap).to include(<<-MESSAGE.strip)
25
25
  message:
26
- login: alice
27
- password: "[FILTERED]"
26
+ - name: login
27
+ class: String
28
+ value: alice
29
+ object_id:
30
+ MESSAGE
31
+
32
+ expect(appmap).to include(<<-MESSAGE.strip)
33
+ - name: password
34
+ class: String
35
+ value: "[FILTERED]"
36
+ object_id:
28
37
  MESSAGE
29
38
 
30
39
  expect(appmap).to include(<<-SERVER_REQUEST.strip)
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.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-03 00:00:00.000000000 Z
11
+ date: 2019-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport