speedy-af 0.1.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 661404c61902d5652138e211676ceb36bec090baa5bc9467ad09dceb82addfb9
4
- data.tar.gz: 7991c33010f105ce4a696ad49cac92e1776058794aff1fb16162c2c4e274ac29
3
+ metadata.gz: f90da5142141870db8a58733e7456af65d963a3de8ed26e40af1c1d23fba022a
4
+ data.tar.gz: a995000c4e447c04073f22884d7608c33fb9a6401d839ef613007818ebb4d648
5
5
  SHA512:
6
- metadata.gz: 9245b0f678836124bc108a452d91a22c5e0620395a380113460e6a2c43e1bcf3e447bd967c0e51858d0d9f4270e12f91f55c2b95c07e0532b43befec8e6686ca
7
- data.tar.gz: 22e10b6d617229d31b5b16dd1aa1f45b4f59f8d9832810a0f948946de68ce81374f636290ce2948ba73b41b1e95fbc7d136bc41d7fd3ce66e0fe07e6626caa58
6
+ metadata.gz: d07dc9fdfabc614b2ad7ba5960da463d102f07680626efa40e1446087ea027b243fe29ac28be4ad01866c5edbff3663ee9bc846297c3bd3815fc481dd7564b90
7
+ data.tar.gz: 445ce106eabd70703ad9b96ef3c91a657fd6500d82e8b7c9d8e3c52baf48030d01601fc21f95ac57a5832f721621db8aa535ddf2bac546381d2c0e0b9eacdb29
@@ -0,0 +1,55 @@
1
+ version: 2.1
2
+ orbs:
3
+ samvera: samvera/circleci-orb@1
4
+ jobs:
5
+ bundle_and_test:
6
+ parameters:
7
+ ruby_version:
8
+ type: string
9
+ rails_version:
10
+ type: string
11
+ bundler_version:
12
+ type: string
13
+ default: 2.0.2
14
+ ffmpeg_version:
15
+ type: string
16
+ default: 4.1.4
17
+ executor:
18
+ name: 'samvera/ruby_fcrepo_solr'
19
+ ruby_version: << parameters.ruby_version >>
20
+ solr_version: 8-slim
21
+ environment:
22
+ RAILS_VERSION: << parameters.rails_version >>
23
+ working_directory: ~/project
24
+ steps:
25
+ - samvera/cached_checkout
26
+
27
+ - samvera/bundle:
28
+ ruby_version: << parameters.ruby_version >>
29
+ bundler_version: << parameters.bundler_version >>
30
+
31
+ - samvera/rubocop
32
+
33
+ - samvera/install_solr_core
34
+
35
+ - samvera/parallel_rspec
36
+
37
+ workflows:
38
+ ci:
39
+ jobs:
40
+ - bundle_and_test:
41
+ name: "ruby2-7_rails7-0"
42
+ ruby_version: "2.7.6"
43
+ rails_version: "7.0.4"
44
+ - bundle_and_test:
45
+ name: "ruby2-7_rails6-1"
46
+ ruby_version: "2.7.6"
47
+ rails_version: "6.1.7"
48
+ - bundle_and_test:
49
+ name: "ruby2-7_rails6-0"
50
+ ruby_version: "2.7.6"
51
+ rails_version: "6.0.6"
52
+ - bundle_and_test:
53
+ name: "ruby2-7_rails5-2"
54
+ ruby_version: "2.7.6"
55
+ rails_version: "5.2.8.1"
data/.rubocop.yml CHANGED
@@ -1,178 +1,6 @@
1
- require: rubocop-rspec
2
-
3
- inherit_from:
4
- - .rubocop_todo.yml
5
-
6
- AllCops:
7
- TargetRubyVersion: 2.2
8
- DisplayCopNames: true
9
- Include:
10
- - '**/Rakefile'
11
- Exclude:
12
- - 'script/**/*'
13
- - 'vendor/**/*'
14
-
15
- Lint/HandleExceptions:
16
- Exclude:
17
- - 'spec/unit/**/*'
18
-
19
- Lint/AssignmentInCondition:
20
- Enabled: false
21
-
22
- Metrics/LineLength:
23
- Enabled: false
24
-
25
- Metrics/AbcSize:
26
- Enabled: false
27
-
28
- Metrics/BlockNesting:
29
- Exclude:
30
-
31
- Metrics/CyclomaticComplexity:
32
- Max: 7
33
- Severity: warning
34
- Exclude:
35
-
36
- Metrics/PerceivedComplexity:
37
- Exclude:
38
-
39
- Metrics/ModuleLength:
40
- Exclude:
41
-
42
- Metrics/ClassLength:
43
- Enabled: false
44
-
45
- Metrics/MethodLength:
46
- Enabled: false
47
-
48
- Style/MethodName:
49
- Exclude:
50
-
51
- Style/AndOr:
52
- Exclude:
53
-
54
- Style/AccessorMethodName:
55
- Exclude:
56
-
57
- Style/PredicateName:
58
- Exclude:
59
-
60
- Style/GuardClause:
61
- Exclude:
62
-
63
- Style/TrivialAccessors:
64
- Exclude:
65
-
66
- Style/EachWithObject:
67
- Exclude:
68
-
69
- Style/CaseEquality:
70
- Exclude:
71
-
72
- Style/BlockDelimiters:
73
- Exclude:
74
- - 'spec/**/*'
75
-
76
- Style/BlockEndNewline:
77
- Exclude:
78
- - 'spec/**/*'
79
-
80
- Style/MultilineBlockLayout:
81
- Exclude:
82
- - 'spec/**/*'
83
-
84
- Style/Semicolon:
85
- Exclude:
86
- - 'spec/**/*'
1
+ inherit_from: .rubocop_todo.yml
87
2
 
88
- Style/Lambda:
89
- Exclude:
90
- - 'spec/**/*'
91
-
92
- Style/IndentationConsistency:
93
- EnforcedStyle: rails
94
-
95
- Style/CollectionMethods:
96
- PreferredMethods:
97
- collect: 'map'
98
- collect!: 'map!'
99
- inject: 'reduce'
100
- detect: 'find'
101
- find_all: 'select'
102
-
103
- Style/WordArray:
104
- Enabled: false
105
-
106
- Style/RegexpLiteral:
107
- Enabled: false
108
-
109
- Style/StringLiterals:
110
- Enabled: false
111
-
112
- Style/ClassAndModuleChildren:
113
- Enabled: false
114
-
115
- Style/Documentation:
116
- Enabled: false
117
-
118
- Style/GlobalVars:
119
- Exclude:
120
- - 'spec/**/*'
121
-
122
- Style/SingleLineBlockParams:
123
- Enabled: false
124
-
125
- Style/ClassVars:
126
- Exclude:
127
-
128
- Style/SignalException:
129
- Enabled: false
130
-
131
- Style/FileName:
132
- Exclude:
133
- - 'lib/speedy-af.rb'
134
-
135
- Style/ZeroLengthPredicate:
136
- Exclude:
137
-
138
- Performance/RedundantMerge:
139
- Exclude:
140
-
141
- Rails:
142
- Enabled: true
143
-
144
- Rails/Output:
145
- Exclude:
146
-
147
- Rails/Date:
148
- Enabled: false
149
-
150
- Rails/TimeZone:
151
- Enabled: false
152
-
153
- RSpec/AnyInstance:
154
- Enabled: false
155
-
156
- RSpec/ExampleWording:
157
- CustomTransform:
158
- be: is
159
- have: has
160
- not: does not
161
- NOT: does NOT
162
- IgnoredWords:
163
- - only
164
-
165
- RSpec/FilePath:
166
- Enabled: false
167
-
168
- RSpec/InstanceVariable:
169
- Enabled: false
170
-
171
- RSpec/DescribeClass:
172
- Exclude:
173
-
174
- RSpec/DescribedClass:
175
- Exclude:
3
+ require: rubocop-rspec
176
4
 
177
- RSpec/NotToNot:
178
- Enabled: false
5
+ inherit_gem:
6
+ bixby: bixby_default.yml
data/.rubocop_todo.yml CHANGED
@@ -1,55 +1,75 @@
1
- require: rubocop-rspec
2
-
3
1
  # This configuration was generated by
4
2
  # `rubocop --auto-gen-config`
5
- # on 2016-08-25 16:34:38 -0700 using RuboCop version 0.42.0.
3
+ # on 2022-02-16 16:30:36 -0500 using RuboCop version 0.85.1.
6
4
  # The point is for the user to remove these configuration records
7
5
  # one by one as the offenses are removed from the code base.
8
6
  # Note that changes in the inspected code, or installation of new
9
7
  # versions of RuboCop, may require this file to be generated again.
10
8
 
11
- # Offense count: 116
12
- # Configuration parameters: Max.
13
- RSpec/ExampleLength:
14
- Enabled: false
15
-
16
- # Offense count: 40
17
- RSpec/LeadingSubject:
18
- Enabled: false
19
-
20
- # Offense count: 15
21
- RSpec/LetSetup:
9
+ # Offense count: 5
10
+ # Configuration parameters: CountComments, ExcludedMethods.
11
+ # ExcludedMethods: refine
12
+ Metrics/BlockLength:
13
+ Max: 143
22
14
  Exclude:
23
- - 'spec/integration/collection_association_spec.rb'
24
- - 'spec/integration/delete_all_spec.rb'
25
- - 'spec/integration/has_many_associations_spec.rb'
26
- - 'spec/integration/nested_attribute_spec.rb'
27
- - 'spec/integration/persistence_spec.rb'
28
- - 'spec/unit/has_and_belongs_to_many_association_spec.rb'
15
+ - 'spec/**/*_spec.rb'
29
16
 
30
17
  # Offense count: 1
31
- RSpec/MessageChain:
18
+ # Configuration parameters: CountComments.
19
+ Metrics/ClassLength:
20
+ Max: 165
32
21
  Exclude:
33
- - 'spec/unit/file_spec.rb'
22
+ - 'lib/speedy_af/base.rb'
23
+
24
+ # Offense count: 1
25
+ # Configuration parameters: IgnoredMethods.
26
+ Metrics/CyclomaticComplexity:
27
+ Max: 11
28
+
29
+ # Offense count: 1
30
+ # Configuration parameters: IgnoredMethods.
31
+ Metrics/PerceivedComplexity:
32
+ Max: 11
33
+
34
+ # Offense count: 1
35
+ Metrics/AbcSize:
36
+ Max: 40
34
37
 
35
- # Offense count: 218
36
- # Configuration parameters: EnforcedStyle, SupportedStyles.
37
- # SupportedStyles: allow, expect
38
- RSpec/MessageExpectation:
39
- Enabled: false
38
+ # Offense count: 1
39
+ # Configuration parameters: CountComments, ExcludedMethods.
40
+ Metrics/MethodLength:
41
+ Max: 20
40
42
 
41
- # Offense count: 238
42
- RSpec/MultipleExpectations:
43
- Max: 8
43
+ # Offense count: 1
44
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
45
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
46
+ Naming/FileName:
47
+ Exclude:
48
+ - '**/Gemfile'
49
+ - '**/*.rake'
50
+ - 'Capfile'
51
+ - 'config/deploy/*'
52
+ - 'lib/speedy-af.rb'
44
53
 
