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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c1694a1424290f18d78ac3f09606e6c166fb6b300748db46662bc1facdf90fe
4
- data.tar.gz: a72137854713cd2e2856ea34232134e44e2ba8e455becb9c20e6ada255ef0814
3
+ metadata.gz: 59f7e4b65c587a3e25ca1089573f1aca005b66030f9504ae453d4bea93a7bf06
4
+ data.tar.gz: '059c1b40ec8cb85c4f8860a2f638805e1eba540bdbadd9e3aaa979ea32c64533'
5
5
  SHA512:
6
- metadata.gz: ef2a70f0e68d96834d702ceb265500836dbddf6170cc1530e06a0bf58b4a9e5586fe7f045f67dbd62930e980eada681382c55a14dfefaa143d49228737ecd665
7
- data.tar.gz: 1872a26aa0b9b4f0069c02c8b8e03848c4ef994d7fda0f81d52363f8349113eab44d6508482c24bf9378a6665c36f41c0e2fa651bab8215b996b664a8ca56423
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.first.nil?
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
 
@@ -1,9 +1,9 @@
1
1
  module CiviCrm
2
2
  module Errors
3
- class Unauthorized < Exception; end;
4
- class InternalError < Exception; end;
5
- class Forbidden < Exception; end;
6
- class BadRequest < Exception; end;
7
- class NotFound < Exception; end;
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
@@ -1,3 +1,3 @@
1
1
  module CiviCrm
2
- VERSION = '1.3.4'
2
+ VERSION = '1.3.5'
3
3
  end
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
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-01-23 00:00:00.000000000 Z
11
+ date: 2020-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client