shale 0.2.1 → 0.2.2
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -2
- data/lib/shale/type/composite.rb +2 -3
- data/lib/shale/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5907ba25342167fa8079e683c671f83f89b51777d0b27e8d0126ba404304c2bd
|
4
|
+
data.tar.gz: d88f5acb763a1aaa5f3ceff194613df16377107035cf2c5528bbda593a70b6fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 967646fcc21c1735acc67ad67b467013dae4da76c2e7cfc3a863b8bc811ae3fcee73cc3a99e1344ab0ea38ef03fed181ba14286666afc6e965399c8929de045a
|
7
|
+
data.tar.gz: bebfbda2bb8fab102ae8b70506cd3fad3e1b178c02ed0486576d2fb26ef5a98ac45a0f62d410888e95b40d9a21ace32c76da36e2a75151ce104c4764a98b1b68
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -40,7 +40,7 @@ end
|
|
40
40
|
class Person < Shale::Mapper
|
41
41
|
attribute :first_name, Shale::Type::String
|
42
42
|
attribute :last_name, Shale::Type::String
|
43
|
-
attribute :age, Shale::Type::
|
43
|
+
attribute :age, Shale::Type::Integer
|
44
44
|
attribute :married, Shale::Type::Boolean, default: -> { false }
|
45
45
|
attribute :hobbies, Shale::Type::String, collection: true
|
46
46
|
attribute :address, Address
|
@@ -291,7 +291,7 @@ end
|
|
291
291
|
class Person < Shale::Mapper
|
292
292
|
attribute :first_name, Shale::Type::String
|
293
293
|
attribute :last_name, Shale::Type::String
|
294
|
-
attribute :age, Shale::Type::
|
294
|
+
attribute :age, Shale::Type::Integer
|
295
295
|
attribute :hobbies, Shale::Type::String, collection: true
|
296
296
|
attribute :address, Address
|
297
297
|
|
data/lib/shale/type/composite.rb
CHANGED
@@ -234,10 +234,9 @@ module Shale
|
|
234
234
|
next unless attribute
|
235
235
|
|
236
236
|
value = instance.public_send(attribute.name)
|
237
|
+
next if value.nil?
|
237
238
|
|
238
|
-
|
239
|
-
doc.add_attribute(element, xml_attr, value)
|
240
|
-
end
|
239
|
+
doc.add_attribute(element, xml_attr, value)
|
241
240
|
end
|
242
241
|
end
|
243
242
|
|
data/lib/shale/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Giszczak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby object mapper and serializer for XML, JSON and YAML.
|
14
14
|
email:
|