raygun4ruby 3.1.0 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +0 -0
  3. data/.rspec +0 -0
  4. data/.travis.yml +11 -3
  5. data/CHANGELOG.md +23 -2
  6. data/Gemfile +0 -0
  7. data/LICENSE.txt +0 -0
  8. data/README.md +3 -3
  9. data/Rakefile +0 -0
  10. data/examples/sinatras_raygun.rb +0 -0
  11. data/lib/generators/raygun/install_generator.rb +0 -0
  12. data/lib/raygun.rb +2 -5
  13. data/lib/raygun/affected_user.rb +0 -0
  14. data/lib/raygun/breadcrumbs.rb +0 -0
  15. data/lib/raygun/breadcrumbs/breadcrumb.rb +4 -0
  16. data/lib/raygun/breadcrumbs/store.rb +10 -0
  17. data/lib/raygun/client.rb +4 -1
  18. data/lib/raygun/configuration.rb +0 -0
  19. data/lib/raygun/error.rb +0 -0
  20. data/lib/raygun/javascript_tracker.rb +0 -0
  21. data/lib/raygun/middleware/breadcrumbs_store_initializer.rb +0 -0
  22. data/lib/raygun/middleware/javascript_exception_tracking.rb +5 -3
  23. data/lib/raygun/middleware/rack_exception_interceptor.rb +0 -0
  24. data/lib/raygun/middleware/rails_insert_affected_user.rb +0 -0
  25. data/lib/raygun/railtie.rb +0 -0
  26. data/lib/raygun/services/apply_whitelist_filter_to_payload.rb +0 -0
  27. data/lib/raygun/sidekiq.rb +3 -0
  28. data/lib/raygun/testable.rb +0 -0
  29. data/lib/raygun/version.rb +1 -1
  30. data/lib/raygun4ruby.rb +0 -0
  31. data/lib/resque/failure/raygun.rb +0 -0
  32. data/lib/tasks/raygun.tasks +0 -0
  33. data/raygun4ruby.gemspec +4 -4
  34. data/spec/dummy/.gitignore +17 -0
  35. data/spec/dummy/Gemfile +47 -0
  36. data/spec/dummy/README.rdoc +28 -0
  37. data/spec/dummy/Rakefile +1 -1
  38. data/spec/dummy/app/assets/config/manifest.js +1 -1
  39. data/spec/dummy/app/assets/images/.keep +0 -0
  40. data/spec/dummy/app/assets/javascripts/application.js +1 -3
  41. data/spec/dummy/app/assets/stylesheets/application.css +3 -3
  42. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  43. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  44. data/spec/dummy/app/controllers/home_controller.rb +1 -1
  45. data/spec/dummy/app/helpers/application_helper.rb +0 -0
  46. data/spec/dummy/app/{assets/javascripts/channels → mailers}/.keep +0 -0
  47. data/spec/dummy/{storage → app/models}/.keep +0 -0
  48. data/spec/dummy/app/models/concerns/.keep +0 -0
  49. data/spec/dummy/app/views/home/index.html.erb +0 -0
  50. data/spec/dummy/app/views/home/index.json.erb +0 -0
  51. data/spec/dummy/app/views/layouts/application.html.erb +9 -10
  52. data/spec/dummy/bin/bundle +1 -1
  53. data/spec/dummy/bin/rails +6 -1
  54. data/spec/dummy/bin/rake +5 -0
  55. data/spec/dummy/bin/setup +13 -20
  56. data/spec/dummy/bin/spring +17 -0
  57. data/spec/dummy/config.ru +1 -2
  58. data/spec/dummy/config/application.rb +16 -8
  59. data/spec/dummy/config/boot.rb +2 -4
  60. data/spec/dummy/config/database.yml +1 -1
  61. data/spec/dummy/config/environment.rb +1 -1
  62. data/spec/dummy/config/environments/development.rb +11 -31
  63. data/spec/dummy/config/environments/production.rb +16 -31
  64. data/spec/dummy/config/environments/test.rb +6 -10
  65. data/spec/dummy/config/initializers/assets.rb +3 -6
  66. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -0
  67. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -2
  68. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -0
  69. data/spec/dummy/config/initializers/inflections.rb +0 -0
  70. data/spec/dummy/config/initializers/mime_types.rb +0 -0
  71. data/spec/dummy/config/initializers/session_store.rb +3 -0
  72. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
  73. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
  74. data/spec/dummy/config/locales/en.yml +0 -10
  75. data/spec/dummy/config/routes.rb +56 -1
  76. data/spec/dummy/config/secrets.yml +22 -0
  77. data/spec/dummy/db/seeds.rb +7 -0
  78. data/spec/dummy/db/test.sqlite3 +0 -0
  79. data/spec/dummy/lib/assets/.keep +0 -0
  80. data/spec/dummy/{public/apple-touch-icon-precomposed.png → lib/tasks/.keep} +0 -0
  81. data/spec/dummy/public/404.html +6 -6
  82. data/spec/dummy/public/422.html +6 -6
  83. data/spec/dummy/public/500.html +6 -6
  84. data/spec/dummy/public/favicon.ico +0 -0
  85. data/spec/dummy/public/robots.txt +5 -0
  86. data/spec/dummy/{public/apple-touch-icon.png → test/controllers/.keep} +0 -0
  87. data/spec/dummy/test/fixtures/.keep +0 -0
  88. data/spec/dummy/test/helpers/.keep +0 -0
  89. data/spec/dummy/test/integration/.keep +0 -0
  90. data/spec/dummy/test/mailers/.keep +0 -0
  91. data/spec/dummy/test/models/.keep +0 -0
  92. data/spec/dummy/test/test_helper.rb +10 -0
  93. data/spec/dummy/vendor/assets/javascripts/.keep +0 -0
  94. data/spec/dummy/vendor/assets/stylesheets/.keep +0 -0
  95. data/spec/features/javascript_spec.rb +0 -0
  96. data/spec/rails_helper.rb +0 -0
  97. data/spec/raygun/breadcrumbs/breadcrumb_spec.rb +37 -0
  98. data/spec/raygun/breadcrumbs/store_spec.rb +24 -0
  99. data/spec/raygun/raygun_spec.rb +0 -0
  100. data/spec/services/apply_whitelist_filter_to_payload_spec.rb +0 -0
  101. data/spec/spec_helper.rb +0 -0
  102. data/spec/support/fake_logger.rb +0 -0
  103. data/test/integration/client_test.rb +0 -0
  104. data/test/test_helper.rb +1 -1
  105. data/test/unit/affected_user_test.rb +0 -0
  106. data/test/unit/client_test.rb +3 -1
  107. data/test/unit/configuration_test.rb +0 -0
  108. data/test/unit/raygun_test.rb +0 -0
  109. data/test/unit/resque_failure_test.rb +0 -0
  110. data/test/unit/sidekiq_failure_test.rb +0 -0
  111. metadata +38 -41
  112. data/spec/dummy/.ruby-version +0 -1
  113. data/spec/dummy/app/assets/javascripts/cable.js +0 -13
  114. data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
  115. data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
  116. data/spec/dummy/app/jobs/application_job.rb +0 -2
  117. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  118. data/spec/dummy/app/models/application_record.rb +0 -3
  119. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  120. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  121. data/spec/dummy/bin/update +0 -31
  122. data/spec/dummy/bin/yarn +0 -11
  123. data/spec/dummy/config/cable.yml +0 -10
  124. data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
  125. data/spec/dummy/config/initializers/content_security_policy.rb +0 -25
  126. data/spec/dummy/config/puma.rb +0 -34
  127. data/spec/dummy/config/spring.rb +0 -6
  128. data/spec/dummy/config/storage.yml +0 -34
  129. data/spec/dummy/db/schema.rb +0 -15
  130. data/spec/dummy/package.json +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: acbc458153d576b6856920cb72985952f9f6ed22
4
- data.tar.gz: bb9976f64347bce6b6a6a6f3920564b489b478bb
2
+ SHA256:
3
+ metadata.gz: 03f1be499b87a7e21e94ffb59e414dad9681adcbf13b58a2fcc66e29c939f43d
4
+ data.tar.gz: 24885acd5b4076e37c9778114547302f2997bb993d1d353aa3880c0964f497b8
5
5
  SHA512:
6
- metadata.gz: d603e52d886065cf9cc7b26f6639a8f6c237447d2af106bd5e55b96e5d25b721b1b2607a34f25b71ef9ea5514252492dd7f584463d36a7dd2d614db1a00b66c1
7
- data.tar.gz: 9c1f5c46f012cc003a32ed8829755f3c8321d3049c6b1c7c349063461674f6bf0a6c7114fb9bf444f8ce926c101cd9125c96f92438a34c2a6f1dd8322e650734
6
+ metadata.gz: 60d5e19831a25963ae99355c235e7e184c916db16cf5cec1d93bdf4ca86cf899bf78c406cf4598fc89c08bb11145f420e3eced31c1d0db7875fedd194c0de61b
7
+ data.tar.gz: de64cda810b1d3b9c625606933e4f437a1285b0bb47d5033c24876a4f3605844a2a40d5fe89a4b084e6c4468230d3eaa74b7913deab5f61158c769940e998585
data/.gitignore CHANGED
File without changes
data/.rspec CHANGED
File without changes
@@ -1,12 +1,20 @@
1
+ language: ruby
2
+
1
3
  before_install:
2
- - gem install bundler
4
+ - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
5
+ - gem install bundler -v '< 2'
3
6
 
4
7
  script:
5
8
  - bundle exec rake
6
9
 
7
10
  rvm:
8
- - 2.3.3
9
- - 2.4.0
11
+ - 2.0.0-p648
12
+ - 2.1.0
13
+ - 2.2.10
14
+ - 2.3.8
15
+ - 2.4.5
16
+ - 2.5.3
17
+ - 2.6.1
10
18
 
11
19
  gemfile:
12
20
  - Gemfile
@@ -1,7 +1,28 @@
1
+ ## 3.2.2 (10/06/2020):
2
+ - Introduce support for Raygun APM exceptions correlation ([#154](https://github.com/MindscapeHQ/raygun4ruby/pull/154))
3
+
4
+ ## 3.2.1 (25/02/2019):
5
+ Bugfix:
6
+ - Remove Ruby 2.3 syntax to retain support for Ruby >= 2.0 ([#148](https://github.com/MindscapeHQ/raygun4ruby/pull/148))
7
+
8
+ ## 3.2.0 (21/02/2019):
9
+ Bugfix:
10
+ - Fix NoMethodError Exception: undefined method `include?' for nil:NilClass in `JavascriptExceptionTracking` class. Thanks @yamanaltereh for this ([#141](https://github.com/MindscapeHQ/raygun4ruby/pull/141))
11
+ - Fix ([#145](https://github.com/MindscapeHQ/raygun4ruby/issues/145)), "raygun4ruby will load pry if it is in the gem bundle". Thanks to @eoinkelly for reporting this
12
+
13
+ Feature:
14
+ - If you have recorded a large number of Breadcrumbs, or just very large ones, Raygun4Ruby will now only send up to 100KB of them instead of all of them, potentially going over the 128KB payload limit Raygun accepts ([#147](https://github.com/MindscapeHQ/raygun4ruby/pull/147))
15
+
16
+ ## 3.1.1 (16/01/2019):
17
+ Bugfix:
18
+ - Don't attempt to modify response unless JS api key is present
19
+ - Don't attempt to modify response unless it responds to indexing ([])
20
+ - See PR ([#140](https://github.com/MindscapeHQ/raygun4ruby/pull/140))
21
+
1
22
  ## 3.1.0 (15/01/2019):
2
23
 
3
- Feature:
4
- - Ability to automatically configure Raygun4JS on the client side by injecting it into outbound HTML pages. Thanks @MikeRogers0 for this ([#138](https://github.com/MindscapeHQ/raygun4ruby/pull/138)])
24
+ Feature:
25
+ - Ability to automatically configure Raygun4JS on the client side by injecting it into outbound HTML pages. Thanks @MikeRogers0 for this ([#138](https://github.com/MindscapeHQ/raygun4ruby/pull/138))
5
26
 
6
27
  ## 3.0.0 (18/12/2018):
7
28
  Breaking changes:
data/Gemfile CHANGED
File without changes
File without changes
data/README.md CHANGED
@@ -19,7 +19,7 @@ Or install it yourself as:
19
19
 
20
20
  ## Usage
21
21
 
22
- ### Rails 3/4
22
+ ### Rails 3/4/5
23
23
 
24
24
  Run:
25
25
 
@@ -83,7 +83,7 @@ rescue => e
83
83
  end
84
84
  ```
85
85
 
86
- You can also pass a Hash as the second parameter to `track_exception`. It should look like a [Rack Env Hash](http://rack.rubyforge.org/doc/SPEC.html)
86
+ You can also pass a Hash as the second parameter to `track_exception`. It should look like a [Rack Env Hash](https://www.rubydoc.info/github/rack/rack/master/file/SPEC)
87
87
 
88
88
  ### Customizing The Parameter Filtering
89
89
 
@@ -182,7 +182,7 @@ Raygun.setup do |config|
182
182
  config.api_key = "YOUR_RAYGUN_API_KEY"
183
183
  config.filter_payload_with_whitelist = true
184
184
 
185
- config.whitelist_payload_keys do |payload|
185
+ config.whitelist_payload_shape do |payload|
186
186
  # Return the payload mutated into your desired form
187
187
  payload
188
188
  end
data/Rakefile CHANGED
File without changes
File without changes
@@ -6,11 +6,6 @@ require "socket"
6
6
  require "rack"
7
7
  require "ostruct"
8
8
 
9
- begin
10
- require "pry"
11
- rescue LoadError
12
- end
13
-
14
9
  require "raygun/version"
15
10
  require "raygun/configuration"
16
11
  require "raygun/client"
@@ -152,6 +147,8 @@ module Raygun
152
147
  env[:custom_data] ||= {}
153
148
  env[:custom_data].merge!(original_stacktrace: exception_instance.backtrace)
154
149
 
150
+ ::Raygun::Breadcrumbs::Store.clear
151
+
155
152
  track_exception(new_exception, env, user, retry_count - 1)
156
153
  else
157
154
  raise e
File without changes
File without changes
@@ -25,6 +25,10 @@ module Raygun
25
25
  v != nil
26
26
  end]
27
27
  end
28
+
29
+ def size
30
+ return message.length + 100
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -47,6 +47,16 @@ module Raygun
47
47
  stored != nil && stored.length > 0
48
48
  end
49
49
 
50
+ def self.take_until_size(size)
51
+ breadcrumb_size = 0
52
+
53
+ stored.reverse.take_while do |crumb|
54
+ breadcrumb_size += crumb.size
55
+
56
+ breadcrumb_size < size
57
+ end.reverse
58
+ end
59
+
50
60
  private
51
61
 
52
62
  def self.should_record?(crumb)
@@ -5,6 +5,7 @@ module Raygun
5
5
 
6
6
  ENV_IP_ADDRESS_KEYS = %w(action_dispatch.remote_ip raygun.remote_ip REMOTE_ADDR)
7
7
  NO_API_KEY_MESSAGE = "[RAYGUN] Just a note, you've got no API Key configured, which means we can't report exceptions. Specify your Raygun API key using Raygun#setup (find yours at https://app.raygun.io)"
8
+ MAX_BREADCRUMBS_SIZE = 100_000
8
9
 
9
10
  include HTTParty
10
11
 
@@ -191,6 +192,7 @@ module Raygun
191
192
  Raygun.log('set tags')
192
193
 
193
194
  grouping_key = env.delete(:grouping_key)
195
+ correlation_id = env.delete(:correlation_id)
194
196
 
195
197
  configuration_custom_data = Raygun.configuration.custom_data
196
198
  configured_custom_data = if configuration_custom_data.is_a?(Proc)
@@ -214,11 +216,12 @@ module Raygun
214
216
  }
215
217
  }
216
218
  store = ::Raygun::Breadcrumbs::Store
217
- error_details[:breadcrumbs] = store.stored.map(&:build_payload) if store.any?
219
+ error_details[:breadcrumbs] = store.take_until_size(MAX_BREADCRUMBS_SIZE).map(&:build_payload) if store.any?
218
220
 
219
221
  Raygun.log('set details and breadcrumbs')
220
222
 
221
223
  error_details.merge!(groupingKey: grouping_key) if grouping_key
224
+ error_details.merge!(correlationId: correlation_id) if correlation_id
222
225
 
223
226
  user_details = if affected_user_present?(env)
224
227
  user_information(env)
File without changes
File without changes
File without changes
@@ -8,7 +8,7 @@ module Raygun::Middleware
8
8
  status, headers, response = @app.call(env)
9
9
 
10
10
  # It's a html file, inject our JS
11
- if headers['Content-Type'].include?('text/html')
11
+ if headers['Content-Type'] && headers['Content-Type'].include?('text/html')
12
12
  response = inject_javascript_to_response(response)
13
13
  end
14
14
 
@@ -16,8 +16,10 @@ module Raygun::Middleware
16
16
  end
17
17
 
18
18
  def inject_javascript_to_response(response)
19
- response[0].gsub!('</head>', "#{js_tracker.head_html}</head>")
20
- response[0].gsub!('</body>', "#{js_tracker.body_html}</body>")
19
+ if Raygun.configuration.js_api_key.present? && response.respond_to?('[]')
20
+ response[0].gsub!('</head>', "#{js_tracker.head_html}</head>")
21
+ response[0].gsub!('</body>', "#{js_tracker.body_html}</body>")
22
+ end
21
23
 
22
24
  response
23
25
  end
File without changes
@@ -25,6 +25,9 @@ module Raygun
25
25
  sidekiq_context: context_hash
26
26
  }
27
27
  }
28
+ if correlation_id = exception.instance_variable_get(:@__raygun_correlation_id)
29
+ data.merge!(correlation_id: correlation_id)
30
+ end
28
31
  ::Raygun.track_exception(
29
32
  exception,
30
33
  data,
File without changes
@@ -1,3 +1,3 @@
1
1
  module Raygun
2
- VERSION = "3.1.0"
2
+ VERSION = "3.2.3"
3
3
  end
File without changes
File without changes
File without changes
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_runtime_dependency "concurrent-ruby"
27
27
 
28
28
  spec.add_development_dependency "bundler", ">= 1.1"
29
- spec.add_development_dependency "rake", "~> 11"
29
+ spec.add_development_dependency "rake", ">= 12.3.3"
30
30
  spec.add_development_dependency "timecop"
31
31
  spec.add_development_dependency "minitest", "~> 5.11"
32
32
  spec.add_development_dependency "redis-namespace", ">= 1.3.1"
@@ -36,10 +36,10 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "pry"
37
37
  spec.add_development_dependency "webmock"
38
38
 
39
- spec.add_development_dependency 'rails', "= 5.2"
40
- spec.add_development_dependency 'sqlite3'
39
+ spec.add_development_dependency 'rails', "= 4.2.11"
40
+ spec.add_development_dependency 'sqlite3', '~> 1.3.6'
41
41
  spec.add_development_dependency 'capybara'
42
- spec.add_development_dependency "rspec-rails"
42
+ spec.add_development_dependency "rspec-rails", '~> 3.9'
43
43
  spec.add_development_dependency "launchy"
44
44
  spec.add_development_dependency "simplecov"
45
45
  end
@@ -0,0 +1,17 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ !/log/.keep
17
+ /tmp
@@ -0,0 +1,47 @@
1
+ source 'https://rubygems.org'
2
+
3
+
4
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
+ gem 'rails', '4.2.11'
6
+ # Use sqlite3 as the database for Active Record
7
+ gem 'sqlite3'
8
+ # Use SCSS for stylesheets
9
+ gem 'sass-rails', '~> 5.0'
10
+ # Use Uglifier as compressor for JavaScript assets
11
+ gem 'uglifier', '>= 1.3.0'
12
+ # Use CoffeeScript for .coffee assets and views
13
+ gem 'coffee-rails', '~> 4.1.0'
14
+ # See https://github.com/rails/execjs#readme for more supported runtimes
15
+ # gem 'therubyracer', platforms: :ruby
16
+
17
+ # Use jquery as the JavaScript library
18
+ gem 'jquery-rails'
19
+ # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
20
+ gem 'turbolinks'
21
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
22
+ gem 'jbuilder', '~> 2.0'
23
+ # bundle exec rake doc:rails generates the API under doc/api.
24
+ gem 'sdoc', '~> 0.4.0', group: :doc
25
+
26
+ # Use ActiveModel has_secure_password
27
+ # gem 'bcrypt', '~> 3.1.7'
28
+
29
+ # Use Unicorn as the app server
30
+ # gem 'unicorn'
31
+
32
+ # Use Capistrano for deployment
33
+ # gem 'capistrano-rails', group: :development
34
+
35
+ group :development, :test do
36
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
37
+ gem 'byebug'
38
+ end
39
+
40
+ group :development do
41
+ # Access an IRB console on exception pages or by using <%= console %> in views
42
+ gem 'web-console', '~> 2.0'
43
+
44
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
45
+ gem 'spring'
46
+ end
47
+
@@ -0,0 +1,28 @@
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,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require_relative 'config/application'
4
+ require File.expand_path('../config/application', __FILE__)
5
5
 
6
6
  Rails.application.load_tasks
@@ -1,3 +1,3 @@
1
1
  //= link_tree ../images
2
2
  //= link_directory ../javascripts .js
3
- //= link_directory ../stylesheets .css
3
+ //= link_directory ../stylesheets .css
File without changes
@@ -5,11 +5,9 @@
5
5
  // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file. JavaScript code in this file should be added after the last require_* statement.
8
+ // compiled file.
9
9
  //
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require rails-ujs
14
- //= require activestorage
15
13
  //= require_tree .
@@ -6,9 +6,9 @@
6
6
  * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
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.
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
12
  *
13
13
  *= require_tree .
14
14
  *= require_self
@@ -1,2 +1,5 @@
1
1
  class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
2
5
  end
File without changes
@@ -1,4 +1,4 @@
1
1
  class HomeController < ApplicationController
2
- def index
2
+ def home
3
3
  end
4
4
  end
File without changes