raygun4ruby 3.2.5.pre → 4.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/tests.yml +48 -0
  3. data/.gitignore +22 -21
  4. data/.rspec +1 -1
  5. data/Appraisals +19 -0
  6. data/CHANGELOG.md +169 -130
  7. data/Gemfile +4 -4
  8. data/LICENSE.txt +22 -22
  9. data/README.md +424 -420
  10. data/Rakefile +32 -27
  11. data/examples/sinatras_raygun.rb +17 -17
  12. data/gemfiles/rails_6.gemfile +9 -0
  13. data/gemfiles/rails_7.gemfile +10 -0
  14. data/gemfiles/rails_7_sidekiq_6.gemfile +10 -0
  15. data/lib/generators/raygun/install_generator.rb +26 -26
  16. data/lib/raygun/affected_user.rb +59 -59
  17. data/lib/raygun/breadcrumbs/breadcrumb.rb +34 -34
  18. data/lib/raygun/breadcrumbs/store.rb +86 -86
  19. data/lib/raygun/breadcrumbs.rb +34 -34
  20. data/lib/raygun/client.rb +313 -308
  21. data/lib/raygun/configuration.rb +197 -194
  22. data/lib/raygun/demo_exception.rb +23 -0
  23. data/lib/raygun/error.rb +10 -10
  24. data/lib/raygun/error_subscriber.rb +21 -0
  25. data/lib/raygun/javascript_tracker.rb +42 -42
  26. data/lib/raygun/middleware/breadcrumbs_store_initializer.rb +19 -19
  27. data/lib/raygun/middleware/javascript_exception_tracking.rb +40 -32
  28. data/lib/raygun/middleware/rack_exception_interceptor.rb +18 -18
  29. data/lib/raygun/middleware/rails_insert_affected_user.rb +26 -26
  30. data/lib/raygun/railtie.rb +47 -39
  31. data/lib/raygun/services/apply_whitelist_filter_to_payload.rb +27 -27
  32. data/lib/raygun/sidekiq.rb +51 -71
  33. data/lib/raygun/version.rb +3 -3
  34. data/lib/raygun.rb +197 -179
  35. data/lib/raygun4ruby.rb +1 -1
  36. data/lib/resque/failure/raygun.rb +25 -25
  37. data/lib/tasks/raygun.tasks +7 -7
  38. data/raygun4ruby.gemspec +43 -45
  39. data/spec/features/javascript_spec.rb +48 -48
  40. data/spec/rails_applications/6.1.4/Gemfile +56 -0
  41. data/spec/{dummy/README.rdoc → rails_applications/6.1.4/README.md} +24 -28
  42. data/spec/{dummy → rails_applications/6.1.4}/Rakefile +6 -6
  43. data/spec/rails_applications/6.1.4/app/assets/config/manifest.js +2 -0
  44. data/spec/{dummy → rails_applications/6.1.4}/app/assets/stylesheets/application.css +15 -15
  45. data/spec/rails_applications/6.1.4/app/channels/application_cable/channel.rb +4 -0
  46. data/spec/rails_applications/6.1.4/app/channels/application_cable/connection.rb +4 -0
  47. data/spec/rails_applications/6.1.4/app/controllers/application_controller.rb +2 -0
  48. data/spec/{dummy → rails_applications/6.1.4}/app/controllers/home_controller.rb +4 -4
  49. data/spec/{dummy → rails_applications/6.1.4}/app/helpers/application_helper.rb +2 -2
  50. data/spec/rails_applications/6.1.4/app/javascript/channels/consumer.js +6 -0
  51. data/spec/rails_applications/6.1.4/app/javascript/channels/index.js +5 -0
  52. data/spec/rails_applications/6.1.4/app/javascript/packs/application.js +13 -0
  53. data/spec/rails_applications/6.1.4/app/jobs/application_job.rb +7 -0
  54. data/spec/rails_applications/6.1.4/app/mailers/application_mailer.rb +4 -0
  55. data/spec/rails_applications/6.1.4/app/models/application_record.rb +3 -0
  56. data/spec/{dummy → rails_applications/6.1.4}/app/views/home/index.html.erb +3 -3
  57. data/spec/{dummy → rails_applications/6.1.4}/app/views/home/index.json.erb +1 -1
  58. data/spec/rails_applications/6.1.4/app/views/layouts/application.html.erb +13 -0
  59. data/spec/rails_applications/6.1.4/app/views/layouts/mailer.html.erb +13 -0
  60. data/spec/rails_applications/6.1.4/app/views/layouts/mailer.text.erb +1 -0
  61. data/spec/rails_applications/6.1.4/bin/rails +5 -0
  62. data/spec/rails_applications/6.1.4/bin/rake +5 -0
  63. data/spec/rails_applications/6.1.4/bin/setup +36 -0
  64. data/spec/rails_applications/6.1.4/bin/spring +14 -0
  65. data/spec/rails_applications/6.1.4/bin/yarn +17 -0
  66. data/spec/rails_applications/6.1.4/config/application.rb +22 -0
  67. data/spec/rails_applications/6.1.4/config/boot.rb +3 -0
  68. data/spec/rails_applications/6.1.4/config/cable.yml +10 -0
  69. data/spec/rails_applications/6.1.4/config/credentials.yml.enc +1 -0
  70. data/spec/{dummy → rails_applications/6.1.4}/config/database.yml +25 -25
  71. data/spec/{dummy → rails_applications/6.1.4}/config/environment.rb +5 -5
  72. data/spec/rails_applications/6.1.4/config/environments/development.rb +76 -0
  73. data/spec/rails_applications/6.1.4/config/environments/production.rb +120 -0
  74. data/spec/rails_applications/6.1.4/config/environments/test.rb +60 -0
  75. data/spec/rails_applications/6.1.4/config/initializers/application_controller_renderer.rb +8 -0
  76. data/spec/rails_applications/6.1.4/config/initializers/assets.rb +14 -0
  77. data/spec/rails_applications/6.1.4/config/initializers/backtrace_silencers.rb +8 -0
  78. data/spec/rails_applications/6.1.4/config/initializers/content_security_policy.rb +30 -0
  79. data/spec/{dummy → rails_applications/6.1.4}/config/initializers/cookies_serializer.rb +5 -3
  80. data/spec/{dummy → rails_applications/6.1.4}/config/initializers/filter_parameter_logging.rb +6 -4
  81. data/spec/{dummy → rails_applications/6.1.4}/config/initializers/inflections.rb +16 -16
  82. data/spec/{dummy → rails_applications/6.1.4}/config/initializers/mime_types.rb +4 -4
  83. data/spec/rails_applications/6.1.4/config/initializers/permissions_policy.rb +11 -0
  84. data/spec/{dummy → rails_applications/6.1.4}/config/initializers/wrap_parameters.rb +14 -14
  85. data/spec/{dummy → rails_applications/6.1.4}/config/locales/en.yml +33 -23
  86. data/spec/rails_applications/6.1.4/config/master.key +1 -0
  87. data/spec/rails_applications/6.1.4/config/puma.rb +43 -0
  88. data/spec/rails_applications/6.1.4/config/routes.rb +4 -0
  89. data/spec/rails_applications/6.1.4/config/spring.rb +6 -0
  90. data/spec/rails_applications/6.1.4/config/storage.yml +34 -0
  91. data/spec/{dummy → rails_applications/6.1.4}/config.ru +6 -4
  92. data/spec/rails_applications/6.1.4/db/seeds.rb +7 -0
  93. data/spec/rails_applications/6.1.4/package.json +11 -0
  94. data/spec/{dummy → rails_applications/6.1.4}/public/404.html +67 -67
  95. data/spec/{dummy → rails_applications/6.1.4}/public/422.html +67 -67
  96. data/spec/{dummy → rails_applications/6.1.4}/public/500.html +66 -66
  97. data/spec/rails_applications/6.1.4/public/robots.txt +1 -0
  98. data/spec/rails_applications/7.1.3/.dockerignore +37 -0
  99. data/spec/rails_applications/7.1.3/.gitattributes +9 -0
  100. data/spec/rails_applications/7.1.3/.gitignore +35 -0
  101. data/spec/rails_applications/7.1.3/.ruby-version +1 -0
  102. data/spec/rails_applications/7.1.3/Dockerfile +62 -0
  103. data/spec/rails_applications/7.1.3/Gemfile +67 -0
  104. data/spec/rails_applications/7.1.3/README.md +24 -0
  105. data/spec/rails_applications/7.1.3/Rakefile +6 -0
  106. data/spec/rails_applications/7.1.3/app/assets/config/manifest.js +4 -0
  107. data/spec/rails_applications/7.1.3/app/assets/stylesheets/application.css +15 -0
  108. data/spec/rails_applications/7.1.3/app/channels/application_cable/channel.rb +4 -0
  109. data/spec/rails_applications/7.1.3/app/channels/application_cable/connection.rb +4 -0
  110. data/spec/rails_applications/7.1.3/app/controllers/application_controller.rb +2 -0
  111. data/spec/rails_applications/7.1.3/app/controllers/concerns/.keep +0 -0
  112. data/spec/rails_applications/7.1.3/app/controllers/home_controller.rb +2 -0
  113. data/spec/rails_applications/7.1.3/app/helpers/application_helper.rb +2 -0
  114. data/spec/rails_applications/7.1.3/app/helpers/home_helper.rb +2 -0
  115. data/spec/rails_applications/7.1.3/app/javascript/application.js +3 -0
  116. data/spec/rails_applications/7.1.3/app/javascript/controllers/application.js +9 -0
  117. data/spec/rails_applications/7.1.3/app/javascript/controllers/hello_controller.js +7 -0
  118. data/spec/rails_applications/7.1.3/app/javascript/controllers/index.js +11 -0
  119. data/spec/rails_applications/7.1.3/app/jobs/application_job.rb +7 -0
  120. data/spec/rails_applications/7.1.3/app/mailers/application_mailer.rb +4 -0
  121. data/spec/rails_applications/7.1.3/app/models/application_record.rb +3 -0
  122. data/spec/rails_applications/7.1.3/app/models/concerns/.keep +0 -0
  123. data/spec/rails_applications/7.1.3/app/views/home/index.html.erb +3 -0
  124. data/spec/rails_applications/7.1.3/app/views/home/index.json.erb +1 -0
  125. data/spec/rails_applications/7.1.3/app/views/layouts/application.html.erb +16 -0
  126. data/spec/rails_applications/7.1.3/app/views/layouts/mailer.html.erb +13 -0
  127. data/spec/rails_applications/7.1.3/app/views/layouts/mailer.text.erb +1 -0
  128. data/spec/rails_applications/7.1.3/bin/bundle +109 -0
  129. data/spec/rails_applications/7.1.3/bin/docker-entrypoint +8 -0
  130. data/spec/rails_applications/7.1.3/bin/importmap +4 -0
  131. data/spec/rails_applications/7.1.3/bin/rails +4 -0
  132. data/spec/rails_applications/7.1.3/bin/rake +4 -0
  133. data/spec/rails_applications/7.1.3/bin/setup +33 -0
  134. data/spec/rails_applications/7.1.3/config/application.rb +27 -0
  135. data/spec/rails_applications/7.1.3/config/boot.rb +4 -0
  136. data/spec/rails_applications/7.1.3/config/cable.yml +11 -0
  137. data/spec/rails_applications/7.1.3/config/credentials.yml.enc +1 -0
  138. data/spec/rails_applications/7.1.3/config/database.yml +25 -0
  139. data/spec/rails_applications/7.1.3/config/environment.rb +5 -0
  140. data/spec/rails_applications/7.1.3/config/environments/development.rb +76 -0
  141. data/spec/rails_applications/7.1.3/config/environments/production.rb +97 -0
  142. data/spec/rails_applications/7.1.3/config/environments/test.rb +64 -0
  143. data/spec/rails_applications/7.1.3/config/importmap.rb +7 -0
  144. data/spec/rails_applications/7.1.3/config/initializers/assets.rb +12 -0
  145. data/spec/rails_applications/7.1.3/config/initializers/content_security_policy.rb +25 -0
  146. data/spec/rails_applications/7.1.3/config/initializers/filter_parameter_logging.rb +8 -0
  147. data/spec/rails_applications/7.1.3/config/initializers/inflections.rb +16 -0
  148. data/spec/rails_applications/7.1.3/config/initializers/permissions_policy.rb +13 -0
  149. data/spec/rails_applications/7.1.3/config/locales/en.yml +31 -0
  150. data/spec/rails_applications/7.1.3/config/puma.rb +35 -0
  151. data/spec/rails_applications/7.1.3/config/routes.rb +11 -0
  152. data/spec/rails_applications/7.1.3/config/storage.yml +34 -0
  153. data/spec/rails_applications/7.1.3/config.ru +6 -0
  154. data/spec/rails_applications/7.1.3/db/seeds.rb +9 -0
  155. data/spec/rails_applications/7.1.3/lib/assets/.keep +0 -0
  156. data/spec/rails_applications/7.1.3/lib/tasks/.keep +0 -0
  157. data/spec/rails_applications/7.1.3/public/404.html +67 -0
  158. data/spec/rails_applications/7.1.3/public/422.html +67 -0
  159. data/spec/rails_applications/7.1.3/public/500.html +66 -0
  160. data/spec/rails_applications/7.1.3/public/apple-touch-icon-precomposed.png +0 -0
  161. data/spec/rails_applications/7.1.3/public/apple-touch-icon.png +0 -0
  162. data/spec/rails_applications/7.1.3/public/favicon.ico +0 -0
  163. data/spec/rails_applications/7.1.3/public/robots.txt +1 -0
  164. data/spec/rails_applications/7.1.3/storage/.keep +0 -0
  165. data/spec/rails_applications/7.1.3/test/application_system_test_case.rb +5 -0
  166. data/spec/rails_applications/7.1.3/test/channels/application_cable/connection_test.rb +13 -0
  167. data/spec/rails_applications/7.1.3/test/controllers/.keep +0 -0
  168. data/spec/rails_applications/7.1.3/test/controllers/home_controller_test.rb +7 -0
  169. data/spec/rails_applications/7.1.3/test/fixtures/files/.keep +0 -0
  170. data/spec/rails_applications/7.1.3/test/helpers/.keep +0 -0
  171. data/spec/rails_applications/7.1.3/test/integration/.keep +0 -0
  172. data/spec/rails_applications/7.1.3/test/mailers/.keep +0 -0
  173. data/spec/rails_applications/7.1.3/test/models/.keep +0 -0
  174. data/spec/rails_applications/7.1.3/test/system/.keep +0 -0
  175. data/spec/rails_applications/7.1.3/test/test_helper.rb +15 -0
  176. data/spec/rails_applications/7.1.3/vendor/.keep +0 -0
  177. data/spec/rails_applications/7.1.3/vendor/javascript/.keep +0 -0
  178. data/spec/rails_helper.rb +8 -4
  179. data/spec/raygun/breadcrumbs/breadcrumb_spec.rb +171 -171
  180. data/spec/raygun/breadcrumbs/store_spec.rb +170 -170
  181. data/spec/services/apply_whitelist_filter_to_payload_spec.rb +251 -251
  182. data/spec/spec_helper.rb +24 -24
  183. data/spec/support/fake_logger.rb +17 -17
  184. data/test/integration/client_test.rb +19 -19
  185. data/test/rails_helper.rb +6 -0
  186. data/test/test_helper.rb +76 -72
  187. data/test/unit/affected_user_test.rb +136 -136
  188. data/test/unit/client_test.rb +812 -812
  189. data/test/unit/configuration_test.rb +202 -206
  190. data/test/unit/error_subscriber_test.rb +43 -0
  191. data/test/unit/raygun_test.rb +106 -25
  192. data/test/unit/resque_failure_test.rb +27 -24
  193. data/test/unit/sidekiq_failure_test.rb +42 -32
  194. metadata +186 -115
  195. data/.travis.yml +0 -20
  196. data/spec/dummy/.gitignore +0 -17
  197. data/spec/dummy/Gemfile +0 -47
  198. data/spec/dummy/app/assets/config/manifest.js +0 -3
  199. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  200. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  201. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  202. data/spec/dummy/bin/bundle +0 -3
  203. data/spec/dummy/bin/rails +0 -9
  204. data/spec/dummy/bin/rake +0 -9
  205. data/spec/dummy/bin/setup +0 -29
  206. data/spec/dummy/bin/spring +0 -17
  207. data/spec/dummy/config/application.rb +0 -26
  208. data/spec/dummy/config/boot.rb +0 -3
  209. data/spec/dummy/config/environments/development.rb +0 -41
  210. data/spec/dummy/config/environments/production.rb +0 -79
  211. data/spec/dummy/config/initializers/assets.rb +0 -11
  212. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  213. data/spec/dummy/config/initializers/session_store.rb +0 -3
  214. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +0 -10
  215. data/spec/dummy/config/routes.rb +0 -58
  216. data/spec/dummy/config/secrets.yml +0 -22
  217. data/spec/dummy/db/seeds.rb +0 -7
  218. data/spec/dummy/public/robots.txt +0 -5
  219. data/spec/raygun/raygun_spec.rb +0 -47
  220. /data/spec/{dummy → rails_applications/6.1.4}/app/assets/images/.keep +0 -0
  221. /data/spec/{dummy → rails_applications/6.1.4}/app/controllers/concerns/.keep +0 -0
  222. /data/spec/{dummy/app/mailers → rails_applications/6.1.4/app/models/concerns}/.keep +0 -0
  223. /data/spec/{dummy/app/models/.keep → rails_applications/6.1.4/db/test.sqlite3} +0 -0
  224. /data/spec/{dummy/app/models/concerns → rails_applications/6.1.4/lib/assets}/.keep +0 -0
  225. /data/spec/{dummy/lib/assets → rails_applications/6.1.4/lib/tasks}/.keep +0 -0
  226. /data/spec/{dummy/lib/tasks/.keep → rails_applications/6.1.4/public/apple-touch-icon-precomposed.png} +0 -0
  227. /data/spec/{dummy/log/.keep → rails_applications/6.1.4/public/apple-touch-icon.png} +0 -0
  228. /data/spec/{dummy → rails_applications/6.1.4}/public/favicon.ico +0 -0
  229. /data/spec/{dummy/vendor/assets/javascripts → rails_applications/6.1.4/storage}/.keep +0 -0
  230. /data/spec/{dummy/vendor/assets/stylesheets → rails_applications/7.1.3/app/assets/images}/.keep +0 -0
