infopark_reactor 1.21.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reactor/attributes.rb +14 -8
- data/lib/reactor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c59bc733ec7b98e7ff693e9c805fbbc42294b68f
|
4
|
+
data.tar.gz: 0fc4bb0e96439f00513376932feae19ccec249c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92b243ad4e3c1820b802de109898e9f6f168bf7d2b33bc3874a15094eb01052822c494a65304b38a2cb02f72ed3263eac0c0eef8fdf53a6ad9014196b49b8326
|
7
|
+
data.tar.gz: ab24d89df2a1bd0418114ed9b5cd920107df60e4e153b28ff3448792eb2ad01faaafdab187a39375f04eb91af8434ed76f2f7232a47b9949f38caee4c36b735d
|
data/lib/reactor/attributes.rb
CHANGED
@@ -262,7 +262,7 @@ module Reactor
|
|
262
262
|
|
263
263
|
__track_dirty_attribute(key)
|
264
264
|
active_record_set(key, formated_value) if active_record_attr?(key)
|
265
|
-
rails_connector_set(key, formated_value)
|
265
|
+
rails_connector_set(key, formated_value, not_formated_value)
|
266
266
|
|
267
267
|
# return new value
|
268
268
|
__send__(key)
|
@@ -355,16 +355,22 @@ module Reactor
|
|
355
355
|
end
|
356
356
|
end
|
357
357
|
|
358
|
-
def rails_connector_set(field, value)
|
358
|
+
def rails_connector_set(field, value, supplied_value)
|
359
359
|
field = :blob if field.to_sym == :body
|
360
360
|
field = field.to_sym
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
# send(:attr_dict).send(:blob_dict)[field] = value
|
365
|
-
if cached_value?(field, value)
|
361
|
+
|
362
|
+
case attribute_type(field)
|
363
|
+
when :linklist
|
366
364
|
send(:attr_dict).instance_variable_get('@attr_cache')[field] = value
|
367
|
-
send(:attr_dict).send(:blob_dict)[field] = :
|
365
|
+
send(:attr_dict).send(:blob_dict)[field] = :special_linklist_handling_is_broken
|
366
|
+
when :date
|
367
|
+
if supplied_value.nil? || supplied_value.kind_of?(String)
|
368
|
+
parsed_value = Time.from_iso(value) rescue nil
|
369
|
+
else
|
370
|
+
parsed_value = supplied_value
|
371
|
+
end
|
372
|
+
send(:attr_dict).instance_variable_get('@attr_cache')[field] = parsed_value
|
373
|
+
send(:attr_dict).send(:blob_dict)[field] = value
|
368
374
|
else
|
369
375
|
send(:attr_dict).instance_variable_get('@attr_cache')[field] = nil
|
370
376
|
send(:attr_dict).send(:blob_dict)[field] = value
|
data/lib/reactor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Przedmojski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|