memento 0.5.0 → 0.5.1

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
  SHA256:
3
- metadata.gz: 0ffb4f13c2e20305cc1278a65fddde559e090748407cf824316e65aa23ff2c7e
4
- data.tar.gz: 60c42b17605cf297072f936f096f7d7cc539252338df1cf44d84a4cf87cb32ec
3
+ metadata.gz: 5f5e3eb83ff1fee7c5da0653d76fc14c4731c6d9b3a5550fe88af05f925513c4
4
+ data.tar.gz: 9e973c84abc2ca42f51328892eafb7e699e8a28dd26d8dfe1f9d55532a8d16fe
5
5
  SHA512:
6
- metadata.gz: 50c98b769d00c6433da06824e1f9d46e17b9a5011d896dee58c9b973bbb3b3369cf133d4fac829ee666f98b41c6b05088d139246cb14b45cd5b5a30c54f6a6e1
7
- data.tar.gz: 04f573dd73bbdf067882ce76bde3e3e745918d3ec14676cabbe3a197d9921239faede0823104f77f4eacfb6a881d1d4f3092ec13871b7cdaa0316cf9096cab2e
6
+ metadata.gz: 0cfb199898af2ba779e3d916cc2d23933d3b7486f80da14fe608dcb917c2bb2377e0827c20c4ca2a26d4c019b2b951205c38bdb5a5b8c145affca4838393dd49
7
+ data.tar.gz: 6f762712363b8235ce24e55496d55dc7bc317eee4132e9cb1678dce53ff57de6f63987608fd014d985ede85f1f0f693b5610f7bd65aa1a1f050b44ad66885e1d
data/CHANGES.md CHANGED
@@ -1,6 +1,11 @@
1
1
  ### dev
2
2
 
3
- [full changelog](http://github.com/yolk/valvat/compare/v0.5.0...master)
3
+ [full changelog](http://github.com/yolk/valvat/compare/v0.5.1...master)
4
+
5
+ ### 0.5.0 / 2019-07-04
6
+ [full changelog](http://github.com/yolk/valvat/compare/v0.5.0...v0.5.1)
7
+
8
+ * Check attribute_without_formatting method for current value
4
9
 
5
10
  ### 0.5.0 / 2019-06-13
6
11
  [full changelog](http://github.com/yolk/valvat/compare/v0.4.3...v0.5.0)
@@ -34,7 +34,9 @@ module Memento
34
34
  record_data.all? do |attribute, values|
35
35
  # ugly fix to compare times
36
36
  values = values.map{|v| v.is_a?(Time) ? v.to_s(:db) : v }
37
- current_value = record.send(:"#{attribute}")
37
+ current_value = record.respond_to?(:"#{attribute}_without_formatting") ?
38
+ record.send(:"#{attribute}_without_formatting") :
39
+ record.send(:"#{attribute}")
38
40
  current_value = current_value.utc.to_s(:db) if current_value.is_a?(Time)
39
41
  values.include?(current_value) || (current_value.is_a?(String) && values.include?(current_value.gsub(/\r\n/, "\n")))
40
42
  end || record_data.size.zero?
@@ -1,3 +1,3 @@
1
1
  module Memento
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memento
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yolk Sebastian Munz & Julia Soergel GbR
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-13 00:00:00.000000000 Z
11
+ date: 2019-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord