whimsy-asf 0.0.13 → 0.0.14

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