@@ -0,0 +1,56 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ ruby '2.6.3'
5
+
6
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
7
+ gem 'rails', '~> 6.1.4'
8
+ # Use sqlite3 as the database for Active Record
9
+ gem 'sqlite3', '~> 1.4'
10
+ # Use Puma as the app server
11
+ gem 'puma', '~> 5.0'
12
+ # Use SCSS for stylesheets
13
+ gem 'sass-rails', '>= 6'
14
+ # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
15
+ gem 'webpacker', '~> 5.0'
16
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
17
+ gem 'turbolinks', '~> 5'
18
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
19
+ gem 'jbuilder', '~> 2.7'
20
+ # Use Redis adapter to run Action Cable in production
21
+ # gem 'redis', '~> 4.0'
22
+ # Use Active Model has_secure_password
23
+ # gem 'bcrypt', '~> 3.1.7'
24
+
25
+ # Use Active Storage variant
26
+ # gem 'image_processing', '~> 1.2'
27
+
28
+ # Reduces boot times through caching; required in config/boot.rb
29
+ gem 'bootsnap', '>= 1.4.4', require: false
30
+
31
+ group :development, :test do
32
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
33
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
34
+ end
35
+
36
+ group :development do
37
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
38
+ gem 'web-console', '>= 4.1.0'
39
+ # Display performance information such as SQL time and flame graphs for each request in your browser.
40
+ # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
41
+ gem 'rack-mini-profiler', '~> 2.0'
42
+ gem 'listen', '~> 3.3'
43
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
44
+ gem 'spring'
45
+ end
46
+
47
+ group :test do
48
+ # Adds support for Capybara system testing and selenium driver
49
+ gem 'capybara', '>= 3.26'
50
+ gem 'selenium-webdriver'
51
+ # Easy installation and use of web drivers to run system tests with browsers
52
+ gem 'webdrivers'
53
+ end
54
+
55
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
56
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
@@ -1,28 +1,24 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
@@ -1,6 +1,6 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative "config/application"
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,2 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../stylesheets .css
@@ -1,15 +1,15 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
6
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationController < ActionController::Base
2
+ end
@@ -1,4 +1,4 @@
1
- class HomeController < ApplicationController
2
- def home
3
- end
4
- end
1
+ class HomeController < ApplicationController
2
+ def home
3
+ end
4
+ end
@@ -1,2 +1,2 @@
1
- module ApplicationHelper
2
- end
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,6 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the `bin/rails generate channel` command.
3
+
4
+ import { createConsumer } from "@rails/actioncable"
5
+
6
+ export default createConsumer()
@@ -0,0 +1,5 @@
1
+ // Load all the channels within this directory and all subdirectories.
2
+ // Channel files must be named *_channel.js.
3
+
4
+ const channels = require.context('.', true, /_channel\.js$/)
5
+ channels.keys().forEach(channels)
@@ -0,0 +1,13 @@
1
+ // This file is automatically compiled by Webpack, along with any other files
2
+ // present in this directory. You're encouraged to place your actual application logic in
3
+ // a relevant structure within app/javascript and only use these pack files to reference
4
+ // that code so it'll be compiled.
5
+
6
+ import Rails from "@rails/ujs"
7
+ import Turbolinks from "turbolinks"
8
+ import * as ActiveStorage from "@rails/activestorage"
9
+ import "channels"
10
+
11
+ Rails.start()
12
+ Turbolinks.start()
13
+ ActiveStorage.start()
@@ -0,0 +1,7 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ # Automatically retry jobs that encountered a deadlock
3
+ # retry_on ActiveRecord::Deadlocked
4
+
5
+ # Most jobs are safe to ignore if the underlying records are no longer available
6
+ # discard_on ActiveJob::DeserializationError
7
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -1,3 +1,3 @@
1
- <h1>Home#index</h1>
2
- <p>Find me in app/views/home/index.html.erb</p>
3
- <p><%= Raygun.configuration.js_api_key %></p>
1
+ <h1>Home#index</h1>
2
+ <p>Find me in app/views/home/index.html.erb</p>
3
+ <p><%= Raygun.configuration.js_api_key %></p>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ load File.expand_path("spring", __dir__)
3
+ APP_PATH = File.expand_path('../config/application', __dir__)
4
+ require_relative "../config/boot"
5
+ require "rails/commands"
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ load File.expand_path("spring", __dir__)
3
+ require_relative "../config/boot"
4
+ require "rake"
5
+ Rake.application.run
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+ require "fileutils"
3
+
4
+ # path to your application root.
5
+ APP_ROOT = File.expand_path('..', __dir__)
6
+
7
+ def system!(*args)
8
+ system(*args) || abort("\n== Command #{args} failed ==")
9
+ end
10
+
11
+ FileUtils.chdir APP_ROOT do
12
+ # This script is a way to set up or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
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
+ # Install JavaScript dependencies
21
+ system! 'bin/yarn'
22
+
23
+ # puts "\n== Copying sample files =="
24
+ # unless File.exist?('config/database.yml')
25
+ # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
26
+ # end
27
+
28
+ puts "\n== Preparing database =="
29
+ system! 'bin/rails db:prepare'
30
+
31
+ puts "\n== Removing old logs and tempfiles =="
32
+ system! 'bin/rails log:clear tmp:clear'
33
+
34
+ puts "\n== Restarting application server =="
35
+ system! 'bin/rails restart'
36
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
3
+ gem "bundler"
4
+ require "bundler"
5
+
6
+ # Load Spring without loading other gems in the Gemfile, for speed.
7
+ Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring|
8
+ Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
9
+ gem "spring", spring.version
10
+ require "spring/binstub"
11
+ rescue Gem::LoadError
12
+ # Ignore when Spring is not installed.
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
+ yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
5
+ select { |dir| File.expand_path(dir) != __dir__ }.
6
+ product(["yarn", "yarn.cmd", "yarn.ps1"]).
7
+ map { |dir, file| File.expand_path(file, dir) }.
8
+ find { |file| File.executable?(file) }
9
+
10
+ if yarn
11
+ exec yarn, *ARGV
12
+ else
13
+ $stderr.puts "Yarn executable was not detected in the system."
14
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
15
+ exit 1
16
+ end
17
+ end
@@ -0,0 +1,22 @@
1
+ require_relative "boot"
2
+
3
+ require "rails/all"
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(*Rails.groups)
8
+
9
+ module Dummy
10
+ class Application < Rails::Application
11
+ # Initialize configuration defaults for originally generated Rails version.
12
+ config.load_defaults 6.1
13
+
14
+ # Configuration for the application, engines, and railties goes here.
15
+ #
16
+ # These settings can be overridden in specific environments using the files
17
+ # in config/environments, which are processed later.
18
+ #
19
+ # config.time_zone = "Central Time (US & Canada)"
20
+ # config.eager_load_paths << Rails.root.join("extras")
21
+ end
22
+ end
@@ -0,0 +1,3 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
+
3
+ require "bundler/setup" # Set up gems listed in the Gemfile.
@@ -0,0 +1,10 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: test
6
+
7
+ production:
8
+ adapter: redis
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
+ channel_prefix: dummy_production
@@ -0,0 +1 @@
1
+ TP13p+rsIB1CqXHd7WTBK/V7c8UoysyfwGwQi3NW2pETK4wrCDcae8NTlPABXjJE47tVttKGOLDviGP9lnCfrxW1fLMbCdNHEcuv0akgPjkBnTI2NAm/d1h+sqQxiD/cdTqSU84yYz4hnV/CzZ/SOnHj77XqGlBcF2eot2dI4JDayQfb6DK3cQC1Xbr0yi8WoIw5BfnH7jMSmstvSArzMi2GMA1swM2pZ2CEBRfF5OlSB+urrxVnA20wFReD+Nb9/0A/z1by6hP8PMMNgBRVYqRHvYGFu4zxSxQ9x416010+wRKwT/dfdUm9Y1hR9v0bSZpX07TEO4cdfz+Dc94HaB1ydWQ1OjJrUcz5gbE2DYZDjvZeQ4l1FL8frvm+1irZE7rAtk+qjHhHYqFpSi7/zVzTUrAv0Ny2MIhp--owt0TMtuGtE5tfhv--rqwMgDdo9gtJvq5rpa1cBQ==
@@ -1,25 +1,25 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: 5
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
1
+ # SQLite. Versions 3.8.0 and up are supported.
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -1,5 +1,5 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
1
+ # Load the Rails application.
2
+ require_relative "application"
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,76 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
8
+ # since you don't have to restart the web server when you make code changes.
9
+ config.cache_classes = false
10
+
11
+ # Do not eager load code on boot.
12
+ config.eager_load = false
13
+
14
+ # Show full error reports.
15
+ config.consider_all_requests_local = true
16
+
17
+ # Enable/disable caching. By default caching is disabled.
18
+ # Run rails dev:cache to toggle caching.
19
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
20
+ config.action_controller.perform_caching = true
21
+ config.action_controller.enable_fragment_cache_logging = true
22
+
23
+ config.cache_store = :memory_store
24
+ config.public_file_server.headers = {
25
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
26
+ }
27
+ else
28
+ config.action_controller.perform_caching = false
29
+
30
+ config.cache_store = :null_store
31
+ end
32
+
33
+ # Store uploaded files on the local file system (see config/storage.yml for options).
34
+ config.active_storage.service = :local
35
+
36
+ # Don't care if the mailer can't send.
37
+ config.action_mailer.raise_delivery_errors = false
38
+
39
+ config.action_mailer.perform_caching = false
40
+
41
+ # Print deprecation notices to the Rails logger.
42
+ config.active_support.deprecation = :log
43
+
44
+ # Raise exceptions for disallowed deprecations.
45
+ config.active_support.disallowed_deprecation = :raise
46
+
47
+ # Tell Active Support which deprecation messages to disallow.
48
+ config.active_support.disallowed_deprecation_warnings = []
49
+
50
+ # Raise an error on page load if there are pending migrations.
51
+ config.active_record.migration_error = :page_load
52
+
53
+ # Highlight code that triggered database queries in logs.
54
+ config.active_record.verbose_query_logs = true
55
+
56
+ # Debug mode disables concatenation and preprocessing of assets.
57
+ # This option may cause significant delays in view rendering with a large
58
+ # number of complex assets.
59
+ config.assets.debug = true
60
+
61
+ # Suppress logger output for asset requests.
62
+ config.assets.quiet = true
63
+
64
+ # Raises error for missing translations.
65
+ # config.i18n.raise_on_missing_translations = true
66
+
67
+ # Annotate rendered view with file names.
68
+ # config.action_view.annotate_rendered_view_with_filenames = true
69
+
70
+ # Use an evented file watcher to asynchronously detect changes in source code,
71
+ # routes, locales, etc. This feature depends on the listen gem.
72
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
73
+
74
+ # Uncomment if you wish to allow Action Cable access from any origin.
75
+ # config.action_cable.disable_request_forgery_protection = true
76
+ end