seiso-import_ldap 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGQ1Mzg2NWU3NjlhMGJhNTFiMWFmZTdjMzYxMjk5ZjliZWQ0ZWZmZg==
4
+ MzE2MGViZmNhNWQ2ZDhiNDg0MzFjZjFiYWUzYzI2Yjk1NjNmYjFiZQ==
5
5
  data.tar.gz: !binary |-
6
- ZTM2NzY3NWE1ZjUyOWVhOGNiYTkyOTU3OTk1ZjRkZjU4ZGU5ODk1MA==
6
+ NDk0ZDg2ZTNhNjZiZjU1MTE5MTk2NWU5NWMxNThkNDNmZTE2NDkyYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Mjk0NzIxNjEyMjk1MzQzZDg4NTYzMzg5ZjJmYjRkYzg0MWZiMTE3MmM3NDE0
10
- N2IxMjYyMmQ3Yjc4MDA3YzBmMzY4OTM2ZTUxMzVlYzM5Y2E1ZmI1OTE2Mzky
11
- MDc0NmRkODY4YTUwMTRlMWViYmYxOWZhMmRhNDEyNWFlNGZjZDg=
9
+ YmFlMmVhODhlMTg3Njg2NzJiYTYxNzhjZmRjNGZmMzA0ZGJiNzNiMTZmZjM3
10
+ NDBhMDEzZjViNGUyNjMyMDg1Mzk1YmY0NTI0NWU4M2Q5NDFkMGMxMjc5ZWUy
11
+ NmE3MDY4NDFjMzVmZjQ4ZjI2MTJmZTc0NGU3YzFhM2UzODAzZDU=
12
12
  data.tar.gz: !binary |-
13
- Y2U0NjY2YmQxMjc0YjI5OTAzZjZmNTc1NThiZDU3ZTdmYmRjY2M2OWY1ODE0
14
- OGZkNjNlNDJhNGU0YmVjNjI5N2E2ZTAxOWJkMTEzNWIwNzA3YmVkNjkzMTY0
15
- YmM3MWIxYjZmYzg4MjZhZjY3NDY3Yjk5YjM1YjgxZmNmZDllNjY=
13
+ NWU3MWNhZGU5M2FiODAxYmVhMzY3Mzg2MDA3MTgyOWFhMDdjZjA2NmM0YjRi
14
+ NzA0YjliYjdkMzNjYTRmODNmMjQwZmIyMWYzOTg5MWNmNzhhZTY1OTcxN2U5
15
+ NWZiOGY2NzFhZWQxZWU2ODA3OWQzMzVlMDdiNWZmNDYwZjJkMTE=
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
@@ -2,16 +2,45 @@
2
2
  # -*- mode: ruby -*-
3
3
  # vi: set ft=ruby :
4
4
 
5
+ require 'optparse'
5
6
  require 'seiso/import_ldap'
6
7
  require 'yaml'
7
8
 
8
9
  # Imports LDAP person data into Seiso.
9
10
  #
10
- # Author:: Willie Wheeler (mailto:wwheeler@expedia.com)
11
+ # Author:: Willie Wheeler
11
12
  # Copyright:: Copyright (c) 2014-2015 Expedia, Inc.
12
13
  # License:: Apache 2.0
13
14
 
14
- ldap_settings = YAML.load_file "#{Dir.home}/.seiso-importers/ldap.yml"
15
- seiso_settings = YAML.load_file "#{Dir.home}/.seiso-importers/seiso.yml"
16
- importer = Seiso::ImportLdap.new ldap_settings, seiso_settings
15
+ options = {}
16
+ option_parser = OptionParser.new do |opts|
17
+ executable_name = File.basename $PROGRAM_NAME
18
+ opts.banner = "Import LDAP users into Seiso as people.
19
+
20
+ Usage: #{executable_name} [options]"
21
+ options[:ldap_settings_path] = "#{Dir.home}/.seiso-importers/ldap.yml"
22
+ opts.on("--ldap=LDAP_SETTINGS_PATH", "Path to LDAP settings file") do |path|
23
+ options[:ldap_settings_path] = path
24
+ end
25
+
26
+ options[:seiso_settings_path] = "#{Dir.home}/.seiso-importers/seiso.yml"
27
+ opts.on("--seiso=SEISO_SETTINGS_PATH", "Path to Seiso API settings file") do |path|
28
+ options[:seiso_settings_path] = path
29
+ end
30
+
31
+ opts.on("-h", "--help", "Display this screen") do
32
+ puts opts
33
+ exit
34
+ end
35
+ end
36
+
37
+ option_parser.parse!
38
+
39
+ puts ("Using: #{options[:ldap_settings_path]}")
40
+ puts ("Using: #{options[:seiso_settings_path]}")
41
+
42
+ ldap_settings = YAML.load_file(options[:ldap_settings_path])
43
+ seiso_settings = YAML.load_file(options[:seiso_settings_path])
44
+
45
+ importer = Seiso::ImportLdap.new(ldap_settings, seiso_settings)
17
46
  importer.import_all
@@ -4,7 +4,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "seiso-import_ldap"
7
- spec.version = "0.0.1"
7
+ # spec.version = "0.1.0.SNAPSHOT"
8
+ spec.version = "0.0.2"
8
9
  spec.authors = ["Willie Wheeler"]
9
10
  spec.email = ["wwheeler@expedia.com"]
10
11
  spec.summary = "Imports person data from an LDAP server, like Active Directory."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seiso-import_ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willie Wheeler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-27 00:00:00.000000000 Z
11
+ date: 2015-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,6 +76,7 @@ extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
78
  - .gitignore
79
+ - .travis.yml
79
80
  - Gemfile
80
81
  - LICENSE.txt
81
82
  - README.md