ldap_tools 0.1.1 → 0.2.0

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
  SHA1:
3
- metadata.gz: 680f930e9b471901d9d55ef5e08c199017c96b88
4
- data.tar.gz: e253c8522ed99e84bb5ef8ebfc2ff8b46c1c993e
3
+ metadata.gz: 7b5fc90c2fafaac8d5d87fd389a8204af330c578
4
+ data.tar.gz: 7eb5aeecdc894c8d4a4a5be52cb4b999f879a44c
5
5
  SHA512:
6
- metadata.gz: 2d307cb15f56e20936eefe020f920748ca86f440f70d0fcf42988e0141faec78454125850501053c0c6ecc01bde6af110bfc7b26505c3a9ec7dd0d413fd6edb0
7
- data.tar.gz: 5b27551a089d9e967cddc725f4b93d083a1f829b4915676776d5f453c4f5bdec17df55d4a1abc619246dda4ea665a2e033e629fc724db61461c4b6c029292d35
6
+ metadata.gz: 236c0a9bce5ab074ac60bd38f75484f799da72408d5d7022bf1ac41c08bfccd3c1eeb76d1a3b300705f7a5ef4d22e1db6e40215b3ac7a21baff1ae89845595df
7
+ data.tar.gz: 8c75b66f44ad0519abc760399f994179027cd65e1009976610b79ecb375575c07da321b76ef6df0c376a04c41c9f06d500231cddad67a7ed7b06007bd52aaf31
data/bin/ldaptools CHANGED
@@ -23,9 +23,10 @@ when 'group'
23
23
  commands('This object is used for group management', cmd, GROUP_SUB_COMMANDS)
24
24
  Tapjoy::LDAP::Group.new
25
25
  when 'key'
26
- KEY_SUB_COMMANDS = %w(add remove install)
26
+ KEY_SUB_COMMANDS = %w(add remove install list show)
27
27
  commands('This object is used for group management', cmd, KEY_SUB_COMMANDS)
28
- Tapjoy::LDAP::Key.new
28
+ keys = Tapjoy::LDAP::Key.new
29
+ puts keys.show(ARGV.shift)
29
30
  when 'audit'
30
31
  AUDIT_SUB_COMMANDS = %w(by_user by_group raw)
31
32
  commands('This object is used for auditing LDAP permissions', cmd, AUDIT_SUB_COMMANDS)
@@ -7,13 +7,19 @@ module Tapjoy
7
7
  command = ARGV.shift
8
8
 
9
9
  case command
10
- when 'add', 'remove', 'install'
10
+ when 'add', 'remove', 'install', 'list'
11
11
  send(command)
12
+ when 'show'
13
+ return
12
14
  else
13
15
  raise Tapjoy::LDAP::InvalidArgument
14
16
  end
15
17
  end
16
18
 
19
+ def show(user)
20
+ get_keys_from_ldap[user]
21
+ end
22
+
17
23
  ## Private methods start here ##
18
24
  private
19
25
  # Get key listing from LDAP
@@ -180,7 +186,11 @@ module Tapjoy
180
186
  end
181
187
  end
182
188
 
183
- # TODO method to remove from authorized_keys any key that is not in LDAP
189
+ # @TODO method to remove from authorized_keys any key that is not in LDAP
190
+ end
191
+
192
+ def list
193
+ puts get_keys_from_ldap
184
194
  end
185
195
  end
186
196
  end
@@ -0,0 +1,11 @@
1
+ module Tapjoy
2
+ module LDAP
3
+ module Version
4
+ MAJOR = 0
5
+ MINOR = 2
6
+ PATCH = 0
7
+ end
8
+
9
+ VERSION = [Version::MAJOR, Version::MINOR, Version::PATCH].join('.')
10
+ end
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ldap_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Tayarani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2015-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop
@@ -52,6 +52,7 @@ files:
52
52
  - lib/tapjoy/ldap/group.rb
53
53
  - lib/tapjoy/ldap/key.rb
54
54
  - lib/tapjoy/ldap/user.rb
55
+ - lib/tapjoy/ldap/version.rb
55
56
  homepage: https://github.com/Tapjoy/ldap_tools
56
57
  licenses:
57
58
  - MIT