Updates rubocop dep

This commit is contained in:
erwanlr
2021-01-29 11:56:04 +01:00
parent f30255d6d8
commit fa3005f2b7
9 changed files with 11 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
require: rubocop-performance
AllCops:
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: 2.5
Exclude:
- '*.gemspec'

View File

@@ -39,7 +39,7 @@ module WPScan
output('@notice', msg: 'It seems like you have not updated the database for some time.')
print '[?] Do you want to update now? [Y]es [N]o, default: [N]'
/^y/i.match?(Readline.readline) ? true : false
/^y/i.match?(Readline.readline)
end
def update_db

View File

@@ -63,7 +63,7 @@ module WPScan
def webshot_enabled?
res = Browser.get(url, params: { webshot: 1, src: "http://#{default_allowed_domains.sample}" })
/WEBSHOT_ENABLED == true/.match?(res.body) ? false : true
!/WEBSHOT_ENABLED == true/.match?(res.body)
end
# @return [ Array<String> ] The default allowed domains (between the 2.0 and 2.8.13)

View File

@@ -7,7 +7,7 @@ describe WPScan::Controller::VulnApi do
before do
WPScan::ParsedCli.options = rspec_parsed_options(cli_args)
WPScan::DB::VulnApi.instance_variable_set(:'@default_request_params', nil)
WPScan::DB::VulnApi.instance_variable_set(:@default_request_params, nil)
end
describe '#cli_options' do

View File

@@ -172,7 +172,7 @@ describe WPScan::Model::Plugin do
after do
expect(plugin.vulnerabilities).to eq @expected
expect(plugin.vulnerable?).to eql @expected.empty? ? false : true
expect(plugin.vulnerable?).to eql !@expected.empty?
end
context 'when plugin not in the DB' do

View File

@@ -200,7 +200,7 @@ describe WPScan::Model::Theme do
after do
expect(theme.vulnerabilities).to eq @expected
expect(theme.vulnerable?).to eql @expected.empty? ? false : true
expect(theme.vulnerable?).to eql !@expected.empty?
end
context 'when theme not in the DB' do

View File

@@ -12,7 +12,7 @@ describe WPScan::DB::VulnApi do
before do
# Reset the default_request_params
api.instance_variable_set(:'@default_request_params', nil)
api.instance_variable_set(:@default_request_params, nil)
end
describe '#uri' do

View File

@@ -32,7 +32,7 @@ shared_examples 'App::Views::VulnApi' do
it 'outputs the expected string' do
@tpl_vars = tpl_vars.merge(
status: { 'success': true, 'plan' => 'free', 'requests_remaining' => 0 },
status: { success: true, 'plan' => 'free', 'requests_remaining' => 0 },
api_requests: 3
)
end
@@ -43,7 +43,7 @@ shared_examples 'App::Views::VulnApi' do
it 'outputs the expected string' do
@tpl_vars = tpl_vars.merge(
status: { 'success': true, 'plan' => 'paid', 'requests_remaining' => 120 },
status: { success: true, 'plan' => 'paid', 'requests_remaining' => 120 },
api_requests: 3
)
end
@@ -54,7 +54,7 @@ shared_examples 'App::Views::VulnApi' do
it 'outputs the expected string' do
@tpl_vars = tpl_vars.merge(
status: { 'success': true, 'plan' => 'enterprise', 'requests_remaining' => 'Unlimited' },
status: { success: true, 'plan' => 'enterprise', 'requests_remaining' => 'Unlimited' },
api_requests: 3
)
end

View File

@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'rspec', '~> 3.10.0'
s.add_development_dependency 'rspec-its', '~> 1.3.0'
s.add_development_dependency 'rubocop', '~> 1.8.0'
s.add_development_dependency 'rubocop', '~> 1.9.0'
s.add_development_dependency 'rubocop-performance', '~> 1.9.0'
s.add_development_dependency 'simplecov', '~> 0.21.0'
s.add_development_dependency 'simplecov-lcov', '~> 0.8.0'