apiotics 0.1.59 → 0.1.60
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apiotics/extract.rb +8 -8
- 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: 19afe73f95e9a3a8925b9bba008780512e11eaa6
|
4
|
+
data.tar.gz: de2b1eede10faf5760b8685a6d514ae45019fd2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d8042034c6740e642776e703cbb82784c94085c62491aa786ae36f19d028eec7a4829a3065e2c0606761044a9d45c8df0cd9749a9ead2bd6548281eb47a1bab
|
7
|
+
data.tar.gz: 2edfad5f428e995af5a58f4fef85b28e94a5137354bd38c986d1fd1d18944c9689b295dc3a12f430033eefa44b285f9f80505845f4485aeaf80b09be45d3b03b
|
data/lib/apiotics/extract.rb
CHANGED
@@ -18,16 +18,16 @@ module Apiotics
|
|
18
18
|
interfaces.each do |k,v|
|
19
19
|
if Apiotics.configuration.parents[object.class.parent][object.class.demodulize][k] != nil
|
20
20
|
m = "#{object.class.parent}".underscore.gsub(" ","_").downcase
|
21
|
-
target_class = Apiotics.configuration.parents[object.class.parent][object.class.demodulize][k]["driver"].downcase.constantize
|
21
|
+
target_class = Apiotics.configuration.parents[object.class.parent.name][object.class.name.demodulize][k]["driver"].downcase.constantize
|
22
22
|
target = object.m.target_class
|
23
|
-
i = Apiotics.configuration.parents[object.class.parent][object.class.demodulize][k]["interface"].downcase.constantize
|
24
|
-
if Apiotics.configuration.parents[object.class.parent][object.class.demodulize][k].keys < 3
|
23
|
+
i = Apiotics.configuration.parents[object.class.parent.name][object.class.name.demodulize][k]["interface"].downcase.constantize
|
24
|
+
if Apiotics.configuration.parents[object.class.parent.name][object.class.name.demodulize][k].keys < 3
|
25
25
|
target.i = v
|
26
26
|
target.skip_extract = true
|
27
27
|
target.save
|
28
28
|
target.skip_extract = false
|
29
29
|
else
|
30
|
-
target.i = Apiotics.configuration.parents[object.class.parent][object.class.demodulize][k][v]
|
30
|
+
target.i = Apiotics.configuration.parents[object.class.parent.name][object.class.name.demodulize][k][v]
|
31
31
|
target.skip_extract = true
|
32
32
|
target.save
|
33
33
|
target.skip_extract = false
|
@@ -39,7 +39,7 @@ module Apiotics
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def self.is_target(object, k)
|
42
|
-
if Apiotics.configuration.targets[object.class.parent.
|
42
|
+
if Apiotics.configuration.targets[object.class.parent.name][object.class.name.demodulize.to_s].include?(k) || Apiotics.configuration.targets[object.class.parent.name][object.class.name.demodulize.to_s].include?(k.titleize)
|
43
43
|
return true
|
44
44
|
else
|
45
45
|
return false
|
@@ -58,9 +58,9 @@ module Apiotics
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def self.fire(object, interfaces, a, time0= nil, time1= nil)
|
61
|
-
if Apiotics.configuration.targets[object.class.parent.
|
62
|
-
k = "#{object.class.parent}::#{object.class.parent}".constantize
|
63
|
-
i = "#{object.class.parent}".underscore.gsub(" ","_").downcase + "_id"
|
61
|
+
if Apiotics.configuration.targets[object.class.parent.name] != nil
|
62
|
+
k = "#{object.class.parent.name}::#{object.class.parent.name}".constantize
|
63
|
+
i = "#{object.class.parent.name}".underscore.gsub(" ","_").downcase + "_id"
|
64
64
|
msg = {
|
65
65
|
"action" => a,
|
66
66
|
"instance" => k.find(object.send(i)).apiotics_instance,
|
data/lib/apiotics/version.rb
CHANGED