hyperlayer 0.1

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.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +38 -0
  4. data/Rakefile +8 -0
  5. data/app/assets/config/manifest.js +7 -0
  6. data/app/assets/stylesheets/application.bootstrap.scss +2 -0
  7. data/app/assets/stylesheets/hyperlayer/app.css +47 -0
  8. data/app/assets/stylesheets/hyperlayer/application.css +18774 -0
  9. data/app/assets/stylesheets/hyperlayer/prism.css +3 -0
  10. data/app/controllers/hyperlayer/application_controller.rb +4 -0
  11. data/app/controllers/hyperlayer/events_controller.rb +95 -0
  12. data/app/controllers/hyperlayer/example_groups_controller.rb +9 -0
  13. data/app/controllers/hyperlayer/paths_controller.rb +18 -0
  14. data/app/controllers/hyperlayer/runs_controller.rb +7 -0
  15. data/app/controllers/hyperlayer/specs_controller.rb +8 -0
  16. data/app/javascript/controllers/application.js +9 -0
  17. data/app/javascript/controllers/index.js +11 -0
  18. data/app/javascript/hyperlayer/application.js +7 -0
  19. data/app/javascript/hyperlayer/prism.js +8 -0
  20. data/app/models/application_record.rb +3 -0
  21. data/app/models/hyperlayer/event.rb +28 -0
  22. data/app/models/hyperlayer/example_group.rb +6 -0
  23. data/app/models/hyperlayer/path.rb +35 -0
  24. data/app/models/hyperlayer/run.rb +5 -0
  25. data/app/models/hyperlayer/spec.rb +8 -0
  26. data/app/services/build_file_overlay.rb +26 -0
  27. data/app/services/callable.rb +129 -0
  28. data/app/services/file_builder.rb +260 -0
  29. data/app/services/find_method_from_event.rb +65 -0
  30. data/app/services/find_method_in_path.rb +98 -0
  31. data/app/services/generate_buffer.rb +116 -0
  32. data/app/services/import_events.rb +56 -0
  33. data/app/services/split_methods.rb +50 -0
  34. data/app/services/test_one.rb +34 -0
  35. data/app/services/update_code.rb +111 -0
  36. data/app/views/hyperlayer/events/_code.html.erb +36 -0
  37. data/app/views/hyperlayer/events/_event.html.erb +15 -0
  38. data/app/views/hyperlayer/events/_tree-text.html.erb +22 -0
  39. data/app/views/hyperlayer/events/_tree.html.erb +15 -0
  40. data/app/views/hyperlayer/events/index.html.erb +41 -0
  41. data/app/views/hyperlayer/example_groups/index.html.erb +25 -0
  42. data/app/views/hyperlayer/paths/_path.html.erb +52 -0
  43. data/app/views/hyperlayer/paths/index.html.erb +5 -0
  44. data/app/views/hyperlayer/paths/show.html.erb +3 -0
  45. data/app/views/hyperlayer/runs/index.html.erb +23 -0
  46. data/app/views/hyperlayer/specs/index.html.erb +24 -0
  47. data/app/views/layouts/_nav.html.erb +8 -0
  48. data/app/views/layouts/hyperlayer/application.html.erb +30 -0
  49. data/app/views/layouts/hyperlayer/mailer.html.erb +13 -0
  50. data/app/views/layouts/hyperlayer/mailer.text.erb +1 -0
  51. data/config/initializers/engine_migrations.rb +3 -0
  52. data/config/routes.rb +11 -0
  53. data/db/migrate/20231009165755_create_hyperlayer_events.rb +19 -0
  54. data/db/migrate/20231009165919_create_hyperlayer_example_groups.rb +12 -0
  55. data/db/migrate/20231009165952_create_hyperlayer_runs.rb +9 -0
  56. data/db/migrate/20231009170101_create_hyperlayer_paths.rb +10 -0
  57. data/db/migrate/20231009170121_create_hyperlayer_specs.rb +12 -0
  58. data/lib/hyperlayer/engine.rb +22 -0
  59. data/lib/hyperlayer/method_tracer.rb +12 -0
  60. data/lib/hyperlayer/tracer.rb +78 -0
  61. data/lib/hyperlayer/version.rb +3 -0
  62. data/lib/hyperlayer.rb +15 -0
  63. data/lib/tasks/listen.rake +8 -0
  64. metadata +207 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9fd30d67e114c0e092b7e38cbea6552944fea27c90b8ea7837609c115ceddaf7
