csv_pirate 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 2
4
4
  :minor: 1
data/csv_pirate.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{csv_pirate}
8
- s.version = "2.1.1"
8
+ s.version = "2.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Peter Boling"]
data/lib/csv_pirate.rb CHANGED
@@ -301,14 +301,16 @@ class CsvPirate
301
301
  def self.marlinespike(spoils, navigation)
302
302
  navigation.map do |east,west|
303
303
  spoils = spoils.send(east.to_sym)
304
- if west.is_a?(Hash)
305
- # Recursive nadness is here!
306
- spoils = CsvPirate.marlinespike(spoils, west)
307
- else
308
- spoils = spoils.send(west.to_sym)
304
+ unless spoils.nil?
305
+ if west.is_a?(Hash)
306
+ # Recursive nadness is here!
307
+ spoils = CsvPirate.marlinespike(spoils, west)
308
+ else
309
+ spoils = spoils.send(west.to_sym)
310
+ end
309
311
  end
310
312
  spoils
311
- end.join(' - ')
313
+ end.compact.join(' - ')
312
314
  end
313
315
 
314
316
  # Used to read any loot found by any pirate
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_pirate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling