authpds-nyu 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module AuthpdsNyu
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/authpds-nyu.rb CHANGED
@@ -3,8 +3,7 @@ require 'authpds'
3
3
  AUTHPDS_NYU_PATH = File.dirname(__FILE__) + "/authpds-nyu/"
4
4
  [
5
5
  'session',
6
- 'sun/opensso',
7
- 'exlibris/aleph'
6
+ 'sun/opensso'
8
7
  ].each do |library|
9
8
  require AUTHPDS_NYU_PATH + library
10
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authpds-nyu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2151932000 !ruby/object:Gem::Requirement
16
+ requirement: &2151931660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2151932000
24
+ version_requirements: *2151931660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: authpds
27
- requirement: &2151930520 !ruby/object:Gem::Requirement
27
+ requirement: &2151930040 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2151930520
35
+ version_requirements: *2151930040
36
+ - !ruby/object:Gem::Dependency
37
+ name: exlibris-aleph
38
+ requirement: &2151928280 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2151928280
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: sqlite3
38
- requirement: &2151928840 !ruby/object:Gem::Requirement
49
+ requirement: &2151926300 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,7 +54,7 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *2151928840
57
+ version_requirements: *2151926300
47
58
  description: NYU libraries SSO client.
48
59
  email:
49
60
  - scotdalton@gmail.com
@@ -51,7 +62,6 @@ executables: []
51
62
  extensions: []
52
63
  extra_rdoc_files: []
53
64
  files:
54
- - lib/authpds-nyu/exlibris/aleph.rb
55
65
  - lib/authpds-nyu/session.rb
56
66
  - lib/authpds-nyu/sun/opensso.rb
57
67
  - lib/authpds-nyu/version.rb
@@ -1,41 +0,0 @@
1
- module AuthpdsNyu
2
- module Exlibris
3
- module Aleph
4
- require 'open-uri'
5
- class BorAuth
6
- attr_reader :response, :error, :session_id
7
- def initialize(aleph_url, library, sub_library, translate, bor_id, bor_verification)
8
- url = "#{aleph_url}/X?"
9
- url += "op=bor-auth&library=#{library}&"
10
- url += "sub_library=#{sub_library}&translate=#{translate}&"
11
- url += "bor_id=#{bor_id}&verification=#{bor_verification}&"
12
- @response = Nokogiri.XML(open(url))
13
- @session_id = @response.at("//session-id").inner_text unless @response.at("//session-id").nil?
14
- @error = @response.at("//error").inner_text unless @response.at("//error").nil?
15
- end
16
-
17
- def permissions
18
- rv = {}
19
- return rv unless @response and self.error.nil?
20
- rv[:home_sub_library] = @response.at("z303-home-library").inner_text unless @response.at("z303-home-library").nil?
21
- rv[:bor_status] = @response.at("z305-bor-status").inner_text unless @response.at("z305-bor-status").nil?
22
- rv[:bor_type] = @response.at("z305-bor-type").inner_text unless @response.at("z305-bor-type").nil?
23
- rv[:loan_permission] = @response.at("z305-loan-permission").inner_text unless @response.at("z305-loan-permission").nil?
24
- rv[:photo_permission] = @response.at("z305-photo-permission").inner_text unless @response.at("z305-photo-permission").nil?
25
- rv[:over_permission] = @response.at("z305-over-permission").inner_text unless @response.at("z305-over-permission").nil?
26
- rv[:multi_hold] = @response.at("z305-multi-hold").inner_text unless @response.at("z305-multi-hold").nil?
27
- rv[:loan_check] = @response.at("z305-loan-check").inner_text unless @response.at("z305-loan-check").nil?
28
- rv[:hold_permission] = @response.at("z305-hold-permission").inner_text unless @response.at("z305-hold-permission").nil?
29
- rv[:renew_permission] = @response.at("z305-renew-permission").inner_text unless @response.at("z305-renew-permission").nil?
30
- rv[:rr_permission] = @response.at("z305-rr-permission").inner_text unless @response.at("z305-rr-permission").nil?
31
- rv[:ignore_late_return] = @response.at("z305-ignore-late-return").inner_text unless @response.at("z305-ignore-late-return").nil?
32
- rv[:hold_on_shelf] = @response.at("z305-hold-on-shelf").inner_text unless @response.at("z305-hold-on-shelf").nil?
33
- rv[:end_block_date] = @response.at("z305-end-block-date").inner_text unless @response.at("z305-end-block-date").nil?
34
- rv[:booking_permission] = @response.at("z305-booking-permission").inner_text unless @response.at("z305-booking-permission").nil?
35
- rv[:booking_ignore_hours] = @response.at("z305-booking-ignore-hours").inner_text unless @response.at("z305-booking-ignore-hours").nil?
36
- return rv
37
- end
38
- end
39
- end
40
- end
41
- end