shibboleth_auth 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -21,39 +21,36 @@ rescue LoadError
21
21
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
22
22
  end
23
23
 
24
- require 'spec/rake/spectask'
25
- Spec::Rake::SpecTask.new(:spec) do |spec|
26
- spec.libs << 'lib' << 'spec'
27
- spec.spec_files = FileList['spec/**/*_spec.rb']
24
+ require 'rake/testtask'
25
+ Rake::TestTask.new(:test) do |test|
26
+ test.libs << 'lib' << 'test'
27
+ test.pattern = 'test/**/test_*.rb'
28
+ test.verbose = true
28
29
  end
29
30
 
30
- Spec::Rake::SpecTask.new(:rcov) do |spec|
31
- spec.libs << 'lib' << 'spec'
32
- spec.pattern = 'spec/**/*_spec.rb'
33
- spec.rcov = true
34
- end
35
-
36
- task :spec => :check_dependencies
37
-
38
31
  begin
39
- require 'cucumber/rake/task'
40
- Cucumber::Rake::Task.new(:features)
41
-
42
- task :features => :check_dependencies
32
+ require 'rcov/rcovtask'
33
+ Rcov::RcovTask.new do |test|
34
+ test.libs << 'test'
35
+ test.pattern = 'test/**/test_*.rb'
36
+ test.verbose = true
37
+ end
43
38
  rescue LoadError
44
- task :features do
45
- abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
39
+ task :rcov do
40
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
46
41
  end
47
42
  end
48
43
 
49
- task :default => :spec
44
+ task :test => :check_dependencies
45
+
46
+ task :default => :test
50
47
 
51
48
  require 'rake/rdoctask'
52
49
  Rake::RDocTask.new do |rdoc|
53
50
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
54
51
 
55
52
  rdoc.rdoc_dir = 'rdoc'
56
- rdoc.title = "shibboleth_auth #{version}"
53
+ rdoc.title = "testgem #{version}"
57
54
  rdoc.rdoc_files.include('README*')
58
55
  rdoc.rdoc_files.include('lib/**/*.rb')
59
56
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.3.0
@@ -10,9 +10,9 @@ class ShibbolethAuth::LoginController < ApplicationController
10
10
 
11
11
  # POST /shibboleth_auth/login
12
12
  def login
13
- # Adding Group Prefix
13
+ # Check all Groups for Prefixes
14
14
  groups = params["shibboleth_debug_login"][:groups].split(";").map do |group|
15
- ShibbolethAuth::GroupPrefixField + ":" + group unless group.include?(ShibbolethAuth::GroupPrefixField)
15
+ check_group_prefix(group)
16
16
  end.join(";")
17
17
 
18
18
  session[:shibboleth_debug_env] = {
@@ -32,4 +32,9 @@ class ShibbolethAuth::LoginController < ApplicationController
32
32
  session[:shibboleth_debug_env] = nil
33
33
  redirect_to :root
34
34
  end
35
+ private
36
+ def check_group_prefix group
37
+ group = ShibbolethAuth::GroupPrefixField + ":" + group unless group.include?(ShibbolethAuth::GroupPrefixField)
38
+ return group
39
+ end
35
40
  end
@@ -1,4 +1,3 @@
1
-
2
1
  module ShibbolethAuth
3
2
  class ShibbolethUser
4
3
  attr_reader :username, :common_name, :groups, :affiliations
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shibboleth_auth}
8
- s.version = "0.2.1"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dominik Masur"]
12
- s.date = %q{2010-10-21}
12
+ s.date = %q{2010-11-10}
13
13
  s.description = %q{Adds a Userobject and a debug Login/Logout to your Railsapplication}
14
14
  s.email = %q{masur@rz.rwth-aachen.de}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shibboleth_auth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dominik Masur
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-21 00:00:00 +02:00
18
+ date: 2010-11-10 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency