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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/tainbox/type_converter.rb +1 -1
- data/lib/tainbox/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: 245ea23761652bb1c160bfc33df82a51cf15845f
|
4
|
+
data.tar.gz: 0eea24024053d344f9654790f28229bec64343c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/tainbox/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|