conjur-api 5.2.0 → 5.2.1

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: 5cde5e15366fbf8e8838402bd8ffa29183a1d6972cbf0c2f2583a6e56093fed7
4
- data.tar.gz: 8a2fe440ec1693c50498adbcc1f188341ffe4767ea80182ce6e1e13a089936ce
3
+ metadata.gz: e48184760d9c40ab8a43ffeb451c3f733ba23cbe0cdb364efd13ac6183b68055
4
+ data.tar.gz: e31f3fee9f4f75038da1b3ad3ffcad72e5005c758b2fc1fc52cf00e0bc9deff1
5
5
  SHA512:
6
- metadata.gz: ff0b849ec96f16fa10fa1ef8f8c661fa5a1695ed16f8c97a24a4d5e3cf7a6660f3fb8e112d1086eec995028585ecd074348d202b96f0fa6252fd55ae128ac7bc
7
- data.tar.gz: 5597bfc53825bd362be9f50b914824ca77640f391b859820277a50179ca917a1502d3d33bfad9eccfa81d0aa618c32f0e41db734ea9cb013520a018944831892
6
+ metadata.gz: 7a215e37eda9fb96db4c2554d02fd88a862b7a34865fad86c080314b217bca494b88a0a3b431f49f6b06476c3bd17ab0ed6c678db7ab42c7c5310936fde75361
7
+ data.tar.gz: 2b381514ef1d02855e6ce96b635738b7ee0bcfc7b12367eca924d8e1cade02d45ebc8f8911cdd7d98b030d772d16b217859badc5885cc37d370829288b52f843
@@ -1,5 +1,11 @@
1
1
  # Latest
2
2
 
3
+ # v5.2.1
4
+
5
+ * Fix `Conjur::BuildObject#build_object` so it only tries to create
6
+ instances of objects for classes that inherit from BaseObject.
7
+ * require `openssl` before using it.
8
+
3
9
  # v5.2.0
4
10
 
5
11
  * Adds support for the Role endpoint for searching and paging Role Members
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Conjur
21
21
  class API
22
- VERSION = "5.2.0"
22
+ VERSION = "5.2.1"
23
23
  end
24
24
  end
@@ -33,12 +33,17 @@ module Conjur
33
33
  def build_object id, credentials, default_class:
34
34
  id = cast_to_id(id)
35
35
  class_name = id.kind.classify.to_sym
36
+ find_class(class_name, default_class)
37
+ .new(id, credentials)
38
+ end
39
+
40
+ def find_class class_name, default_class
36
41
  cls = if Conjur.constants.member?(class_name)
37
42
  Conjur.const_get(class_name)
38
43
  else
39
44
  default_class
40
45
  end
41
- cls.new(id, credentials)
46
+ cls < BaseObject ? cls : default_class
42
47
  end
43
48
  end
44
49
 
@@ -19,6 +19,8 @@
19
19
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
21
 
22
+ require 'openssl'
23
+
22
24
  module Conjur
23
25
  module CertUtils
24
26
  CERT_RE = /-----BEGIN CERTIFICATE-----\n.*?\n-----END CERTIFICATE-----\n/m
@@ -19,8 +19,8 @@
19
19
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
21
 
22
+ require 'openssl'
22
23
  require 'set'
23
-
24
24
  require 'conjur/cert_utils'
25
25
 
26
26
  module Conjur
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafal Rzepecki