active_fedora-datastreams 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +21 -13
- data/.rubocop.yml +17 -16
- data/Gemfile +1 -0
- data/active_fedora-datastreams.gemspec +14 -14
- data/lib/active_fedora/datastreams/version.rb +1 -1
- data/lib/active_fedora/om_datastream.rb +2 -4
- data/lib/active_fedora/rdf/rdf_datastream.rb +2 -2
- metadata +48 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de7b2795b6188560ce51fefd0dc438041abe196f5955ac4d91a5a3a40de97049
|
4
|
+
data.tar.gz: adc5f9a68f7b5706e229ada269b7e10a46f5968cc9910c6b4937bba304104b97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c94dd7b0b5a68467a7861535fdf01b2ce4b1ec0726e83c730ff409500f03c079038b036438aa18b1d83514f1f6457a3c0eb995df4e203f60596b34dfcb3cf20
|
7
|
+
data.tar.gz: 691000ced9706509f8dc720e08bc7bd7362b659d9da7d70f792d4215c67b2bf49330a02d73c80559c6cff41731d9f70f73fe043178445a17213813ccbbc2cfc9
|
data/.circleci/config.yml
CHANGED
@@ -8,7 +8,7 @@ jobs:
|
|
8
8
|
type: string
|
9
9
|
bundler_version:
|
10
10
|
type: string
|
11
|
-
default: 2.
|
11
|
+
default: 2.4.5
|
12
12
|
rails_version:
|
13
13
|
type: string
|
14
14
|
solr_port:
|
@@ -49,18 +49,26 @@ workflows:
|
|
49
49
|
ci:
|
50
50
|
jobs:
|
51
51
|
- bundle_lint_test:
|
52
|
-
name:
|
53
|
-
ruby_version: 2.
|
54
|
-
rails_version:
|
52
|
+
name: ruby3-2_rails7-0
|
53
|
+
ruby_version: 3.2.0
|
54
|
+
rails_version: 7.0.4.2
|
55
55
|
- bundle_lint_test:
|
56
|
-
name:
|
57
|
-
ruby_version: 2.
|
58
|
-
rails_version:
|
56
|
+
name: ruby3-2_rails6-1
|
57
|
+
ruby_version: 3.2.0
|
58
|
+
rails_version: 6.1.7.2
|
59
|
+
- bundle_lint_test:
|
60
|
+
name: ruby3-1_rails6-0
|
61
|
+
ruby_version: 3.1.3
|
62
|
+
rails_version: 6.0.6.1
|
59
63
|
- bundle_lint_test:
|
60
|
-
name:
|
61
|
-
ruby_version:
|
62
|
-
rails_version:
|
64
|
+
name: ruby3-0_rails6-0
|
65
|
+
ruby_version: 3.0.5
|
66
|
+
rails_version: 6.0.6.1
|
63
67
|
- bundle_lint_test:
|
64
|
-
name: ruby2-
|
65
|
-
ruby_version: 2.
|
66
|
-
rails_version:
|
68
|
+
name: ruby2-7_rails6-0
|
69
|
+
ruby_version: 2.7.7
|
70
|
+
rails_version: 6.0.6.1
|
71
|
+
- bundle_lint_test:
|
72
|
+
name: ruby2-7_rails5-2
|
73
|
+
ruby_version: 2.7.7
|
74
|
+
rails_version: 5.2.8.1
|
data/.rubocop.yml
CHANGED
@@ -1,13 +1,14 @@
|
|
1
|
+
inherit_gem:
|
2
|
+
bixby: bixby_default.yml
|
3
|
+
|
1
4
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
5
|
+
TargetRubyVersion: 2.6
|
3
6
|
DisplayCopNames: true
|
4
|
-
Include:
|
5
|
-
- '**/Rakefile'
|
6
7
|
Exclude:
|
7
8
|
- 'script/**/*'
|
8
9
|
- 'vendor/**/*'
|
9
10
|
|
10
|
-
Lint/
|
11
|
+
Lint/SuppressedException:
|
11
12
|
Exclude:
|
12
13
|
- 'spec/unit/**/*'
|
13
14
|
- 'spec/integration/**/*'
|
@@ -15,7 +16,7 @@ Lint/HandleExceptions:
|
|
15
16
|
Lint/AssignmentInCondition:
|
16
17
|
Enabled: false
|
17
18
|
|
18
|
-
|
19
|
+
Layout/LineLength:
|
19
20
|
Enabled: false
|
20
21
|
|
21
22
|
Metrics/AbcSize:
|
@@ -38,7 +39,7 @@ Metrics/ClassLength:
|
|
38
39
|
Metrics/MethodLength:
|
39
40
|
Enabled: false
|
40
41
|
|
41
|
-
|
42
|
+
Naming/PredicateName:
|
42
43
|
Exclude:
|
43
44
|
- 'lib/active_fedora/om_datastream.rb'
|
44
45
|
|
@@ -46,11 +47,14 @@ Style/BlockDelimiters:
|
|
46
47
|
Exclude:
|
47
48
|
- 'spec/**/*'
|
48
49
|
|
49
|
-
Style/
|
50
|
+
Style/FrozenStringLiteralComment:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Layout/BlockEndNewline:
|
50
54
|
Exclude:
|
51
55
|
- 'spec/**/*'
|
52
56
|
|
53
|
-
|
57
|
+
Layout/MultilineBlockLayout:
|
54
58
|
Exclude:
|
55
59
|
- 'spec/**/*'
|
56
60
|
|
@@ -62,12 +66,12 @@ Style/Lambda:
|
|
62
66
|
Exclude:
|
63
67
|
- 'spec/**/*'
|
64
68
|
|
65
|
-
|
69
|
+
Naming/FileName:
|
66
70
|
Exclude:
|
67
71
|
- 'spec/samples/hydra-mods_article_datastream.rb'
|
68
72
|
|
69
|
-
|
70
|
-
EnforcedStyle:
|
73
|
+
Layout/IndentationConsistency:
|
74
|
+
EnforcedStyle: indented_internal_methods
|
71
75
|
|
72
76
|
Style/CollectionMethods:
|
73
77
|
PreferredMethods:
|
@@ -105,10 +109,7 @@ Style/SignalException:
|
|
105
109
|
Rails:
|
106
110
|
Enabled: true
|
107
111
|
|
108
|
-
Rails/
|
109
|
-
Enabled: false
|
110
|
-
|
111
|
-
Rails/TimeZone:
|
112
|
+
Rails/RakeEnvironment:
|
112
113
|
Enabled: false
|
113
114
|
|
114
115
|
RSpec/AnyInstance:
|
@@ -137,4 +138,4 @@ RSpec/NotToNot:
|
|
137
138
|
Enabled: false
|
138
139
|
|
139
140
|
RSpec/ExampleLength:
|
140
|
-
Enabled: false
|
141
|
+
Enabled: false
|
data/Gemfile
CHANGED
@@ -9,28 +9,28 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Justin Coyne"]
|
10
10
|
spec.email = ["jcoyne@justincoyne.com"]
|
11
11
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
12
|
+
spec.summary = 'Datastreams for ActiveFedora'
|
13
|
+
spec.description = 'XML and RDF datastreams for ActiveFedora'
|
14
14
|
spec.homepage = "https://github.com/projecthydra-labs/active_fedora-datastreams"
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
16
|
spec.bindir = "exe"
|
17
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "active-fedora", ">= 11.0.0.pre"
|
21
|
-
spec.add_dependency "activemodel", "
|
20
|
+
spec.add_dependency "active-fedora", ">= 11.0.0.pre"
|
21
|
+
spec.add_dependency "activemodel", ">= 5.2"
|
22
22
|
spec.add_dependency "om", "~> 3.1"
|
23
23
|
spec.add_dependency "nom-xml", ">= 0.5.1"
|
24
|
-
spec.add_dependency "rdf-rdfxml", '~> 2
|
25
|
-
spec.add_dependency "rdf", "
|
26
|
-
spec.add_development_dependency "
|
27
|
-
spec.add_development_dependency "
|
28
|
-
spec.add_development_dependency 'rspec_junit_formatter'
|
24
|
+
spec.add_dependency "rdf-rdfxml", '~> 3.2'
|
25
|
+
spec.add_dependency "rdf", "~> 3.2"
|
26
|
+
spec.add_development_dependency "bixby"
|
27
|
+
spec.add_development_dependency "byebug"
|
29
28
|
spec.add_development_dependency 'coveralls'
|
30
|
-
spec.add_development_dependency 'simplecov'
|
31
|
-
spec.add_development_dependency "solr_wrapper", "~> 2.1"
|
32
|
-
spec.add_development_dependency 'fcrepo_wrapper', '~> 0.9'
|
33
|
-
spec.add_development_dependency "rubocop", '~> 0.42'
|
34
|
-
spec.add_development_dependency "rubocop-rspec", '~> 1.4'
|
35
29
|
spec.add_development_dependency "equivalent-xml"
|
30
|
+
spec.add_development_dependency 'fcrepo_wrapper'
|
31
|
+
spec.add_development_dependency "rake"
|
32
|
+
spec.add_development_dependency "rspec"
|
33
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
34
|
+
spec.add_development_dependency 'simplecov'
|
35
|
+
spec.add_development_dependency "solr_wrapper"
|
36
36
|
end
|
@@ -59,15 +59,13 @@ module ActiveFedora
|
|
59
59
|
# </mods:name>
|
60
60
|
# </mods>
|
61
61
|
def update_indexed_attributes(params = {}, _opts = {})
|
62
|
-
if self.class.terminology.nil?
|
63
|
-
raise "No terminology is set for this OmDatastream class. Cannot perform update_indexed_attributes"
|
64
|
-
end
|
62
|
+
raise "No terminology is set for this OmDatastream class. Cannot perform update_indexed_attributes" if self.class.terminology.nil?
|
65
63
|
# remove any fields from params that this datastream doesn't recognize
|
66
64
|
# make sure to make a copy of params so not to modify hash that might be passed to other methods
|
67
65
|
current_params = params.clone
|
68
66
|
current_params.delete_if do |term_pointer, new_values|
|
69
67
|
if term_pointer.is_a?(String)
|
70
|
-
ActiveFedora::Base.logger
|
68
|
+
ActiveFedora::Base.logger&.warn "WARNING: #{self.class.name} ignoring {#{term_pointer.inspect} => #{new_values.inspect}} because #{term_pointer.inspect} is a String (only valid OM Term Pointers will be used). Make sure your html has the correct field_selector tags in it."
|
71
69
|
true
|
72
70
|
else
|
73
71
|
!self.class.terminology.has_term?(*OM.destringify(term_pointer))
|
@@ -47,7 +47,7 @@ module ActiveFedora
|
|
47
47
|
|
48
48
|
before_save do
|
49
49
|
if content.blank?
|
50
|
-
ActiveFedora::Base.logger
|
50
|
+
ActiveFedora::Base.logger&.warn "Cowardly refusing to save a datastream with empty content: #{inspect}"
|
51
51
|
if ActiveSupport.respond_to?(:halt_callback_chains_on_return_false)
|
52
52
|
# For Rails 5+
|
53
53
|
throw :abort
|
@@ -110,7 +110,7 @@ module ActiveFedora
|
|
110
110
|
predicate: config.predicate,
|
111
111
|
class_name: config.class_name)
|
112
112
|
end
|
113
|
-
klass.accepts_nested_attributes_for(*nested_attributes_options.keys)
|
113
|
+
klass.accepts_nested_attributes_for(*nested_attributes_options.keys) if nested_attributes_options.present?
|
114
114
|
uri_stub = self.class.rdf_subject.call(self)
|
115
115
|
|
116
116
|
r = klass.new(uri_stub)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_fedora-datastreams
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 11.0.0.pre
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '14'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,23 +24,20 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 11.0.0.pre
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '14'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: activemodel
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- - "
|
31
|
+
- - ">="
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
33
|
+
version: '5.2'
|
40
34
|
type: :runtime
|
41
35
|
prerelease: false
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
|
-
- - "
|
38
|
+
- - ">="
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
40
|
+
version: '5.2'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: om
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,58 +72,58 @@ dependencies:
|
|
78
72
|
requirements:
|
79
73
|
- - "~>"
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '2
|
75
|
+
version: '3.2'
|
82
76
|
type: :runtime
|
83
77
|
prerelease: false
|
84
78
|
version_requirements: !ruby/object:Gem::Requirement
|
85
79
|
requirements:
|
86
80
|
- - "~>"
|
87
81
|
- !ruby/object:Gem::Version
|
88
|
-
version: '2
|
82
|
+
version: '3.2'
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
84
|
name: rdf
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
92
86
|
requirements:
|
93
|
-
- - "
|
87
|
+
- - "~>"
|
94
88
|
- !ruby/object:Gem::Version
|
95
89
|
version: '3.2'
|
96
90
|
type: :runtime
|
97
91
|
prerelease: false
|
98
92
|
version_requirements: !ruby/object:Gem::Requirement
|
99
93
|
requirements:
|
100
|
-
- - "
|
94
|
+
- - "~>"
|
101
95
|
- !ruby/object:Gem::Version
|
102
96
|
version: '3.2'
|
103
97
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
98
|
+
name: bixby
|
105
99
|
requirement: !ruby/object:Gem::Requirement
|
106
100
|
requirements:
|
107
|
-
- - "
|
101
|
+
- - ">="
|
108
102
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
103
|
+
version: '0'
|
110
104
|
type: :development
|
111
105
|
prerelease: false
|
112
106
|
version_requirements: !ruby/object:Gem::Requirement
|
113
107
|
requirements:
|
114
|
-
- - "
|
108
|
+
- - ">="
|
115
109
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
110
|
+
version: '0'
|
117
111
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
112
|
+
name: byebug
|
119
113
|
requirement: !ruby/object:Gem::Requirement
|
120
114
|
requirements:
|
121
|
-
- - "
|
115
|
+
- - ">="
|
122
116
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
117
|
+
version: '0'
|
124
118
|
type: :development
|
125
119
|
prerelease: false
|
126
120
|
version_requirements: !ruby/object:Gem::Requirement
|
127
121
|
requirements:
|
128
|
-
- - "
|
122
|
+
- - ">="
|
129
123
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
124
|
+
version: '0'
|
131
125
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
126
|
+
name: coveralls
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
134
128
|
requirements:
|
135
129
|
- - ">="
|
@@ -143,7 +137,7 @@ dependencies:
|
|
143
137
|
- !ruby/object:Gem::Version
|
144
138
|
version: '0'
|
145
139
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
140
|
+
name: equivalent-xml
|
147
141
|
requirement: !ruby/object:Gem::Requirement
|
148
142
|
requirements:
|
149
143
|
- - ">="
|
@@ -157,7 +151,7 @@ dependencies:
|
|
157
151
|
- !ruby/object:Gem::Version
|
158
152
|
version: '0'
|
159
153
|
- !ruby/object:Gem::Dependency
|
160
|
-
name:
|
154
|
+
name: fcrepo_wrapper
|
161
155
|
requirement: !ruby/object:Gem::Requirement
|
162
156
|
requirements:
|
163
157
|
- - ">="
|
@@ -171,63 +165,63 @@ dependencies:
|
|
171
165
|
- !ruby/object:Gem::Version
|
172
166
|
version: '0'
|
173
167
|
- !ruby/object:Gem::Dependency
|
174
|
-
name:
|
168
|
+
name: rake
|
175
169
|
requirement: !ruby/object:Gem::Requirement
|
176
170
|
requirements:
|
177
|
-
- - "
|
171
|
+
- - ">="
|
178
172
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
173
|
+
version: '0'
|
180
174
|
type: :development
|
181
175
|
prerelease: false
|
182
176
|
version_requirements: !ruby/object:Gem::Requirement
|
183
177
|
requirements:
|
184
|
-
- - "
|
178
|
+
- - ">="
|
185
179
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
180
|
+
version: '0'
|
187
181
|
- !ruby/object:Gem::Dependency
|
188
|
-
name:
|
182
|
+
name: rspec
|
189
183
|
requirement: !ruby/object:Gem::Requirement
|
190
184
|
requirements:
|
191
|
-
- - "
|
185
|
+
- - ">="
|
192
186
|
- !ruby/object:Gem::Version
|
193
|
-
version: '0
|
187
|
+
version: '0'
|
194
188
|
type: :development
|
195
189
|
prerelease: false
|
196
190
|
version_requirements: !ruby/object:Gem::Requirement
|
197
191
|
requirements:
|
198
|
-
- - "
|
192
|
+
- - ">="
|
199
193
|
- !ruby/object:Gem::Version
|
200
|
-
version: '0
|
194
|
+
version: '0'
|
201
195
|
- !ruby/object:Gem::Dependency
|
202
|
-
name:
|
196
|
+
name: rspec_junit_formatter
|
203
197
|
requirement: !ruby/object:Gem::Requirement
|
204
198
|
requirements:
|
205
|
-
- - "
|
199
|
+
- - ">="
|
206
200
|
- !ruby/object:Gem::Version
|
207
|
-
version: '0
|
201
|
+
version: '0'
|
208
202
|
type: :development
|
209
203
|
prerelease: false
|
210
204
|
version_requirements: !ruby/object:Gem::Requirement
|
211
205
|
requirements:
|
212
|
-
- - "
|
206
|
+
- - ">="
|
213
207
|
- !ruby/object:Gem::Version
|
214
|
-
version: '0
|
208
|
+
version: '0'
|
215
209
|
- !ruby/object:Gem::Dependency
|
216
|
-
name:
|
210
|
+
name: simplecov
|
217
211
|
requirement: !ruby/object:Gem::Requirement
|
218
212
|
requirements:
|
219
|
-
- - "
|
213
|
+
- - ">="
|
220
214
|
- !ruby/object:Gem::Version
|
221
|
-
version: '
|
215
|
+
version: '0'
|
222
216
|
type: :development
|
223
217
|
prerelease: false
|
224
218
|
version_requirements: !ruby/object:Gem::Requirement
|
225
219
|
requirements:
|
226
|
-
- - "
|
220
|
+
- - ">="
|
227
221
|
- !ruby/object:Gem::Version
|
228
|
-
version: '
|
222
|
+
version: '0'
|
229
223
|
- !ruby/object:Gem::Dependency
|
230
|
-
name:
|
224
|
+
name: solr_wrapper
|
231
225
|
requirement: !ruby/object:Gem::Requirement
|
232
226
|
requirements:
|
233
227
|
- - ">="
|
@@ -274,7 +268,7 @@ files:
|
|
274
268
|
homepage: https://github.com/projecthydra-labs/active_fedora-datastreams
|
275
269
|
licenses: []
|
276
270
|
metadata: {}
|
277
|
-
post_install_message:
|
271
|
+
post_install_message:
|
278
272
|
rdoc_options: []
|
279
273
|
require_paths:
|
280
274
|
- lib
|
@@ -289,8 +283,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
283
|
- !ruby/object:Gem::Version
|
290
284
|
version: '0'
|
291
285
|
requirements: []
|
292
|
-
rubygems_version: 3.1
|
293
|
-
signing_key:
|
286
|
+
rubygems_version: 3.4.1
|
287
|
+
signing_key:
|
294
288
|
specification_version: 4
|
295
289
|
summary: Datastreams for ActiveFedora
|
296
290
|
test_files: []
|