raygun4ruby 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -5
  3. data/CHANGELOG.md +4 -0
  4. data/lib/raygun/middleware/javascript_exception_tracking.rb +1 -1
  5. data/lib/raygun/version.rb +1 -1
  6. data/raygun4ruby.gemspec +1 -1
  7. data/spec/dummy/.gitignore +17 -0
  8. data/spec/dummy/Gemfile +47 -0
  9. data/spec/dummy/README.rdoc +28 -0
  10. data/spec/dummy/Rakefile +1 -1
  11. data/spec/dummy/app/assets/javascripts/application.js +1 -3
  12. data/spec/dummy/app/assets/stylesheets/application.css +3 -3
  13. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  14. data/spec/dummy/app/controllers/home_controller.rb +1 -1
  15. data/spec/dummy/app/{assets/javascripts/channels → mailers}/.keep +0 -0
  16. data/spec/dummy/{storage → app/models}/.keep +0 -0
  17. data/spec/dummy/app/views/layouts/application.html.erb +9 -10
  18. data/spec/dummy/bin/bundle +1 -1
  19. data/spec/dummy/bin/rails +6 -1
  20. data/spec/dummy/bin/rake +5 -0
  21. data/spec/dummy/bin/setup +13 -20
  22. data/spec/dummy/bin/spring +17 -0
  23. data/spec/dummy/config.ru +1 -2
  24. data/spec/dummy/config/application.rb +16 -8
  25. data/spec/dummy/config/boot.rb +2 -4
  26. data/spec/dummy/config/database.yml +1 -1
  27. data/spec/dummy/config/environment.rb +1 -1
  28. data/spec/dummy/config/environments/development.rb +11 -31
  29. data/spec/dummy/config/environments/production.rb +16 -31
  30. data/spec/dummy/config/environments/test.rb +6 -10
  31. data/spec/dummy/config/initializers/assets.rb +3 -6
  32. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -2
  33. data/spec/dummy/config/initializers/session_store.rb +3 -0
  34. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
  35. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
  36. data/spec/dummy/config/locales/en.yml +0 -10
  37. data/spec/dummy/config/routes.rb +56 -1
  38. data/spec/dummy/config/secrets.yml +22 -0
  39. data/spec/dummy/db/seeds.rb +7 -0
  40. data/spec/dummy/{public/apple-touch-icon-precomposed.png → lib/tasks/.keep} +0 -0
  41. data/spec/dummy/public/404.html +6 -6
  42. data/spec/dummy/public/422.html +6 -6
  43. data/spec/dummy/public/500.html +6 -6
  44. data/spec/dummy/public/robots.txt +5 -0
  45. data/spec/dummy/{public/apple-touch-icon.png → test/controllers/.keep} +0 -0
  46. data/spec/dummy/test/fixtures/.keep +0 -0
  47. data/spec/dummy/test/helpers/.keep +0 -0
  48. data/spec/dummy/test/integration/.keep +0 -0
  49. data/spec/dummy/test/mailers/.keep +0 -0
  50. data/spec/dummy/test/models/.keep +0 -0
  51. data/spec/dummy/test/test_helper.rb +10 -0
  52. data/spec/dummy/vendor/assets/javascripts/.keep +0 -0
  53. data/spec/dummy/vendor/assets/stylesheets/.keep +0 -0
  54. metadata +25 -28
  55. data/spec/dummy/.ruby-version +0 -1
  56. data/spec/dummy/app/assets/config/manifest.js +0 -3
  57. data/spec/dummy/app/assets/javascripts/cable.js +0 -13
  58. data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
  59. data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
  60. data/spec/dummy/app/jobs/application_job.rb +0 -2
  61. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  62. data/spec/dummy/app/models/application_record.rb +0 -3
  63. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  64. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  65. data/spec/dummy/bin/update +0 -31
  66. data/spec/dummy/bin/yarn +0 -11
  67. data/spec/dummy/config/cable.yml +0 -10
  68. data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
  69. data/spec/dummy/config/initializers/content_security_policy.rb +0 -25
  70. data/spec/dummy/config/puma.rb +0 -34
  71. data/spec/dummy/config/spring.rb +0 -6
  72. data/spec/dummy/config/storage.yml +0 -34
  73. data/spec/dummy/db/schema.rb +0 -15
  74. data/spec/dummy/package.json +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38293d7b440b4bfd6832b011cd1e21e35bb6fbf9
4
- data.tar.gz: b6f121cd013f4bb492f818a1affc0d4d8e85c42b
3
+ metadata.gz: 1c19a73f7454672b2cb814548a49703460f12fc2
4
+ data.tar.gz: 2b9e1b70912fbf7fe1287d48e2b881e2aaaded0c
5
5
  SHA512:
6
- metadata.gz: 39e682dda4b6aeb589c7cd1dab4f3314f170cabdbbaf83538aab686197237bc8ba3b4618307b12ad9cacc8f3fb5e5dd3e2bf8d0df96ae13849895027eea6c95c
7
- data.tar.gz: d35f07722386ed7b3b27827709be074dbd52e1984860689290466af3dcfe19b98487a770db769b717ba17d988bdb868ab178a61c4f560b8b8571a208943a9d5f
6
+ metadata.gz: d67524d7e34b399c2033cb57c1995df80735c321857dac77a800d9ffa2139b6c95a78061a9bd431f9860bd2d4e268c3d3b1cbdc4e342f5425adae5da9c98965d
7
+ data.tar.gz: 75b26f8c4cd398699a6a557c21c12540c36780fc791a6c46214c22acbac48b7bb2e2237a84582b0819044f96b19abc0735ea1e9da3ff831824633225103fc2a9
@@ -1,12 +1,14 @@
1
- before_install:
2
- - gem install bundler
3
-
4
1
  script:
5
2
  - bundle exec rake
6
3
 
7
4
  rvm:
8
- - 2.3.3
9
- - 2.4.0
5
+ - 2.0.0-p648
6
+ - 2.1.0
7
+ - 2.2.10
8
+ - 2.3.8
9
+ - 2.4.5
10
+ - 2.5.3
11
+ - 2.6.1
10
12
 
11
13
  gemfile:
12
14
  - Gemfile
