cs-ruby-ldap 0.1.2 → 0.1.2.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cloudscaling/ldap.rb +7 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19e574263bc68b0b3eadebc634b65cc0188fd5d4
4
- data.tar.gz: 4ca1ff90e220d24d8a4db6cf1f703d48f3b5d1c7
3
+ metadata.gz: caffea2e1fac8506d6e17580119da954b32517cf
4
+ data.tar.gz: 97a3409a6f73092a0171c7dea13332db970607ce
5
5
  SHA512:
6
- metadata.gz: 8e7bd944ff3e8c3162e04212e241bf239d2ba725af6cd8ef9a28532c25c5c7d0b572619276777107b958036f09904966920f97eda5ae541ea994c43b404f9075
7
- data.tar.gz: ca4fa065811f6a649448c5ed5189d63c01e12259fc1391db229f98f536ec028a47038972eabe47b9383566d283ff17a5710570750ccafa2ae93d9371e296e43d
6
+ metadata.gz: 9f4071af0d38a008c6d25a969e5b178687fd01c8ec7c96b1844e3c4972f1dc3bea844a71f0deda01ce9a9e904a312009a55aaf35ac6fd229d1d7c69945a7c20f
7
+ data.tar.gz: 07f7776f67e9e3219948a546903704a7732e376715e40f16c46b02b05d84c429a44e21b6f0e21595cd2b3de46664c3b93aa4a70a62c5d0f2ec2542115aa21946
@@ -55,10 +55,14 @@ module Cloudscaling
55
55
  when 'filter'
56
56
  filter = val
57
57
  when 'attributes'
58
- unless val.is_a?(Array)
58
+ case val
59
+ when Array
60
+ attributes = val
61
+ when String
62
+ attributes = [val]
63
+ else
59
64
  fail("attributes must be an Array, not #{val.class}")
60
65
  end
61
- attributes = val
62
66
  else
63
67
  fail "Unrecognized option: #{arg}"
64
68
  end
@@ -93,7 +97,7 @@ module Cloudscaling
93
97
  # Check for existence of a cn=config entry
94
98
  def self.dn_exists?(dn)
95
99
  true unless ldapsearch(base: dn,
96
- attributes: 'dn',
100
+ attributes: ['dn'],
97
101
  scope: :base
98
102
  ).empty?
99
103
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cs-ruby-ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Staffin