dynarex 1.5.43 → 1.5.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dynarex.rb +13 -5
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1c986b9441b99e1547f35ee19d77b76040b21ef
|
4
|
+
data.tar.gz: 02622b66cc1a6f205a30d8379869d0a813306c0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a45c1a8f2f09145a603afc65b0524d8ce320fd1d8ac07d02b1a6c0db6921db93a6680eafe04eddec5916004356ab0cabae7b569f768e449405763afb352416f9
|
7
|
+
data.tar.gz: 082274e61e178944ed177498ed61aa2e30cd5b5c7dd916a7b2cdd49755a521381726676d4791053eb10721fb5c919a53e7a77779b5b76d4c7d2e728cc50a98e4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dynarex.rb
CHANGED
@@ -374,12 +374,20 @@ EOF
|
|
374
374
|
# dynarex = Dynarex.new 'contacts/contact(name,age,dob)'
|
375
375
|
# dynarex.create name: Bob, age: 52
|
376
376
|
|
377
|
-
def create(
|
377
|
+
def create(obj, id: nil, custom_attributes: {})
|
378
378
|
|
379
|
-
raise 'Dynarex#create(): input error: no arg provided' unless
|
380
|
-
|
381
|
-
|
382
|
-
|
379
|
+
raise 'Dynarex#create(): input error: no arg provided' unless obj
|
380
|
+
|
381
|
+
case obj.class.to_s.downcase.to_sym
|
382
|
+
when :hash
|
383
|
+
hash_create obj, id, attr: custom_attributes
|
384
|
+
when :string
|
385
|
+
create_from_line obj, id, attr: custom_attributes
|
386
|
+
when :recordx
|
387
|
+
hash_create obj.to_h, id || obj.id, attr: custom_attributes
|
388
|
+
else
|
389
|
+
hash_create obj.to_h, id, attr: custom_attributes
|
390
|
+
end
|
383
391
|
|
384
392
|
@dirty_flag = true
|
385
393
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynarex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
zafTuKRozNy5wCw7Z32VaDGcJ+yTPq73CrcPrNyaoxqGfU0qNsh6oGvwrq4Q1k4j
|
32
32
|
Pz2GWE7KigXTBg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-
|
34
|
+
date: 2015-12-08 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex-import
|
metadata.gz.sig
CHANGED
Binary file
|