tainbox 2.1.0 → 2.1.1

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: c6c7d2f828d08390d1a8190b447beeef3d4382e4
4
- data.tar.gz: '07296a7790ec0f77824377574f15f749c9b11acb'
3
+ metadata.gz: 245ea23761652bb1c160bfc33df82a51cf15845f
4
+ data.tar.gz: 0eea24024053d344f9654790f28229bec64343c0
5
5
  SHA512:
6
- metadata.gz: '08d34d82657a406d1c3543dda0152f40dfce57b8f2e7d21367ce6b5996b1b48940cd6b05f6986f29b5401170e40e343ba32f4d0a646f45565eb2a6d0c00959b3'
7
- data.tar.gz: e279554e774bce99cc93ab49810054e72cea642a0ec82e95f49d21edc3a3c75e2ee26d06cc5a194009f575e70762be80afd65b8a6a4f32b5da51d9361b388f3f
6
+ metadata.gz: 979d7fa9ca3395715056afd3203c487a7d73bdfc12d169edbc40d9db363be33301111ee144026f3b5902bbae34f1bdbc94500a0c070c304506911d9772c14c25
7
+ data.tar.gz: 38c26110955e5f0f9330164107097640f21ecb7451fdea244af5035e13af2927121cec561aea759acf9b44443f7698d27cbb273a6bfd728e0fb22e79b5be761a
data/CHANGELOG.md CHANGED
@@ -46,3 +46,11 @@ avoid automatic casting from double star parameters
46
46
 
47
47
  * Replace `readonly` and `writeonly` options with `reader` and `writer` options for better
48
48
  semantics
49
+
50
+ ## 2.1.0
51
+
52
+ * Add `patch_attributes` method
53
+
54
+ ## 2.1.1
55
+
56
+ * Fix `Time` converter
data/README.md CHANGED
@@ -25,8 +25,8 @@ person.attributes = {}
25
25
  person.attributes # => { :name => "person_20", :age => 20 }
26
26
  ```
27
27
 
28
- *NOTE* There are two ways to change attributes in bulk. attributes= replaces missing values
29
- with nils or default values, while patch_attributes leaves missing attributes untouched.
28
+ **NOTE**: There are two ways to change attributes in bulk. `attributes=` replaces missing values
29
+ with nils or default values, while `patch_attributes` leaves missing attributes untouched.
30
30
 
31
31
  ## But what's wrong with Virtus?
32
32
 
@@ -59,7 +59,7 @@ Tainbox.define_converter(Symbol) do
59
59
  end
60
60
 
61
61
  Tainbox.define_converter(Time) do
62
- value.is_a?(Time) ? value : (Time.zone.parse(value) rescue nil)
62
+ value.is_a?(Time) ? value : (Time.zone.parse(value.to_s) rescue nil)
63
63
  end
64
64
 
65
65
  Tainbox.define_converter(:Boolean) do
@@ -1,3 +1,3 @@
1
1
  module Tainbox
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tainbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Gubitskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-17 00:00:00.000000000 Z
11
+ date: 2018-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport