Commit c8e53c8

mo khan <mo.khan@gmail.com>
2020-04-19 15:55:45
Fix bug with iterating through nuget packages
1 parent 15eb7d5
lib/spandx/dotnet/nuget_gateway.rb
@@ -78,7 +78,7 @@ module Spandx
       end
 
       def items_from(page)
-        page['items'].sort_by { |x| x['commitTimeStamp'] }
+        page.fetch('items', []).sort_by { |x| x['commitTimeStamp'] }
       end
 
       def page_number_from(url)
lib/spandx/version.rb
@@ -1,5 +1,5 @@
 # frozen_string_literal: true
 
 module Spandx
-  VERSION = '0.12.2'
+  VERSION = '0.12.3'
 end
lib/spandx.rb
@@ -3,7 +3,6 @@
 require 'addressable/uri'
 require 'bundler'
 require 'csv'
-require 'etc'
 require 'forwardable'
 require 'json'
 require 'logger'
CHANGELOG.md
@@ -1,4 +1,4 @@
-Version 0.12.2
+Version 0.12.3
 
 # Changelog
 
@@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+
+## [0.12.3] - 2020-04-19
+### Fixed
+- Ignore nuget entries with missing `items`.
+- Remove require `etc`.
+
 ## [0.12.2] - 2020-04-18
 ### Fixed
 - Insert entries with unknown license into cache instead of one large dead letter file that is too big to commit to git.
Gemfile.lock
@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    spandx (0.12.2)
+    spandx (0.12.3)
       addressable (~> 2.7)
       bundler (>= 1.16, < 3.0.0)
       net-hippie (~> 0.3)