nvd_feed_api 0.2.0 → 0.2.1.yank

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
2
  SHA1:
3
- metadata.gz: 38ab69d805d125729995fc9ea26d79e0b324414f
4
- data.tar.gz: 7c9838e134a5f503d21979a5915db3cd9d9e823b
3
+ metadata.gz: 6787ce3cf4a7b489e422d52f0be48642ea091e60
4
+ data.tar.gz: 5e41fab281567c47a8323997f6b6ef4e5759320a
5
5
  SHA512:
6
- metadata.gz: eda8d75faf07c0189cf6fdf9bbea8296fce70f0aaf380e8af2a3af83d1216f6ae360319cd01e727659f4cac527cd284ac9e9555dfb1dc79f1982f93309940129
7
- data.tar.gz: eb9eb999eee1ef44b3b64de314f3fb37b0cc857df67a7ae580ed6f71ef51e827f3ec93de5b5fdfdd0205a0f280f6825e673a858e67248c9a684dc77a1342adea
6
+ metadata.gz: c30c2411484e44cd49878ff6396ca21cf9fb172ec095e2b48bd15ced3ba05d245df89917eceb10f6e00331794462898aa4b02f1f66241ba0e8886ed24beaf55a
7
+ data.tar.gz: 86eb79764eddc1d8ffdbf76f3f105d819c4482b64fedbedf597ac86ae54858c97cefc2155bf5fa3e0f267d1a6e0ceb5c0ead1036312e5b8318a0a5ac08f650ca
data/.gitlab-ci.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  # Official language image. Look for the different tagged releases at:
2
2
  # https://hub.docker.com/r/library/ruby/tags/
3
- image: ruby:2.4-alpine
4
3
 
5
4
  cache:
6
5
  paths:
@@ -17,18 +16,23 @@ before_script:
17
16
  - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
18
17
  - rake install # install the gem
19
18
 
20
- rubocop:
19
+ test:2.4:
21
20
  stage: test
21
+ image: ruby:2.4-alpine
22
22
  script:
23
23
  - rubocop
24
+ - rake test
24
25
 
25
- test:
26
+ test:2.5:
26
27
  stage: test
28
+ image: ruby:2.5-alpine
27
29
  script:
30
+ - rubocop
28
31
  - rake test
29
32
 
30
33
  pages:
31
34
  stage: deploy
35
+ image: ruby:2.4-alpine
32
36
  script:
33
37
  - yard doc
34
38
  - mkdir public
@@ -362,7 +362,7 @@ class NVDFeedScraper
362
362
  unless skip_download
363
363
  res = Net::HTTP.get_response(uri)
364
364
  raise "#{file_url} ended with #{res.code} #{res.message}" unless res.is_a?(Net::HTTPSuccess)
365
- open(destination_file, 'wb') do |file|
365
+ File.open(destination_file, 'wb') do |file|
366
366
  file.write(res.body)
367
367
  end
368
368
  end
@@ -1,3 +1,3 @@
1
1
  module NvdFeedApi
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1.yank'.freeze
3
3
  end
data/nvd_feed_api.gemspec CHANGED
@@ -1,4 +1,4 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'nvd_feed_api/version'
4
4
 
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = 'nvd_feed_api'
7
7
  s.version = NvdFeedApi::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.date = '2018-01-06'
9
+ s.date = '2018-05-02'
10
10
  s.summary = 'API for NVD CVE feeds'
11
11
  s.description = 'A simple API for NVD CVE feeds'
12
12
  s.authors = ['Alexandre ZANNI']
data/pages/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # [0.2.1] - 2 May 2018
2
+
3
+ [0.2.1]: https://gitlab.com/noraj/nvd_api/tags/v0.2.1
4
+
5
+ - Gitlab-CI: test vith ruby 2.4.x and 2.5.x
6
+ - style: fix Style/ExpandPathArguments cop
7
+ - security: fix Security/Open cop, protect from pipe command injection
8
+ - test: fix NVD URL after NVD changed it
9
+
1
10
  # [0.2.0] - 20 January 2018
2
11
 
3
12
  [0.2.0]: https://gitlab.com/noraj/nvd_api/tags/v0.2.0
@@ -109,9 +109,9 @@ class NVDAPITest < Minitest::Test
109
109
 
110
110
  def test_feed_attributes
111
111
  name = 'CVE-2010'
112
- meta_url = 'https://static.nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2010.meta'
113
- gz_url = 'https://static.nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2010.json.gz'
114
- zip_url = 'https://static.nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2010.json.zip'
112
+ meta_url = 'https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2010.meta'
113
+ gz_url = 'https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2010.json.gz'
114
+ zip_url = 'https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2010.json.zip'
115
115
  f = @s.feeds('CVE-2010')
116
116
  # Test name
117
117
  assert_instance_of(String, f.name, "name doesn't return a string")
@@ -240,25 +240,25 @@ class NVDAPITest < Minitest::Test
240
240
  end
241
241
 
242
242
  def test_meta_parse_noarg
243
- m = NVDFeedScraper::Meta.new('https://static.nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta')
243
+ m = NVDFeedScraper::Meta.new('https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta')
244
244
  assert_equal(0, m.parse, 'parse method return nothing')
245
245
  end
246
246
 
247
247
  def test_meta_parse_witharg
248
248
  m = NVDFeedScraper::Meta.new
249
- meta_url = 'https://static.nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta'
249
+ meta_url = 'https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta'
250
250
  assert_equal(0, m.parse(meta_url), 'parse method return nothing')
251
251
  end
252
252
 
253
253
  def test_meta_url_setter
254
254
  m = NVDFeedScraper::Meta.new
255
- meta_url = 'https://static.nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta'
255
+ meta_url = 'https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta'
256
256
  assert_equal(meta_url, m.url = meta_url, 'the meta URL is not set correctly')
257
257
  end
258
258
 
259
259
  def test_meta_attributes
260
260
  m = NVDFeedScraper::Meta.new
261
- meta_url = 'https://static.nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta'
261
+ meta_url = 'https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2015.meta'
262
262
  m.url = meta_url
263
263
  m.parse
264
264
  # Test gz_size
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nvd_feed_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1.yank
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre ZANNI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-06 00:00:00.000000000 Z
11
+ date: 2018-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: archive-zip
@@ -220,9 +220,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
220
  version: '2.4'
221
221
  required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  requirements:
223
- - - ">="
223
+ - - ">"
224
224
  - !ruby/object:Gem::Version
225
- version: '0'
225
+ version: 1.3.1
226
226
  requirements: []
227
227
  rubyforge_project:
228
228
  rubygems_version: 2.6.14