active_tools 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2dcc05c30ee3fbc858b68fe489c4c217a85231a
|
4
|
+
data.tar.gz: f182069e6df8604eeebc27f515d36a1f26ad4950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2140f2895ff1324f6c118434fd541ab54815df4986284661dc17803829f3e1eeb6a8b38f15847de876837e1f213147f15a42830b8f9c0fe6afcff00a58eb6fc7
|
7
|
+
data.tar.gz: 3c01d62b41c620ac591e823905d789851b408e95ae76eb70d815d4e40a9a7baa463b03ef012c868640fac5bb56b236c394cb93071292c7f54e12c26854b04fe0
|
@@ -69,7 +69,7 @@ module ActiveTools
|
|
69
69
|
attributes(target, *@remote_attributes)
|
70
70
|
end
|
71
71
|
|
72
|
-
def try_update
|
72
|
+
def try_update
|
73
73
|
if updateable_backup?
|
74
74
|
begin
|
75
75
|
@backup.update(template_attributes)
|
@@ -84,8 +84,8 @@ module ActiveTools
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
def try_commit_existed
|
88
|
-
if @template.present? && @uniq_by.any? && (existed = detect_existed)
|
87
|
+
def try_commit_existed
|
88
|
+
if @template.present? && @uniq_by.any? && (existed = detect_existed)
|
89
89
|
self.target = existed
|
90
90
|
if updateable_backup?
|
91
91
|
@backup.mark_for_destruction
|
@@ -54,9 +54,9 @@ module ActiveTools
|
|
54
54
|
adapter_name = "#{assoc_name}_adaptive"
|
55
55
|
|
56
56
|
raise(TypeError, "Option :attributes must be a Hash. #{options[:attributes].class} passed!") unless options[:attributes].is_a?(Hash)
|
57
|
-
attr_map = options.delete(:attributes)
|
58
|
-
|
59
|
-
valid_with assoc_name, :attributes => attr_map#, :fit => true
|
57
|
+
attr_map = HashWithIndifferentAccess.new(options.delete(:attributes))
|
58
|
+
valid_options = HashWithIndifferentAccess.new(options.delete(:valid_with))
|
59
|
+
valid_with assoc_name, valid_options.merge(:attributes => attr_map) #, :fit => true
|
60
60
|
|
61
61
|
class_attribute :adaptive_options unless defined?(adaptive_options)
|
62
62
|
self.adaptive_options ||= {}
|
data/lib/active_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valery Kvon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|