whimsy-asf 0.0.35 → 0.0.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/asf.version +1 -1
- data/lib/whimsy/asf/ldap.rb +15 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58768873c0a9afc365dd831603d62bf554853dc8
|
4
|
+
data.tar.gz: f92b8ea32754dffada5e8c56b7fbc6ac729af844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef0de1fe468a59698be338cd8e7ca26439d69b9d5e1aa218f02b1cba0683a4185c8a39ff028dc7aac1fa7b73b41c4ec2322319868e9c0f99bb6518fab9e664fc
|
7
|
+
data.tar.gz: d18e7a75f58703d293cfe6d58b94937b4026cea8c59db6a477b2b8519173e859e573951d4ec8bf6a5b4642a8924c8f942933880aaa1d40f343779b9c02094570
|
data/asf.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.36
|
data/lib/whimsy/asf/ldap.rb
CHANGED
@@ -2,6 +2,13 @@ require 'wunderbar'
|
|
2
2
|
require 'ldap'
|
3
3
|
|
4
4
|
module ASF
|
5
|
+
# determine where ldap.conf resides
|
6
|
+
if Dir.exist? '/etc/openldap'
|
7
|
+
ETCLDAP = '/etc/openldap'
|
8
|
+
else
|
9
|
+
ETCLDAP = '/etc/ldap'
|
10
|
+
end
|
11
|
+
|
5
12
|
# determine whether or not the LDAP API can be used
|
6
13
|
def self.init_ldap
|
7
14
|
@ldap = nil
|
@@ -249,9 +256,9 @@ module ASF
|
|
249
256
|
|
250
257
|
# check system configuration
|
251
258
|
unless host
|
252
|
-
conf =
|
259
|
+
conf = "#{ETCLDAP}/ldap.conf"
|
253
260
|
if File.exist? conf
|
254
|
-
|
261
|
+
host = File.read(conf)[/^uri\s+(ldaps?:\/\/\S+?:\d+)/i, 1]
|
255
262
|
end
|
256
263
|
end
|
257
264
|
|
@@ -278,17 +285,19 @@ module ASF
|
|
278
285
|
# update /etc/ldap.conf. Usage:
|
279
286
|
# sudo ruby -r whimsy/asf -e "ASF::LDAP.configure"
|
280
287
|
def self.configure
|
281
|
-
if not File.exist? "/
|
282
|
-
File.write "/
|
288
|
+
if not File.exist? "#{ETCLDAP}/asf-ldap-client.pem"
|
289
|
+
File.write "#{ETCLDAP}/asf-ldap-client.pem", self.cert
|
283
290
|
end
|
284
291
|
|
285
|
-
ldap_conf =
|
292
|
+
ldap_conf = "#{ETCLDAP}/ldap.conf"
|
286
293
|
content = File.read(ldap_conf)
|
287
294
|
unless content.include? 'asf-ldap-client.pem'
|
288
295
|
content.gsub!(/^TLS_CACERT/, '# TLS_CACERT')
|
289
|
-
content
|
296
|
+
content.gsub!(/^TLS_REQCERT/, '# TLS_REQCERT')
|
297
|
+
content += "TLS_CACERT #{ETCLDAP}/asf-ldap-client.pem\n"
|
290
298
|
content += "uri #{LDAP.host}\n"
|
291
299
|
content += "base dc=apache,dc=org\n"
|
300
|
+
content += "TLS_REQCERT allow\n" if ETCLDAP.include? 'openldap'
|
292
301
|
File.write(ldap_conf, content)
|
293
302
|
end
|
294
303
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whimsy-asf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -104,8 +104,6 @@ extra_rdoc_files: []
|
|
104
104
|
files:
|
105
105
|
- asf.gemspec
|
106
106
|
- asf.version
|
107
|
-
- lib/whimsy/asf.rb
|
108
|
-
- lib/whimsy/asf/agenda.rb
|
109
107
|
- lib/whimsy/asf/agenda/attachments.rb
|
110
108
|
- lib/whimsy/asf/agenda/back.rb
|
111
109
|
- lib/whimsy/asf/agenda/committee.rb
|
@@ -113,6 +111,7 @@ files:
|
|
113
111
|
- lib/whimsy/asf/agenda/front.rb
|
114
112
|
- lib/whimsy/asf/agenda/minutes.rb
|
115
113
|
- lib/whimsy/asf/agenda/special.rb
|
114
|
+
- lib/whimsy/asf/agenda.rb
|
116
115
|
- lib/whimsy/asf/auth.rb
|
117
116
|
- lib/whimsy/asf/committee.rb
|
118
117
|
- lib/whimsy/asf/config.rb
|
@@ -126,6 +125,7 @@ files:
|
|
126
125
|
- lib/whimsy/asf/site.rb
|
127
126
|
- lib/whimsy/asf/svn.rb
|
128
127
|
- lib/whimsy/asf/watch.rb
|
128
|
+
- lib/whimsy/asf.rb
|
129
129
|
homepage: https://whimsy.apache.org/
|
130
130
|
licenses:
|
131
131
|
- Apache License, Version 2.0
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.0.14
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Whimsy 'model' of the ASF
|