45
- # Offense count: 394
46
- # Configuration parameters: MaxNesting.
47
- RSpec/NestedGroups:
48
- Enabled: false
54
+ # Offense count: 2
55
+ # Configuration parameters: Max.
56
+ RSpec/ExampleLength:
57
+ Exclude:
58
+ - 'spec/integration/base_spec.rb'
49
59
 
50
- # Offense count: 94
51
- RSpec/SubjectStub:
52
- Enabled: false
60
+ # Offense count: 3
61
+ # Cop supports --auto-correct.
62
+ # Configuration parameters: Include.
63
+ # Include: **/Rakefile, **/*.rake
64
+ Rails/RakeEnvironment:
65
+ Exclude:
66
+ - 'lib/capistrano/tasks/**/*.rake'
67
+ - 'Rakefile'
53
68
 
54
- RSpec/VerifiedDoubles:
55
- Enabled: false
69
+ # Offense count: 1
70
+ # Cop supports --auto-correct.
71
+ # Configuration parameters: EnforcedStyle.
72
+ # SupportedStyles: strict, flexible
73
+ Rails/TimeZone:
74
+ Exclude:
75
+ - 'lib/speedy_af/base.rb'
data/Gemfile CHANGED
@@ -2,4 +2,7 @@
2
2
  source 'https://rubygems.org'
3
3
 
4
4
  gemspec
5
+
6
+ gem 'byebug'
5
7
  gem 'pry-byebug' unless ENV['CI']
