whimsy-asf 0.0.4 → 0.0.5

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