civicrm 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/civicrm/actions/create.rb +5 -3
- data/lib/civicrm/errors.rb +5 -5
- data/lib/civicrm/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: 59f7e4b65c587a3e25ca1089573f1aca005b66030f9504ae453d4bea93a7bf06
|
4
|
+
data.tar.gz: '059c1b40ec8cb85c4f8860a2f638805e1eba540bdbadd9e3aaa979ea32c64533'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88733e225beb0b74f04fc147e38e7fd18f6b72737eec36c0beb2f853a53ee0e04cf39f0719c5320c2f943ca59b7530b1fb91a85423c6f1b78f8b9119d1450d5e
|
7
|
+
data.tar.gz: e57e11ab95f6f943649c67a79804c5eddccf5916c28bb5f3e2ce842d071e6fe04526d7e118da02d80a0b6deedc514c0af71b5fc321b94567abc788b1b442c00e
|
@@ -6,11 +6,13 @@ module CiviCrm
|
|
6
6
|
params = {'entity' => entity_class_name, 'action' => 'create'}
|
7
7
|
response = CiviCrm::Client.request(:post, params.merge(attrs))
|
8
8
|
|
9
|
-
if response
|
9
|
+
if response == 1
|
10
|
+
Resource.build_from(attrs, params)
|
11
|
+
elsif response.first.nil?
|
10
12
|
raise Error, "Couldn't create #{entity_class_name}"
|
13
|
+
else
|
14
|
+
Resource.build_from(response.first, params)
|
11
15
|
end
|
12
|
-
|
13
|
-
Resource.build_from(response.first, params)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
data/lib/civicrm/errors.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module CiviCrm
|
2
2
|
module Errors
|
3
|
-
class Unauthorized <
|
4
|
-
class InternalError <
|
5
|
-
class Forbidden <
|
6
|
-
class BadRequest <
|
7
|
-
class NotFound <
|
3
|
+
class Unauthorized < RuntimeError; end
|
4
|
+
class InternalError < RuntimeError; end
|
5
|
+
class Forbidden < RuntimeError; end
|
6
|
+
class BadRequest < RuntimeError; end
|
7
|
+
class NotFound < RuntimeError; end
|
8
8
|
end
|
9
9
|
end
|
data/lib/civicrm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civicrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iskander Haziev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|