active-fedora 6.5.0 → 6.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1fd2e7e3abce44ee6d01097e229e9299c14f8334
4
+ data.tar.gz: dec7ba5847ad7417b25a02a82519a3aa9ff0c26b
5
+ SHA512:
6
+ metadata.gz: 67ed9db96070226172df55c478ddfb0bf698ebd9ec170e5f028b860e9623cd353482a696c2dbf115bbf8a896b5bfffda88abc00c0bc17fce4d3940900612a9e7
7
+ data.tar.gz: fadc2758f9fe768ad3a2a7b257790876a1bf1b4c16fed656755f113788d9594e1f81c4333b2e6ef7267e89cb7c532593a3c36135a2be9ac818c2716a0bce6ba3
data/.gitignore CHANGED
@@ -8,4 +8,7 @@ doc
8
8
  tmp
9
9
  Gemfile.lock
10
10
  jetty
11
- bin
11
+ bin
12
+ .idea
13
+ .ruby-version
14
+ .ruby-gemset
@@ -1,3 +1,8 @@
1
+ v6.5.1 (2013-09-10)
2
+
3
+ ActiveFedora::Predicates.set_predicates allows you to set predicates
4
+ without wiping out existing configs [Matt Zumwalt]
5
+
1
6
  v6.5.0 (2013-08-28)
2
7
 
3
8
  An empty query value that is a string should not return all
@@ -82,6 +82,27 @@ module ActiveFedora
82
82
  raise ActiveFedora::UnregisteredPredicateError, "Unregistered predicate: #{predicate.inspect}"
83
83
  end
84
84
 
85
+ # Add/Modify predicates without destroying the other predicate configs
86
+ #
87
+ # @example
88
+ # ActiveFedora::Predicates.set_predicates({
89
+ # "http://projecthydra.org/ns/relations#"=>{has_profile:"hasProfile"},
90
+ # "info:fedora/fedora-system:def/relations-external#"=>{
91
+ # references:"references",
92
+ # has_derivation: "cameFrom"
93
+ # },
94
+ # })
95
+ def self.set_predicates(new_predicates)
96
+ predicate_config = ActiveFedora::Predicates.predicate_config
97
+ new_predicates.each_pair do |ns, predicate_confs|
98
+ predicate_config[:predicate_mapping][ns] ||= {}
99
+ predicate_confs.each_pair do |property, value|
100
+ predicate_config[:predicate_mapping][ns][property] = value
101
+ end
102
+ end
103
+ predicate_config
104
+ end
105
+
85
106
  end
86
107
 
87
108
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "6.5.0"
2
+ VERSION = "6.5.1"
3
3
  end
@@ -83,7 +83,24 @@ describe ActiveFedora::Predicates do
83
83
  it 'should ensure that the configuration has the correct keys' do
84
84
  lambda { ActiveFedora::Predicates.predicate_config = { :foo => 'invalid!' } }.should raise_error TypeError
85
85
  end
86
-
86
+
87
+ it "should allow adding predicates without wiping out existing predicates" do
88
+ ActiveFedora::Predicates.set_predicates({
89
+ "http://projecthydra.org/ns/relations#"=>{has_profile:"hasProfile"},
90
+ "info:fedora/fedora-system:def/relations-external#"=>{
91
+ references:"references",
92
+ has_derivation: "cameFrom"
93
+ },
94
+ })
95
+ # New & Modified Predicates
96
+ ActiveFedora::Predicates.find_predicate(:has_profile).should == ["hasProfile", "http://projecthydra.org/ns/relations#"]
97
+ ActiveFedora::Predicates.find_predicate(:references).should == ["references", "info:fedora/fedora-system:def/relations-external#"]
98
+ ActiveFedora::Predicates.find_predicate(:has_derivation).should == ["cameFrom", "info:fedora/fedora-system:def/relations-external#"]
99
+ # Pre-Existing predicates should be unharmed
100
+ ActiveFedora::Predicates.find_predicate(:is_part_of).should == ["isPartOf", "info:fedora/fedora-system:def/relations-external#"]
101
+ ActiveFedora::Predicates.find_predicate(:is_governed_by).should == ["isGovernedBy", "http://projecthydra.org/ns/relations#"]
102
+ end
103
+
87
104
  end
