googleapps-auth 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,10 @@ module GoogleAppsAuth
22
22
  !! OpenID.fetcher.ca_file
23
23
  end
24
24
 
25
+ def self.certificate_authority_file
26
+ OpenID.fetcher.ca_file
27
+ end
28
+
25
29
  class Result
26
30
  attr_reader :error
27
31
  def initialize(status, error=nil, attrs=nil)
@@ -108,7 +112,7 @@ module GoogleAppsAuth
108
112
  end
109
113
 
110
114
  def assert_certificate_authority_file_present!
111
- unless GoogleAppsAuth.certificate_authority_file?
115
+ if !GoogleAppsAuth.certificate_authority_file? || !File.exists?(GoogleAppsAuth.certificate_authority_file)
112
116
  raise CertificateAuthorityFileError,
113
117
  "Configure a CA file through GoogleAppsAuth.certificate_authority_file="
114
118
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GoogleAppsAuth
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -31,5 +31,6 @@ describe GoogleAppsAuth do
31
31
  GoogleAppsAuth.certificate_authority_file = nil
32
32
  end
33
33
  end
34
+
34
35
  end
35
36
 
@@ -14,6 +14,14 @@ describe SessionsController, :type => :controller do
14
14
 
15
15
  end
16
16
 
17
+ describe "and an incorrect path is passed" do
18
+ it "should raise" do
19
+ GoogleAppsAuth.certificate_authority_file = "daksjdkasjkdjsakldjksa"
20
+
21
+ lambda { get :start }.should raise_error(GoogleAppsAuth::CertificateAuthorityFileError)
22
+ end
23
+ end
24
+
17
25
  end
18
26
 
19
27
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: googleapps-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
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Muller