pupper 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 076ade035c194893ca835d7a83d587f24c7bf424
4
- data.tar.gz: f2a63deb8e3fe6e390163fcb395fcd06c53a3585
3
+ metadata.gz: c7361411fe0e93d04684d27d9ac5cd73e087b4f0
4
+ data.tar.gz: 512671c14356e6f53325823e5ab0a9bc066342f6
5
5
  SHA512:
6
- metadata.gz: dde6f826c686fb59b1fb176454982503ec1952ed8258fcfc659477a876a3abfce3e70380c87ce59f3cc3d114da2845e5b5f58c51767de5d3bd631836354cd561
7
- data.tar.gz: 73231d2f3bf3e59e42ec331daf9b3448d5fba38de6cc4c5785b3177d0c7e18dc1f0fa3d21afbb94c8b9ce5e22e1547b5bc1cc0e3be762f1aa1c4bc0cbf66927e
6
+ metadata.gz: dfda4cb865f6d44411c21694d2fa36cd10c3bcd1fc8dc734462ef32647f020cf7003fb5c90b0adac9bc326bf1b78814e83d72a99ba722b7efc1c6f523c2e28d1
7
+ data.tar.gz: f44fb5ea441ddf3cb1527c714c68c74ca4fc58ed67b70394e6a0da896f16a7dcb5a618a1be257372e16e1dc373f93dec143452c4a9d07a342a080b62f7269014
data/lib/pupper/model.rb CHANGED
@@ -19,14 +19,14 @@ module Pupper
19
19
  delegate :backend, to: :class
20
20
 
21
21
  def initialize(**args)
22
- args.slice!(*self.class._attributes)
23
-
24
22
  assocs, attrs = args.partition do |attr, value|
25
23
  attr.to_s =~ /_u?id$/ || value.is_a?(Hash) || value.is_a?(Array)
26
24
  end.map(&Hash.method(:[]))
27
25
 
28
26
  assocs = build_associations(assocs)
29
27
 
28
+ [attrs, assocs].map { |args| args.slice!(*self.class._attributes) }
29
+
30
30
  super(**attrs, **assocs)
31
31
 
32
32
  changes_applied
@@ -1,3 +1,3 @@
1
1
  module Pupper
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pupper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Machin