Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/twilio-ruby/util/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Twilio
module Util
class Configuration
attr_accessor :account_sid, :auth_token, :http_client, :region, :edge, :logger
attr_reader :account_sid, :auth_token, :http_client, :region, :edge, :logger

def account_sid=(value)
@account_sid = value
Expand Down
24 changes: 12 additions & 12 deletions spec/rack/twilio_webhook_authentication_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
expect(Twilio::Security::RequestValidator).to receive(:new).with(auth_token).and_return(request_validator)
expect(request_validator).to receive(:validate).and_return(true)
request = Rack::MockRequest.env_for('/voice')
status, headers, body = @middleware.call(request)
status, _headers, _body = @middleware.call(request)
expect(status).to be(200)
end
end
Expand All @@ -51,7 +51,7 @@
it 'should not intercept when the path doesn\'t match' do
expect(Twilio::Security::RequestValidator).to_not receive(:validate)
request = Rack::MockRequest.env_for('/sms')
status, headers, body = @middleware.call(request)
status, _headers, _body = @middleware.call(request)
expect(status).to be(200)
end

Expand All @@ -60,7 +60,7 @@
receive(:validate).and_return(true)
)
request = Rack::MockRequest.env_for('/voice')
status, headers, body = @middleware.call(request)
status, _headers, _body = @middleware.call(request)
expect(status).to be(200)
end

Expand All @@ -69,7 +69,7 @@
receive(:validate).and_return(false)
)
request = Rack::MockRequest.env_for('/voice')
status, headers, body = @middleware.call(request)
status, _headers, _body = @middleware.call(request)
expect(status).to be(403)
end
end
Expand All @@ -82,7 +82,7 @@
it 'should not intercept when the path doesn\'t match' do
expect(Twilio::Security::RequestValidator).to_not receive(:validate)
request = Rack::MockRequest.env_for('icesms')
status, headers, body = @middleware.call(request)
status, _headers, _body = @middleware.call(request)
expect(status).to be(200)
end

Expand All @@ -91,7 +91,7 @@
receive(:validate).and_return(true)
)
request = Rack::MockRequest.env_for('/sms')
status, headers, body = @middleware.call(request)
status, _headers, _body = @middleware.call(request)
expect(status).to be(200)
end

Expand All @@ -100,7 +100,7 @@
receive(:validate).and_return(false)
)
request = Rack::MockRequest.env_for('/sms')
status, headers, body = @middleware.call(request)
status, _headers, _body = @middleware.call(request)
expect(status).to be(403)
end
end
Expand All @@ -118,7 +118,7 @@
request['HTTP_X_TWILIO_SIGNATURE'] = '+LYlbGr/VmN84YPJQCuWs+9UA7E='
request['CONTENT_TYPE'] = 'application/json'

status, headers, body = middleware.call(request)
status, _headers, _body = middleware.call(request)

expect(status).not_to be(200)
end
Expand All @@ -135,7 +135,7 @@
request['HTTP_X_TWILIO_SIGNATURE'] = 'zR5Oq4f6cijN5oz5bisiVuxYnTU='
request['CONTENT_TYPE'] = 'application/json'

status, headers, body = middleware.call(request)
status, _headers, _body = middleware.call(request)

expect(status).to be(200)
end
Expand All @@ -153,7 +153,7 @@
request['CONTENT_TYPE'] = 'application/json'
request['rack.input'].read

status, headers, body = middleware.call(request)
status, _headers, _body = middleware.call(request)

expect(status).to be(200)
end
Expand All @@ -171,7 +171,7 @@
request['HTTP_X_TWILIO_SIGNATURE'] = 'foobarbaz'
expect(request['CONTENT_TYPE']).to eq('application/x-www-form-urlencoded')

status, headers, body = middleware.call(request)
status, _headers, _body = middleware.call(request)

expect(status).not_to be(200)
end
Expand All @@ -187,7 +187,7 @@
request['HTTP_X_TWILIO_SIGNATURE'] = 'TR9Skm9jiF4WVRJznU5glK5I83k='
expect(request['CONTENT_TYPE']).to eq('application/x-www-form-urlencoded')

status, headers, body = middleware.call(request)
status, _headers, _body = middleware.call(request)

expect(status).to be(200)
end
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$VERBOSE = true

if RUBY_VERSION.start_with?('3.0')
require 'simplecov'
require 'simplecov_json_formatter'
Expand Down
Loading