8
+ gem 'psych', '< 4' # pinned to less than 4 due to ActiveFedora not specifying this restriction
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  Code: [![Version](https://badge.fury.io/rb/speedy_af.png)](http://badge.fury.io/rb/speedy_af)
2
- [![Build Status](https://travis-ci.org/samvera-labs/speedy_af.png?branch=master)](https://travis-ci.org/samvera-labs/speedy_af)
2
+ [![CircleCI](https://circleci.com/gh/samvera-labs/speedy_af.svg?style=svg)](https://circleci.com/gh/samvera-labs/speedy_af)
3
3
  [![Coverage Status](https://coveralls.io/repos/github/samvera-labs/speedy_af/badge.svg?branch=master)](https://coveralls.io/github/samvera-labs/speedy_af?branch=master)
4
4
  [![Code Climate](https://codeclimate.com/github/samvera-labs/speedy_af/badges/gpa.svg)](https://codeclimate.com/github/samvera-labs/speedy_af)
5
5
  [![Dependency Status](https://gemnasium.com/samvera-labs/speedy_af.png)](https://gemnasium.com/samvera-labs/speedy_af)
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'solr_wrapper'
2
3
  require 'fcrepo_wrapper'
3
4
  require 'active_fedora/rake_support'
data/lib/speedy-af.rb CHANGED
@@ -1 +1,2 @@
1
+ # frozen_string_literal: true
1
2
  require 'speedy_af'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'ostruct'
2
3
 
3
4
  module SpeedyAF
@@ -6,55 +7,151 @@ module SpeedyAF
6
7
 
7
8
  SOLR_ALL = 10_000_000
8
9
 
10
+ class_attribute :model_reflections, :reflection_predicates
11
+ SpeedyAF::Base.model_reflections = { belongs_to: {}, has_many: {}, subresource: {} }
12
+ SpeedyAF::Base.reflection_predicates = {}
13
+
9
14
  attr_reader :attrs, :model
10
15
 
11
- def self.defaults
12
- @defaults ||= {}
13
- end
16
+ class << self
17
+ def defaults
18
+ @defaults ||= {}
19
+ end
14
20
 
15
- def self.defaults=(value)
16
- raise ArgumentError unless value.respond_to?(:merge)
17
- @defaults = value
18
- end
21
+ def defaults=(value)
22
+ raise ArgumentError unless value.respond_to?(:merge)
23
+ @defaults = value
24
+ end
19
25
 
20
- def self.proxy_class_for(model)
21
- klass = "::SpeedyAF::Proxy::#{model.name}".safe_constantize
22
- if klass.nil?
23
- namespace = model.name.deconstantize
24
- name = model.name.demodulize
25
- klass_module = namespace.split(/::/).inject(::SpeedyAF::Proxy) do |mod, ns|
26
- mod.const_defined?(ns, false) ? mod.const_get(ns, false) : mod.const_set(ns, Module.new)
26
+ def proxy_class_for(model)
27
+ klass = "::SpeedyAF::Proxy::#{model.name}".safe_constantize
28
+ if klass.nil?
29
+ namespace = model.name.deconstantize
30
+ name = model.name.demodulize
31
+ klass_module = namespace.split(/::/).inject(::SpeedyAF::Proxy) do |mod, ns|
32
+ mod.const_defined?(ns, false) ? mod.const_get(ns, false) : mod.const_set(ns, Module.new)
33
+ end
34
+ klass = klass_module.const_set(name, Class.new(self))
27
35
  end
28
- klass = klass_module.const_set(name, Class.new(self))
36
+ klass
29
37
  end
30
- klass
31
- end
32
38
 
33
- def self.config(model, &block)
34
- proxy_class = proxy_class_for(model) { Class.new(self) }
35
- proxy_class.class_eval(&block) if block_given?
36
- end
39
+ def config(model, &block)
40
+ proxy_class = proxy_class_for(model) { Class.new(self) }
41
+ proxy_class.class_eval(&block) if block_given?
42
+ end
37
43
 
38
- def self.find(id, opts = {})
39
- where(%(id:"#{id}"), opts).first
40
- end
44
+ def find(id, opts = {})
45
+ where(%(id:"#{id}"), opts).first
46
+ end
41
47
 
42
- def self.where(query, opts = {})
43
- docs = ActiveFedora::SolrService.query(query, rows: SOLR_ALL)
44
- from(docs, opts)
45
- end
48
+ def where(query, opts = {})
49
+ docs = ActiveFedora::SolrService.query(query, rows: SOLR_ALL)
50
+ from(docs, opts)
51
+ end
46
52
 
47
- def self.from(docs, opts = {})
48
- hash = docs.each_with_object({}) do |doc, h|
53
+ def for(doc, opts = {})
49
54
  proxy = proxy_class_for(model_for(doc))
50
- h[doc['id']] = proxy.new(doc, opts[:defaults])
55
+ proxy.new(doc, opts[:defaults])
56
+ end
57
+
58
+ def from(docs, opts = {})
59
+ hash = docs.each_with_object({}) do |doc, h|
60
+ h[doc['id']] = self.for(doc, opts)
61
+ end
62
+
63
+ if opts[:load_reflections]
64
+ reflections_hash = gather_reflections(hash, opts)
65
+ reflections_hash.each { |parent_id, reflections| hash[parent_id].attrs.merge!(reflections) }
66
+ end
67
+
68
+ return hash.values if opts[:order].nil?
69
+ opts[:order].call.collect { |id| hash[id] }.to_a
70
+ end
71
+
72
+ def model_for(solr_document)
73
+ solr_document[:has_model_ssim].first.safe_constantize
74
+ end
75
+
76
+ protected
77
+
78
+ def predicate_for_reflection(reflection)
79
+ SpeedyAF::Base.reflection_predicates[reflection.name] ||= reflection.predicate_for_solr
80
+ end
81
+
82
+ def gather_reflections(proxy_hash, opts)
83
+ query = [query_for_belongs_to(proxy_hash, opts), query_for_has_many(proxy_hash, opts), query_for_subresources(proxy_hash, opts)].reject(&:blank?).join(" OR ")
84
+ docs = ActiveFedora::SolrService.query query, rows: SOLR_ALL
85
+
86
+ reflections = {}
87
+ reflections.deep_merge!(gather_belongs_to(docs, proxy_hash, opts))
88
+ reflections.deep_merge!(gather_has_many(docs, proxy_hash, opts))
89
+ reflections.deep_merge!(gather_subresources(docs, proxy_hash, opts))
90
+ reflections
91
+ end
92
+
93
+ def query_for_belongs_to(proxy_hash, _opts)
94
+ proxy_hash.collect do |_id, proxy|
95
+ proxy.belongs_to_reflections.collect { |_name, reflection| "id:#{proxy.attrs[predicate_for_reflection(reflection).to_sym]}" }
96
+ end.flatten.join(" OR ")
97
+ end
98
+
99
+ def gather_belongs_to(docs, proxy_hash, _opts)
100
+ hash = {}
101
+ proxy_hash.each do |proxy_id, proxy|
102
+ proxy.belongs_to_reflections.each do |name, reflection|
103
+ doc = docs.find { |d| d.id == proxy.attrs[predicate_for_reflection(reflection).to_sym] }
104
+ next unless doc
105
+ hash[proxy_id] ||= {}
106
+ hash[proxy_id][name] = doc
107
+ hash[proxy_id]["#{name}_id".to_sym] = doc.id
108
+ end
109
+ end
110
+ hash
111
+ end
112
+
113
+ def query_for_has_many(proxy_hash, _opts)
114
+ proxy_hash.collect do |id, proxy|
115
+ proxy.has_many_reflections.collect { |_name, reflection| "#{predicate_for_reflection(reflection)}_ssim:#{id}" }
116
+ end.flatten.join(" OR ")
117
+ end
118
+
119
+ def gather_has_many(docs, proxy_hash, _opts)
120
+ hash = {}
121
+ has_many_reflections = SpeedyAF::Base.model_reflections[:has_many].values.reduce(:merge)
122
+ docs.each do |doc|
123
+ has_many_reflections.each do |name, reflection|
124
+ Array(doc["#{predicate_for_reflection(reflection)}_ssim"]).each do |proxy_id|
125
+ next unless proxy_hash.key?(proxy_id)
126
+ hash[proxy_id] ||= {}
127
+ hash[proxy_id][name] ||= []
128
+ hash[proxy_id][name] << doc
129
+ hash[proxy_id]["#{name.to_s.singularize}_ids".to_sym] ||= []
130
+ hash[proxy_id]["#{name.to_s.singularize}_ids".to_sym] << doc.id
131
+ end
132
+ end
133
+ end
134
+ hash
135
+ end
136
+
137
+ def query_for_subresources(proxy_hash, _opts)
138
+ proxy_hash.collect do |id, proxy|
139
+ proxy.subresource_reflections.collect { |name, _reflection| "id:#{id}/#{name}" }
140
+ end.flatten.join(" OR ")
51
141
  end
52
- return hash.values if opts[:order].nil?
53
- opts[:order].call.collect { |id| hash[id] }.to_a
54
- end
55
142
 
56
- def self.model_for(solr_document)
57
- solr_document[:has_model_ssim].first.safe_constantize
143
+ def gather_subresources(docs, proxy_hash, _opts)
144
+ docs.each_with_object({}) do |doc, hash|
145
+ doc_id = doc.id
146
+ parent_id = proxy_hash.keys.find { |id| doc_id.start_with? id }
147
+ next unless parent_id
148
+ subresource_id = proxy_hash[parent_id].subresource_reflections.keys.find { |name| doc_id == "#{parent_id}/#{name}" }
149
+ next unless subresource_id
150
+ hash[parent_id] ||= {}
151
+ hash[parent_id][subresource_id.to_sym] = doc
152
+ hash[parent_id]["#{subresource_id}_id".to_sym] = doc_id
153
+ end
154
+ end
58
155
  end
59
156
 
60
157
  def initialize(solr_document, instance_defaults = {})
@@ -100,7 +197,12 @@ module SpeedyAF
100
197
  def method_missing(sym, *args)
101
198
  return real_object.send(sym, *args) if real?
102
199
 
103
- return @attrs[sym] if @attrs.key?(sym)
200
+ if @attrs.key?(sym)
201
+ # Lazy convert the solr document into a speedy_af proxy object
202
+ @attrs[sym] = SpeedyAF::Base.for(@attrs[sym]) if @attrs[sym].is_a?(ActiveFedora::SolrHit)
203
+ @attrs[sym] = @attrs[sym].map { |doc| SpeedyAF::Base.for(doc) } if @attrs[sym].is_a?(Array) && @attrs[sym].all? { |d| d.is_a?(ActiveFedora::SolrHit) }
204
+ return @attrs[sym]
205
+ end
104
206
 
105
207
  reflection = reflection_for(sym)
106
208
  unless reflection.nil?
@@ -118,97 +220,103 @@ module SpeedyAF
118
220
  super
119
221
  end
120
222
 
223
+ def subresource_reflections
224
+ SpeedyAF::Base.model_reflections[:subresource][model] ||= model.reflections.select { |_name, reflection| reflection.is_a? ActiveFedora::Reflection::HasSubresourceReflection }
225
+ end
226
+
227
+ # rubocop:disable Naming/PredicateName
228
+ def has_many_reflections
229
+ SpeedyAF::Base.model_reflections[:has_many][model] ||= model.reflections.select { |_name, reflection| reflection.has_many? && reflection.respond_to?(:predicate_for_solr) }
230
+ end
231
+ # rubocop:enable Naming/PredicateName
232
+
233
+ def belongs_to_reflections
234
+ SpeedyAF::Base.model_reflections[:belongs_to][model] ||= model.reflections.select { |_name, reflection| reflection.belongs_to? && reflection.respond_to?(:predicate_for_solr) }
235
+ end
236
+
121
237
  protected
122
238
 
123
- def reflection_for(sym)
124
- return nil unless model.respond_to?(:reflections)
125
- reflection_name = sym.to_s.sub(/_id(s?)$/, '\1').to_sym
126
- model.reflections[reflection_name] || model.reflections[:"#{reflection_name.to_s.singularize}_proxies"]
127
- end
128
-
129
- def parse_solr_field(k, v)
130
- # :nocov:
131
- transforms = {
132
- 'dt' => ->(m) { Time.parse(m) },
133
- 'b' => ->(m) { m },
134
- 'db' => ->(m) { m.to_f },
135
- 'f' => ->(m) { m.to_f },
136
- 'i' => ->(m) { m.to_i },
137
- 'l' => ->(m) { m.to_i },
138
- nil => ->(m) { m }
139
- }
140
- # :nocov:
141
- attr_name, type, _stored, _indexed, _multi = k.scan(/^(.+)_(.+)(s)(i?)(m?)$/).first
142
- return [k, v] if attr_name.nil?
143
- value = Array(v).map { |m| transforms.fetch(type, transforms[nil]).call(m) }
144
- value = value.first unless @model.respond_to?(:properties) && multiple?(@model.properties[attr_name])
145
- [attr_name, value]
146
- end
147
-
148
- def multiple?(prop)
149
- prop.present? && prop.respond_to?(:multiple?) && prop.multiple?
150
- end
151
-
152
- def load_from_reflection(reflection, ids_only = false)
153
- if reflection.options.key?(:through)
154
- return load_through_reflection(reflection, ids_only)
155
- end
156
- if reflection.belongs_to? && reflection.respond_to?(:predicate_for_solr)
157
- return load_belongs_to_reflection(reflection.predicate_for_solr, ids_only)
158
- end
159
- if reflection.has_many? && reflection.respond_to?(:predicate_for_solr)
160
- return load_has_many_reflection(reflection.predicate_for_solr, ids_only)
161
- end
162
- if reflection.is_a?(ActiveFedora::Reflection::HasSubresourceReflection)
163
- return load_subresource_content(reflection)
164
- end
165
- # :nocov:
166
- raise NotAvailable, "`#{reflection.name}' cannot be quick-loaded. Falling back to model."
167
- # :nocov:
168
- end
239
+ def reflection_for(sym)
240
+ return nil unless model.respond_to?(:reflections)
241
+ reflection_name = sym.to_s.sub(/_id(s?)$/, '\1').to_sym
242
+ model.reflections[reflection_name] || model.reflections[:"#{reflection_name.to_s.singularize}_proxies"]
243
+ end
169
244
 
170
- def load_through_reflection(reflection, ids_only = false)
171
- ids = case reflection.options[:through]
172
- when 'ActiveFedora::Aggregation::Proxy' then proxy_ids(reflection)
173
- else subresource_ids(reflection)
174
- end
175
- return ids if ids_only
176
- query = ActiveFedora::SolrQueryBuilder.construct_query_for_ids(ids)
177
- Base.where(query, order: -> { ids })
178
- end
245
+ def parse_solr_field(k, v)
246
+ # :nocov:
247
+ transforms = {
248
+ 'dt' => ->(m) { Time.parse(m) },
249
+ 'b' => ->(m) { m },
250
+ 'db' => ->(m) { m.to_f },
251
+ 'f' => ->(m) { m.to_f },
252
+ 'i' => ->(m) { m.to_i },
253
+ 'l' => ->(m) { m.to_i },
254
+ nil => ->(m) { m }
255
+ }
256
+ # :nocov:
257
+ attr_name, type, _stored, _indexed, _multi = k.scan(/^(.+)_(.+)(s)(i?)(m?)$/).first
258
+ return [k, v] if attr_name.nil?
259
+ value = Array(v).map { |m| transforms.fetch(type, transforms[nil]).call(m) }
260
+ value = value.first unless @model.respond_to?(:properties) && multiple?(@model.properties[attr_name])
261
+ [attr_name, value]
262
+ end
179
263
 
180
- def proxy_ids(reflection)
181
- docs = ActiveFedora::SolrService.query %(id:#{id}/#{reflection.name}/*), rows: SOLR_ALL
182
- docs.collect { |doc| doc['proxyFor_ssim'] }.flatten
183
- end
264
+ def multiple?(prop)
265
+ prop.present? && prop.respond_to?(:multiple?) && prop.multiple?
266
+ end
184
267
 
185
- def subresource_ids(reflection)
186
- subresource = reflection.options[:through]
187
- docs = ActiveFedora::SolrService.query %(id:"#{id}/#{subresource}"), rows: 1
188
- return [] if docs.empty?
189
- ids = docs.first['ordered_targets_ssim']
190
- return [] if ids.nil?
191
- ids
192
- end
268
+ def load_from_reflection(reflection, ids_only = false)
269
+ return load_through_reflection(reflection, ids_only) if reflection.options.key?(:through)
270
+ return load_belongs_to_reflection(reflection.predicate_for_solr, ids_only) if reflection.belongs_to? && reflection.respond_to?(:predicate_for_solr)
271
+ return load_has_many_reflection(reflection.predicate_for_solr, ids_only) if reflection.has_many? && reflection.respond_to?(:predicate_for_solr)
272
+ return load_subresource_content(reflection) if reflection.is_a?(ActiveFedora::Reflection::HasSubresourceReflection)
273
+ # :nocov:
274
+ raise NotAvailable, "`#{reflection.name}' cannot be quick-loaded. Falling back to model."
275
+ # :nocov:
276
+ end
193
277
 
194
- def load_belongs_to_reflection(predicate, ids_only = false)
195
- id = @attrs[predicate.to_sym]
196
- return id if ids_only
197
- Base.find(id)
198
- end
278
+ def load_through_reflection(reflection, ids_only = false)
279
+ ids = case reflection.options[:through]
280
+ when 'ActiveFedora::Aggregation::Proxy' then proxy_ids(reflection)
281
+ else subresource_ids(reflection)
282
+ end
283
+ return ids if ids_only
284
+ query = ActiveFedora::SolrQueryBuilder.construct_query_for_ids(ids)
285
+ Base.where(query, order: -> { ids })
286
+ end
199
287
 
200
- def load_has_many_reflection(predicate, ids_only = false)
201
- query = %(#{predicate}_ssim:#{id})
202
- return Base.where(query) unless ids_only
203
- docs = ActiveFedora::SolrService.query query, rows: SOLR_ALL
204
- docs.collect { |doc| doc['id'] }
205
- end
288
+ def proxy_ids(reflection)
289
+ docs = ActiveFedora::SolrService.query %(id:#{id}/#{reflection.name}/*), rows: SOLR_ALL
290
+ docs.collect { |doc| doc['proxyFor_ssim'] }.flatten
291
+ end
206
292
 
207
- def load_subresource_content(reflection)
208
- subresource = reflection.name
209
- docs = ActiveFedora::SolrService.query(%(id:"#{id}/#{subresource}"), rows: 1)
210
- raise NotAvailable, "`#{subresource}' is not indexed" if docs.empty? || !docs.first.key?('has_model_ssim')
211
- @attrs[subresource] = Base.from(docs).first
212
- end
293
+ def subresource_ids(reflection)
294
+ subresource = reflection.options[:through]
295
+ docs = ActiveFedora::SolrService.query %(id:"#{id}/#{subresource}"), rows: 1
296
+ return [] if docs.empty?
297
+ ids = docs.first['ordered_targets_ssim']
298
+ return [] if ids.nil?
299
+ ids
300
+ end
301
+
302
+ def load_belongs_to_reflection(predicate, ids_only = false)
303
+ id = @attrs[predicate.to_sym]
304
+ return id if ids_only
305
+ Base.find(id)
306
+ end
307
+
308
+ def load_has_many_reflection(predicate, ids_only = false)
309
+ query = %(#{predicate}_ssim:#{id})
310
+ return Base.where(query) unless ids_only
311
+ docs = ActiveFedora::SolrService.query query, rows: SOLR_ALL
312
+ docs.collect { |doc| doc['id'] }
313
+ end
314
+
315
+ def load_subresource_content(reflection)
316
+ subresource = reflection.name
317
+ docs = ActiveFedora::SolrService.query(%(id:"#{id}/#{subresource}"), rows: 1)
318
+ raise NotAvailable, "`#{subresource}' is not indexed" if docs.empty? || !docs.first.key?('has_model_ssim')
319
+ @attrs[subresource] = Base.from(docs).first
320
+ end
213
321
  end
214
322
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module SpeedyAF
2
3
  module IndexedContent
3
4
  extend ActiveSupport::Concern
@@ -16,7 +17,7 @@ module SpeedyAF
16
17
  doc[:mime_type_ss] = mime_type
17
18
  doc[:original_name_ss] = original_name
18
19
  doc[:size_is] = content.present? ? content.size : 0
19
- doc[:'empty?_bs'] = content.nil? || content.empty?
20
+ doc[:'empty?_bs'] = content.blank?
20
21
  doc[:content_ss] = content if index_content?
21
22
  end
22
23
  end
@@ -27,8 +28,8 @@ module SpeedyAF
27
28
 
28
29
  protected
29
30
 
30
- def index_content?
31
- has_content? && mime_type =~ /(^text\/)|([\/\+]xml$)/ && size < MAX_CONTENT_SIZE && content !~ /\x00/
32
- end
31
+ def index_content?
32
+ has_content? && mime_type =~ /(^text\/)|([\/\+]xml$)/ && size < MAX_CONTENT_SIZE && content !~ /\x00/
33
+ end
33
34
  end
34
35
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module SpeedyAF
2
3
  module OrderedAggregationIndex
3
4
  extend ActiveSupport::Concern
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module SpeedyAF
2
- VERSION = '0.1.3'.freeze
3
+ VERSION = '0.3.0'
3
4
  end
data/lib/speedy_af.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'active_fedora'
2
3
  module SpeedyAF
3
4
  module Proxy; end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class IndexedFile < ActiveFedora::File
2
3
  include SpeedyAF::IndexedContent
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'rdf/vocab/dc'
3
4
 
@@ -7,27 +8,29 @@ describe SpeedyAF::Base do
7
8
 
8
9
  let!(:library) { Library.create }
9
10
  let!(:book) { Book.new title: 'Ordered Things', publisher: 'ActiveFedora Performance LLC', library: library }
10
- let!(:chapters) {[
11
- Chapter.create(title: 'Chapter 3', contributor: ['Hopper', 'Lovelace', 'Johnson']),
12
- Chapter.create(title: 'Chapter 1', contributor: ['Rogers', 'Johnson', 'Stark', 'Romanoff']),
13
- Chapter.create(title: 'Chapter 2', contributor: ['Alice', 'Bob', 'Charlie'])
14
- ]}
15
- let!(:indexed_content) {
11
+ let!(:chapters) do
12
+ [
13
+ Chapter.create(title: 'Chapter 3', contributor: ['Hopper', 'Lovelace', 'Johnson']),
14
+ Chapter.create(title: 'Chapter 1', contributor: ['Rogers', 'Johnson', 'Stark', 'Romanoff']),
15
+ Chapter.create(title: 'Chapter 2', contributor: ['Alice', 'Bob', 'Charlie'])
16
+ ]
17
+ end
18
+ let!(:indexed_content) do
16
19
  <<-IPSUM
17
20
  Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering
18
21
  animata corpora quaeritis. Summus brains sit, morbo vel maleficia? De apocalypsi gorger
19
22
  omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil
20
23
  stalking monstra adventus resi dentevil vultus comedat cerebella viventium.
21
24
  IPSUM
22
- }
23
- let!(:unindexed_content) {
25
+ end
26
+ let!(:unindexed_content) do
24
27
  <<-IPSUM
25
28
  Qui animated corpse, cricket bat max brucks terribilem incessu zomby. The voodoo sacerdos
26
29
  flesh eater, suscitat mortuos comedere carnem virus. Zonbi tattered for solum oculi eorum
27
30
  defunctis go lum cerebro. Nescio brains an Undead zombies. Sicut malus putrid voodoo horror.
28
31
  Nigh tofth eliv ingdead.
29
32
  IPSUM
30
- }
33
+ end
31
34
  let(:book_presenter) { described_class.find(book.id) }
32
35
 
33
36
  context 'lightweight presenter' do
@@ -101,6 +104,45 @@ describe SpeedyAF::Base do
101
104
  expect(book_presenter.library.model).to eq(library.class)
102
105
  expect(book_presenter).not_to be_real
103
106
  end
107
+
108
+ context 'preloaded subresources' do
109
+ let(:book_presenter) { described_class.find(book.id, load_reflections: true) }
110
+
111
+ it 'has already loaded indexed subresources' do
112
+ expect(book_presenter.attrs).to include :indexed_file
113
+ allow(ActiveFedora::SolrService).to receive(:query).and_call_original
114
+ ipsum_presenter = book_presenter.indexed_file
115
+ expect(ipsum_presenter.model).to eq(IndexedFile)
116
+ expect(ipsum_presenter.content).to eq(indexed_content)
117
+ expect(ipsum_presenter).not_to be_real
118
+ expect(ActiveFedora::SolrService).not_to have_received(:query)
119
+ end
120
+
121
+ it 'has already loaded has_many reflections' do
122
+ library.books.create(title: 'Ordered Things II')
123
+ library.save
124
+ book_ids = library.book_ids
125
+ library_presenter = described_class.find(library.id, load_reflections: true)
126
+ expect(library_presenter.attrs).to include :books
127
+ allow(ActiveFedora::SolrService).to receive(:query).and_call_original
128
+ presenter = library_presenter.books
129
+ expect(presenter.length).to eq(2)
130
+ expect(presenter.all? { |bp| bp.is_a?(described_class) }).to be_truthy
131
+ expect(library_presenter.book_ids).to match_array(book_ids)
132
+ expect(library_presenter).not_to be_real
133
+ expect(ActiveFedora::SolrService).not_to have_received(:query)
134
+ end
135
+
136
+ it 'has already loaded belongs_to reflections' do
137
+ expect(book_presenter.attrs).to include :library
138
+ allow(ActiveFedora::SolrService).to receive(:query).and_call_original
139
+ expect(book_presenter.library_id).to eq(library.id)
140
+ expect(book_presenter.library).to be_a(described_class)
141
+ expect(book_presenter.library.model).to eq(library.class)
142
+ expect(book_presenter).not_to be_real
143
+ expect(ActiveFedora::SolrService).not_to have_received(:query)
144
+ end
145
+ end
104
146
  end
105
147
 
106
148
  context 'configuration' do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe SpeedyAF::OrderedAggregationIndex do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  ENV['environment'] ||= 'test'
2
3
  require 'bundler/setup'
3
4
 
@@ -9,6 +10,8 @@ SimpleCov.start do
9
10
  add_filter '/spec/'
10
11
  end
11
12
 
13
+ require 'byebug'
14
+ require 'rsolr'
12
15
  require 'active-fedora'
13
16
  require 'speedy_af'
14
17
  require 'rspec'
@@ -17,12 +20,10 @@ require 'rspec/its'
17
20
  require 'active_fedora/cleaner'
18
21
  RSpec.configure do |config|
19
22
  # Stub out test stuff.
20
- config.before(:each) do
21
- begin
22
- ActiveFedora::Cleaner.clean!
23
- rescue Faraday::ConnectionFailed, RSolr::Error::ConnectionRefused => e
24
- $stderr.puts e.message
25
- end
23
+ config.before do
24
+ ActiveFedora::Cleaner.clean!
25
+ rescue Faraday::ConnectionFailed, RSolr::Error::ConnectionRefused => e
26
+ $stderr.puts e.message
26
27
  end
27
28
  end
28
29
 
data/speedy-af.gemspec CHANGED
@@ -1,12 +1,11 @@
1
+ # frozen_string_literal: true
1
2
  require File.expand_path('../lib/speedy_af/version', __FILE__)
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = 'speedy-af'
5
6
  s.version = SpeedyAF::VERSION
6
7
 
7
- if s.respond_to? :required_rubygems_version=
8
- s.required_rubygems_version = Gem::Requirement.new('>= 0')
9
- end
8
+ s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
10
9
  s.authors = ['Michael B. Klein']
11
10
  s.description = 'Performance enhancements for ActiveFedora'
12
11
  s.email = 'mbklein@gmail.com'
@@ -24,16 +23,16 @@ Gem::Specification.new do |s|
24
23
  s.files = `git ls-files`.split("\n")
25
24
  s.test_files = `git ls-files -- {spec}/*`.split("\n")
26
25
 
27
- s.add_dependency 'active-fedora', ['>= 11.0.0']
28
- s.add_dependency 'activesupport', '< 5.3'
29
- s.add_development_dependency 'solr_wrapper', '~> 0.15'
30
- s.add_development_dependency 'fcrepo_wrapper', '~> 0.2'
26
+ s.add_dependency 'active-fedora', '>= 11.0.0'
27
+ s.add_dependency 'activesupport', '> 5.2'
28
+ s.add_development_dependency 'solr_wrapper'
29
+ s.add_development_dependency 'fcrepo_wrapper'
31
30
  s.add_development_dependency 'simplecov'
32
31
  s.add_development_dependency 'coveralls'
33
32
  s.add_development_dependency 'rspec', '~> 3.0'
34
33
  s.add_development_dependency 'rspec-its'
34
+ s.add_development_dependency 'rspec_junit_formatter'
35
35
  s.add_development_dependency 'rake'
36
36
  s.add_development_dependency 'rdoc'
37
- s.add_development_dependency 'rubocop', '~> 0.42.0'
38
- s.add_development_dependency 'rubocop-rspec', '~> 1.8.0'
37
+ s.add_development_dependency 'bixby'
39
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speedy-af
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael B. Klein
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2022-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora
@@ -28,44 +28,44 @@ dependencies:
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "<"
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.3'
33
+ version: '5.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "<"
38
+ - - ">"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.3'
40
+ version: '5.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: solr_wrapper
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '0.15'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0.15'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fcrepo_wrapper
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '0.2'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '0.2'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rake
126
+ name: rspec_junit_formatter
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
@@ -137,7 +137,7 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rdoc
140
+ name: rake
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
@@ -151,33 +151,33 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: rubocop
154
+ name: rdoc
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 0.42.0
159
+ version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: 0.42.0
166
+ version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: rubocop-rspec
168
+ name: bixby
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: 1.8.0
173
+ version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - "~>"
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: 1.8.0
180
+ version: '0'
181
181
  description: Performance enhancements for ActiveFedora
182
182
  email: mbklein@gmail.com
183
183
  executables: []
@@ -187,10 +187,10 @@ extra_rdoc_files:
187
187
  - README.md
188
188
  - LICENSE
189
189
  files:
190
+ - ".circleci/config.yml"
190
191
  - ".gitignore"
191
192
  - ".rubocop.yml"
192
193
  - ".rubocop_todo.yml"
193
- - ".travis.yml"
194
194
  - CONTRIBUTING.md
195
195
  - Gemfile
196
196
  - LICENSE
@@ -211,7 +211,7 @@ homepage: http://github.com/samvera-labs/speedy_af
211
211
  licenses:
212
212
  - APACHE2
213
213
  metadata: {}
214
- post_install_message:
214
+ post_install_message:
215
215
  rdoc_options: []
216
216
  require_paths:
217
217
  - lib
@@ -226,8 +226,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  - !ruby/object:Gem::Version
227
227
  version: '0'
228
228
  requirements: []
229
- rubygems_version: 3.0.1
230
- signing_key:
229
+ rubygems_version: 3.1.6
230
+ signing_key:
231
231
  specification_version: 4
232
232
  summary: Performance enhancements for ActiveFedora
233
233
  test_files: []
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- sudo: false
4
- rvm: 2.4.0
5
- matrix:
6
- include:
7
- - rvm: 2.3.3
8
- env: "RAILS_VERSION=4.2.7.1"
9
- - env: "RSOLR_VERSION=2.0.0.pre1"
10
- global_env:
11
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
12
- before_install:
13
- - gem update --system
14
- before_script:
15
- - jdk_switcher use oraclejdk8