appmap 0.83.3 → 0.83.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (362) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +16 -0
  3. data/CHANGELOG.md +21 -0
  4. data/appmap.gemspec +2 -1
  5. data/lib/appmap/trace.rb +1 -1
  6. data/lib/appmap/version.rb +1 -1
  7. metadata +3 -357
  8. data/spec/class_map_spec.rb +0 -28
  9. data/spec/config_spec.rb +0 -155
  10. data/spec/depends/api_spec.rb +0 -196
  11. data/spec/depends/spec_helper.rb +0 -18
  12. data/spec/display_string_spec.rb +0 -40
  13. data/spec/fixtures/config/incomplete_config.yml +0 -1
  14. data/spec/fixtures/config/invalid_config.yml +0 -2
  15. data/spec/fixtures/config/invalid_yaml_config.yml +0 -3
  16. data/spec/fixtures/config/maximal_config.yml +0 -14
  17. data/spec/fixtures/config/missing_path_or_gem.yml +0 -3
  18. data/spec/fixtures/config/valid_config.yml +0 -3
  19. data/spec/fixtures/database.yml +0 -11
  20. data/spec/fixtures/depends/.gitignore +0 -2
  21. data/spec/fixtures/depends/app/controllers/api/api_keys_controller.rb +0 -2
  22. data/spec/fixtures/depends/app/controllers/organizations_controller.rb +0 -2
  23. data/spec/fixtures/depends/app/models/api_key.rb +0 -2
  24. data/spec/fixtures/depends/app/models/configuration.rb +0 -2
  25. data/spec/fixtures/depends/app/models/show.rb +0 -2
  26. data/spec/fixtures/depends/app/models/user.rb +0 -2
  27. data/spec/fixtures/depends/revoke_api_key.appmap.json +0 -901
  28. data/spec/fixtures/depends/spec/actual_rspec_test.rb +0 -7
  29. data/spec/fixtures/depends/spec/api_spec.rb +0 -2
  30. data/spec/fixtures/depends/spec/user_spec.rb +0 -2
  31. data/spec/fixtures/depends/test/actual_minitest_test.rb +0 -5
  32. data/spec/fixtures/depends/user_page_scenario.appmap.json +0 -1776
  33. data/spec/fixtures/hook/.gitignore +0 -2
  34. data/spec/fixtures/hook/app/controllers/api/api_keys_controller.rb +0 -1
  35. data/spec/fixtures/hook/app/controllers/organizations_controller.rb +0 -1
  36. data/spec/fixtures/hook/app/models/api_key.rb +0 -1
  37. data/spec/fixtures/hook/app/models/configuration.rb +0 -1
  38. data/spec/fixtures/hook/app/models/show.rb +0 -1
  39. data/spec/fixtures/hook/app/models/user.rb +0 -1
  40. data/spec/fixtures/hook/attr_accessor.rb +0 -5
  41. data/spec/fixtures/hook/compare.rb +0 -7
  42. data/spec/fixtures/hook/constructor.rb +0 -7
  43. data/spec/fixtures/hook/custom_instance_method.rb +0 -11
  44. data/spec/fixtures/hook/exception_method.rb +0 -61
  45. data/spec/fixtures/hook/exclude.rb +0 -15
  46. data/spec/fixtures/hook/instance_method.rb +0 -31
  47. data/spec/fixtures/hook/kwargs.rb +0 -11
  48. data/spec/fixtures/hook/labels.rb +0 -6
  49. data/spec/fixtures/hook/method_named_call.rb +0 -11
  50. data/spec/fixtures/hook/pkg_a/a.rb +0 -7
  51. data/spec/fixtures/hook/prepended_override.rb +0 -14
  52. data/spec/fixtures/hook/protected_method.rb +0 -29
  53. data/spec/fixtures/hook/report_parameters.rb +0 -8
  54. data/spec/fixtures/hook/revoke_api_key.appmap.json +0 -847
  55. data/spec/fixtures/hook/singleton_method.rb +0 -63
  56. data/spec/fixtures/hook/spec/api_spec.rb +0 -1
  57. data/spec/fixtures/hook/spec/user_spec.rb +0 -1
  58. data/spec/fixtures/hook/sub_packages.rb +0 -7
  59. data/spec/fixtures/hook/user_page_scenario.appmap.json +0 -1722
  60. data/spec/fixtures/rack_users_app/.dockerignore +0 -2
  61. data/spec/fixtures/rack_users_app/.gitignore +0 -2
  62. data/spec/fixtures/rack_users_app/Gemfile +0 -10
  63. data/spec/fixtures/rack_users_app/appmap.yml +0 -3
  64. data/spec/fixtures/rack_users_app/config.ru +0 -2
  65. data/spec/fixtures/rack_users_app/lib/app.rb +0 -36
  66. data/spec/fixtures/rails5_users_app/.dockerignore +0 -1
  67. data/spec/fixtures/rails5_users_app/.gitignore +0 -39
  68. data/spec/fixtures/rails5_users_app/.rspec +0 -1
  69. data/spec/fixtures/rails5_users_app/.ruby-version +0 -1
  70. data/spec/fixtures/rails5_users_app/Gemfile +0 -54
  71. data/spec/fixtures/rails5_users_app/Rakefile +0 -6
  72. data/spec/fixtures/rails5_users_app/app/controllers/api/users_controller.rb +0 -29
  73. data/spec/fixtures/rails5_users_app/app/controllers/application_controller.rb +0 -2
  74. data/spec/fixtures/rails5_users_app/app/controllers/concerns/.keep +0 -0
  75. data/spec/fixtures/rails5_users_app/app/controllers/health_controller.rb +0 -5
  76. data/spec/fixtures/rails5_users_app/app/controllers/users_controller.rb +0 -21
  77. data/spec/fixtures/rails5_users_app/app/models/activerecord/user.rb +0 -18
  78. data/spec/fixtures/rails5_users_app/app/models/concerns/.keep +0 -0
  79. data/spec/fixtures/rails5_users_app/app/models/sequel/user.rb +0 -25
  80. data/spec/fixtures/rails5_users_app/app/views/layouts/application.html.haml +0 -7
  81. data/spec/fixtures/rails5_users_app/app/views/users/index.html.haml +0 -7
  82. data/spec/fixtures/rails5_users_app/appmap.yml +0 -11
  83. data/spec/fixtures/rails5_users_app/bin/appmap +0 -29
  84. data/spec/fixtures/rails5_users_app/bin/byebug +0 -29
  85. data/spec/fixtures/rails5_users_app/bin/gli +0 -29
  86. data/spec/fixtures/rails5_users_app/bin/htmldiff +0 -29
  87. data/spec/fixtures/rails5_users_app/bin/ldiff +0 -29
  88. data/spec/fixtures/rails5_users_app/bin/nokogiri +0 -29
  89. data/spec/fixtures/rails5_users_app/bin/rackup +0 -29
  90. data/spec/fixtures/rails5_users_app/bin/rails +0 -4
  91. data/spec/fixtures/rails5_users_app/bin/rake +0 -29
  92. data/spec/fixtures/rails5_users_app/bin/rspec +0 -29
  93. data/spec/fixtures/rails5_users_app/bin/ruby-parse +0 -29
  94. data/spec/fixtures/rails5_users_app/bin/ruby-rewrite +0 -29
  95. data/spec/fixtures/rails5_users_app/bin/sequel +0 -29
  96. data/spec/fixtures/rails5_users_app/bin/setup +0 -25
  97. data/spec/fixtures/rails5_users_app/bin/sprockets +0 -29
  98. data/spec/fixtures/rails5_users_app/bin/thor +0 -29
  99. data/spec/fixtures/rails5_users_app/bin/update +0 -25
  100. data/spec/fixtures/rails5_users_app/config/application.rb +0 -45
  101. data/spec/fixtures/rails5_users_app/config/boot.rb +0 -3
  102. data/spec/fixtures/rails5_users_app/config/credentials.yml.enc +0 -1
  103. data/spec/fixtures/rails5_users_app/config/database.yml +0 -1
  104. data/spec/fixtures/rails5_users_app/config/environment.rb +0 -5
  105. data/spec/fixtures/rails5_users_app/config/environments/development.rb +0 -40
  106. data/spec/fixtures/rails5_users_app/config/environments/production.rb +0 -68
  107. data/spec/fixtures/rails5_users_app/config/environments/test.rb +0 -39
  108. data/spec/fixtures/rails5_users_app/config/initializers/application_controller_renderer.rb +0 -8
  109. data/spec/fixtures/rails5_users_app/config/initializers/backtrace_silencers.rb +0 -7
  110. data/spec/fixtures/rails5_users_app/config/initializers/cors.rb +0 -16
  111. data/spec/fixtures/rails5_users_app/config/initializers/filter_parameter_logging.rb +0 -4
  112. data/spec/fixtures/rails5_users_app/config/initializers/inflections.rb +0 -16
  113. data/spec/fixtures/rails5_users_app/config/initializers/mime_types.rb +0 -4
  114. data/spec/fixtures/rails5_users_app/config/initializers/wrap_parameters.rb +0 -9
  115. data/spec/fixtures/rails5_users_app/config/locales/en.yml +0 -33
  116. data/spec/fixtures/rails5_users_app/config/routes.rb +0 -11
  117. data/spec/fixtures/rails5_users_app/config.ru +0 -5
  118. data/spec/fixtures/rails5_users_app/db/migrate/20190728211408_create_users.rb +0 -9
  119. data/spec/fixtures/rails5_users_app/db/schema.rb +0 -23
  120. data/spec/fixtures/rails5_users_app/features/api_users.feature +0 -13
  121. data/spec/fixtures/rails5_users_app/features/support/env.rb +0 -4
  122. data/spec/fixtures/rails5_users_app/features/support/hooks.rb +0 -11
  123. data/spec/fixtures/rails5_users_app/features/support/steps.rb +0 -18
  124. data/spec/fixtures/rails5_users_app/lib/tasks/.keep +0 -0
  125. data/spec/fixtures/rails5_users_app/log/.keep +0 -0
  126. data/spec/fixtures/rails5_users_app/public/robots.txt +0 -1
  127. data/spec/fixtures/rails5_users_app/spec/controllers/users_controller_api_spec.rb +0 -42
  128. data/spec/fixtures/rails5_users_app/spec/controllers/users_controller_spec.rb +0 -27
  129. data/spec/fixtures/rails5_users_app/spec/models/user_spec.rb +0 -29
  130. data/spec/fixtures/rails5_users_app/spec/rails_helper.rb +0 -57
  131. data/spec/fixtures/rails5_users_app/spec/spec_helper.rb +0 -96
  132. data/spec/fixtures/rails5_users_app/users_app/.gitignore +0 -20
  133. data/spec/fixtures/rails6_users_app/.dockerignore +0 -1
  134. data/spec/fixtures/rails6_users_app/.gitignore +0 -39
  135. data/spec/fixtures/rails6_users_app/.rspec +0 -1
  136. data/spec/fixtures/rails6_users_app/Gemfile +0 -28
  137. data/spec/fixtures/rails6_users_app/Rakefile +0 -6
  138. data/spec/fixtures/rails6_users_app/app/controllers/api/users_controller.rb +0 -28
  139. data/spec/fixtures/rails6_users_app/app/controllers/application_controller.rb +0 -2
  140. data/spec/fixtures/rails6_users_app/app/controllers/concerns/.keep +0 -0
  141. data/spec/fixtures/rails6_users_app/app/controllers/health_controller.rb +0 -5
  142. data/spec/fixtures/rails6_users_app/app/controllers/users_controller.rb +0 -21
  143. data/spec/fixtures/rails6_users_app/app/models/activerecord/user.rb +0 -18
  144. data/spec/fixtures/rails6_users_app/app/models/concerns/.keep +0 -0
  145. data/spec/fixtures/rails6_users_app/app/models/sequel/user.rb +0 -25
  146. data/spec/fixtures/rails6_users_app/app/views/layouts/application.html.haml +0 -7
  147. data/spec/fixtures/rails6_users_app/app/views/users/index.html.haml +0 -7
  148. data/spec/fixtures/rails6_users_app/appmap.yml +0 -14
  149. data/spec/fixtures/rails6_users_app/bin/appmap +0 -29
  150. data/spec/fixtures/rails6_users_app/bin/byebug +0 -29
  151. data/spec/fixtures/rails6_users_app/bin/gli +0 -29
  152. data/spec/fixtures/rails6_users_app/bin/htmldiff +0 -29
  153. data/spec/fixtures/rails6_users_app/bin/ldiff +0 -29
  154. data/spec/fixtures/rails6_users_app/bin/nokogiri +0 -29
  155. data/spec/fixtures/rails6_users_app/bin/rackup +0 -29
  156. data/spec/fixtures/rails6_users_app/bin/rails +0 -4
  157. data/spec/fixtures/rails6_users_app/bin/rake +0 -29
  158. data/spec/fixtures/rails6_users_app/bin/rspec +0 -29
  159. data/spec/fixtures/rails6_users_app/bin/ruby-parse +0 -29
  160. data/spec/fixtures/rails6_users_app/bin/ruby-rewrite +0 -29
  161. data/spec/fixtures/rails6_users_app/bin/sequel +0 -29
  162. data/spec/fixtures/rails6_users_app/bin/setup +0 -25
  163. data/spec/fixtures/rails6_users_app/bin/sprockets +0 -29
  164. data/spec/fixtures/rails6_users_app/bin/thor +0 -29
  165. data/spec/fixtures/rails6_users_app/bin/update +0 -25
  166. data/spec/fixtures/rails6_users_app/config/application.rb +0 -45
  167. data/spec/fixtures/rails6_users_app/config/boot.rb +0 -3
  168. data/spec/fixtures/rails6_users_app/config/credentials.yml.enc +0 -1
  169. data/spec/fixtures/rails6_users_app/config/database.yml +0 -1
  170. data/spec/fixtures/rails6_users_app/config/environment.rb +0 -5
  171. data/spec/fixtures/rails6_users_app/config/environments/development.rb +0 -40
  172. data/spec/fixtures/rails6_users_app/config/environments/production.rb +0 -68
  173. data/spec/fixtures/rails6_users_app/config/environments/test.rb +0 -39
  174. data/spec/fixtures/rails6_users_app/config/initializers/application_controller_renderer.rb +0 -8
  175. data/spec/fixtures/rails6_users_app/config/initializers/backtrace_silencers.rb +0 -7
  176. data/spec/fixtures/rails6_users_app/config/initializers/cors.rb +0 -16
  177. data/spec/fixtures/rails6_users_app/config/initializers/filter_parameter_logging.rb +0 -4
  178. data/spec/fixtures/rails6_users_app/config/initializers/inflections.rb +0 -16
  179. data/spec/fixtures/rails6_users_app/config/initializers/mime_types.rb +0 -4
  180. data/spec/fixtures/rails6_users_app/config/initializers/wrap_parameters.rb +0 -9
  181. data/spec/fixtures/rails6_users_app/config/locales/en.yml +0 -33
  182. data/spec/fixtures/rails6_users_app/config/routes.rb +0 -11
  183. data/spec/fixtures/rails6_users_app/config.ru +0 -5
  184. data/spec/fixtures/rails6_users_app/db/migrate/20190728211408_create_users.rb +0 -9
  185. data/spec/fixtures/rails6_users_app/db/schema.rb +0 -23
  186. data/spec/fixtures/rails6_users_app/features/api_users.feature +0 -13
  187. data/spec/fixtures/rails6_users_app/features/support/env.rb +0 -4
  188. data/spec/fixtures/rails6_users_app/features/support/hooks.rb +0 -11
  189. data/spec/fixtures/rails6_users_app/features/support/steps.rb +0 -18
  190. data/spec/fixtures/rails6_users_app/lib/tasks/.keep +0 -0
  191. data/spec/fixtures/rails6_users_app/lib/tasks/appmap.rake +0 -23
  192. data/spec/fixtures/rails6_users_app/log/.keep +0 -0
  193. data/spec/fixtures/rails6_users_app/package.json +0 -8
  194. data/spec/fixtures/rails6_users_app/public/robots.txt +0 -1
  195. data/spec/fixtures/rails6_users_app/spec/controllers/users_controller_api_spec.rb +0 -42
  196. data/spec/fixtures/rails6_users_app/spec/controllers/users_controller_spec.rb +0 -27
  197. data/spec/fixtures/rails6_users_app/spec/models/user_spec.rb +0 -29
  198. data/spec/fixtures/rails6_users_app/spec/rails_helper.rb +0 -57
  199. data/spec/fixtures/rails6_users_app/spec/spec_helper.rb +0 -96
  200. data/spec/fixtures/rails6_users_app/test/controllers/functional_calc_test.rb +0 -10
  201. data/spec/fixtures/rails6_users_app/test/integration/integration_calc_test.rb +0 -12
  202. data/spec/fixtures/rails6_users_app/users_app/.gitignore +0 -20
  203. data/spec/fixtures/rails6_users_app/yarn.lock +0 -2020
  204. data/spec/fixtures/rails7_users_app/.dockerignore +0 -1
  205. data/spec/fixtures/rails7_users_app/.gitattributes +0 -7
  206. data/spec/fixtures/rails7_users_app/.gitignore +0 -31
  207. data/spec/fixtures/rails7_users_app/.rspec +0 -1
  208. data/spec/fixtures/rails7_users_app/Gemfile +0 -75
  209. data/spec/fixtures/rails7_users_app/README.md +0 -24
  210. data/spec/fixtures/rails7_users_app/Rakefile +0 -6
  211. data/spec/fixtures/rails7_users_app/app/assets/config/manifest.js +0 -4
  212. data/spec/fixtures/rails7_users_app/app/assets/images/.keep +0 -0
  213. data/spec/fixtures/rails7_users_app/app/assets/stylesheets/application.css +0 -15
  214. data/spec/fixtures/rails7_users_app/app/channels/application_cable/channel.rb +0 -4
  215. data/spec/fixtures/rails7_users_app/app/channels/application_cable/connection.rb +0 -4
  216. data/spec/fixtures/rails7_users_app/app/controllers/application_controller.rb +0 -2
  217. data/spec/fixtures/rails7_users_app/app/controllers/concerns/.keep +0 -0
  218. data/spec/fixtures/rails7_users_app/app/helpers/application_helper.rb +0 -2
  219. data/spec/fixtures/rails7_users_app/app/javascript/application.js +0 -3
  220. data/spec/fixtures/rails7_users_app/app/javascript/controllers/application.js +0 -9
  221. data/spec/fixtures/rails7_users_app/app/javascript/controllers/hello_controller.js +0 -7
  222. data/spec/fixtures/rails7_users_app/app/javascript/controllers/index.js +0 -11
  223. data/spec/fixtures/rails7_users_app/app/jobs/application_job.rb +0 -7
  224. data/spec/fixtures/rails7_users_app/app/mailers/application_mailer.rb +0 -4
  225. data/spec/fixtures/rails7_users_app/app/models/application_record.rb +0 -3
  226. data/spec/fixtures/rails7_users_app/app/models/concerns/.keep +0 -0
  227. data/spec/fixtures/rails7_users_app/app/models/instance.rb +0 -7
  228. data/spec/fixtures/rails7_users_app/app/models/instructor.rb +0 -7
  229. data/spec/fixtures/rails7_users_app/app/views/layouts/application.html.erb +0 -16
  230. data/spec/fixtures/rails7_users_app/app/views/layouts/mailer.html.erb +0 -13
  231. data/spec/fixtures/rails7_users_app/app/views/layouts/mailer.text.erb +0 -1
  232. data/spec/fixtures/rails7_users_app/appmap.yml +0 -3
  233. data/spec/fixtures/rails7_users_app/bin/bundle +0 -114
  234. data/spec/fixtures/rails7_users_app/bin/importmap +0 -4
  235. data/spec/fixtures/rails7_users_app/bin/rails +0 -4
  236. data/spec/fixtures/rails7_users_app/bin/rake +0 -4
  237. data/spec/fixtures/rails7_users_app/bin/setup +0 -33
  238. data/spec/fixtures/rails7_users_app/config/application.rb +0 -22
  239. data/spec/fixtures/rails7_users_app/config/boot.rb +0 -4
  240. data/spec/fixtures/rails7_users_app/config/cable.yml +0 -10
  241. data/spec/fixtures/rails7_users_app/config/credentials.yml.enc +0 -1
  242. data/spec/fixtures/rails7_users_app/config/database.yml +0 -1
  243. data/spec/fixtures/rails7_users_app/config/environment.rb +0 -5
  244. data/spec/fixtures/rails7_users_app/config/environments/development.rb +0 -70
  245. data/spec/fixtures/rails7_users_app/config/environments/production.rb +0 -93
  246. data/spec/fixtures/rails7_users_app/config/environments/test.rb +0 -60
  247. data/spec/fixtures/rails7_users_app/config/importmap.rb +0 -7
  248. data/spec/fixtures/rails7_users_app/config/initializers/assets.rb +0 -12
  249. data/spec/fixtures/rails7_users_app/config/initializers/content_security_policy.rb +0 -26
  250. data/spec/fixtures/rails7_users_app/config/initializers/filter_parameter_logging.rb +0 -8
  251. data/spec/fixtures/rails7_users_app/config/initializers/inflections.rb +0 -16
  252. data/spec/fixtures/rails7_users_app/config/initializers/permissions_policy.rb +0 -11
  253. data/spec/fixtures/rails7_users_app/config/locales/en.yml +0 -33
  254. data/spec/fixtures/rails7_users_app/config/puma.rb +0 -43
  255. data/spec/fixtures/rails7_users_app/config/routes.rb +0 -6
  256. data/spec/fixtures/rails7_users_app/config/storage.yml +0 -34
  257. data/spec/fixtures/rails7_users_app/config.ru +0 -6
  258. data/spec/fixtures/rails7_users_app/db/migrate/20220328093141_create_instances.rb +0 -8
  259. data/spec/fixtures/rails7_users_app/db/migrate/20220328093154_create_instructors.rb +0 -8
  260. data/spec/fixtures/rails7_users_app/db/schema.rb +0 -27
  261. data/spec/fixtures/rails7_users_app/db/seeds.rb +0 -7
  262. data/spec/fixtures/rails7_users_app/lib/assets/.keep +0 -0
  263. data/spec/fixtures/rails7_users_app/lib/tasks/.keep +0 -0
  264. data/spec/fixtures/rails7_users_app/log/.keep +0 -0
  265. data/spec/fixtures/rails7_users_app/public/404.html +0 -67
  266. data/spec/fixtures/rails7_users_app/public/422.html +0 -67
  267. data/spec/fixtures/rails7_users_app/public/500.html +0 -66
  268. data/spec/fixtures/rails7_users_app/public/apple-touch-icon-precomposed.png +0 -0
  269. data/spec/fixtures/rails7_users_app/public/apple-touch-icon.png +0 -0
  270. data/spec/fixtures/rails7_users_app/public/favicon.ico +0 -0
  271. data/spec/fixtures/rails7_users_app/public/robots.txt +0 -1
  272. data/spec/fixtures/rails7_users_app/storage/.keep +0 -0
  273. data/spec/fixtures/rails7_users_app/test/application_system_test_case.rb +0 -5
  274. data/spec/fixtures/rails7_users_app/test/channels/application_cable/connection_test.rb +0 -11
  275. data/spec/fixtures/rails7_users_app/test/controllers/.keep +0 -0
  276. data/spec/fixtures/rails7_users_app/test/fixtures/files/.keep +0 -0
  277. data/spec/fixtures/rails7_users_app/test/fixtures/instances.yml +0 -11
  278. data/spec/fixtures/rails7_users_app/test/fixtures/instructors.yml +0 -11
  279. data/spec/fixtures/rails7_users_app/test/helpers/.keep +0 -0
  280. data/spec/fixtures/rails7_users_app/test/integration/.keep +0 -0
  281. data/spec/fixtures/rails7_users_app/test/mailers/.keep +0 -0
  282. data/spec/fixtures/rails7_users_app/test/models/.keep +0 -0
  283. data/spec/fixtures/rails7_users_app/test/models/instance_test.rb +0 -6
  284. data/spec/fixtures/rails7_users_app/test/models/instructor_test.rb +0 -7
  285. data/spec/fixtures/rails7_users_app/test/system/.keep +0 -0
  286. data/spec/fixtures/rails7_users_app/test/test_helper.rb +0 -13
  287. data/spec/handler/class_with_eval.rb +0 -13
  288. data/spec/handler/eval_spec.rb +0 -73
  289. data/spec/hook_spec.rb +0 -1216
  290. data/spec/open_spec.rb +0 -19
  291. data/spec/rails_recording_spec.rb +0 -281
  292. data/spec/rails_spec_helper.rb +0 -107
  293. data/spec/rails_test_spec.rb +0 -35
  294. data/spec/railtie_spec.rb +0 -25
  295. data/spec/record_net_http_spec.rb +0 -161
  296. data/spec/record_sql_rails_pg_spec.rb +0 -59
  297. data/spec/remote_recording_spec.rb +0 -108
  298. data/spec/service/config_analyzer_spec.rb +0 -102
  299. data/spec/service/integration_test_path_finder_spec.rb +0 -24
  300. data/spec/service/validator/violation_spec.rb +0 -68
  301. data/spec/spec_helper.rb +0 -37
  302. data/spec/swagger/swagger_spec.rb +0 -85
  303. data/spec/util_spec.rb +0 -38
  304. data/test/agent_setup_init_test.rb +0 -39
  305. data/test/agent_setup_status_test.rb +0 -84
  306. data/test/agent_setup_validate_test.rb +0 -102
  307. data/test/bundle_vendor_test.rb +0 -35
  308. data/test/cucumber_test.rb +0 -72
  309. data/test/expectations/openssl_test_key_sign1.json +0 -53
  310. data/test/expectations/openssl_test_key_sign2-3.1.json +0 -53
  311. data/test/expectations/openssl_test_key_sign2.json +0 -58
  312. data/test/fixtures/bundle_vendor_app/Gemfile +0 -8
  313. data/test/fixtures/bundle_vendor_app/appmap.yml +0 -4
  314. data/test/fixtures/bundle_vendor_app/cli.rb +0 -54
  315. data/test/fixtures/cli_record_test/appmap.yml +0 -3
  316. data/test/fixtures/cli_record_test/lib/cli_record_test/main.rb +0 -9
  317. data/test/fixtures/cucumber4_recorder/Gemfile +0 -5
  318. data/test/fixtures/cucumber4_recorder/appmap.yml +0 -3
  319. data/test/fixtures/cucumber4_recorder/features/say_hello.feature +0 -5
  320. data/test/fixtures/cucumber4_recorder/features/support/env.rb +0 -5
  321. data/test/fixtures/cucumber4_recorder/features/support/hooks.rb +0 -11
  322. data/test/fixtures/cucumber4_recorder/features/support/steps.rb +0 -9
  323. data/test/fixtures/cucumber4_recorder/lib/hello.rb +0 -7
  324. data/test/fixtures/cucumber_recorder/Gemfile +0 -5
  325. data/test/fixtures/cucumber_recorder/appmap.yml +0 -3
  326. data/test/fixtures/cucumber_recorder/features/say_hello.feature +0 -5
  327. data/test/fixtures/cucumber_recorder/features/support/env.rb +0 -5
  328. data/test/fixtures/cucumber_recorder/features/support/hooks.rb +0 -11
  329. data/test/fixtures/cucumber_recorder/features/support/steps.rb +0 -9
  330. data/test/fixtures/cucumber_recorder/lib/hello.rb +0 -7
  331. data/test/fixtures/gem_test/Gemfile +0 -7
  332. data/test/fixtures/gem_test/appmap.yml +0 -3
  333. data/test/fixtures/gem_test/test/parser_test.rb +0 -12
  334. data/test/fixtures/minitest_recorder/Gemfile +0 -5
  335. data/test/fixtures/minitest_recorder/appmap.yml +0 -3
  336. data/test/fixtures/minitest_recorder/lib/hello.rb +0 -5
  337. data/test/fixtures/minitest_recorder/test/hello_test.rb +0 -12
  338. data/test/fixtures/mocha_mock_app/Gemfile +0 -5
  339. data/test/fixtures/mocha_mock_app/appmap.yml +0 -5
  340. data/test/fixtures/mocha_mock_app/lib/sheep.rb +0 -5
  341. data/test/fixtures/mocha_mock_app/test/sheep_test.rb +0 -18
  342. data/test/fixtures/openssl_recorder/Gemfile +0 -3
  343. data/test/fixtures/openssl_recorder/appmap.yml +0 -3
  344. data/test/fixtures/openssl_recorder/lib/openssl_cert_sign.rb +0 -94
  345. data/test/fixtures/openssl_recorder/lib/openssl_encrypt.rb +0 -34
  346. data/test/fixtures/openssl_recorder/lib/openssl_key_sign.rb +0 -28
  347. data/test/fixtures/process_recorder/appmap.yml +0 -3
  348. data/test/fixtures/process_recorder/hello.rb +0 -9
  349. data/test/fixtures/rspec_recorder/Gemfile +0 -5
  350. data/test/fixtures/rspec_recorder/appmap.yml +0 -3
  351. data/test/fixtures/rspec_recorder/lib/hello.rb +0 -5
  352. data/test/fixtures/rspec_recorder/spec/decorated_hello_spec.rb +0 -21
  353. data/test/fixtures/rspec_recorder/spec/labeled_hello_spec.rb +0 -9
  354. data/test/fixtures/rspec_recorder/spec/plain_hello_spec.rb +0 -9
  355. data/test/gem_test.rb +0 -35
  356. data/test/inspect_cli_test.rb +0 -12
  357. data/test/minitest_test.rb +0 -37
  358. data/test/mock_compatibility_test.rb +0 -45
  359. data/test/openssl_test.rb +0 -54
  360. data/test/record_process_test.rb +0 -35
  361. data/test/rspec_test.rb +0 -63
  362. data/test/test_helper.rb +0 -8
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'sequel' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("sequel", "sequel")
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'fileutils'
3
- include FileUtils
4
-
5
- # path to your application root.
6
- APP_ROOT = File.expand_path('..', __dir__)
7
-
8
- def system!(*args)
9
- system(*args) || abort("\n== Command #{args} failed ==")
10
- end
11
-
12
- chdir APP_ROOT do
13
- # This script is a starting point to setup your application.
14
- # Add necessary setup steps to this file.
15
-
16
- puts '== Installing dependencies =='
17
- system! 'gem install bundler --conservative'
18
- system('bundle check') || system!('bundle install')
19
-
20
- puts "\n== Removing old logs and tempfiles =="
21
- system! 'bin/rails log:clear tmp:clear'
22
-
23
- puts "\n== Restarting application server =="
24
- system! 'bin/rails restart'
25
- end
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'sprockets' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("sprockets", "sprockets")
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'thor' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("thor", "thor")
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'fileutils'
3
- include FileUtils
4
-
5
- # path to your application root.
6
- APP_ROOT = File.expand_path('..', __dir__)
7
-
8
- def system!(*args)
9
- system(*args) || abort("\n== Command #{args} failed ==")
10
- end
11
-
12
- chdir APP_ROOT do
13
- # This script is a way to update your development environment automatically.
14
- # Add necessary update steps to this file.
15
-
16
- puts '== Installing dependencies =='
17
- system! 'gem install bundler --conservative'
18
- system('bundle check') || system!('bundle install')
19
-
20
- puts "\n== Removing old logs and tempfiles =="
21
- system! 'bin/rails log:clear tmp:clear'
22
-
23
- puts "\n== Restarting application server =="
24
- system! 'bin/rails restart'
25
- end
@@ -1,45 +0,0 @@
1
- require_relative 'boot'
2
-
3
- def orm_module
4
- ENV['ORM_MODULE'] || 'sequel'
5
- end
6
-
7
- require "rails"
8
- # Pick the frameworks you want:
9
- require "active_model/railtie"
10
- require "active_job/railtie"
11
- require "action_controller/railtie"
12
- require "action_view/railtie"
13
-
14
- case orm_module
15
- when 'sequel'
16
- require 'sequel-rails'
17
- require 'sequel_secure_password'
18
- require 'database_cleaner-sequel' if Rails.env.test?
19
- when 'activerecord'
20
- require 'active_record/railtie'
21
- require 'database_cleaner-active_record' if Rails.env.test?
22
- end
23
-
24
- # Require the gems listed in Gemfile, including any gems
25
- # you've limited to :test, :development, or :production.
26
- Bundler.require(*Rails.groups)
27
-
28
- module UsersApp
29
- class Application < Rails::Application
30
- # Initialize configuration defaults for originally generated Rails version.
31
- config.load_defaults 5.2
32
-
33
- # Settings in config/environments/* take precedence over those specified here.
34
- # Application configuration can go into files in config/initializers
35
- # -- all .rb files in that directory are automatically loaded after loading
36
- # the framework and any gems in your application.
37
-
38
- # Only loads a smaller set of middleware suitable for API only apps.
39
- # Middleware like session, flash, cookies can be added back manually.
40
- # Skip views, helpers and assets when generating a new resource.
41
- config.api_only = true
42
-
43
- config.autoload_paths << File.join(Rails.root, "app/models/#{orm_module}")
44
- end
45
- end
@@ -1,3 +0,0 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
-
3
- require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -1 +0,0 @@
1
- fvHJWgAisxKdEtPejF1DMotrGxwK5QwUVQRqOvkI7+olbFTlcZMah2cfLAupIMKEZKXwx3ui+kNWDbMv1/JYxiMQfsvDZPx/yXD4k0IENYMILaMApFfxco5cjerEHCOZb+TJxOCTKGHD1ckt8zwNbBOA6mN1P8sbs3IXRc8bz/2FG/ILQvNIsvMO2ODb8WEeIp5N3dWkkk2pPJqwodBpoHHqcycTMru/pNl+V8BHEgfjMOIzdHpz2M1A2F4vOOCWx4vL2onZJXMDta3p9FZoypGZLr5X37+/B9fM+dJhWNz2Bvrlq8amdbKmOfSjehUAsSePj+nBY8zu0ZeNx4t7/3JBOKQ8PTSvovTgw71IeZckavz1dyyPatJ3d7ngrC7x2/VKt/JP1nAaf+5kBEjaARuM0+VewXZiO7Y5--ze5FclBM0tyGg/Ql--+S/6aIP52fpUTSoTQlw5nA==
@@ -1 +0,0 @@
1
- ../../database.yml
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require_relative 'application'
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,40 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports.
13
- config.consider_all_requests_local = true
14
-
15
- # Enable/disable caching. By default caching is disabled.
16
- # Run rails dev:cache to toggle caching.
17
- if Rails.root.join('tmp', 'caching-dev.txt').exist?
18
- config.action_controller.perform_caching = true
19
-
20
- config.cache_store = :memory_store
21
- config.public_file_server.headers = {
22
- 'Cache-Control' => "public, max-age=#{2.days.to_i}"
23
- }
24
- else
25
- config.action_controller.perform_caching = false
26
-
27
- config.cache_store = :null_store
28
- end
29
-
30
- # Print deprecation notices to the Rails logger.
31
- config.active_support.deprecation = :log
32
-
33
-
34
- # Raises error for missing translations
35
- # config.action_view.raise_on_missing_translations = true
36
-
37
- # Use an evented file watcher to asynchronously detect changes in source code,
38
- # routes, locales, etc. This feature depends on the listen gem.
39
- # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
40
- end
@@ -1,68 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18
- # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19
- # config.require_master_key = true
20
-
21
- # Disable serving static files from the `/public` folder by default since
22
- # Apache or NGINX already handles this.
23
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
24
-
25
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
26
- # config.action_controller.asset_host = 'http://assets.example.com'
27
-
28
- # Specifies the header that your server uses for sending files.
29
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
30
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
31
-
32
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
33
- # config.force_ssl = true
34
-
35
- # Use the lowest log level to ensure availability of diagnostic information
36
- # when problems arise.
37
- config.log_level = :debug
38
-
39
- # Prepend all log lines with the following tags.
40
- config.log_tags = [ :request_id ]
41
-
42
- # Use a different cache store in production.
43
- # config.cache_store = :mem_cache_store
44
-
45
- # Use a real queuing backend for Active Job (and separate queues per environment)
46
- # config.active_job.queue_adapter = :resque
47
- # config.active_job.queue_name_prefix = "users_app_#{Rails.env}"
48
-
49
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
50
- # the I18n.default_locale when a translation cannot be found).
51
- config.i18n.fallbacks = true
52
-
53
- # Send deprecation notices to registered listeners.
54
- config.active_support.deprecation = :notify
55
-
56
- # Use default logging formatter so that PID and timestamp are not suppressed.
57
- config.log_formatter = ::Logger::Formatter.new
58
-
59
- # Use a different logger for distributed setups.
60
- # require 'syslog/logger'
61
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
62
-
63
- if ENV["RAILS_LOG_TO_STDOUT"].present?
64
- logger = ActiveSupport::Logger.new(STDOUT)
65
- logger.formatter = config.log_formatter
66
- config.logger = ActiveSupport::TaggedLogging.new(logger)
67
- end
68
- end
@@ -1,39 +0,0 @@
1
- require 'active_support'
2
- require 'active_support/core_ext'
3
-
4
- Rails.application.configure do
5
- # Settings specified here will take precedence over those in config/application.rb.
6
-
7
- # The test environment is used exclusively to run your application's
8
- # test suite. You never need to work with it otherwise. Remember that
9
- # your test database is "scratch space" for the test suite and is wiped
10
- # and recreated between test runs. Don't rely on the data there!
11
- config.cache_classes = true
12
-
13
- # Do not eager load code on boot. This avoids loading your whole application
14
- # just for the purpose of running a single test. If you are using a tool that
15
- # preloads Rails for running tests, you may have to set it to true.
16
- config.eager_load = false
17
-
18
- # Configure public file server for tests with Cache-Control for performance.
19
- config.public_file_server.enabled = true
20
- config.public_file_server.headers = {
21
- 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
22
- }
23
-
24
- # Show full error reports and disable caching.
25
- config.consider_all_requests_local = true
26
- config.action_controller.perform_caching = false
27
-
28
- # Raise exceptions instead of rendering exception templates.
29
- config.action_dispatch.show_exceptions = false
30
-
31
- # Disable request forgery protection in test environment.
32
- config.action_controller.allow_forgery_protection = false
33
-
34
- # Print deprecation notices to the stderr.
35
- config.active_support.deprecation = :stderr
36
-
37
- # Raises error for missing translations
38
- # config.action_view.raise_on_missing_translations = true
39
- end
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # ActiveSupport::Reloader.to_prepare do
4
- # ApplicationController.renderer.defaults.merge!(
5
- # http_host: 'example.org',
6
- # https: false
7
- # )
8
- # end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
@@ -1,16 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Avoid CORS issues when API is called from the frontend app.
4
- # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
5
-
6
- # Read more: https://github.com/cyu/rack-cors
7
-
8
- # Rails.application.config.middleware.insert_before 0, Rack::Cors do
9
- # allow do
10
- # origins 'example.com'
11
- #
12
- # resource '*',
13
- # headers: :any,
14
- # methods: [:get, :post, :put, :patch, :delete, :options, :head]
15
- # end
16
- # end
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
@@ -1,16 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format. Inflections
4
- # are locale specific, and you may define rules for as many different
5
- # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
10
- # inflect.uncountable %w( fish sheep )
11
- # end
12
-
13
- # These inflection rules are supported but not enabled by default:
14
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
16
- # end
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
@@ -1,9 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
9
- end
@@ -1,33 +0,0 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t('hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # The following keys must be escaped otherwise they will not be retrieved by
20
- # the default I18n backend:
21
- #
22
- # true, false, on, off, yes, no
23
- #
24
- # Instead, surround them with single quotes.
25
- #
26
- # en:
27
- # 'true': 'foo'
28
- #
29
- # To learn more, please read the Rails Internationalization guide
30
- # available at http://guides.rubyonrails.org/i18n.html.
31
-
32
- en:
33
- hello: "Hello world"
@@ -1,11 +0,0 @@
1
- Rails.application.routes.draw do
2
- namespace :api do
3
- resources :users, only: %i[index create]
4
- end
5
-
6
- resources :users, only: %i[index show]
7
-
8
- get 'health', to: 'health#show'
9
-
10
- root 'users#index'
11
- end
@@ -1,5 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require_relative 'config/environment'
4
-
5
- run Rails.application
@@ -1,9 +0,0 @@
1
- Sequel.migration do
2
- change do
3
- create_table :users do
4
- primary_key :id
5
- text :login, null: false, unique: true
6
- column :password_digest, :bytea
7
- end
8
- end
9
- end
@@ -1,23 +0,0 @@
1
- Sequel.migration do
2
- change do
3
- create_table(:schema_migrations) do
4
- column :filename, "text", :null=>false
5
-
6
- primary_key [:filename]
7
- end
8
-
9
- create_table(:users) do
10
- primary_key :id
11
- column :login, "text", :null=>false
12
- column :password_digest, "bytea"
13
-
14
- index [:login], :name=>:users_login_key, :unique=>true
15
- end
16
- end
17
- end
18
- Sequel.migration do
19
- change do
20
- self << "SET search_path TO \"$user\", public"
21
- self << "INSERT INTO \"schema_migrations\" (\"filename\") VALUES ('20190728211408_create_users.rb')"
22
- end
23
- end
@@ -1,13 +0,0 @@
1
- Feature: /api/users
2
-
3
- @appmap-disable
4
- Scenario: A user can be created
5
- When I create a user
6
- Then the response status should be 201
7
-
8
- Scenario: When a user is created, it should be in the user list
9
- Given I create a user
10
- And the response status should be 201
11
- When I list the users
12
- Then the response status should be 200
13
- And the response should include the user
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'cucumber/rails'
4
- require 'appmap/cucumber'
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- if AppMap::Cucumber.enabled?
4
- Around('not @appmap-disable') do |scenario, block|
5
- appmap = AppMap.record do
6
- block.call
7
- end
8
-
9
- AppMap::Cucumber.write_scenario(scenario, appmap)
10
- end
11
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- When 'I create a user' do
4
- @response = post '/api/users', login: 'alice'
5
- end
6
-
7
- Then(/the response status should be (\d+)/) do |status|
8
- expect(@response.status).to eq(status.to_i)
9
- end
10
-
11
- When 'I list the users' do
12
- @response = get '/api/users'
13
- @users = JSON.parse(@response.body)
14
- end
15
-
16
- Then 'the response should include the user' do
17
- expect(@users.map { |u| u['login'] }).to include('alice')
18
- end
File without changes
File without changes
@@ -1 +0,0 @@
1
- # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
@@ -1,42 +0,0 @@
1
- require 'rails_helper'
2
- require 'rack/test'
3
-
4
- RSpec.describe Api::UsersController, type: :controller do
5
- describe 'POST /api/users' do
6
- describe 'with required parameters' do
7
- it 'creates a user' do
8
- post :create, params: { login: 'alice', password: 'foobar' }
9
- expect(response.status).to eq(201)
10
- end
11
- describe 'with object-style parameters' do
12
- it 'creates a user' do
13
- post :create, params: { user: { login: 'alice', password: 'foobar' } }
14
- expect(response.status).to eq(201)
15
- end
16
- end
17
- end
18
- describe 'with a missing parameter' do
19
- it 'reports error 422' do
20
- post :create, params: {}
21
- expect(response.status).to eq(422)
22
- end
23
- end
24
- end
25
- describe 'GET /api/users' do
26
- before do
27
- post :create, params: { login: 'alice' }
28
- end
29
- it 'lists the users' do
30
- get :index, params: {}
31
- users = JSON.parse(response.body)
32
- expect(users.map { |r| r['login'] }).to include('alice')
33
- end
34
- describe 'with a custom header' do
35
- it 'lists the users' do
36
- request.headers['X-Sandwich'] = 'turkey'
37
- get :index, params: {}
38
- expect(response.status).to eq(200)
39
- end
40
- end
41
- end
42
- end
@@ -1,27 +0,0 @@
1
- require 'rails_helper'
2
- require 'rack/test'
3
-
4
- RSpec.describe UsersController, type: :controller do
5
- render_views
6
-
7
- describe 'GET /users' do
8
- before do
9
- User.create login: 'alice'
10
- end
11
- it 'lists the users' do
12
- get :index
13
- expect(response).to be_ok
14
- end
15
- end
16
-
17
- describe 'GET /users/:login' do
18
- before do
19
- User.create login: 'alice'
20
- end
21
-
22
- it 'shows the user' do
23
- get :show, params: { id: 'alice' }
24
- expect(response).to be_ok
25
- end
26
- end
27
- end