appmap 0.58.0 → 0.59.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: ca5a16a5edc35706d33aa6ec21e45b5641aa9342b6fc5ab03ada141556c2b859
4
- data.tar.gz: 7a4b5b6ff0c504814b7eccebba46a739cc4e00fcf6eb1e5492ef7f52d2f887d6
3
+ metadata.gz: b0592a1e7b252df037c7e06986095c4e7f5feba8011a317e54edda181c53aed7
4
+ data.tar.gz: 44d0c65506400e36016dd140e7f4a109f6495dd2ae6bdd893e038bd8c1504d95
5
5
  SHA512:
6
- metadata.gz: 5267e3ba0827671d825ca0bb0323965ae0d8b5c0ac772f95721227af2b66a3a2d2843f7813a4f1faff997e49cd83dc4b7d78a57cb3b4852cfd6fbe63290aa223
7
- data.tar.gz: cdb60a38a5d9c836a159c9473a7bf42e06589926ec7011b5978add71dca14ef6fd8acc807d7ef745e3d17ab908e38eca49bfbb3094c5b48a97d4084d9a2f34d8
6
+ metadata.gz: cc7057bf09581066d6ef84f2f73b17ea9a3088ec6e19dfd90f2983a15706f98de6ca1e20ccfc949aad334ccfa7f0346474bd53899eefb9a44d871618c7c17995
7
+ data.tar.gz: 4c86d5a8782501a8924f286e41334b79473d87990e7a731ee7832288ae81ad4db112d6826313dfae99cb1a5b418e77fbea63a3a2888ec9d09fffbbd98d0c7e80
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.59.0](https://github.com/applandinc/appmap-ruby/compare/v0.58.0...v0.59.0) (2021-07-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * define commands as objects ([1b43203](https://github.com/applandinc/appmap-ruby/commit/1b432039040277e1b5349cc2f75aa436238ea873))
7
+
1
8
  # [0.58.0](https://github.com/applandinc/appmap-ruby/compare/v0.57.1...v0.58.0) (2021-07-06)
2
9
 
3
10
 
@@ -13,21 +13,27 @@ module AppMap
13
13
  if TestFrameworkDetector.rspec_present? && !integration_test_paths[:rspec].empty?
14
14
  commands << {
15
15
  framework: :rspec,
16
- command: "APPMAP=true bundle exec rspec #{integration_test_paths[:rspec].join(' ')}"
16
+ command: {
17
+ program: 'bundle',
18
+ args: %w[exec rspec] + integration_test_paths[:rspec].map { |path| "./#{path}" },
19
+ environment: {
20
+ APPMAP: 'true'
21
+ }
22
+ }
17
23
  }
18
24
  end
19
25
 
20
26
  if TestFrameworkDetector.minitest_present? && !integration_test_paths[:minitest].empty?
21
- commands << {
22
- framework: :minitest,
23
- command: minitest_command
24
- }
27
+ commands += minitest_commands
25
28
  end
26
-
27
29
  if TestFrameworkDetector.cucumber_present? && !integration_test_paths[:cucumber].empty?
28
30
  commands << {
29
31
  framework: :cucumber,
30
- command: 'APPMAP=true bundle exec cucumber'
32
+ command: {
33
+ program: 'bundle',
34
+ args: %w[exec cucumber],
35
+ environment: { APPMAP: 'true' }
36
+ }
31
37
  }
32
38
  end
33
39
 
@@ -36,12 +42,29 @@ module AppMap
36
42
 
37
43
  private
38
44
 
39
- def minitest_command
45
+ def minitest_commands
40
46
  if Gem.loaded_specs.has_key?('rails')
41
- "APPMAP=true bundle exec rails test #{integration_test_paths[:minitest].join(' ')}"
47
+ [
48
+ {
49
+ framework: :minitest,
50
+ command: {
51
+ program: 'bundle',
52
+ args: %w[exec rails test] + integration_test_paths[:minitest].map { |path| "./#{path}" },
53
+ environment: { APPMAP: 'true' }
54
+ }
55
+ }
56
+ ]
42
57
  else
43
- subcommands = integration_test_paths[:minitest].map { |path| "APPMAP=true bundle exec ruby #{path}" }
44
- subcommands.join(' && ')
58
+ integration_test_paths[:minitest].map do |path|
59
+ {
60
+ framework: :minitest,
61
+ command: {
62
+ program: 'bundle',
63
+ args: ['exec', 'ruby', "./#{path}"],
64
+ environment: { APPMAP: 'true' }
65
+ }
66
+ }
67
+ end
45
68
  end
46
69
  end
47
70
 
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.58.0'
6
+ VERSION = '0.59.0'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.5.1'
9
9
 
@@ -27,39 +27,55 @@ class AgentSetupInitTest < Minitest::Test
27
27
  end
28
28
 
29
29
  def test_status_rails_app
30
- def test_status
31
- output = `cd spec/fixtures/rails6_users_app && bundle exec ../../../exe/appmap-agent-status`
32
- assert_equal 0, $CHILD_STATUS.exitstatus
33
- expected = {
34
- test_commands: [
35
- {
36
- framework: :rspec,
37
- command: 'APPMAP=true bundle exec rspec spec/controllers'
38
- },
39
- {
40
- framework: :minitest,
41
- command: 'APPMAP=true bundle exec ruby test/controllers && APPMAP=true bundle exec ruby test/integration'
42
- },
43
- {
44
- framework: :cucumber,
45
- command: 'APPMAP=true bundle exec cucumber'
30
+ output = `cd spec/fixtures/rails6_users_app && bundle exec ../../../exe/appmap-agent-status`
31
+ assert_equal 0, $CHILD_STATUS.exitstatus
32
+ expected = {
33
+ test_commands: [
34
+ {
35
+ framework: :rspec,
36
+ command: {
37
+ program: 'bundle',
38
+ args: %w[exec rspec ./spec/controllers],
39
+ environment: {
40
+ APPMAP: 'true'
41
+ }
42
+ }
43
+ },
44
+ {
45
+ framework: :minitest,
46
+ command: {
47
+ program: 'bundle',
48
+ args: %w[exec ruby ./test/controllers],
49
+ environment: {
50
+ APPMAP: 'true'
51
+ }
46
52
  }
47
- ],
48
- properties: {
49
- config: {
50
- app: nil,
51
- present: true,
52
- valid: true
53
- },
54
- project: {
55
- agentVersion: AppMap::VERSION,
56
- language: 'ruby',
57
- remoteRecordingCapable: false,
58
- integrationTests: true
53
+ },
54
+ {
55
+ framework: :minitest,
56
+ command: {
57
+ program: 'bundle',
58
+ args: %w[exec ruby ./test/integration],
59
+ environment: {
60
+ APPMAP: 'true'
61
+ }
59
62
  }
60
63
  }
64
+ ],
65
+ properties: {
66
+ config: {
67
+ app: nil,
68
+ present: true,
69
+ valid: false
70
+ },
71
+ project: {
72
+ agentVersion: AppMap::VERSION,
73
+ language: 'ruby',
74
+ remoteRecordingCapable: false,
75
+ integrationTests: true
76
+ }
61
77
  }
62
- assert_equal JSON.pretty_generate(expected), output.strip
63
- end
78
+ }
79
+ assert_equal JSON.pretty_generate(expected), output.strip
64
80
  end
65
81
  end
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.58.0
4
+ version: 0.59.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: 2021-07-06 00:00:00.000000000 Z
11
+ date: 2021-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport