apiotics 0.1.125 → 0.1.126
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apiotics/insert.rb +21 -19
- data/lib/apiotics/version.rb +1 -1
- 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: 75830b04fc7dba73c02aa47a90abedcb80f6548e
|
4
|
+
data.tar.gz: cf982b85792ab34e7fe8d0b77187d3c96510c13f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80ab700ddb6fc8e5324be89df9f9f49754c074047436d0a1c7613b98f12e02a8b8ef3ec3c44fa9b446d278adda67efa3a4dfdef06daa2920b6e4817fe80305d5
|
7
|
+
data.tar.gz: 18f1d3cd8cecb6b864f5454f0a49d64d8d43ef78ba5ffea75295d270fa90783282dcfef07f0fdbe5d72b0c447648f096c409c7a947e072f30e224ae226199cf8
|
data/lib/apiotics/insert.rb
CHANGED
@@ -15,27 +15,29 @@ module Apiotics
|
|
15
15
|
@timestamp = hash["timestamp"]
|
16
16
|
@status = hash["status"]
|
17
17
|
@valid = true
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
@
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
unless hash["error"] == nil
|
19
|
+
begin
|
20
|
+
find_record
|
21
|
+
@methods.each do |k,v|
|
22
|
+
@type = @record.class.columns_hash[k].type
|
23
|
+
#change_value
|
24
|
+
@record.send("#{k}=".to_sym, v)
|
25
|
+
unless Apiotics.configuration.reduced_metadata == true
|
26
|
+
@record.send(("#{k}_action=").to_sym, @action)
|
27
|
+
@record.send("#{k}_timestamp=".to_sym, @timestamp)
|
28
|
+
@record.send("#{k}_status=".to_sym, @status)
|
29
|
+
end
|
28
30
|
end
|
31
|
+
if @action == "set-complete"
|
32
|
+
set_complete
|
33
|
+
elsif @action == "set-request-ack"
|
34
|
+
set_ack
|
35
|
+
elsif @action == "get-ack"
|
36
|
+
get_ack
|
37
|
+
end
|
38
|
+
rescue
|
39
|
+
@valid = false
|
29
40
|
end
|
30
|
-
if @action == "set-complete"
|
31
|
-
set_complete
|
32
|
-
elsif @action == "set-request-ack"
|
33
|
-
set_ack
|
34
|
-
elsif @action == "get-ack"
|
35
|
-
get_ack
|
36
|
-
end
|
37
|
-
rescue
|
38
|
-
@valid = false
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
data/lib/apiotics/version.rb
CHANGED