appmap 0.37.0 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +1 -1
  3. data/.rubocop.yml +12 -1
  4. data/.travis.yml +2 -23
  5. data/CHANGELOG.md +24 -0
  6. data/CONTRIBUTING.md +22 -0
  7. data/README.md +79 -50
  8. data/Rakefile +3 -3
  9. data/lib/appmap/class_map.rb +25 -8
  10. data/lib/appmap/config.rb +22 -10
  11. data/lib/appmap/event.rb +16 -1
  12. data/lib/appmap/hook.rb +11 -3
  13. data/lib/appmap/hook/method.rb +18 -12
  14. data/lib/appmap/rails/request_handler.rb +25 -4
  15. data/lib/appmap/railtie.rb +1 -5
  16. data/lib/appmap/trace.rb +18 -7
  17. data/lib/appmap/version.rb +2 -2
  18. data/spec/abstract_controller_base_spec.rb +132 -67
  19. data/spec/fixtures/hook/instance_method.rb +4 -0
  20. data/spec/fixtures/hook/labels.rb +6 -0
  21. data/spec/fixtures/{rails_users_app → rails5_users_app}/.dockerignore +0 -0
  22. data/spec/fixtures/{rails_users_app → rails5_users_app}/.gitignore +0 -0
  23. data/spec/fixtures/{rails_users_app → rails5_users_app}/.rspec +0 -0
  24. data/spec/fixtures/{rails_users_app → rails5_users_app}/.ruby-version +0 -0
  25. data/spec/fixtures/{rails_users_app → rails5_users_app}/Dockerfile +0 -0
  26. data/spec/fixtures/{rails_users_app → rails5_users_app}/Dockerfile.pg +0 -0
  27. data/spec/fixtures/rails5_users_app/Gemfile +50 -0
  28. data/spec/fixtures/{rails_users_app → rails5_users_app}/Rakefile +0 -0
  29. data/spec/fixtures/{rails_users_app → rails5_users_app}/app/controllers/api/users_controller.rb +0 -0
  30. data/spec/fixtures/{rails_users_app → rails5_users_app}/app/controllers/application_controller.rb +0 -0
  31. data/spec/fixtures/{rails4_users_app/app/assets/images → rails5_users_app/app/controllers/concerns}/.keep +0 -0
  32. data/spec/fixtures/{rails_users_app → rails5_users_app}/app/controllers/health_controller.rb +0 -0
  33. data/spec/fixtures/rails5_users_app/app/controllers/users_controller.rb +13 -0
  34. data/spec/fixtures/{rails4_users_app/app/models → rails5_users_app/app/models/activerecord}/user.rb +0 -0
  35. data/spec/fixtures/{rails4_users_app/app/controllers → rails5_users_app/app/models}/concerns/.keep +0 -0
  36. data/spec/fixtures/{rails_users_app → rails5_users_app}/app/models/sequel/user.rb +0 -0
  37. data/spec/fixtures/{rails4_users_app → rails5_users_app}/app/views/layouts/application.html.haml +0 -0
  38. data/spec/fixtures/{rails4_users_app → rails5_users_app}/app/views/users/index.html.haml +0 -0
  39. data/spec/fixtures/rails5_users_app/appmap.yml +4 -0
  40. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/appmap +0 -0
  41. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/byebug +0 -0
  42. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/gli +0 -0
  43. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/htmldiff +0 -0
  44. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/ldiff +0 -0
  45. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/nokogiri +0 -0
  46. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rackup +0 -0
  47. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rails +0 -0
  48. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rake +0 -0
  49. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rspec +0 -0
  50. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/ruby-parse +0 -0
  51. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/ruby-rewrite +0 -0
  52. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/sequel +0 -0
  53. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/setup +0 -0
  54. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/sprockets +0 -0
  55. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/thor +0 -0
  56. data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/update +0 -0
  57. data/spec/fixtures/{rails_users_app → rails5_users_app}/config.ru +0 -0
  58. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/application.rb +2 -0
  59. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/boot.rb +0 -0
  60. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/credentials.yml.enc +0 -0
  61. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/database.yml +0 -0
  62. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environment.rb +0 -0
  63. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environments/development.rb +0 -0
  64. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environments/production.rb +0 -0
  65. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environments/test.rb +0 -0
  66. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/application_controller_renderer.rb +0 -0
  67. data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/backtrace_silencers.rb +0 -0
  68. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/cors.rb +0 -0
  69. data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/filter_parameter_logging.rb +0 -0
  70. data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/inflections.rb +0 -0
  71. data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/mime_types.rb +0 -0
  72. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/record_button.rb +0 -0
  73. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/wrap_parameters.rb +0 -0
  74. data/spec/fixtures/{rails_users_app → rails5_users_app}/config/locales/en.yml +0 -0
  75. data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/routes.rb +1 -2
  76. data/spec/fixtures/{rails_users_app → rails5_users_app}/create_app +0 -0
  77. data/spec/fixtures/{rails_users_app → rails5_users_app}/db/migrate/20190728211408_create_users.rb +0 -0
  78. data/spec/fixtures/{rails_users_app → rails5_users_app}/db/schema.rb +0 -0
  79. data/spec/fixtures/{rails_users_app → rails5_users_app}/docker-compose.yml +0 -0
  80. data/spec/fixtures/{rails_users_app → rails5_users_app}/features/api_users.feature +0 -0
  81. data/spec/fixtures/{rails_users_app → rails5_users_app}/features/support/env.rb +0 -0
  82. data/spec/fixtures/{rails_users_app → rails5_users_app}/features/support/hooks.rb +0 -0
  83. data/spec/fixtures/{rails_users_app → rails5_users_app}/features/support/steps.rb +0 -0
  84. data/spec/fixtures/{rails4_users_app/app/mailers → rails5_users_app/lib/tasks}/.keep +0 -0
  85. data/spec/fixtures/{rails4_users_app/app/models → rails5_users_app/log}/.keep +0 -0
  86. data/spec/fixtures/{rails_users_app → rails5_users_app}/public/robots.txt +0 -0
  87. data/spec/fixtures/{rails_users_app → rails5_users_app}/spec/controllers/users_controller_api_spec.rb +1 -1
  88. data/spec/fixtures/rails5_users_app/spec/controllers/users_controller_spec.rb +27 -0
  89. data/spec/fixtures/{rails_users_app → rails5_users_app}/spec/models/user_spec.rb +0 -0
  90. data/spec/fixtures/{rails_users_app → rails5_users_app}/spec/rails_helper.rb +0 -0
  91. data/spec/fixtures/{rails4_users_app → rails5_users_app}/spec/spec_helper.rb +0 -0
  92. data/spec/fixtures/{rails_users_app → rails5_users_app}/users_app/.gitignore +0 -0
  93. data/spec/fixtures/rails6_users_app/.dockerignore +1 -0
  94. data/spec/fixtures/rails6_users_app/.gitignore +39 -0
  95. data/spec/fixtures/rails6_users_app/.rspec +1 -0
  96. data/spec/fixtures/rails6_users_app/.ruby-version +1 -0
  97. data/spec/fixtures/{rails4_users_app → rails6_users_app}/Dockerfile +3 -4
  98. data/spec/fixtures/{rails4_users_app → rails6_users_app}/Dockerfile.pg +1 -1
  99. data/spec/fixtures/{rails_users_app → rails6_users_app}/Gemfile +3 -4
  100. data/spec/fixtures/{rails4_users_app → rails6_users_app}/Rakefile +1 -1
  101. data/spec/fixtures/{rails4_users_app → rails6_users_app}/app/controllers/api/users_controller.rb +1 -1
  102. data/spec/fixtures/rails6_users_app/app/controllers/application_controller.rb +2 -0
  103. data/spec/fixtures/{rails4_users_app/app/models → rails6_users_app/app/controllers}/concerns/.keep +0 -0
  104. data/spec/fixtures/{rails4_users_app → rails6_users_app}/app/controllers/health_controller.rb +1 -1
  105. data/spec/fixtures/rails6_users_app/app/controllers/users_controller.rb +13 -0
  106. data/spec/fixtures/{rails_users_app → rails6_users_app}/app/models/activerecord/user.rb +0 -0
  107. data/spec/fixtures/{rails4_users_app/lib/assets → rails6_users_app/app/models/concerns}/.keep +0 -0
  108. data/spec/fixtures/rails6_users_app/app/models/sequel/user.rb +25 -0
  109. data/spec/fixtures/{rails_users_app → rails6_users_app}/app/views/layouts/application.html.haml +0 -0
  110. data/spec/fixtures/{rails_users_app → rails6_users_app}/app/views/users/index.html.haml +0 -0
  111. data/spec/fixtures/rails6_users_app/appmap.yml +5 -0
  112. data/spec/fixtures/rails6_users_app/bin/appmap +29 -0
  113. data/spec/fixtures/rails6_users_app/bin/byebug +29 -0
  114. data/spec/fixtures/rails6_users_app/bin/gli +29 -0
  115. data/spec/fixtures/rails6_users_app/bin/htmldiff +29 -0
  116. data/spec/fixtures/rails6_users_app/bin/ldiff +29 -0
  117. data/spec/fixtures/rails6_users_app/bin/nokogiri +29 -0
  118. data/spec/fixtures/rails6_users_app/bin/rackup +29 -0
  119. data/spec/fixtures/rails6_users_app/bin/rails +4 -0
  120. data/spec/fixtures/rails6_users_app/bin/rake +29 -0
  121. data/spec/fixtures/rails6_users_app/bin/rspec +29 -0
  122. data/spec/fixtures/rails6_users_app/bin/ruby-parse +29 -0
  123. data/spec/fixtures/rails6_users_app/bin/ruby-rewrite +29 -0
  124. data/spec/fixtures/rails6_users_app/bin/sequel +29 -0
  125. data/spec/fixtures/rails6_users_app/bin/setup +25 -0
  126. data/spec/fixtures/rails6_users_app/bin/sprockets +29 -0
  127. data/spec/fixtures/rails6_users_app/bin/thor +29 -0
  128. data/spec/fixtures/rails6_users_app/bin/update +25 -0
  129. data/spec/fixtures/{rails4_users_app → rails6_users_app}/config.ru +2 -1
  130. data/spec/fixtures/rails6_users_app/config/application.rb +53 -0
  131. data/spec/fixtures/rails6_users_app/config/boot.rb +3 -0
  132. data/spec/fixtures/rails6_users_app/config/credentials.yml.enc +1 -0
  133. data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/database.yml +2 -2
  134. data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/environment.rb +1 -1
  135. data/spec/fixtures/rails6_users_app/config/environments/development.rb +40 -0
  136. data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/environments/production.rb +19 -30
  137. data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/environments/test.rb +5 -11
  138. data/spec/fixtures/rails6_users_app/config/initializers/application_controller_renderer.rb +8 -0
  139. data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/backtrace_silencers.rb +0 -0
  140. data/spec/fixtures/rails6_users_app/config/initializers/cors.rb +16 -0
  141. data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/filter_parameter_logging.rb +0 -0
  142. data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/inflections.rb +0 -0
  143. data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/mime_types.rb +0 -0
  144. data/spec/fixtures/rails6_users_app/config/initializers/record_button.rb +3 -0
  145. data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/initializers/wrap_parameters.rb +1 -6
  146. data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/locales/en.yml +10 -0
  147. data/spec/fixtures/{rails_users_app → rails6_users_app}/config/routes.rb +1 -1
  148. data/spec/fixtures/{rails4_users_app → rails6_users_app}/create_app +7 -3
  149. data/spec/fixtures/rails6_users_app/db/migrate/20190728211408_create_users.rb +9 -0
  150. data/spec/fixtures/rails6_users_app/db/schema.rb +23 -0
  151. data/spec/fixtures/{rails4_users_app → rails6_users_app}/docker-compose.yml +3 -1
  152. data/spec/fixtures/rails6_users_app/features/api_users.feature +13 -0
  153. data/spec/fixtures/rails6_users_app/features/support/env.rb +4 -0
  154. data/spec/fixtures/rails6_users_app/features/support/hooks.rb +11 -0
  155. data/spec/fixtures/rails6_users_app/features/support/steps.rb +18 -0
  156. data/spec/fixtures/{rails4_users_app → rails6_users_app}/lib/tasks/.keep +0 -0
  157. data/spec/fixtures/{rails4_users_app → rails6_users_app}/log/.keep +0 -0
  158. data/spec/fixtures/rails6_users_app/public/robots.txt +1 -0
  159. data/spec/fixtures/rails6_users_app/spec/controllers/users_controller_api_spec.rb +29 -0
  160. data/spec/fixtures/rails6_users_app/spec/controllers/users_controller_spec.rb +27 -0
  161. data/spec/fixtures/rails6_users_app/spec/models/user_spec.rb +39 -0
  162. data/spec/fixtures/{rails4_users_app → rails6_users_app}/spec/rails_helper.rb +3 -32
  163. data/spec/fixtures/{rails_users_app → rails6_users_app}/spec/spec_helper.rb +0 -0
  164. data/spec/fixtures/{rails4_users_app → rails6_users_app/users_app}/.gitignore +8 -1
  165. data/spec/hook_spec.rb +111 -57
  166. data/spec/rails_spec_helper.rb +5 -5
  167. data/spec/railtie_spec.rb +31 -32
  168. data/spec/record_sql_rails_pg_spec.rb +62 -63
  169. data/spec/remote_recording_spec.rb +90 -89
  170. data/spec/rspec_feature_metadata_spec.rb +17 -18
  171. data/spec/spec_helper.rb +1 -0
  172. metadata +148 -139
  173. data/spec/abstract_controller4_base_spec.rb +0 -67
  174. data/spec/fixtures/rails4_users_app/.rbenv-gemsets +0 -2
  175. data/spec/fixtures/rails4_users_app/.ruby-version +0 -1
  176. data/spec/fixtures/rails4_users_app/Gemfile +0 -77
  177. data/spec/fixtures/rails4_users_app/README.rdoc +0 -28
  178. data/spec/fixtures/rails4_users_app/app/assets/javascripts/application.js +0 -16
  179. data/spec/fixtures/rails4_users_app/app/assets/stylesheets/application.css +0 -15
  180. data/spec/fixtures/rails4_users_app/app/controllers/application_controller.rb +0 -5
  181. data/spec/fixtures/rails4_users_app/app/controllers/users_controller.rb +0 -5
  182. data/spec/fixtures/rails4_users_app/app/helpers/application_helper.rb +0 -2
  183. data/spec/fixtures/rails4_users_app/appmap.yml +0 -3
  184. data/spec/fixtures/rails4_users_app/bin/rails +0 -9
  185. data/spec/fixtures/rails4_users_app/bin/setup +0 -29
  186. data/spec/fixtures/rails4_users_app/bin/spring +0 -17
  187. data/spec/fixtures/rails4_users_app/config/application.rb +0 -26
  188. data/spec/fixtures/rails4_users_app/config/boot.rb +0 -3
  189. data/spec/fixtures/rails4_users_app/config/environments/development.rb +0 -41
  190. data/spec/fixtures/rails4_users_app/config/initializers/assets.rb +0 -11
  191. data/spec/fixtures/rails4_users_app/config/initializers/cookies_serializer.rb +0 -3
  192. data/spec/fixtures/rails4_users_app/config/initializers/session_store.rb +0 -3
  193. data/spec/fixtures/rails4_users_app/config/initializers/to_time_preserves_timezone.rb +0 -10
  194. data/spec/fixtures/rails4_users_app/config/secrets.yml +0 -22
  195. data/spec/fixtures/rails4_users_app/db/migrate/20191127112304_create_users.rb +0 -10
  196. data/spec/fixtures/rails4_users_app/db/schema.rb +0 -26
  197. data/spec/fixtures/rails4_users_app/db/seeds.rb +0 -7
  198. data/spec/fixtures/rails4_users_app/public/404.html +0 -67
  199. data/spec/fixtures/rails4_users_app/public/422.html +0 -67
  200. data/spec/fixtures/rails4_users_app/public/500.html +0 -66
  201. data/spec/fixtures/rails4_users_app/public/favicon.ico +0 -0
  202. data/spec/fixtures/rails4_users_app/public/robots.txt +0 -5
  203. data/spec/fixtures/rails4_users_app/spec/controllers/users_controller_api_spec.rb +0 -49
  204. data/spec/fixtures/rails4_users_app/test/fixtures/users.yml +0 -9
  205. data/spec/fixtures/rails_users_app/app/controllers/concerns/.keep +0 -0
  206. data/spec/fixtures/rails_users_app/app/controllers/users_controller.rb +0 -5
  207. data/spec/fixtures/rails_users_app/app/models/concerns/.keep +0 -0
  208. data/spec/fixtures/rails_users_app/appmap.yml +0 -3
  209. data/spec/fixtures/rails_users_app/lib/tasks/.keep +0 -0
  210. data/spec/fixtures/rails_users_app/log/.keep +0 -0
  211. data/spec/record_sql_rails4_pg_spec.rb +0 -76
@@ -3,30 +3,29 @@
3
3
  require 'rails_spec_helper'
4
4
 
5
5
  describe 'RSpec feature and feature group metadata' do
6
- before(:all) { @fixture_dir = 'spec/fixtures/rails_users_app' }
7
- include_examples 'Rails app pg database'
8
-
9
- around(:each) do |example|
10
- FileUtils.rm_rf tmpdir
11
- FileUtils.mkdir_p tmpdir
12
- cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path(tmpdir).shellescape}:/app/tmp app ./bin/rspec spec/models/user_spec.rb"
13
- run_cmd cmd, chdir: @fixture_dir
6
+ include_examples 'Rails app pg database', 'spec/fixtures/rails5_users_app' do
7
+ around(:each) do |example|
8
+ FileUtils.rm_rf tmpdir
9
+ FileUtils.mkdir_p tmpdir
10
+ cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path(tmpdir).shellescape}:/app/tmp app ./bin/rspec spec/models/user_spec.rb"
11
+ run_cmd cmd, chdir: fixture_dir
14
12
 
15
- example.run
16
- end
13
+ example.run
14
+ end
17
15
 
18
- let(:tmpdir) { 'tmp/spec/RSpec feature and feature group metadata' }
19
- let(:appmap_json) { File.join(tmpdir, %(appmap/rspec/User_creation_creates_charles.appmap.json)) }
16
+ let(:tmpdir) { 'tmp/spec/RSpec feature and feature group metadata' }
17
+ let(:appmap_json) { File.join(tmpdir, %(appmap/rspec/User_creation_creates_charles.appmap.json)) }
20
18
 
