Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Wininger <fw.centrale@gmail.com>
  • Loading branch information
fwininger committed Dec 12, 2017
1 parent e8919cf commit 975e14e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 39 deletions.
33 changes: 9 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,20 @@ PATH
remote: .
specs:
openvas (0.1.0)
nokogiri
nokogiri (~> 1.8)

GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
ast (2.3.0)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
docile (1.1.5)
hashdiff (0.3.7)
json (2.1.0)
mini_portile2 (2.3.0)
nokogiri (1.8.1)
Expand All @@ -29,9 +24,7 @@ GEM
parser (2.4.0.2)
ast (~> 2.3)
powerpack (0.1.1)
public_suffix (3.0.1)
rainbow (2.2.2)
rake
rainbow (3.0.0)
rake (12.3.0)
rspec (3.7.0)
rspec-core (~> 3.7.0)
Expand All @@ -46,15 +39,14 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rubocop (0.51.0)
rubocop (0.52.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
parser (>= 2.4.0.2, < 3.0)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 3.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
safe_yaml (1.0.4)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
Expand All @@ -65,24 +57,17 @@ GEM
thor (0.19.4)
tins (1.16.3)
unicode-display_width (1.3.0)
vcr (4.0.0)
webmock (3.1.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff

PLATFORMS
ruby

DEPENDENCIES
bundler
bundler (~> 1.16)
coveralls
openvas!
rake
rspec
rubocop
vcr
webmock
rake (~> 12.3)
rspec (~> 3.7)
rubocop (~> 0.52)

BUNDLED WITH
1.16.0
2 changes: 1 addition & 1 deletion lib/openvas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
require 'openvas/results'

module Openvas
extend self
module_function

def configure
block_given? ? yield(Config) : Config
Expand Down
8 changes: 2 additions & 6 deletions lib/openvas/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ class QueryError < StandardError; end
# Connect the websocket
def self.connect
# Retrieve URI
unless Openvas::Config.url
raise InvalidUrlConfigError, 'Please Configure the client before'
end
raise InvalidUrlConfigError, 'Please Configure the client before' unless Openvas::Config.url

uri = URI.parse(Openvas::Config.url)

Expand Down Expand Up @@ -45,9 +43,7 @@ def self.version
def self.query(data)
res = Nokogiri::XML(send_receive(data.to_xml))

unless res.at_xpath('//@status')&.value == '200'
raise QueryError 'Unknown query error'
end
raise QueryError 'Unknown query error' unless res.at_xpath('//@status')&.value == '200'

res
end
Expand Down
2 changes: 1 addition & 1 deletion lib/openvas/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Openvas
module Config
class RequiredOptionMissing < RuntimeError; end
extend self
module_function

attr_accessor :url, :username, :password, :socket
end
Expand Down
12 changes: 5 additions & 7 deletions openvas.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ Gem::Specification.new do |s|
# s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.test_files = s.files.grep(%r{^(test|spec|features)/})

s.add_dependency 'nokogiri'
s.add_dependency 'nokogiri', '~> 1.8'

s.add_development_dependency 'bundler'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rubocop'
s.add_development_dependency 'vcr'
s.add_development_dependency 'webmock'
s.add_development_dependency 'bundler', '~> 1.16'
s.add_development_dependency 'rake', '~> 12.3'
s.add_development_dependency 'rspec', '~> 3.7'
s.add_development_dependency 'rubocop', '~> 0.52'
end

0 comments on commit 975e14e

Please sign in to comment.