yavdb 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f7756e8fbc8d584989454331f21dfb6767c55b09
4
- data.tar.gz: 9ae89dfb16c7dca2cea1c21b51ab104e5a8cefe5
2
+ SHA256:
3
+ metadata.gz: e8af50e09446ce3b10fc4ab040d61051d822580e08b4c115ac070a88e67cdfab
4
+ data.tar.gz: fdffb83c5bbd1f1aa8f4ae78e8c181d16ba11c76f40ac6d5665f379bc54c7741
5
5
  SHA512:
6
- metadata.gz: 6dc03d4d46b62f2f0daacb3a7a1fad2d7bd12c2ef7b3c916e00f86401085709ad0a3952c910b508f53fef8fdbca09cc73955064fb40499ac03e8340f8b8de007
7
- data.tar.gz: 96a2687468ebf390ff5ba3236a66973adccdd4ffb245ec7a1f9b7e105082dec3466cb50dbb203435ddfe2fabb839a906aa71f4e817e4106de1017c0a462ae572
6
+ metadata.gz: bef0e177ea672587d23ea447324d33c783bd0467976406b596b088a5356698874af77d196ccadbd564aa5faa0b5dad649622cd0f52d1fdb85fa1e9796cefd4f2
7
+ data.tar.gz: f17925ffe91e7ef516d79798ebd54e6a6cfd725a0758b32f253af2a000e909c69d6711d7fd2125a0a9b7a5d3950f03a8f1cf587df6ad89d1a4c9f006743c7d8b
data/.circleci/config.yml CHANGED
@@ -4,7 +4,7 @@ jobs:
4
4
  build-lint-test:
5
5
  working_directory: ~/yavdb
6
6
  docker:
7
- - image: circleci/ruby:2.3.7
7
+ - image: circleci/ruby:2.5.5
8
8
  steps:
9
9
  - checkout
10
10
 
data/.rubocop.yml CHANGED
@@ -57,7 +57,7 @@ AllCops:
57
57
  DefaultFormatter: progress
58
58
  UseCache: false
59
59
  DisplayCopNames: false
60
- TargetRubyVersion: 2.3.7
60
+ TargetRubyVersion: 2.5.5
61
61
 
62
62
  Gemspec/OrderedDependencies:
63
63
  Enabled: true
@@ -94,18 +94,18 @@ Layout/EmptyLinesAroundModuleBody:
94
94
  Layout/ExtraSpacing:
95
95
  Enabled: true
96
96
 
97
- Layout/FirstParameterIndentation:
97
+ Layout/IndentFirstArgument:
98
98
  Enabled: true
99
99
  EnforcedStyle: consistent
100
100
  IndentationWidth: 2
101
101
 
102
- Layout/IndentArray:
102
+ Layout/IndentFirstArrayElement:
103
103
  Enabled: true
104
104
 
105
105
  Layout/IndentAssignment:
106
106
  Enabled: true
107
107
 
108
- Layout/IndentHash:
108
+ Layout/IndentFirstHashElement:
109
109
  Enabled: true
110
110
 
111
111
  Layout/MultilineHashBraceLayout:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.7
1
+ 2.5.5
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yavdb (0.5.1)
5
- execjs (~> 2.7.0)
6
- json (~> 2.1)
7
- kramdown (~> 1.17)
4
+ yavdb (0.5.2)
5
+ execjs (~> 2.7)
6
+ json (~> 2.2)
7
+ kramdown (~> 2.1)
8
8
  oga (~> 2.15)
9
9
  semantic_interval (~> 0.1)
10
10
  therubyracer (~> 0.12)
@@ -16,23 +16,46 @@ GEM
16
16
  specs:
17
17
  ansi (1.5.0)
18
18
  ast (2.4.0)
19
+ bibliothecary (6.6.0)
20
+ commander
21
+ deb_control
22
+ librariesio-gem-parser
23
+ ox (>= 2.8.1)
24
+ sdl4r
25
+ toml-rb (~> 1.0)
26
+ typhoeus
19
27
  citrus (3.0.2)
20
28
  codacy-coverage (2.1.0)
21
29
  simplecov
30
+ colorize (0.8.1)
31
+ commander (4.4.7)
32
+ highline (~> 2.0.0)
33
+ deb_control (0.0.1)
34
+ dependency_spy (0.4.1)
35
+ bibliothecary (~> 6.6)
36
+ colorize (= 0.8.1)
37
+ semantic_range (~> 2.2)
38
+ thor (~> 0.20)
39
+ yavdb (~> 0.5)
22
40
  diff-lcs (1.3)
