whimsy-asf 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dc0f1eeac0c67608d3a1f594a9303b2388705a39
4
+ data.tar.gz: 96077c23112805791e08b9c15313349186dd1119
5
+ SHA512:
6
+ metadata.gz: c213687cb6f1c156f6e573fe4157c3db38c5e213d513c4192a6fbffaf176d6caa1787924493f6b2b8c1c5635339ecc845c12b397c1630da21a927570e15f7e8e
7
+ data.tar.gz: 7ca2b80558338cd348cbed060a9aa0716806521a9ec1dd15a868978878f48e52dab6bb4ec9dfa7ab8d59a69c7e21f68fa8cbb8393b5100ef4c6afa54026eec45
data/asf.version CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -2,6 +2,7 @@ require_relative '../asf'
2
2
 
3
3
  require 'time'
4
4
  require 'tzinfo'
5
+ require 'tzinfo/data'
5
6
  require 'digest/md5'
6
7
 
7
8
  module ASF
@@ -1,5 +1,4 @@
1
1
  require 'wunderbar'
2
- require 'rubygems'
3
2
  require 'ldap'
4
3
 
5
4
  module ASF
@@ -8,17 +7,27 @@ module ASF
8
7
  def self.init_ldap
9
8
  @ldap = nil
10
9
  begin
11
- conf = '/etc/ldap/ldap.conf'
12
- host = File.read(conf).scan(/^uri\s+ldaps:\/\/(\S+?):(\d+)/i).first
10
+ config = ASF::Config.get(:ldap)
11
+ if config
12
+ host = config.scan(/^ldap(s?):\/\/(\S+?):(\d+)\/?$/i).first
13
+ else
14
+ conf = '/etc/ldap/ldap.conf'
15
+ host = File.read(conf).scan(/^uri\s+ldap(s?):\/\/(\S+?):(\d+)/i).first
16
+ end
17
+
13
18
  if host
14
- Wunderbar.info "Connecting to LDAP server: [ldaps://#{host[0]}:#{host[1]}]"
19
+ Wunderbar.info "Connecting to LDAP server: [ldap#{host[0]}://#{host[1]}:#{host[2]}]"
15
20
  end
16
21
  rescue Errno::ENOENT
17
22
  host = nil
18
23
  Wunderbar.error "No LDAP server defined, there must be a LDAP ldaps:// URI in /etc/ldap/ldap.conf"
19
24
  end
20
25
  begin
21
- @ldap = LDAP::SSLConn.new(host.first, host.last.to_i) if host
26
+ if host.first == 's'
27
+ @ldap = LDAP::SSLConn.new(host[1], host.last.to_i) if host
28
+ else
29
+ @ldap = LDAP::Conn.new(host[1], host.last.to_i) if host
30
+ end
22
31
  rescue LDAP::ResultError=>re
23
32
  Wunderbar.error "Error binding to LDAP server: message: ["+ re.message + "]"
24
33
  end
metadata CHANGED
@@ -1,150 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whimsy-asf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sam Ruby
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2014-09-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rack
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: ruby-ldap
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: tzinfo
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: wunderbar
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
- description: ! " This package contains a set of classes which encapsulate access\n
95
- \ to a number of data sources such as LDAP, ICLAs, auth lists, etc.\n"
83
+ description: |2
84
+ This package contains a set of classes which encapsulate access
85
+ to a number of data sources such as LDAP, ICLAs, auth lists, etc.
96
86
  email: rubys@intertwingly.net
97
87
  executables: []
98
88
  extensions: []
99
89
  extra_rdoc_files: []
100
90
  files:
101
- - asf.version
102
91
  - asf.gemspec
92
+ - asf.version
103
93
  - lib/whimsy/asf.rb
104
- - lib/whimsy/asf/rack.rb
105
94
  - lib/whimsy/asf/agenda.rb
106
- - lib/whimsy/asf/svn.rb
107
- - lib/whimsy/asf/watch.rb
108
- - lib/whimsy/asf/config.rb
109
- - lib/whimsy/asf/podlings.rb
110
- - lib/whimsy/asf/nominees.rb
111
- - lib/whimsy/asf/auth.rb
112
- - lib/whimsy/asf/member.rb
113
- - lib/whimsy/asf/mail.rb
114
- - lib/whimsy/asf/agenda/special.rb
115
- - lib/whimsy/asf/agenda/committee.rb
116
- - lib/whimsy/asf/agenda/minutes.rb
117
95
  - lib/whimsy/asf/agenda/attachments.rb
96
+ - lib/whimsy/asf/agenda/back.rb
97
+ - lib/whimsy/asf/agenda/committee.rb
118
98
  - lib/whimsy/asf/agenda/exec-officer.rb
119
99
  - lib/whimsy/asf/agenda/front.rb
120
- - lib/whimsy/asf/agenda/back.rb
100
+ - lib/whimsy/asf/agenda/minutes.rb
101
+ - lib/whimsy/asf/agenda/special.rb
102
+ - lib/whimsy/asf/auth.rb
121
103
  - lib/whimsy/asf/committee.rb
104
+ - lib/whimsy/asf/config.rb
105
+ - lib/whimsy/asf/icla.rb
122
106
  - lib/whimsy/asf/ldap.rb
107
+ - lib/whimsy/asf/mail.rb
108
+ - lib/whimsy/asf/member.rb
109
+ - lib/whimsy/asf/nominees.rb
110
+ - lib/whimsy/asf/podlings.rb
111
+ - lib/whimsy/asf/rack.rb
123
112
  - lib/whimsy/asf/site.rb
124
- - lib/whimsy/asf/icla.rb
113
+ - lib/whimsy/asf/svn.rb
114
+ - lib/whimsy/asf/watch.rb
125
115
  homepage: https://whimsy.apache.org/
126
116
  licenses:
127
117
  - Apache License, Version 2.0
118
+ metadata: {}
128
119
  post_install_message:
129
120
  rdoc_options: []
130
121
  require_paths:
131
122
  - lib
132
123
  required_ruby_version: !ruby/object:Gem::Requirement
133
- none: false
134
124
  requirements:
135
- - - ! '>='
125
+ - - ">="
136
126
  - !ruby/object:Gem::Version
137
127
  version: '0'
138
128
  required_rubygems_version: !ruby/object:Gem::Requirement
139
- none: false
140
129
  requirements:
141
- - - ! '>='
130
+ - - ">="
142
131
  - !ruby/object:Gem::Version
143
132
  version: '0'
144
133
  requirements: []
145
134
  rubyforge_project:
146
- rubygems_version: 1.8.23
135
+ rubygems_version: 2.2.2
147
136
  signing_key:
148
- specification_version: 3
137
+ specification_version: 4
149
138
  summary: Whimsy 'model' of the ASF
150
139
  test_files: []