21
- describe do
22
- it 'are recorded in the appmap' do
23
- expect(File).to exist(appmap_json)
24
- appmap = JSON.parse(File.read(appmap_json)).to_yaml
19
+ describe do
20
+ it 'are recorded in the appmap' do
21
+ expect(File).to exist(appmap_json)
22
+ appmap = JSON.parse(File.read(appmap_json)).to_yaml
25
23
 
26
- expect(appmap).to include(<<-METADATA.strip)
24
+ expect(appmap).to include(<<-METADATA.strip)
27
25
  feature: Create a user
28
26
  feature_group: User
29
- METADATA
27
+ METADATA
28
+ end
30
29
  end
31
30
  end
32
31
  end
@@ -3,6 +3,7 @@ require 'net/http'
3
3
  require 'json'
4
4
  require 'yaml'
5
5
  require 'English'
6
+ require 'byebug'
6
7
  require 'webdrivers/chromedriver'
7
8
 
8
9
  # Disable default initialization of AppMap
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.37.0
4
+ version: 0.40.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: 2020-11-12 00:00:00.000000000 Z
11
+ date: 2021-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -319,6 +319,7 @@ files:
319
319
  - ".rubocop.yml"
320
320
  - ".travis.yml"
321
321
  - CHANGELOG.md
322
+ - CONTRIBUTING.md
322
323
  - Dockerfile.appmap
323
324
  - Gemfile
324
325
  - LICENSE.txt
@@ -378,7 +379,6 @@ files:
378
379
  - lore/public/stylesheets/style.css
379
380
  - package-lock.json
380
381
  - package.json
381
- - spec/abstract_controller4_base_spec.rb
382
382
  - spec/abstract_controller_base_spec.rb
383
383
  - spec/class_map_spec.rb
384
384
  - spec/config_spec.rb
@@ -387,6 +387,7 @@ files:
387
387
  - spec/fixtures/hook/constructor.rb
388
388
  - spec/fixtures/hook/exception_method.rb
389
389
  - spec/fixtures/hook/instance_method.rb
390
+ - spec/fixtures/hook/labels.rb
390
391
  - spec/fixtures/hook/singleton_method.rb
391
392
  - spec/fixtures/rack_users_app/.dockerignore
392
393
  - spec/fixtures/rack_users_app/.gitignore
@@ -396,146 +397,154 @@ files:
396
397
  - spec/fixtures/rack_users_app/config.ru
397
398
  - spec/fixtures/rack_users_app/docker-compose.yml
398
399
  - spec/fixtures/rack_users_app/lib/app.rb
399
- - spec/fixtures/rails4_users_app/.gitignore
400
- - spec/fixtures/rails4_users_app/.rbenv-gemsets
401
- - spec/fixtures/rails4_users_app/.ruby-version
402
- - spec/fixtures/rails4_users_app/Dockerfile
403
- - spec/fixtures/rails4_users_app/Dockerfile.pg
404
- - spec/fixtures/rails4_users_app/Gemfile
405
- - spec/fixtures/rails4_users_app/README.rdoc
406
- - spec/fixtures/rails4_users_app/Rakefile
407
- - spec/fixtures/rails4_users_app/app/assets/images/.keep
408
- - spec/fixtures/rails4_users_app/app/assets/javascripts/application.js
409
- - spec/fixtures/rails4_users_app/app/assets/stylesheets/application.css
410
- - spec/fixtures/rails4_users_app/app/controllers/api/users_controller.rb
411
- - spec/fixtures/rails4_users_app/app/controllers/application_controller.rb
412
- - spec/fixtures/rails4_users_app/app/controllers/concerns/.keep
413
- - spec/fixtures/rails4_users_app/app/controllers/health_controller.rb
414
- - spec/fixtures/rails4_users_app/app/controllers/users_controller.rb
415
- - spec/fixtures/rails4_users_app/app/helpers/application_helper.rb
416
- - spec/fixtures/rails4_users_app/app/mailers/.keep
417
- - spec/fixtures/rails4_users_app/app/models/.keep
418
- - spec/fixtures/rails4_users_app/app/models/concerns/.keep
419
- - spec/fixtures/rails4_users_app/app/models/user.rb
420
- - spec/fixtures/rails4_users_app/app/views/layouts/application.html.haml
421
- - spec/fixtures/rails4_users_app/app/views/users/index.html.haml
422
- - spec/fixtures/rails4_users_app/appmap.yml
423
- - spec/fixtures/rails4_users_app/bin/rails
424
- - spec/fixtures/rails4_users_app/bin/setup
425
- - spec/fixtures/rails4_users_app/bin/spring
426
- - spec/fixtures/rails4_users_app/config.ru
427
- - spec/fixtures/rails4_users_app/config/application.rb
428
- - spec/fixtures/rails4_users_app/config/boot.rb
429
- - spec/fixtures/rails4_users_app/config/database.yml
430
- - spec/fixtures/rails4_users_app/config/environment.rb
431
- - spec/fixtures/rails4_users_app/config/environments/development.rb
432
- - spec/fixtures/rails4_users_app/config/environments/production.rb
433
- - spec/fixtures/rails4_users_app/config/environments/test.rb
434
- - spec/fixtures/rails4_users_app/config/initializers/assets.rb
435
- - spec/fixtures/rails4_users_app/config/initializers/backtrace_silencers.rb
436
- - spec/fixtures/rails4_users_app/config/initializers/cookies_serializer.rb
437
- - spec/fixtures/rails4_users_app/config/initializers/filter_parameter_logging.rb
438
- - spec/fixtures/rails4_users_app/config/initializers/inflections.rb
439
- - spec/fixtures/rails4_users_app/config/initializers/mime_types.rb
440
- - spec/fixtures/rails4_users_app/config/initializers/session_store.rb
441
- - spec/fixtures/rails4_users_app/config/initializers/to_time_preserves_timezone.rb
442
- - spec/fixtures/rails4_users_app/config/initializers/wrap_parameters.rb
443
- - spec/fixtures/rails4_users_app/config/locales/en.yml
444
- - spec/fixtures/rails4_users_app/config/routes.rb
445
- - spec/fixtures/rails4_users_app/config/secrets.yml
446
- - spec/fixtures/rails4_users_app/create_app
447
- - spec/fixtures/rails4_users_app/db/migrate/20191127112304_create_users.rb
448
- - spec/fixtures/rails4_users_app/db/schema.rb
449
- - spec/fixtures/rails4_users_app/db/seeds.rb
450
- - spec/fixtures/rails4_users_app/docker-compose.yml
451
- - spec/fixtures/rails4_users_app/lib/assets/.keep
452
- - spec/fixtures/rails4_users_app/lib/tasks/.keep
453
- - spec/fixtures/rails4_users_app/log/.keep
454
- - spec/fixtures/rails4_users_app/public/404.html
455
- - spec/fixtures/rails4_users_app/public/422.html
456
- - spec/fixtures/rails4_users_app/public/500.html
457
- - spec/fixtures/rails4_users_app/public/favicon.ico
458
- - spec/fixtures/rails4_users_app/public/robots.txt
459
- - spec/fixtures/rails4_users_app/spec/controllers/users_controller_api_spec.rb
460
- - spec/fixtures/rails4_users_app/spec/rails_helper.rb
461
- - spec/fixtures/rails4_users_app/spec/spec_helper.rb
462
- - spec/fixtures/rails4_users_app/test/fixtures/users.yml
463
- - spec/fixtures/rails_users_app/.dockerignore
464
- - spec/fixtures/rails_users_app/.gitignore
465
- - spec/fixtures/rails_users_app/.rspec
466
- - spec/fixtures/rails_users_app/.ruby-version
467
- - spec/fixtures/rails_users_app/Dockerfile
468
- - spec/fixtures/rails_users_app/Dockerfile.pg
469
- - spec/fixtures/rails_users_app/Gemfile
470
- - spec/fixtures/rails_users_app/Rakefile
471
- - spec/fixtures/rails_users_app/app/controllers/api/users_controller.rb
472
- - spec/fixtures/rails_users_app/app/controllers/application_controller.rb
473
- - spec/fixtures/rails_users_app/app/controllers/concerns/.keep
474
- - spec/fixtures/rails_users_app/app/controllers/health_controller.rb
475
- - spec/fixtures/rails_users_app/app/controllers/users_controller.rb
476
- - spec/fixtures/rails_users_app/app/models/activerecord/user.rb
477
- - spec/fixtures/rails_users_app/app/models/concerns/.keep
478
- - spec/fixtures/rails_users_app/app/models/sequel/user.rb
479
- - spec/fixtures/rails_users_app/app/views/layouts/application.html.haml
480
- - spec/fixtures/rails_users_app/app/views/users/index.html.haml
481
- - spec/fixtures/rails_users_app/appmap.yml
482
- - spec/fixtures/rails_users_app/bin/appmap
483
- - spec/fixtures/rails_users_app/bin/byebug
484
- - spec/fixtures/rails_users_app/bin/gli
485
- - spec/fixtures/rails_users_app/bin/htmldiff
486
- - spec/fixtures/rails_users_app/bin/ldiff
487
- - spec/fixtures/rails_users_app/bin/nokogiri
488
- - spec/fixtures/rails_users_app/bin/rackup
489
- - spec/fixtures/rails_users_app/bin/rails
490
- - spec/fixtures/rails_users_app/bin/rake
491
- - spec/fixtures/rails_users_app/bin/rspec
492
- - spec/fixtures/rails_users_app/bin/ruby-parse
493
- - spec/fixtures/rails_users_app/bin/ruby-rewrite
494
- - spec/fixtures/rails_users_app/bin/sequel
495
- - spec/fixtures/rails_users_app/bin/setup
496
- - spec/fixtures/rails_users_app/bin/sprockets
497
- - spec/fixtures/rails_users_app/bin/thor
498
- - spec/fixtures/rails_users_app/bin/update
499
- - spec/fixtures/rails_users_app/config.ru
500
- - spec/fixtures/rails_users_app/config/application.rb
501
- - spec/fixtures/rails_users_app/config/boot.rb
502
- - spec/fixtures/rails_users_app/config/credentials.yml.enc
503
- - spec/fixtures/rails_users_app/config/database.yml
504
- - spec/fixtures/rails_users_app/config/environment.rb
505
- - spec/fixtures/rails_users_app/config/environments/development.rb
506
- - spec/fixtures/rails_users_app/config/environments/production.rb
507
- - spec/fixtures/rails_users_app/config/environments/test.rb
508
- - spec/fixtures/rails_users_app/config/initializers/application_controller_renderer.rb
509
- - spec/fixtures/rails_users_app/config/initializers/backtrace_silencers.rb
510
- - spec/fixtures/rails_users_app/config/initializers/cors.rb
511
- - spec/fixtures/rails_users_app/config/initializers/filter_parameter_logging.rb
512
- - spec/fixtures/rails_users_app/config/initializers/inflections.rb
513
- - spec/fixtures/rails_users_app/config/initializers/mime_types.rb
514
- - spec/fixtures/rails_users_app/config/initializers/record_button.rb
515
- - spec/fixtures/rails_users_app/config/initializers/wrap_parameters.rb
516
- - spec/fixtures/rails_users_app/config/locales/en.yml
517
- - spec/fixtures/rails_users_app/config/routes.rb
518
- - spec/fixtures/rails_users_app/create_app
519
- - spec/fixtures/rails_users_app/db/migrate/20190728211408_create_users.rb
520
- - spec/fixtures/rails_users_app/db/schema.rb
521
- - spec/fixtures/rails_users_app/docker-compose.yml
522
- - spec/fixtures/rails_users_app/features/api_users.feature
523
- - spec/fixtures/rails_users_app/features/support/env.rb
524
- - spec/fixtures/rails_users_app/features/support/hooks.rb
525
- - spec/fixtures/rails_users_app/features/support/steps.rb
526
- - spec/fixtures/rails_users_app/lib/tasks/.keep
527
- - spec/fixtures/rails_users_app/log/.keep
528
- - spec/fixtures/rails_users_app/public/robots.txt
529
- - spec/fixtures/rails_users_app/spec/controllers/users_controller_api_spec.rb
530
- - spec/fixtures/rails_users_app/spec/models/user_spec.rb
531
- - spec/fixtures/rails_users_app/spec/rails_helper.rb
532
- - spec/fixtures/rails_users_app/spec/spec_helper.rb
533
- - spec/fixtures/rails_users_app/users_app/.gitignore
400
+ - spec/fixtures/rails5_users_app/.dockerignore
401
+ - spec/fixtures/rails5_users_app/.gitignore
402
+ - spec/fixtures/rails5_users_app/.rspec
403
+ - spec/fixtures/rails5_users_app/.ruby-version
404
+ - spec/fixtures/rails5_users_app/Dockerfile
405
+ - spec/fixtures/rails5_users_app/Dockerfile.pg
406
+ - spec/fixtures/rails5_users_app/Gemfile
407
+ - spec/fixtures/rails5_users_app/Rakefile
408
+ - spec/fixtures/rails5_users_app/app/controllers/api/users_controller.rb
409
+ - spec/fixtures/rails5_users_app/app/controllers/application_controller.rb
410
+ - spec/fixtures/rails5_users_app/app/controllers/concerns/.keep
411
+ - spec/fixtures/rails5_users_app/app/controllers/health_controller.rb
412
+ - spec/fixtures/rails5_users_app/app/controllers/users_controller.rb
413
+ - spec/fixtures/rails5_users_app/app/models/activerecord/user.rb
414
+ - spec/fixtures/rails5_users_app/app/models/concerns/.keep
415
+ - spec/fixtures/rails5_users_app/app/models/sequel/user.rb
416
+ - spec/fixtures/rails5_users_app/app/views/layouts/application.html.haml
417
+ - spec/fixtures/rails5_users_app/app/views/users/index.html.haml
418
+ - spec/fixtures/rails5_users_app/appmap.yml
419
+ - spec/fixtures/rails5_users_app/bin/appmap
420
+ - spec/fixtures/rails5_users_app/bin/byebug
421
+ - spec/fixtures/rails5_users_app/bin/gli
422
+ - spec/fixtures/rails5_users_app/bin/htmldiff
423
+ - spec/fixtures/rails5_users_app/bin/ldiff
424
+ - spec/fixtures/rails5_users_app/bin/nokogiri
425
+ - spec/fixtures/rails5_users_app/bin/rackup
426
+ - spec/fixtures/rails5_users_app/bin/rails
427
+ - spec/fixtures/rails5_users_app/bin/rake
428
+ - spec/fixtures/rails5_users_app/bin/rspec
429
+ - spec/fixtures/rails5_users_app/bin/ruby-parse
430
+ - spec/fixtures/rails5_users_app/bin/ruby-rewrite
431
+ - spec/fixtures/rails5_users_app/bin/sequel
432
+ - spec/fixtures/rails5_users_app/bin/setup
433
+ - spec/fixtures/rails5_users_app/bin/sprockets
434
+ - spec/fixtures/rails5_users_app/bin/thor
435
+ - spec/fixtures/rails5_users_app/bin/update
436
+ - spec/fixtures/rails5_users_app/config.ru
437
+ - spec/fixtures/rails5_users_app/config/application.rb
438
+ - spec/fixtures/rails5_users_app/config/boot.rb
439
+ - spec/fixtures/rails5_users_app/config/credentials.yml.enc
440
+ - spec/fixtures/rails5_users_app/config/database.yml
441
+ - spec/fixtures/rails5_users_app/config/environment.rb
442
+ - spec/fixtures/rails5_users_app/config/environments/development.rb
443
+ - spec/fixtures/rails5_users_app/config/environments/production.rb
444
+ - spec/fixtures/rails5_users_app/config/environments/test.rb
445
+ - spec/fixtures/rails5_users_app/config/initializers/application_controller_renderer.rb
446
+ - spec/fixtures/rails5_users_app/config/initializers/backtrace_silencers.rb
447
+ - spec/fixtures/rails5_users_app/config/initializers/cors.rb
448
+ - spec/fixtures/rails5_users_app/config/initializers/filter_parameter_logging.rb
449
+ - spec/fixtures/rails5_users_app/config/initializers/inflections.rb
450
+ - spec/fixtures/rails5_users_app/config/initializers/mime_types.rb
451
+ - spec/fixtures/rails5_users_app/config/initializers/record_button.rb
452
+ - spec/fixtures/rails5_users_app/config/initializers/wrap_parameters.rb
453
+ - spec/fixtures/rails5_users_app/config/locales/en.yml
454
+ - spec/fixtures/rails5_users_app/config/routes.rb
455
+ - spec/fixtures/rails5_users_app/create_app
456
+ - spec/fixtures/rails5_users_app/db/migrate/20190728211408_create_users.rb
457
+ - spec/fixtures/rails5_users_app/db/schema.rb
458
+ - spec/fixtures/rails5_users_app/docker-compose.yml
459
+ - spec/fixtures/rails5_users_app/features/api_users.feature
460
+ - spec/fixtures/rails5_users_app/features/support/env.rb
461
+ - spec/fixtures/rails5_users_app/features/support/hooks.rb
462
+ - spec/fixtures/rails5_users_app/features/support/steps.rb
463
+ - spec/fixtures/rails5_users_app/lib/tasks/.keep
464
+ - spec/fixtures/rails5_users_app/log/.keep
465
+ - spec/fixtures/rails5_users_app/public/robots.txt
466
+ - spec/fixtures/rails5_users_app/spec/controllers/users_controller_api_spec.rb
467
+ - spec/fixtures/rails5_users_app/spec/controllers/users_controller_spec.rb
468
+ - spec/fixtures/rails5_users_app/spec/models/user_spec.rb
469
+ - spec/fixtures/rails5_users_app/spec/rails_helper.rb
470
+ - spec/fixtures/rails5_users_app/spec/spec_helper.rb
471
+ - spec/fixtures/rails5_users_app/users_app/.gitignore
472
+ - spec/fixtures/rails6_users_app/.dockerignore
473
+ - spec/fixtures/rails6_users_app/.gitignore
474
+ - spec/fixtures/rails6_users_app/.rspec
475
+ - spec/fixtures/rails6_users_app/.ruby-version
476
+ - spec/fixtures/rails6_users_app/Dockerfile
477
+ - spec/fixtures/rails6_users_app/Dockerfile.pg
478
+ - spec/fixtures/rails6_users_app/Gemfile
479
+ - spec/fixtures/rails6_users_app/Rakefile
480
+ - spec/fixtures/rails6_users_app/app/controllers/api/users_controller.rb
481
+ - spec/fixtures/rails6_users_app/app/controllers/application_controller.rb
482
+ - spec/fixtures/rails6_users_app/app/controllers/concerns/.keep
483
+ - spec/fixtures/rails6_users_app/app/controllers/health_controller.rb
484
+ - spec/fixtures/rails6_users_app/app/controllers/users_controller.rb
485
+ - spec/fixtures/rails6_users_app/app/models/activerecord/user.rb
486
+ - spec/fixtures/rails6_users_app/app/models/concerns/.keep
487
+ - spec/fixtures/rails6_users_app/app/models/sequel/user.rb
488
+ - spec/fixtures/rails6_users_app/app/views/layouts/application.html.haml
489
+ - spec/fixtures/rails6_users_app/app/views/users/index.html.haml
490
+ - spec/fixtures/rails6_users_app/appmap.yml
491
+ - spec/fixtures/rails6_users_app/bin/appmap
492
+ - spec/fixtures/rails6_users_app/bin/byebug
493
+ - spec/fixtures/rails6_users_app/bin/gli
494
+ - spec/fixtures/rails6_users_app/bin/htmldiff
495
+ - spec/fixtures/rails6_users_app/bin/ldiff
496
+ - spec/fixtures/rails6_users_app/bin/nokogiri
497
+ - spec/fixtures/rails6_users_app/bin/rackup
498
+ - spec/fixtures/rails6_users_app/bin/rails
499
+ - spec/fixtures/rails6_users_app/bin/rake
500
+ - spec/fixtures/rails6_users_app/bin/rspec
501
+ - spec/fixtures/rails6_users_app/bin/ruby-parse
502
+ - spec/fixtures/rails6_users_app/bin/ruby-rewrite
503
+ - spec/fixtures/rails6_users_app/bin/sequel
504
+ - spec/fixtures/rails6_users_app/bin/setup
505
+ - spec/fixtures/rails6_users_app/bin/sprockets
506
+ - spec/fixtures/rails6_users_app/bin/thor
507
+ - spec/fixtures/rails6_users_app/bin/update
508
+ - spec/fixtures/rails6_users_app/config.ru
509
+ - spec/fixtures/rails6_users_app/config/application.rb
510
+ - spec/fixtures/rails6_users_app/config/boot.rb
511
+ - spec/fixtures/rails6_users_app/config/credentials.yml.enc
512
+ - spec/fixtures/rails6_users_app/config/database.yml
513
+ - spec/fixtures/rails6_users_app/config/environment.rb
514
+ - spec/fixtures/rails6_users_app/config/environments/development.rb
515
+ - spec/fixtures/rails6_users_app/config/environments/production.rb
516
+ - spec/fixtures/rails6_users_app/config/environments/test.rb
517
+ - spec/fixtures/rails6_users_app/config/initializers/application_controller_renderer.rb
518
+ - spec/fixtures/rails6_users_app/config/initializers/backtrace_silencers.rb
519
+ - spec/fixtures/rails6_users_app/config/initializers/cors.rb
520
+ - spec/fixtures/rails6_users_app/config/initializers/filter_parameter_logging.rb
521
+ - spec/fixtures/rails6_users_app/config/initializers/inflections.rb
522
+ - spec/fixtures/rails6_users_app/config/initializers/mime_types.rb
523
+ - spec/fixtures/rails6_users_app/config/initializers/record_button.rb
524
+ - spec/fixtures/rails6_users_app/config/initializers/wrap_parameters.rb
525
+ - spec/fixtures/rails6_users_app/config/locales/en.yml
526
+ - spec/fixtures/rails6_users_app/config/routes.rb
527
+ - spec/fixtures/rails6_users_app/create_app
528
+ - spec/fixtures/rails6_users_app/db/migrate/20190728211408_create_users.rb
529
+ - spec/fixtures/rails6_users_app/db/schema.rb
530
+ - spec/fixtures/rails6_users_app/docker-compose.yml
531
+ - spec/fixtures/rails6_users_app/features/api_users.feature
532
+ - spec/fixtures/rails6_users_app/features/support/env.rb
533
+ - spec/fixtures/rails6_users_app/features/support/hooks.rb
534
+ - spec/fixtures/rails6_users_app/features/support/steps.rb
535
+ - spec/fixtures/rails6_users_app/lib/tasks/.keep
536
+ - spec/fixtures/rails6_users_app/log/.keep
537
+ - spec/fixtures/rails6_users_app/public/robots.txt
538
+ - spec/fixtures/rails6_users_app/spec/controllers/users_controller_api_spec.rb
539
+ - spec/fixtures/rails6_users_app/spec/controllers/users_controller_spec.rb
540
+ - spec/fixtures/rails6_users_app/spec/models/user_spec.rb
541
+ - spec/fixtures/rails6_users_app/spec/rails_helper.rb
542
+ - spec/fixtures/rails6_users_app/spec/spec_helper.rb
543
+ - spec/fixtures/rails6_users_app/users_app/.gitignore
534
544
  - spec/hook_spec.rb
535
545
  - spec/open_spec.rb
536
546
  - spec/rails_spec_helper.rb
537
547
  - spec/railtie_spec.rb
538
- - spec/record_sql_rails4_pg_spec.rb
539
548
  - spec/record_sql_rails_pg_spec.rb
540
549
  - spec/remote_recording_spec.rb
541
550
  - spec/rspec_feature_metadata_spec.rb
@@ -1,67 +0,0 @@
1
- require 'rails_spec_helper'
2
-
3
- describe 'AbstractControllerBase' do
4
- before(:all) { @fixture_dir = 'spec/fixtures/rails4_users_app' }
5
- include_examples 'Rails app pg database'
6
-
7
- around(:each) do |example|
8
- FileUtils.rm_rf tmpdir
9
- FileUtils.mkdir_p tmpdir
10
- cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path tmpdir}:/app/tmp app ./bin/rspec spec/controllers/users_controller_api_spec.rb:8"
11
- run_cmd cmd, chdir: @fixture_dir
12
-
13
- example.run
14
- end
15
-
16
- let(:tmpdir) { 'tmp/spec/AbstractControllerBase' }
17
- let(:appmap_json) { File.join(tmpdir, 'appmap/rspec/Api_UsersController_POST_api_users_with_required_parameters_creates_a_user.appmap.json') }
18
-
19
- describe 'testing with rspec' do
20
- it 'Message fields are recorded in the appmap' do
21
- expect(File).to exist(appmap_json)
22
- appmap = JSON.parse(File.read(appmap_json)).to_yaml
23
-
24
- expect(appmap).to include(<<-MESSAGE.strip)
25
- message:
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:
37
- MESSAGE
38
-
39
- expect(appmap).to include(<<-SERVER_REQUEST.strip)
40
- http_server_request:
41
- request_method: POST
42
- path_info: "/api/users"
43
- SERVER_REQUEST
44
- end
45
- it 'Properly captures method parameters in the appmap' do
46
- expect(File).to exist(appmap_json)
47
- appmap = JSON.parse(File.read(appmap_json)).to_yaml
48
-
49
- expect(appmap).to match(<<-CREATE_CALL.strip)
50
- event: call
51
- thread_id: .*
52
- defined_class: Api::UsersController
53
- method_id: build_user
54
- path: app/controllers/api/users_controller.rb
55
- lineno: 23
56
- static: false
57
- parameters:
58
- - name: params
59
- class: Hash
60
- object_id: .*
61
- value: '{"login"=>"alice"}'
62
- kind: req
63
- receiver:
64
- CREATE_CALL
65
- end
66
- end
67
- end