authpds 0.2.4 → 0.2.5
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/README.rdoc
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
= Authpds
|
2
|
-
{<img src="https://
|
2
|
+
{<img src="https://api.travis-ci.org/scotdalton/authpds.png?branch=master" alt="Build Status" />}[https://travis-ci.org/scotdalton/authpds]
|
3
3
|
{<img src="https://gemnasium.com/scotdalton/authpds.png" alt="Dependency Status" />}[https://gemnasium.com/scotdalton/authpds]
|
4
4
|
{<img src="https://codeclimate.com/badge.png" alt="Code Climage" />}[https://codeclimate.com/github/scotdalton/authpds]
|
5
5
|
|
@@ -50,14 +50,14 @@ Calling the institution "default" will make it the default:
|
|
50
50
|
|
51
51
|
default:
|
52
52
|
login:
|
53
|
-
|
53
|
+
code: INST01
|
54
54
|
display_name: My Institution
|
55
55
|
|
56
56
|
An alternative syntax:
|
57
57
|
|
58
58
|
INST01:
|
59
59
|
login:
|
60
|
-
|
60
|
+
code: INST01
|
61
61
|
default: true
|
62
62
|
display_name: My Institution
|
63
63
|
|
@@ -65,15 +65,15 @@ You can create multiple institution listings as follows:
|
|
65
65
|
|
66
66
|
INST01:
|
67
67
|
login:
|
68
|
-
|
68
|
+
code: INST01
|
69
69
|
default: true
|
70
70
|
display_name: My Institution
|
71
71
|
INST02:
|
72
72
|
login:
|
73
|
-
|
73
|
+
code: INST01
|
74
74
|
display_name: Your Institution
|
75
75
|
|
76
|
-
The two separate institutions above share a
|
76
|
+
The two separate institutions above share a code in this example. The code attribute determines the institute parameter in the PDS url.
|
77
77
|
|
78
78
|
==== Institution fields
|
79
79
|
:name:: Institution name
|
@@ -9,7 +9,7 @@ module Authpds
|
|
9
9
|
|
10
10
|
def primary_institution=(new_primary_institution)
|
11
11
|
new_primary_institution = new_primary_institution.code if new_primary_institution.is_a?(Institutions::Institution)
|
12
|
-
self.user_attributes=({:primary_institution => new_primary_institution.to_sym})
|
12
|
+
self.user_attributes=({:primary_institution => new_primary_institution.to_sym}) unless new_primary_institution.nil?
|
13
13
|
end
|
14
14
|
|
15
15
|
def institutions
|
data/lib/authpds/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
NYU:
|
2
2
|
auth:
|
3
|
-
|
3
|
+
code: NYU
|
4
4
|
logout_url: 'http://bobcat.library.nyu.edu'
|
5
5
|
default: false
|
6
6
|
display_name: NYU Libraries
|
@@ -26,7 +26,7 @@ NYUAD:
|
|
26
26
|
|
27
27
|
NYSID:
|
28
28
|
auth:
|
29
|
-
|
29
|
+
code: NYSID
|
30
30
|
logout_url: 'http://bobcat.library.nyu.edu/nysid'
|
31
31
|
default: false
|
32
32
|
display_name: New York School of Interior Design Library
|
@@ -38,7 +38,7 @@ NYSID:
|
|
38
38
|
|
39
39
|
CU:
|
40
40
|
auth:
|
41
|
-
|
41
|
+
code: CU
|
42
42
|
logout_url: 'http://bobcat.library.nyu.edu/cooper'
|
43
43
|
display_name: Cooper Union Library
|
44
44
|
views:
|
@@ -49,7 +49,7 @@ CU:
|
|
49
49
|
|
50
50
|
NS:
|
51
51
|
auth:
|
52
|
-
|
52
|
+
code: NS
|
53
53
|
logout_url: 'http://bobcat.library.nyu.edu/newschool'
|
54
54
|
display_name: New School Libraries
|
55
55
|
views:
|
data/test/user_test.rb
CHANGED
@@ -53,6 +53,13 @@ class UserTest < ActiveSupport::TestCase
|
|
53
53
|
assert_equal(nil, user.primary_institution)
|
54
54
|
end
|
55
55
|
|
56
|
+
test "primary_institution= nil" do
|
57
|
+
user = User.new
|
58
|
+
assert_nothing_raised do
|
59
|
+
user.primary_institution= "NYU"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
56
63
|
test "institutions" do
|
57
64
|
Institutions.loadpaths<< "#{File.dirname(__FILE__)}/support/config"
|
58
65
|
user = User.new
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authpds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: require_all
|
@@ -211,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
211
|
version: '0'
|
212
212
|
segments:
|
213
213
|
- 0
|
214
|
-
hash:
|
214
|
+
hash: 3075631609703829384
|
215
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
216
|
none: false
|
217
217
|
requirements:
|
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
220
|
version: '0'
|
221
221
|
segments:
|
222
222
|
- 0
|
223
|
-
hash:
|
223
|
+
hash: 3075631609703829384
|
224
224
|
requirements: []
|
225
225
|
rubyforge_project:
|
226
226
|
rubygems_version: 1.8.24
|