23
41
  docile (1.3.1)
42
+ ethon (0.12.0)
43
+ ffi (>= 1.3.0)
24
44
  execjs (2.7.0)
45
+ ffi (1.11.0)
46
+ highline (2.0.2)
25
47
  jaro_winkler (1.5.2)
26
- json (2.1.0)
27
- kramdown (1.17.0)
28
- libv8 (3.16.14.19-x86_64-linux)
48
+ json (2.2.0)
49
+ kramdown (2.1.0)
50
+ librariesio-gem-parser (1.0.0)
51
+ libv8 (3.16.14.19)
29
52
  oga (2.15)
30
53
  ast
31
54
  ruby-ll (~> 2.1)
32
- parallel (1.13.0)
33
- parser (2.6.0.0)
55
+ ox (2.10.0)
56
+ parallel (1.17.0)
57
+ parser (2.6.3.0)
34
58
  ast (~> 2.4.0)
35
- powerpack (0.1.2)
36
59
  rainbow (3.0.0)
37
60
  rake (12.3.2)
38
61
  ref (2.0.0)
@@ -42,7 +65,7 @@ GEM
42
65
  rspec-mocks (~> 3.8.0)
43
66
  rspec-core (3.8.0)
44
67
  rspec-support (~> 3.8.0)
45
- rspec-expectations (3.8.2)
68
+ rspec-expectations (3.8.3)
46
69
  diff-lcs (>= 1.2.0, < 2.0)
47
70
  rspec-support (~> 3.8.0)
48
71
  rspec-mocks (3.8.0)
@@ -51,21 +74,22 @@ GEM
51
74
  rspec-support (3.8.0)
52
75
  rspec_junit_formatter (0.4.1)
53
76
  rspec-core (>= 2, < 4, != 2.12.0)
54
- rubocop (0.64.0)
77
+ rubocop (0.69.0)
55
78
  jaro_winkler (~> 1.5.1)
56
79
  parallel (~> 1.10)
57
- parser (>= 2.5, != 2.5.1.1)
58
- powerpack (~> 0.1)
80
+ parser (>= 2.6)
59
81
  rainbow (>= 2.2.2, < 4.0)
60
82
  ruby-progressbar (~> 1.7)
61
- unicode-display_width (~> 1.4.0)
62
- rubocop-rspec (1.32.0)
83
+ unicode-display_width (>= 1.4.0, < 1.7)
84
+ rubocop-rspec (1.33.0)
63
85
  rubocop (>= 0.60.0)
64
86
  ruby-ll (2.1.2)
65
87
  ansi
66
88
  ast
67
89
  ruby-progressbar (1.10.0)
90
+ sdl4r (0.9.11)
68
91
  semantic_interval (0.1.0)
92
+ semantic_range (2.2.1)
69
93
  simplecov (0.16.1)
70
94
  docile (~> 1.1)
71
95
  json (>= 1.8, < 3)
@@ -77,18 +101,21 @@ GEM
77
101
  thor (0.20.3)
78
102
  toml-rb (1.1.2)
79
103
  citrus (~> 3.0, > 3.0)
80
- unicode-display_width (1.4.1)
104
+ typhoeus (1.3.1)
105
+ ethon (>= 0.9.0)
106
+ unicode-display_width (1.6.0)
81
107
 
82
108
  PLATFORMS
83
109
  ruby
84
110
 
85
111
  DEPENDENCIES
86
112
  codacy-coverage
113
+ dependency_spy (~> 0.4)
87
114
  rake (~> 12.3)
88
115
  rspec (~> 3.8)
89
116
  rspec_junit_formatter (~> 0.4)
90
- rubocop (~> 0.59)
91
- rubocop-rspec (~> 1.29)
117
+ rubocop (~> 0.69)
118
+ rubocop-rspec (~> 1.33)
92
119
  simplecov
93
120
  yavdb!
94
121
 
@@ -17,7 +17,7 @@
17
17
  module YAVDB
18
18
  module Constants
19
19
 
20
- DEBUG = ENV['debug'].freeze
20
+ DEBUG = ENV['debug']
21
21
 
22
22
  YAVDB_DB_URL = 'https://github.com/rtfpessoa/yavdb.git'
23
23
  YAVDB_DB_BRANCH = 'database'
@@ -51,12 +51,14 @@ module YAVDB
51
51
 
52
52
  vuln_id = "rustsec:cargo:#{advisory_hash['package']}:#{advisory_hash['id']}"
53
53
 
54
+ vulnerable_versions = (['*'] if (advisory_hash['unaffected_versions'].nil? || advisory_hash['unaffected_versions'].empty?) && (advisory_hash['patched_versions'].nil? || advisory_hash['patched_versions'].empty?))
55
+
54
56
  YAVDB::Advisory.new(
55
57
  vuln_id,
56
58
  advisory_hash['title'],
57
59
  advisory_hash['description'],
58
60
  advisory_hash['package'],
59
- nil,
61
+ vulnerable_versions,
60
62
  advisory_hash['unaffected_versions'],
61
63
  advisory_hash['patched_versions'],
62
64
  severity,
@@ -52,8 +52,8 @@ module YAVDB
52
52
  else
53
53
  response.body.lines
54
54
  end
55
- rescue StandardError => exception
56
- raise exception if retries.zero?
55
+ rescue StandardError => e
56
+ raise e if retries.zero?
57
57
 
58
58
  puts "Going to retry #{url}"
59
59
  retries -= 1
data/lib/yavdb/version.rb CHANGED
@@ -16,6 +16,6 @@
16
16
 
17
17
  module YAVDB
18
18
 
19
- VERSION = '0.5.1'
19
+ VERSION = '0.5.2'
20
20
 
21
21
  end
data/yavdb.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = ['yavdb', 'vulndb', 'vulnerabilitydb']
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.required_ruby_version = '>= 2.3.7'
24
+ spec.required_ruby_version = '>= 2.5.5'
25
25
 
26
26
  # Development
27
27
  spec.add_development_dependency 'codacy-coverage'
@@ -31,13 +31,14 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency 'simplecov'
32
32
 
33
33
  # Linters
34
- spec.add_development_dependency 'rubocop', ['~> 0.59']
35
- spec.add_development_dependency 'rubocop-rspec', ['~> 1.29']
34
+ spec.add_development_dependency 'dependency_spy', ['~> 0.4']
35
+ spec.add_development_dependency 'rubocop', ['~> 0.69']
36
+ spec.add_development_dependency 'rubocop-rspec', ['~> 1.33']
36
37
 
37
38
  # Runtime
38
- spec.add_runtime_dependency 'execjs', ['~> 2.7.0']
39
- spec.add_runtime_dependency 'json', ['~> 2.1']
40
- spec.add_runtime_dependency 'kramdown', ['~> 1.17']
39
+ spec.add_runtime_dependency 'execjs', ['~> 2.7']
40
+ spec.add_runtime_dependency 'json', ['~> 2.2']
41
+ spec.add_runtime_dependency 'kramdown', ['~> 2.1']
41
42
  spec.add_runtime_dependency 'oga', ['~> 2.15']
42
43
  spec.add_runtime_dependency 'semantic_interval', ['~> 0.1']
43
44
  spec.add_runtime_dependency 'therubyracer', ['~> 0.12']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yavdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Fernandes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-04 00:00:00.000000000 Z
11
+ date: 2019-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codacy-coverage
@@ -80,76 +80,90 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: dependency_spy
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.4'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.4'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rubocop
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0.59'
103
+ version: '0.69'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0.59'
110
+ version: '0.69'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rubocop-rspec
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '1.29'
117
+ version: '1.33'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '1.29'
124
+ version: '1.33'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: execjs
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: 2.7.0
131
+ version: '2.7'
118
132
  type: :runtime
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: 2.7.0
138
+ version: '2.7'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: json
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: '2.1'
145
+ version: '2.2'
132
146
  type: :runtime
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: '2.1'
152
+ version: '2.2'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: kramdown
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - "~>"
144
158
  - !ruby/object:Gem::Version
145
- version: '1.17'
159
+ version: '2.1'
146
160
  type: :runtime
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - "~>"
151
165
  - !ruby/object:Gem::Version
152
- version: '1.17'
166
+ version: '2.1'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: oga
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -280,7 +294,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
280
294
  requirements:
281
295
  - - ">="
282
296
  - !ruby/object:Gem::Version
283
- version: 2.3.7
297
+ version: 2.5.5
284
298
  required_rubygems_version: !ruby/object:Gem::Requirement
285
299
  requirements:
286
300
  - - ">="
@@ -288,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
302
  version: '0'
289
303
  requirements: []
290
304
  rubyforge_project:
291
- rubygems_version: 2.5.2.3
305
+ rubygems_version: 2.7.6.2
292
306
  signing_key:
293
307
  specification_version: 4
294
308
  summary: The Free and Open Source vulnerability database.