88
105
 
89
106
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.0
5
- prerelease:
4
+ version: 6.5.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matt Zumwalt
@@ -11,28 +10,25 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-08-28 00:00:00.000000000 Z
13
+ date: 2013-09-10 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rsolr
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - '>='
22
20
  - !ruby/object:Gem::Version
23
21
  version: '0'
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - '>='
30
27
  - !ruby/object:Gem::Version
31
28
  version: '0'
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: om
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
33
  - - ~>
38
34
  - !ruby/object:Gem::Version
@@ -40,7 +36,6 @@ dependencies:
40
36
  type: :runtime
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
40
  - - ~>
46
41
  - !ruby/object:Gem::Version
@@ -48,93 +43,82 @@ dependencies:
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: nom-xml
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
- - - ! '>='
47
+ - - '>='
54
48
  - !ruby/object:Gem::Version
55
49
  version: 0.5.1
56
50
  type: :runtime
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
- - - ! '>='
54
+ - - '>='
62
55
  - !ruby/object:Gem::Version
63
56
  version: 0.5.1
64
57
  - !ruby/object:Gem::Dependency
65
58
  name: activesupport
66
59
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
- - - ! '>='
61
+ - - '>='
70
62
  - !ruby/object:Gem::Version
71
63
  version: 3.0.0
72
64
  type: :runtime
73
65
  prerelease: false
74
66
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
67
  requirements:
77
- - - ! '>='
68
+ - - '>='
78
69
  - !ruby/object:Gem::Version
79
70
  version: 3.0.0
80
71
  - !ruby/object:Gem::Dependency
81
72
  name: mediashelf-loggable
82
73
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
74
  requirements:
85
- - - ! '>='
75
+ - - '>='
86
76
  - !ruby/object:Gem::Version
87
77
  version: '0'
88
78
  type: :runtime
89
79
  prerelease: false
90
80
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
81
  requirements:
93
- - - ! '>='
82
+ - - '>='
94
83
  - !ruby/object:Gem::Version
95
84
  version: '0'
96
85
  - !ruby/object:Gem::Dependency
97
86
  name: rubydora
98
87
  requirement: !ruby/object:Gem::Requirement
99
- none: false
100
88
  requirements:
101
89
  - - ~>
102
90
  - !ruby/object:Gem::Version
103
91
  version: '1.6'
104
- - - ! '>='
92
+ - - '>='
105
93
  - !ruby/object:Gem::Version
106
94
  version: 1.6.5
107
95
  type: :runtime
108
96
  prerelease: false
109
97
  version_requirements: !ruby/object:Gem::Requirement
110
- none: false
111
98
  requirements:
112
99
  - - ~>
113
100
  - !ruby/object:Gem::Version
114
101
  version: '1.6'
115
- - - ! '>='
102
+ - - '>='
116
103
  - !ruby/object:Gem::Version
117
104
  version: 1.6.5
118
105
  - !ruby/object:Gem::Dependency
119
106
  name: rdf
120
107
  requirement: !ruby/object:Gem::Requirement
121
- none: false
122
108
  requirements:
123
- - - ! '>='
109
+ - - '>='
124
110
  - !ruby/object:Gem::Version
125
111
  version: '0'
126
112
  type: :runtime
127
113
  prerelease: false
128
114
  version_requirements: !ruby/object:Gem::Requirement
129
- none: false
130
115
  requirements:
131
- - - ! '>='
116
+ - - '>='
132
117
  - !ruby/object:Gem::Version
133
118
  version: '0'
134
119
  - !ruby/object:Gem::Dependency
135
120
  name: rdf-rdfxml
136
121
  requirement: !ruby/object:Gem::Requirement
137
- none: false
138
122
  requirements:
139
123
  - - '='
140
124
  - !ruby/object:Gem::Version
@@ -142,7 +126,6 @@ dependencies:
142
126
  type: :runtime
143
127
  prerelease: false
144
128
  version_requirements: !ruby/object:Gem::Requirement
145
- none: false
146
129
  requirements:
147
130
  - - '='
148
131
  - !ruby/object:Gem::Version
@@ -150,161 +133,141 @@ dependencies:
150
133
  - !ruby/object:Gem::Dependency
151
134
  name: deprecation
152
135
  requirement: !ruby/object:Gem::Requirement
153
- none: false
154
136
  requirements:
155
- - - ! '>='
137
+ - - '>='
156
138
  - !ruby/object:Gem::Version
157
139
  version: '0'
158
140
  type: :runtime
159
141
  prerelease: false
160
142
  version_requirements: !ruby/object:Gem::Requirement
161
- none: false
162
143
  requirements:
163
- - - ! '>='
144
+ - - '>='
164
145
  - !ruby/object:Gem::Version
165
146
  version: '0'
166
147
  - !ruby/object:Gem::Dependency
167
148
  name: rdoc
168
149
  requirement: !ruby/object:Gem::Requirement
169
- none: false
170
150
  requirements:
171
- - - ! '>='
151
+ - - '>='
172
152
  - !ruby/object:Gem::Version
173
153
  version: '0'
174
154
  type: :development
175
155
  prerelease: false
176
156
  version_requirements: !ruby/object:Gem::Requirement
177
- none: false
178
157
  requirements:
179
- - - ! '>='
158
+ - - '>='
180
159
  - !ruby/object:Gem::Version
181
160
  version: '0'
182
161
  - !ruby/object:Gem::Dependency
183
162
  name: yard
184
163
  requirement: !ruby/object:Gem::Requirement
185
- none: false
186
164
  requirements:
187
- - - ! '>='
165
+ - - '>='
188
166
  - !ruby/object:Gem::Version
189
167
  version: '0'
190
168
  type: :development
191
169
  prerelease: false
192
170
  version_requirements: !ruby/object:Gem::Requirement
193
- none: false
194
171
  requirements:
195
- - - ! '>='
172
+ - - '>='
196
173
  - !ruby/object:Gem::Version
197
174
  version: '0'
198
175
  - !ruby/object:Gem::Dependency
199
176
  name: RedCloth
200
177
  requirement: !ruby/object:Gem::Requirement
201
- none: false
202
178
  requirements:
203
- - - ! '>='
179
+ - - '>='
204
180
  - !ruby/object:Gem::Version
205
181
  version: '0'
206
182
  type: :development
207
183
  prerelease: false
208
184
  version_requirements: !ruby/object:Gem::Requirement
209
- none: false
210
185
  requirements:
211
- - - ! '>='
186
+ - - '>='
212
187
  - !ruby/object:Gem::Version
213
188
  version: '0'
214
189
  - !ruby/object:Gem::Dependency
215
190
  name: rake
216
191
  requirement: !ruby/object:Gem::Requirement
217
- none: false
218
192
  requirements:
219
- - - ! '>='
193
+ - - '>='
220
194
  - !ruby/object:Gem::Version
221
195
  version: '0'
222
196
  type: :development
223
197
  prerelease: false
224
198
  version_requirements: !ruby/object:Gem::Requirement
225
- none: false
226
199
  requirements:
227
- - - ! '>='
200
+ - - '>='
228
201
  - !ruby/object:Gem::Version
229
202
  version: '0'
230
203
  - !ruby/object:Gem::Dependency
231
204
  name: jettywrapper
232
205
  requirement: !ruby/object:Gem::Requirement
233
- none: false
234
206
  requirements:
235
- - - ! '>='
207
+ - - '>='
236
208
  - !ruby/object:Gem::Version
237
209
  version: 1.4.0
238
210
  type: :development
239
211
  prerelease: false
240
212
  version_requirements: !ruby/object:Gem::Requirement
241
- none: false
242
213
  requirements:
243
- - - ! '>='
214
+ - - '>='
244
215
  - !ruby/object:Gem::Version
245
216
  version: 1.4.0
246
217
  - !ruby/object:Gem::Dependency
247
218
  name: rspec
248
219
  requirement: !ruby/object:Gem::Requirement
249
- none: false
250
220
  requirements:
251
- - - ! '>='
221
+ - - '>='
252
222
  - !ruby/object:Gem::Version
253
223
  version: 2.9.0
254
224
  type: :development
255
225
  prerelease: false
256
226
  version_requirements: !ruby/object:Gem::Requirement
257
- none: false
258
227
  requirements:
259
- - - ! '>='
228
+ - - '>='
260
229
  - !ruby/object:Gem::Version
261
230
  version: 2.9.0
262
231
  - !ruby/object:Gem::Dependency
263
232
  name: equivalent-xml
264
233
  requirement: !ruby/object:Gem::Requirement
265
- none: false
266
234
  requirements:
267
- - - ! '>='
235
+ - - '>='
268
236
  - !ruby/object:Gem::Version
269
237
  version: '0'
270
238
  type: :development
271
239
  prerelease: false
272
240
  version_requirements: !ruby/object:Gem::Requirement
273
- none: false
274
241
  requirements:
275
- - - ! '>='
242
+ - - '>='
276
243
  - !ruby/object:Gem::Version
277
244
  version: '0'
278
245
  - !ruby/object:Gem::Dependency
279
246
  name: rest-client
280
247
  requirement: !ruby/object:Gem::Requirement
281
- none: false
282
248
  requirements:
283
- - - ! '>='
249
+ - - '>='
284
250
  - !ruby/object:Gem::Version
285
251
  version: '0'
286
252
  type: :development
287
253
  prerelease: false
288
254
  version_requirements: !ruby/object:Gem::Requirement
289
- none: false
290
255
  requirements:
291
- - - ! '>='
256
+ - - '>='
292
257
  - !ruby/object:Gem::Version
293
258
  version: '0'
294
259
  - !ruby/object:Gem::Dependency
295
260
  name: webmock
296
261
  requirement: !ruby/object:Gem::Requirement
297
- none: false
298
262
  requirements:
299
- - - ! '>='
263
+ - - '>='
300
264
  - !ruby/object:Gem::Version
301
265
  version: '0'
302
266
  type: :development
303
267
  prerelease: false
304
268
  version_requirements: !ruby/object:Gem::Requirement
305
- none: false
306
269
  requirements:
307
- - - ! '>='
270
+ - - '>='
308
271
  - !ruby/object:Gem::Version
309
272
  version: '0'
310
273
  description: ActiveFedora provides for creating and managing objects in the Fedora
@@ -574,30 +537,26 @@ files:
574
537
  homepage: https://github.com/projecthydra/active_fedora
575
538
  licenses:
576
539
  - APACHE2
540
+ metadata: {}
577
541
  post_install_message:
578
542
  rdoc_options: []
579
543
  require_paths:
580
544
  - lib
581
545
  required_ruby_version: !ruby/object:Gem::Requirement
582
- none: false
583
546
  requirements:
584
- - - ! '>='
547
+ - - '>='
585
548
  - !ruby/object:Gem::Version
586
549
  version: 1.9.3
587
550
  required_rubygems_version: !ruby/object:Gem::Requirement
588
- none: false
589
551
  requirements:
590
- - - ! '>='
552
+ - - '>='
591
553
  - !ruby/object:Gem::Version
592
554
  version: '0'
593
- segments:
594
- - 0
595
- hash: -4121996905287829806
596
555
  requirements: []
597
556
  rubyforge_project:
598
- rubygems_version: 1.8.24
557
+ rubygems_version: 2.0.3
599
558
  signing_key:
600
- specification_version: 3
559
+ specification_version: 4
601
560
  summary: A convenience libary for manipulating documents in the Fedora Repository.
602
561
  test_files:
603
562
  - spec/config_helper.rb