infopark_reactor 1.21.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f35e35f0ecfa2b74de999bafe9d0ee45cfd0bd81
4
- data.tar.gz: 05052d21962fab3f8a00a0ba3e77bfa8c9ec0e01
3
+ metadata.gz: c59bc733ec7b98e7ff693e9c805fbbc42294b68f
4
+ data.tar.gz: 0fc4bb0e96439f00513376932feae19ccec249c2
5
5
  SHA512:
6
- metadata.gz: bcb9564641d388d23dfaa8ac34027d53eb2a0ecaa1ec53817d9102adba25b0d838b5e772ba20b66b3a418802a756a8d65707d490e7364f97d0afbd8cf218cab3
7
- data.tar.gz: 10e2af5abdb3cf1d797c02c2dc9a0084105305c724790c7d33b3b12c12f2a85459dacdc1aeef9cc4a9c2710bc453e53802caf97dc62335b9919ce447a353b4a4
6
+ metadata.gz: 92b243ad4e3c1820b802de109898e9f6f168bf7d2b33bc3874a15094eb01052822c494a65304b38a2cb02f72ed3263eac0c0eef8fdf53a6ad9014196b49b8326
7
+ data.tar.gz: ab24d89df2a1bd0418114ed9b5cd920107df60e4e153b28ff3448792eb2ad01faaafdab187a39375f04eb91af8434ed76f2f7232a47b9949f38caee4c36b735d
@@ -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
- # invalidate RC attribute cache
362
- # send(:attr_dict).instance_variable_get('@attr_cache')[field] = nil
363
- # # set new value for attr_dict
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] = :dirt_hack
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
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Reactor
3
- VERSION = "1.21.0"
3
+ VERSION = "1.22.0"
4
4
  end
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.21.0
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-05-23 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails