appmap 0.19.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +11 -9
- data/exe/appmap +2 -1
- data/lib/appmap/command/record.rb +0 -1
- data/lib/appmap/command/upload.rb +1 -1
- data/lib/appmap/middleware/remote_recording.rb +1 -1
- data/lib/appmap/rails/action_handler.rb +11 -1
- data/lib/appmap/rspec.rb +1 -1
- data/lib/appmap/version.rb +3 -1
- data/spec/abstract_controller4_base_spec.rb +11 -2
- data/spec/abstract_controller_base_spec.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7b445cafb60cb09ec8ac53a47ce2a18983679f4c0b12d57d3296b95ad18e99b
|
4
|
+
data.tar.gz: 32bd5984db62f59553902802e6d21627470f664b049c7b4501e3522ce7ac3c73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
examples.
|
83
|
+
1) Require `appmap/rspec` in your `spec_helper.rb`.
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
require 'appmap/rspec'
|
87
|
+
```
|
89
88
|
|
90
|
-
|
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
|
-
|
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(
|
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
|
@@ -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
|
-
|
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
data/lib/appmap/version.rb
CHANGED
@@ -23,8 +23,17 @@ describe 'AbstractControllerBase' do
|
|
23
23
|
|
24
24
|
expect(appmap).to include(<<-MESSAGE.strip)
|
25
25
|
message:
|
26
|
-
|
27
|
-
|
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
|
-
|
27
|
-
|
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.
|
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-
|
11
|
+
date: 2019-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|