dansguardian 0.5.1 → 0.5.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1,3 +1,7 @@
1
+ 0.5.2 (2011-02-25)
2
+
3
+ * fix major flaws in gemspec (missing files, ouch!)
4
+
1
5
  0.5.1 (2011-02-24)
2
6
 
3
7
  * add sqlauthdbuser
@@ -5,7 +5,7 @@ autoload :Set, 'set'
5
5
  require 'configfiles'
6
6
 
7
7
  module DansGuardian
8
- VERSION = '0.5.1'
8
+ VERSION = '0.5.2.1'
9
9
 
10
10
  autoload :Config, 'dansguardian/config'
11
11
  autoload :Parser, 'dansguardian/parser'
@@ -0,0 +1,11 @@
1
+ module DansGuardian
2
+ class Config
3
+ module Auth
4
+
5
+ autoload :SQL, 'dansguardian/config/auth/sql'
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+
@@ -0,0 +1,47 @@
1
+ require 'dansguardian/config/constants'
2
+
3
+ module DansGuardian
4
+ class Config
5
+ module Auth
6
+ # Handle SQL Auth plugin by G. De Rosa
7
+ # http://dev.vemarsas.it/projects/dansguardian
8
+ class SQL < ::ConfigFiles::Base
9
+
10
+ # Exceptions
11
+ class ValidationFailed < ValidationFailed; end
12
+
13
+ on :unknown_parameter do |s|
14
+ "FIXME: unknown parameter: value = #{s}"
15
+ end
16
+
17
+ parameter :plugname
18
+
19
+ parameter :sqlauthgroups
20
+
21
+ parameter :sqlauthdb
22
+ parameter :sqlauthdbhost
23
+ parameter :sqlauthdbname
24
+ parameter :sqlauthdbuser
25
+ parameter :sqlauthdbpass
26
+
27
+ parameter :sqlauthipuserquery
28
+ parameter :sqlauthusergroupquery
29
+
30
+ parameter :sqlauthcachettl
31
+
32
+ parameter :sqlauthdebug,
33
+ 'on' => true,
34
+ 'off' => false
35
+
36
+ validate do |conf|
37
+ raise ValidationFailed,
38
+ "Cannot find plugname='sqlauth' in config file" unless
39
+ conf[:plugname] == 'sqlauth'
40
+ end
41
+
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+
metadata CHANGED
@@ -5,8 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
+ - 2
8
9
  - 1
9
- version: 0.5.1
10
+ version: 0.5.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Guido De Rosa
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-02-24 00:00:00 +00:00
18
+ date: 2011-02-25 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -41,6 +42,8 @@ extra_rdoc_files:
41
42
  files:
42
43
  - lib/dansguardian/config/filtergroup.rb
43
44
  - lib/dansguardian/config/main.rb
45
+ - lib/dansguardian/config/auth.rb
46
+ - lib/dansguardian/config/auth/sql.rb
44
47
  - lib/dansguardian/config/constants.rb
45
48
  - lib/dansguardian/extensions/float.rb
46
49
  - lib/dansguardian/parser.rb