duck_record 0.0.24 → 0.0.25

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: cabf3726f7d003f3207bd5da1a536d1a4cc4b0ea
4
- data.tar.gz: 61604634b3ae7ad953172a00d190012a37c430a0
3
+ metadata.gz: 2d19663344eb4aa892dd369cda75cc59da67b7e3
4
+ data.tar.gz: 188bf00418075e218d1ec4df018c1bd46a694a8e
5
5
  SHA512:
6
- metadata.gz: 6a3e6595e975d36d0e70e162b1b986e564831f8b42240c1d9e09a164518bb7ee32ccbd4acf95d89370a0e29f89ed4ef598c5369f9d48ecc45e9ff42798e774be
7
- data.tar.gz: b868f9688ce9fbabdd37ea6069f4636a5fa31f68eda6684d0072ad4b2dd2d51970a4664c0f5e3e7f6728bd7a57e5918dac4f1c0110c19b1f8f6bb89ca074b4c3
6
+ metadata.gz: c00ca372657108f0bb63c0c697f57704cb3b2c1fba0d3586588883779dba371505cafe12a60ed69406a9d19424e5a6b4b10f9cfa909463ebed4f49e9b3edc826
7
+ data.tar.gz: 6de741eb0250fba42ae8d0812940d7056329714fc4d48c8b11fb3fd66083f17f1aa221454479c2af9f51a65f120a661944e9b259abcab2be0a8516d422af4562
@@ -31,6 +31,8 @@ module DuckRecord
31
31
  self.target =
32
32
  if record.is_a? klass
33
33
  record
34
+ elsif record.nil?
35
+ nil
34
36
  elsif record.respond_to?(:to_h)
35
37
  build_record(record.to_h)
36
38
  end
@@ -1,3 +1,3 @@
1
1
  module DuckRecord
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duck_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - jasl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-19 00:00:00.000000000 Z
11
+ date: 2018-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
- rubygems_version: 2.6.13
177
+ rubygems_version: 2.6.12
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: Used for creating virtual models like ActiveType or ModelAttribute does