csv_pirate 4.0.2 → 4.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ Version 4.0.4 2010-01-18
2
+ - Fixed bug with find_or_create param to to_memory
3
+
4
+ Version 4.0.3 2010-01-18
5
+ - Fixed typos in new to_memory method
6
+
1
7
  Version 4.0.2 2010-01-18
2
8
  - Improving to_memory method on CsvPirate
3
9
  - Improving raise_anchor method on PirateShip
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 2
2
+ :patch: 3
3
3
  :major: 4
4
4
  :minor: 0
5
5
  :build:
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 = "4.0.2"
8
+ s.version = "4.0.3"
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
@@ -351,10 +351,10 @@ class CsvPirate
351
351
  end
352
352
  buccaneers << obj
353
353
  elsif permanence[:find_or_create]
354
- obj = self.grub.send("find_by_#{permanence[:find_or_create].join('_and_')}".to_sym)
355
- buccaneers << obj || self.grub.create(data_hash)
354
+ obj = self.grub.send("find_by_#{permanence[:find_or_create].join('_and_')}".to_sym) || self.grub.create(data_hash)
355
+ buccaneers << obj
356
356
  elsif permanence[:update_or_new]
357
- obj = self.grub.send("find_by_#{permanence[:find_or_new].join('_and_')}".to_sym)
357
+ obj = self.grub.send("find_by_#{permanence[:update_or_new].join('_and_')}".to_sym)
358
358
  if obj.nil?
359
359
  obj = self.grub.new(data_hash)
360
360
  else
@@ -365,7 +365,7 @@ class CsvPirate
365
365
  end
366
366
  buccaneers << obj
367
367
  elsif permanence[:update_or_save]
368
- obj = self.grub.send("find_by_#{permanence[:find_or_new].join('_and_')}".to_sym)
368
+ obj = self.grub.send("find_by_#{permanence[:update_or_save].join('_and_')}".to_sym)
369
369
  if obj.nil?
370
370
  obj = self.grub.new(data_hash)
371
371
  obj.save(false)
@@ -377,7 +377,7 @@ class CsvPirate
377
377
  end
378
378
  buccaneers << obj
379
379
  elsif permanence[:update_or_create]
380
- obj = self.grub.send("find_by_#{permanence[:find_or_new].join('_and_')}".to_sym)
380
+ obj = self.grub.send("find_by_#{permanence[:update_or_create].join('_and_')}".to_sym)
381
381
  if obj.nil?
382
382
  obj = self.grub.create(data_hash)
383
383
  else
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: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling