flounder 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/flounder.gemspec +1 -1
- data/lib/flounder/entity.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c24fd44d83971c04ab5af008256caa682550c92a
|
4
|
+
data.tar.gz: d75714297696317a7156d0f6f6ca74c6b5541ef8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b45f93c33f514e6bdf2bc6fe1725cac663041814b6ed25fd3b82a749936fd9ec7ad737d41f2a0f26111fda23b0a9fb243ca1ebc8a81e8ac587dd95924d261e8
|
7
|
+
data.tar.gz: 5986acd3c19b5f836f02ac790e48a6ab1ee805b69a567a5c686f08a67b85b9cd89cec6afce452f005a797cf8165bc92c2f71a58ecc69e1261481161aacd6286f
|
data/flounder.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "flounder"
|
5
|
-
s.version = '0.6.
|
5
|
+
s.version = '0.6.1'
|
6
6
|
s.summary = "Flounder is a way to write SQL simply in Ruby. It deals with everything BUT object relational mapping. "
|
7
7
|
s.email = "kaspar.schiess@technologyastronauts.ch"
|
8
8
|
s.homepage = "https://bitbucket.org/technologyastronauts/laboratory_flounder"
|
data/lib/flounder/entity.rb
CHANGED
@@ -63,12 +63,12 @@ module Flounder
|
|
63
63
|
# Not sure yet where the right level of abstraction is to
|
64
64
|
# insert START TRANSACTION/COMMIT TRANSACTION.
|
65
65
|
#
|
66
|
-
def insdate fields, hash, &
|
66
|
+
def insdate fields, hash, &inserted
|
67
67
|
found = where(hash.select { |k, _| fields.include?(k) }).first
|
68
68
|
if found
|
69
69
|
update(hash).where(:id => hash.delete(:id))
|
70
70
|
else
|
71
|
-
insert(hash, &
|
71
|
+
insert(hash, &inserted)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|