@@ -1,3 +1,7 @@
1
+ ## 3.2.1 (25/02/2019):
2
+ Bugfix:
3
+ - Remove Ruby 2.3 syntax to retain support for Ruby >= 2.0 ([#148](https://github.com/MindscapeHQ/raygun4ruby/pull/148))
4
+
1
5
  ## 3.2.0 (21/02/2019):
2
6
  Bugfix:
3
7
  - Fix NoMethodError Exception: undefined method `include?' for nil:NilClass in `JavascriptExceptionTracking` class. Thanks @yamanaltereh for this ([#141](https://github.com/MindscapeHQ/raygun4ruby/pull/141))
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Raygun
2
- VERSION = "3.2.0"
2
+ VERSION = "3.2.1"
3
3
  end
@@ -36,7 +36,7 @@ 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"
39
+ spec.add_development_dependency 'rails', "= 4.2.11"
40
40
  spec.add_development_dependency 'sqlite3', '~> 1.3.6'
41
41
  spec.add_development_dependency 'capybara'
42
42
  spec.add_development_dependency "rspec-rails"
@@ -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
@@ -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
@@ -1,4 +1,4 @@
1
1
  class HomeController < ApplicationController
2
- def index
2
+ def home
3
3
  end
4
4
  end
File without changes
@@ -1,15 +1,14 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
7
10
 
8
- <%= stylesheet_link_tag 'application', media: 'all' %>
9
- <%= javascript_include_tag 'application' %>
10
- </head>
11
+ <%= yield %>
11
12
 
12
- <body>
13
- <%= yield %>
14
- </body>
13
+ </body>
15
14
  </html>
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
3
  load Gem.bin_path('bundler', 'bundle')
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../config/application', __dir__)
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
7
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
8
  require_relative '../config/boot'
4
9
  require 'rails/commands'
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
2
7
  require_relative '../config/boot'
3
8
  require 'rake'
4
9
  Rake.application.run
@@ -1,36 +1,29 @@
1
1
  #!/usr/bin/env ruby
2
- require 'fileutils'
3
- include FileUtils
2
+ require 'pathname'
4
3
 
5
4
  # path to your application root.
6
- APP_ROOT = File.expand_path('..', __dir__)
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
7
6
 
8
- def system!(*args)
9
- system(*args) || abort("\n== Command #{args} failed ==")
10
- end
11
-
12
- chdir APP_ROOT do
7
+ Dir.chdir APP_ROOT do
13
8
  # 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')
9
+ # Add necessary setup steps to this file:
19
10
 
20
- # Install JavaScript dependencies if using Yarn
21
- # system('bin/yarn')
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
22
14
 
23
15
  # puts "\n== Copying sample files =="
24
- # unless File.exist?('config/database.yml')
25
- # cp 'config/database.yml.sample', 'config/database.yml'
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
26
18
  # end
27
19
 
28
20
  puts "\n== Preparing database =="
29
- system! 'bin/rails db:setup'
21
+ system "bin/rake db:setup"
30
22
 
31
23
  puts "\n== Removing old logs and tempfiles =="
32
- system! 'bin/rails log:clear tmp:clear'
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
33
26
 
34
27
  puts "\n== Restarting application server =="
35
- system! 'bin/rails restart'
28
+ system "touch tmp/restart.txt"
36
29
  end
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file loads spring without using Bundler, in order to be fast.
4
+ # It gets overwritten when you run the `spring binstub` command.
5
+
6
+ unless defined?(Spring)
7
+ require 'rubygems'
8
+ require 'bundler'
9
+
10
+ lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11
+ spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12
+ if spring
13
+ Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14
+ gem 'spring', spring.version
15
+ require 'spring/binstub'
16
+ end
17
+ end
@@ -1,5 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require_relative 'config/environment'
4
-
3
+ require ::File.expand_path('../config/environment', __FILE__)
5
4
  run Rails.application
@@ -1,18 +1,26 @@
1
- require_relative 'boot'
1
+ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
5
7
  Bundler.require(*Rails.groups)
6
8
 
7
9
  module Dummy
8
10
  class Application < Rails::Application
9
- # Initialize configuration defaults for originally generated Rails version.
10
- config.load_defaults 5.2
11
-
12
11
  # Settings in config/environments/* take precedence over those specified here.
13
- # Application configuration can go into files in config/initializers
14
- # -- all .rb files in that directory are automatically loaded after loading
15
- # the framework and any gems in your application.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
14
+
15
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
+ # config.time_zone = 'Central Time (US & Canada)'
18
+
19
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21
+ # config.i18n.default_locale = :de
22
+
23
+ # Do not swallow errors in after_commit/after_rollback callbacks.
24
+ config.active_record.raise_in_transactional_callbacks = true
16
25
  end
17
26
  end
18
-
@@ -1,5 +1,3 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
2
 
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -6,7 +6,7 @@
6
6
  #
7
7
  default: &default
8
8
  adapter: sqlite3
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
9
+ pool: 5
10
10
  timeout: 5000
11
11
 
12
12
  development:
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require_relative 'application'
2
+ require File.expand_path('../application', __FILE__)
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -9,53 +9,33 @@ Rails.application.configure do
9
9
  # Do not eager load code on boot.
10
10
  config.eager_load = false
11
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
- # Store uploaded files on the local file system (see config/storage.yml for options)
31
- config.active_storage.service = :local
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
32
15
 
33
16
  # Don't care if the mailer can't send.
34
17
  config.action_mailer.raise_delivery_errors = false
35
18
 
36
- config.action_mailer.perform_caching = false
37
-
38
19
  # Print deprecation notices to the Rails logger.
39
20
  config.active_support.deprecation = :log
40
21
 
41
22
  # Raise an error on page load if there are pending migrations.
42
23
  config.active_record.migration_error = :page_load
43
24
 
44
- # Highlight code that triggered database queries in logs.
45
- config.active_record.verbose_query_logs = true
46
-
47
25
  # Debug mode disables concatenation and preprocessing of assets.
48
26
  # This option may cause significant delays in view rendering with a large
49
27
  # number of complex assets.
50
28
  config.assets.debug = true
51
29
 
52
- # Suppress logger output for asset requests.
53
- config.assets.quiet = true
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
33
+
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
54
38
 
55
39
  # Raises error for missing translations
56
40
  # config.action_view.raise_on_missing_translations = true
57
-
58
- # Use an evented file watcher to asynchronously detect changes in source code,
59
- # routes, locales, etc. This feature depends on the listen gem.
60
- # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
61
41
  end