rubycas-server 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.txt CHANGED
@@ -1,6 +1,18 @@
1
- === 0.4.0 :: In progress...
1
+ === 0.4.1 :: 2007-06-07
2
+
3
+ * This release restores compatiblity with older versions of rubygems
4
+ (pre-0.9.0). To achieve this, we alias the 'gem' method to the old
5
+ 'require_gem' if 'gem' is not already defined.
6
+ * rubycas-server-ctl will now quiety delete an orphaned .pid file
7
+ instead complaining loudly and refusing to start up.
8
+ * Fixed minor bug in rubycas-server-ctl that sometimes incorrectly reported
9
+ startup problems when in fact the server had started just fine.
10
+
11
+
12
+ === 0.4.0 :: 2007-06-05
2
13
 
3
14
  * Added rubycas-server-ctl script for controlling daemonized server.
15
+ * rubygems-0.9.0 or later is now required.
4
16
  * Added system startup script to be used in /etc/init.d on Linux systems.
5
17
  * Authenticator can now be loaded from an external file using the 'source'
6
18
  configuration option.
@@ -8,6 +20,7 @@
8
20
  * User now sees an error message if the service URI is not a valid URI (i.e.
9
21
  if it's not URI-encoded or otherwise malformed).
10
22
 
23
+
11
24
  === 0.3.0 :: 2007-03-29
12
25
 
13
26
  * Fixed glaring security problem with LDAP/AD Authenticator where under some
@@ -62,6 +75,8 @@
62
75
  seemed to be causing problems with the PHP CAS client.
63
76
  * Misc minor bug fixes/cleanup.
64
77
 
78
+
65
79
  === 0.1.0 :: 2007-03-01
66
80
 
67
- * First public release.
81
+ * First public release.
82
+
@@ -23,8 +23,8 @@ def start
23
23
  exit 1
24
24
  when :not_running
25
25
  $stderr.puts "The pid file '#{@options[:pid_file]}' exists but rubycas-server is not running." +
26
- "Please delete the pid file first."
27
- exit 1
26
+ " The pid file will be automatically deleted for you, but this shouldn't have happened!"
27
+ File.delete(@options[:pid_file])
28
28
  when :dead
29
29
  $stderr.puts "The pid file '#{@options[:pid_file]}' exists but rubycas-server is not running." +
30
30
  " Please delete the pid file first."
@@ -48,7 +48,7 @@ def start
48
48
  if s = get_state == :ok
49
49
  exit 0
50
50
  else
51
- $stderr.puts "rubycas-server could not start properly!\nTry running with the --verbose option for details."
51
+ $stderr.puts "rubycas-server could not start properly! (#{s})\nTry running with the --verbose option for details."
52
52
  case s
53
53
  when :missing_pid
54
54
  exit 4
@@ -105,15 +105,15 @@ def get_state
105
105
 
106
106
  state = `ps -p #{pid} -o state=`.strip
107
107
  if state == ''
108
- :not_running
108
+ return :not_running
109
109
  elsif state == 'R' || state == 'S'
110
- :ok
110
+ return :ok
111
111
  else
112
- :dead
112
+ return :dead
113
113
  end
114
114
  else
115
115
  # TODO: scan through the process table to see if server is running without pid file
116
- :missing_pid
116
+ return :missing_pid
117
117
  end
118
118
  end
119
119
 
@@ -1,5 +1,9 @@
1
1
  require 'casserver/authenticators/base'
2
2
 
3
+ # Dummy authenticator used for testing.
4
+ # Accepts "testuser" for username and "testpassword" for password; otherwise authentication fails.
5
+ # Raises an AuthenticationError when username is "do_error" (this is useful to test the Exception
6
+ # handling functionality).
3
7
  class CASServer::Authenticators::Test < CASServer::Authenticators::Base
4
8
  def validate(credentials)
5
9
  read_standard_credentials(credentials)
@@ -8,4 +12,4 @@ class CASServer::Authenticators::Test < CASServer::Authenticators::Base
8
12
 
9
13
  return @username == "testuser" && @password == "testpassword"
10
14
  end
11
- end
15
+ end
@@ -2,7 +2,7 @@ module CASServer
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/casserver.rb CHANGED
@@ -8,6 +8,12 @@ $CASSERVER_HOME = File.dirname(File.expand_path(__FILE__))
8
8
  $: << $CASSERVER_HOME
9
9
 
10
10
  require 'rubygems'
11
+
12
+ # make things backwards-compatible for rubygems < 0.9.0
13
+ unless Object.method_defined? :gem
14
+ alias gem require_gem
15
+ end
16
+
11
17
  gem 'camping', '~> 1.5'
12
18
  require 'camping'
13
19
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: rubycas-server
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.0
7
- date: 2007-06-04 00:00:00 -04:00
6
+ version: 0.4.1
7
+ date: 2007-06-07 00:00:00 -04:00
8
8
  summary: Provides single sign on for web applications using the CAS protocol.
9
9
  require_paths:
10
10
  - lib