Skip to content

Commit dfe7022

Browse files
committed
Fix Ruby verbose mode warnings
1 parent 3f90177 commit dfe7022

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

lib/raven/base.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
require 'raven/instance'
2323

2424
require 'forwardable'
25+
require 'English'
2526

2627
module Raven
2728
AVAILABLE_INTEGRATIONS = %w[delayed_job railties sidekiq rack rake].freeze

lib/raven/configuration.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Configuration
2222
attr_accessor :project_id
2323

2424
# Project directory root
25-
attr_accessor :project_root
25+
attr_reader :project_root
2626

2727
# Encoding type for event bodies
2828
attr_reader :encoding
@@ -85,7 +85,7 @@ class Configuration
8585
attr_reader :async
8686

8787
# Optional Proc, called when the Sentry server cannot be contacted for any reason
88-
attr_accessor :transport_failure_callback
88+
attr_reader :transport_failure_callback
8989

9090
# Directories to be recognized as part of your app. e.g. if you
9191
# have an `engines` dir at the root of your project, you may want
@@ -98,7 +98,7 @@ class Configuration
9898
# will report exceptions even when they are rescued by these middlewares.
9999
attr_accessor :rails_report_rescued_exceptions
100100
# Deprecated accessor
101-
attr_accessor :catch_debugged_exceptions
101+
attr_reader :catch_debugged_exceptions
102102

103103
# Turns on ActiveSupport breadcrumbs integration
104104
attr_accessor :rails_activesupport_breadcrumbs
@@ -174,20 +174,20 @@ def server=(value)
174174

175175
if uri.user
176176
# DSN-style string
177-
@project_id = uri_path.pop
178-
@public_key = uri.user
179-
@secret_key = uri.password
177+
self.project_id = uri_path.pop
178+
self.public_key = uri.user
179+
self.secret_key = uri.password
180180
end
181181

182-
@scheme = uri.scheme
183-
@host = uri.host
184-
@port = uri.port if uri.port
185-
@path = uri_path.join('/')
182+
self.scheme = uri.scheme
183+
self.host = uri.host
184+
self.port = uri.port if uri.port
185+
self.path = uri_path.join('/')
186186

187187
# For anyone who wants to read the base server string
188-
@server = "#{@scheme}://#{@host}"
189-
@server << ":#{@port}" unless @port == { 'http' => 80, 'https' => 443 }[@scheme]
190-
@server << @path
188+
@server = "#{scheme}://#{host}"
189+
@server << ":#{port}" unless port == { 'http' => 80, 'https' => 443 }[scheme]
190+
@server << path
191191
end
192192

193193
def encoding=(encoding)

lib/raven/instance.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
require 'raven/base'
2-
require 'English'
3-
41
module Raven
52
# A copy of Raven's base module class methods, minus some of the integration
63
# and global hooks since it's meant to be used explicitly. Useful for

0 commit comments

Comments
 (0)