4
+ data.tar.gz: 8e7e1e5f49fb5d0aca707bdecf55e5f31bf523b18aedce2f37fc6e88d91d7f04
5
+ SHA512:
6
+ metadata.gz: 618cdfe286f5771bda8ebecd220a46fe3ab20b40da9ee206b2c228fdc60822f252a0707dd70012c2b391560f636c9f3cabc3eaa45fbfb846930f219bf3d5fef8
7
+ data.tar.gz: 90770e90e512b143e4adc9341491f55eed91b533bf5ec72247306dbd8fc55e02a0b73ac58743aebfc5f31661c135fd570479a67c9e0f3be6bed6a9c885fcfc48
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2023 Geoff Wright
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,38 @@
1
+
2
+ # ⚡️ Hyperlayer
3
+
4
+ Debug your Ruby apps 10x faster.
5
+
6
+ > Depending on which research you look at, developers say they tend to spend 25–50% of their time per year on debugging.
7
+
8
+ ## What is Hyperlayer?
9
+
10
+ An entirely new way to visualise Ruby apps, combining application flow, state and the code itself.
11
+
12
+ Removes a lot of what we’re having to do manually to debug apps.
13
+
14
+ It is a paradigm shift in how we engineer software.
15
+
16
+ Works out of the box, supporting any Ruby based app.
17
+
18
+ This is just the beginning.
19
+
20
+ ## Watch the video
21
+ [![Introduction to Hyperlayer](http://img.youtube.com/vi/9iZkE8ZrFMU/0.jpg)](http://www.youtube.com/watch?v=9iZkE8ZrFMU "Introduction to Hyperlayer")
22
+
23
+ * [What is Hyperlayer?](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=00m08s) (00:08)
24
+ * [Why Hyperlayer?](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=04m40s) (04:40)
25
+ * [Meet the demo app](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=05m31s) (05:31)
26
+ * [Debugging with Hyperlayer - Viewing spec runs](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=09m34s) (09:34)
27
+ * [Debugging with Hyperlayer - Application flow & state](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=10m39s) (10:39)
28
+ * [Debugging with Hyperlayer - Code view](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=17m56s) (17:56)
29
+ * [We’ve fixed our bug](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=25m37s) (25:37)
30
+ * [Closing notes](https://www.youtube.com/watch?v=9iZkE8ZrFMU&t=27m47s) (27:47)
31
+
32
+ ## Code coming soon
33
+
34
+ Both the gem and the client application will be online very soon. Tidying up required!
35
+ ## Author
36
+
37
+ - [@geoffw8](https://www.github.com/geoffw8)
38
+ - [Geoff Wright](https://www.linkedin.com/in/geoffw8)
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -0,0 +1,7 @@
1
+ //= link application.css
2
+ //= link app.css
3
+ //= link_tree ../stylesheets
4
+ //= link_tree ../images
5
+ //= link_tree ../../javascript .js
6
+ //= link_tree ../../../vendor/javascript .js
7
+ //= link_tree ../builds
@@ -0,0 +1,2 @@
1
+ @import 'bootstrap/scss/bootstrap';
2
+ @import 'bootstrap-icons/font/bootstrap-icons';
@@ -0,0 +1,47 @@
1
+ .card-header {
2
+ background-color: #fff;
3
+ }
4
+
5
+ .node {
6
+ margin-bottom: 10px;
7
+ }
8
+
9
+ .node .card-body {
10
+ padding: 0;
11
+ }
12
+
13
+ .return_value pre {
14
+ padding: 0;
15
+ margin: 20px 0;
16
+ }
17
+
18
+ .node .card-body pre {
19
+ margin: 0;
20
+ }
21
+
22
+ /* Next */
23
+
24
+ .tree-node {
25
+ margin-left: 15px;
26
+ }
27
+
28
+ a.noStyle {
29
+ color: inherit; /* Inherit the color from the parent element (usually body text color) */
30
+ text-decoration: none; /* Remove the underline */
31
+ background-color: transparent; /* Ensure that there is no background color */
32
+ }
33
+
34
+ /* Custom CSS to remove padding and margin from Bootstrap card */
35
+ hr.no-padding-margin {
36
+ margin: 0 !important;
37
+ border-radius: 0 !important; /* Optional: if you want to remove the border-radius as well */
38
+ }
39
+
40
+ .no-padding-margin .card {
41
+ margin: 10px 0 0 !important;
42
+ border-radius: 0 !important; /* Optional: if you want to remove the border-radius as well */
43
+ }
44
+
45
+ .no-padding-margin .card-body {
46
+ padding: 0 !important;
47
+ }