Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logger as a dependency, drop ostruct for tests #1010

Merged
Merged
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: 2 additions & 0 deletions dalli.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ Gem::Specification.new do |s|
'changelog_uri' => 'https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md',
'rubygems_mfa_required' => 'true'
}

s.add_dependency 'logger'
end
1 change: 0 additions & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

require 'dalli'
require 'logger'
require 'ostruct'
require 'securerandom'

Dalli.logger = Logger.new($stdout)
Expand Down
4 changes: 2 additions & 2 deletions test/integration/test_network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

describe 'with a fake server' do
it 'handle connection reset' do
memcached_mock(->(sock) { sock.close }) do
memcached_mock(lambda(&:close)) do
dc = Dalli::Client.new('localhost:19123')
assert_raises Dalli::RingError, message: 'No server available' do
dc.get('abc')
Expand All @@ -25,7 +25,7 @@

it 'handle connection reset with unix socket' do
socket_path = MemcachedMock::UNIX_SOCKET_PATH
memcached_mock(->(sock) { sock.close }, :start_unix, socket_path) do
memcached_mock(lambda(&:close), :start_unix, socket_path) do
dc = Dalli::Client.new(socket_path)
assert_raises Dalli::RingError, message: 'No server available' do
dc.get('abc')
Expand Down
1 change: 0 additions & 1 deletion test/protocol/test_binary.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require 'ostruct'
require_relative '../helper'

describe Dalli::Protocol::Binary do
Expand Down