institutions 0.0.2 → 0.0.3

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/institutions.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
18
 
19
19
  s.add_dependency "require_all", "~> 1.2.1"
20
- s.add_dependency "ipaddr_range_set", "~> 0.9.1"
20
+ s.add_dependency "ipaddr_range_set", "~> 0.10.0"
21
21
  s.add_dependency "git", "~> 1.2.5"
22
22
  s.add_dependency "rdoc"
23
23
  s.add_dependency "rake"
@@ -3,6 +3,10 @@ module Institutions#:no_doc
3
3
  # Parents attributes
4
4
  attr_reader :parent_code
5
5
 
6
+ def parent_code=(parent_code)
7
+ @parent_code = parent_code.to_sym
8
+ end
9
+
6
10
  #
7
11
  # Merges the given parent into the Institution.
8
12
  # Assumes the parent has a to_hash method
@@ -1,3 +1,3 @@
1
1
  module Institutions
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -8,14 +8,15 @@
8
8
  # all options are neccesarily listed as examples here, see source
9
9
  # or source-generated docs for more info.
10
10
  default:
11
- name: NYU Libraries
11
+ name: Default
12
12
  auth:
13
13
  link_code: NYU
14
14
  views:
15
15
  dir: nyu
16
16
  sfx_base_url: http://sfx.library.nyu.edu/sfxlcl41?
17
17
  NYU:
18
- parent_institution: default
18
+ name: NYU Libraries
19
+ parent_code: default
19
20
  ip_addresses:
20
21
  - 128.122.0.0-128.122.149.239
21
22
  - 172.26.*.*
@@ -25,7 +26,7 @@ NYU:
25
26
  - 128.238.*.*
26
27
  NYUAD:
27
28
  name: NYU Abu Dhabi Library
28
- parent_institution: NYU
29
+ parent_code: NYU
29
30
  views:
30
31
  dir: nyuad
31
32
  sfx_base_url: http://sfx.library.nyu.edu/sfxlcl41?
@@ -33,4 +33,10 @@ class InstitutionsTest < Test::Unit::TestCase
33
33
  assert_equal "ns", institutions[:NS].views["dir"]
34
34
  assert_equal "ns tag", institutions[:NS].views["tag"]
35
35
  end
36
+
37
+ def test_institutions_parents
38
+ Institutions.loadpaths << File.join("test", "config")
39
+ institutions = Institutions.institutions
40
+ assert_equal "NYU Libraries", institutions[:NYU].name
41
+ end
36
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: institutions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 0.9.1
37
+ version: 0.10.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 0.9.1
45
+ version: 0.10.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: git
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: -332144587236410515
146
+ hash: -4524913858757989027
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  none: false
149
149
  requirements:
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  segments:
154
154
  - 0
155
- hash: -332144587236410515
155
+ hash: -4524913858757989027
156
156
  requirements: []
157
157
  rubyforge_project:
158
158
  rubygems_version: 1.8.24