1
0
mirror of https://github.com/cmur2/dyndnsd.git synced 2025-06-26 02:30:22 +02:00

gem: fix applicable rubocop todos

This commit is contained in:
cn
2018-02-23 12:54:43 +01:00
parent 9a7c20babb
commit 21857959b5
14 changed files with 142 additions and 401 deletions

View File

@ -20,9 +20,9 @@ describe Dyndnsd::Daemon do
updater = Dyndnsd::Updater::Dummy.new
daemon = Dyndnsd::Daemon.new(config, db, updater)
app = Rack::Auth::Basic.new(daemon, "DynDNS", &daemon.method(:is_authorized?))
app = Rack::Auth::Basic.new(daemon, 'DynDNS', &daemon.method(:authorized?))
app = Dyndnsd::Responder::DynDNSStyle.new(app)
Dyndnsd::Responder::DynDNSStyle.new(app)
end
it 'requires authentication' do
@ -189,7 +189,7 @@ describe Dyndnsd::Daemon do
get '/nic/update?hostname=foo.example.org&myip=1.2.3.4&myip6=2001:db8::1'
expect(last_response).to be_ok
expect(last_response.body).to eq("good 1.2.3.4 2001:db8::1")
expect(last_response.body).to eq('good 1.2.3.4 2001:db8::1')
get '/nic/update?hostname=foo.example.org&myip=BROKENIP&myip6=2001:db8::1'
expect(last_response).to be_ok

View File

@ -4,7 +4,7 @@ require 'forwardable'
module Dyndnsd
class DummyDatabase
extend Forwardable
def_delegators :@db, :[], :[]=, :each, :has_key?
def initialize(db_init)
@ -25,5 +25,3 @@ module Dyndnsd
end
end
end