ldap_tools 0.9.2 → 0.10.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: ea0fa0ebe1c98580e3e623f810c1b036c5002ff9
4
- data.tar.gz: 6e56df2eb8f7caed546bfec945cb070c162d2b99
3
+ metadata.gz: 77c2a1ba62f8b9af254527701c000784be6ad2aa
4
+ data.tar.gz: f266faabe57587a073eb0c408e1f3b5f50532d3a
5
5
  SHA512:
6
- metadata.gz: 98bb0f41e0ec6df27863a2d4917a28e6d24cd7d4bc7c7966e9375decf4c1b4e7c9760c9d6431127b10238593f96581a454727129329530c26f402da980fca62d
7
- data.tar.gz: 3108815f8a5ec38c43917a7b0111f255aeb83c068d42e30dace52d59a40126586fd81edcd9a36716520f3515e1360b2acaf784db7581d9eb2921c59846444343
6
+ metadata.gz: 283eb45c5746a225bc09abcd5458f3c9b4d1c7728b71b7f13c8b9f5bc379be2bf93d4458590d64ee1be31b8f6ebbef8ce5885974b16d1d4c46b51e92a1656230
7
+ data.tar.gz: dcf7fe4b7cf6014883d311b645b4d5e10c8bfadfa41765a963031b3236d0eb5a8c411a5e01d4541a63f0f0879ec0a23931e8a9edebde9bd5ccd026b635c7a84a
@@ -8,7 +8,7 @@ module Tapjoy
8
8
  # Make the API call to create an LDAP user
9
9
  def create
10
10
  verify_arguments
11
- fname, lname = opts[:user]
11
+ fname, lname = opts[:name]
12
12
  puts Tapjoy::LDAP::API::User.create(fname, lname,
13
13
  opts[:type], opts[:group])
14
14
  end
@@ -20,10 +20,10 @@ module Tapjoy
20
20
  usage 'user create [options]'
21
21
  synopsis "\nThis command is for creating new LDAP users"
22
22
 
23
- # Username is two arguments
23
+ # Name is two arguments
24
24
  # Trollop will accept more, but we will only parse two later
25
25
  # TODO: support given names that include a space
26
- opt :user, "Specify user's first and last name", type: :strings, required: true
26
+ opt :name, "Specify user's first and last name", type: :strings, required: true
27
27
 
28
28
  # Groupname is a single string, for primary group setting
29
29
  opt :group, 'Specify name of primary group', type: :string, required: true
@@ -32,7 +32,7 @@ module Tapjoy
32
32
  end
33
33
 
34
34
  def verify_arguments
35
- Trollop.die :user, 'argument count must be two' if opts[:user].size != 2
35
+ Trollop.die :name, 'argument count must be two' if opts[:name].size != 2
36
36
  Trollop.die :type, "argument must be 'user' or 'service'" unless %w(user service).include?(opts[:type])
37
37
  end
38
38
  end
@@ -9,7 +9,7 @@ module Tapjoy
9
9
  def delete
10
10
  verify_arguments
11
11
  confirm unless opts[:force]
12
- puts Tapjoy::LDAP::API::User.destroy(opts[:user], opts[:type])
12
+ puts Tapjoy::LDAP::API::User.destroy(opts[:username], opts[:type])
13
13
  end
14
14
 
15
15
  private
@@ -18,7 +18,7 @@ module Tapjoy
18
18
  # Set help message
19
19
  usage "user delete [options]"
20
20
 
21
- opt :user, 'Specify username', type: :string, required: true
21
+ opt :username, 'Specify username', type: :string, required: true
22
22
  opt :force, 'Force delete'
23
23
  opt :type, 'Specfy if this is a user or service account', type: :string, default: 'user'
24
24
  end
@@ -24,7 +24,7 @@ module Tapjoy
24
24
  # Set help message
25
25
  usage "user show [options]"
26
26
 
27
- opt :user, 'Specify username', type: :string, required: true
27
+ opt :username, 'Specify username', type: :string, required: true
28
28
  end
29
29
  end
30
30
  end
@@ -20,7 +20,7 @@ module Tapjoy
20
20
  usage 'key add [options]'
21
21
  synopsis "\nThis command is for adding user keys to a given user's profile"
22
22
 
23
- opt :user, 'Specify username to add key to', type: :string,
23
+ opt :username, 'Specify username to add key to', type: :string,
24
24
  required: true
25
25
  opt :filename, 'File to load keys from', type: :string
26
26
  end
@@ -6,7 +6,7 @@ module Tapjoy
6
6
  # Remove key from LDAP
7
7
  def remove
8
8
  keys # Get keys first
9
- Tapjoy::LDAP::Key.verify_user(opts[:user], results)
9
+ Tapjoy::LDAP::Key.verify_user(opts[:username], results)
10
10
 
11
11
  confirm unless opts[:force]
12
12
  Tapjoy::LDAP.client.replace_attribute(
@@ -20,7 +20,7 @@ module Tapjoy
20
20
  usage 'key remove [options]'
21
21
  synopsis "\nThis command is for removing a user's SSH key(s)"
22
22
 
23
- opt :user, 'Specify username to delete key from', type: :string,
23
+ opt :username, 'Specify username to delete key from', type: :string,
24
24
  required: true
25
25
  opt :filename, 'File to load key deletion list from', type: :string
26
26
  opt :force, 'Force delete', short: '-F'
@@ -17,7 +17,7 @@ module Tapjoy
17
17
  usage 'key show [options]'
18
18
  synopsis "\nThis command is for showing a specific user's SSH keys"
19
19
 
20
- opt :user, 'Specify username', type: :string, required: true
20
+ opt :username, 'Specify username', type: :string, required: true
21
21
  end
22
22
  end
23
23
 
@@ -2,8 +2,8 @@ module Tapjoy
2
2
  module LDAP
3
3
  module Version
4
4
  MAJOR = 0
5
- MINOR = 9
6
- PATCH = 2
5
+ MINOR = 10
6
+ PATCH = 0
7
7
  end
8
8
 
9
9
  VERSION = [Version::MAJOR, Version::MINOR, Version::PATCH].join('.')
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.9.2
4
+ version: 0.10.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: 2017-09-13 00:00:00.000000000 Z
11
+ date: 2017-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop