active-fedora 9.7.3 → 9.8.0
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -27
- data/History.txt +7 -3
- data/README.md +12 -13
- data/Rakefile +1 -1
- data/active-fedora.gemspec +4 -3
- data/config/fedora.yml +2 -2
- data/config/solr.yml +5 -5
- data/lib/active_fedora/autosave_association.rb +1 -1
- data/lib/active_fedora/file.rb +11 -1
- data/lib/active_fedora/indexing/map.rb +2 -1
- data/lib/active_fedora/nested_attributes.rb +1 -1
- data/lib/active_fedora/rdf/field_map.rb +4 -2
- data/lib/active_fedora/relation/finder_methods.rb +3 -3
- data/lib/active_fedora/scoping/named.rb +0 -1
- data/lib/active_fedora/solr_query_builder.rb +3 -10
- data/lib/active_fedora/version.rb +1 -1
- data/lib/generators/active_fedora/config/fedora/templates/fedora.yml +2 -2
- data/lib/generators/active_fedora/config/solr/solr_generator.rb +0 -1
- data/lib/generators/active_fedora/config/solr/templates/solr.yml +2 -2
- data/lib/tasks/active_fedora_dev.rake +13 -8
- data/solr/config/_rest_managed.json +3 -0
- data/solr/config/admin-extra.html +31 -0
- data/solr/config/elevate.xml +36 -0
- data/solr/config/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/config/protwords.txt +21 -0
- data/solr/config/schema.xml +372 -0
- data/solr/config/scripts.conf +24 -0
- data/solr/config/solrconfig.xml +419 -0
- data/solr/config/spellings.txt +2 -0
- data/solr/config/stopwords.txt +58 -0
- data/solr/config/stopwords_en.txt +58 -0
- data/solr/config/synonyms.txt +31 -0
- data/solr/config/xslt/example.xsl +132 -0
- data/solr/config/xslt/example_atom.xsl +67 -0
- data/solr/config/xslt/example_rss.xsl +66 -0
- data/solr/config/xslt/luke.xsl +337 -0
- data/spec/integration/complex_rdf_datastream_spec.rb +8 -8
- data/spec/integration/datastream_rdf_nested_attributes_spec.rb +3 -3
- data/spec/integration/has_and_belongs_to_many_associations_spec.rb +1 -1
- data/spec/integration/ntriples_datastream_spec.rb +12 -1
- data/spec/integration/rdf_nested_attributes_spec.rb +51 -20
- data/spec/integration/scoped_query_spec.rb +1 -2
- data/spec/samples/hydra-mods_article_datastream.rb +4 -2
- data/spec/unit/active_fedora_spec.rb +0 -3
- data/spec/unit/base_spec.rb +1 -1
- data/spec/unit/finder_methods_spec.rb +2 -2
- data/spec/unit/ntriples_datastream_spec.rb +20 -10
- data/spec/unit/query_spec.rb +10 -10
- data/spec/unit/sparql_insert_spec.rb +1 -1
- metadata +42 -14
- data/config/solr_mappings_af_0.1.yml +0 -9
- data/config/solr_mappings_bl_2.4.yml +0 -17
- data/lib/generators/active_fedora/config/solr/templates/jetty.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb7bb622089037ec0a49870417c31aedf0b2b3c1
|
4
|
+
data.tar.gz: 077acf9671652587082be135de13ca1afa05b709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cee9e01316cd57089335922d058f7bb537f3845c5da764601be842331707ac1ef175ecd20e6bc8e7cb759b432ec752b0fe9bcda08877b10dea2a72f97a2fc76
|
7
|
+
data.tar.gz: 23964a8f464c39dd2d0c53f5f6418337c76235489d2924895af34d979c214e551999b430d0072d28d6243e7c06114f170eecb8a6e9124664715e82b342f4c1f2
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
1
3
|
AllCops:
|
2
4
|
TargetRubyVersion: 2.2
|
3
5
|
DisplayCopNames: true
|
@@ -12,7 +14,6 @@ Lint/HandleExceptions:
|
|
12
14
|
- 'spec/unit/**/*'
|
13
15
|
- 'spec/integration/**/*'
|
14
16
|
- 'lib/active_fedora/cleaner.rb'
|
15
|
-
- 'lib/active_fedora/associations/builder/has_subresource.rb'
|
16
17
|
- 'lib/active_fedora/associations/builder/contains.rb'
|
17
18
|
|
18
19
|
Lint/AssignmentInCondition:
|
@@ -44,9 +45,6 @@ Metrics/CyclomaticComplexity:
|
|
44
45
|
- 'lib/active_fedora/file_configurator.rb'
|
45
46
|
- 'lib/active_fedora/file.rb'
|
46
47
|
- 'lib/active_fedora/datastreams/nokogiri_datastreams.rb'
|
47
|
-
- 'lib/active_fedora/attribute_methods.rb'
|
48
|
-
- 'lib/active_fedora/scoping/named.rb'
|
49
|
-
- 'lib/active_fedora/inheritance.rb'
|
50
48
|
|
51
49
|
Metrics/PerceivedComplexity:
|
52
50
|
Exclude:
|
@@ -60,10 +58,6 @@ Metrics/PerceivedComplexity:
|
|
60
58
|
- 'lib/active_fedora/associations/has_and_belongs_to_many_association.rb'
|
61
59
|
- 'lib/active_fedora/associations/builder/indirectly_contains.rb'
|
62
60
|
- 'lib/active_fedora/associations/builder/directly_contains_one.rb'
|
63
|
-
- 'lib/active_fedora/associations/collection_association.rb'
|
64
|
-
- 'lib/active_fedora/attribute_methods.rb'
|
65
|
-
- 'lib/active_fedora/scoping/named.rb'
|
66
|
-
- 'lib/active_fedora/inheritance.rb'
|
67
61
|
|
68
62
|
Metrics/ModuleLength:
|
69
63
|
Exclude:
|
@@ -73,7 +67,6 @@ Metrics/ModuleLength:
|
|
73
67
|
- 'lib/active_fedora/attributes.rb'
|
74
68
|
- 'lib/active_fedora/autosave_association.rb'
|
75
69
|
- 'lib/active_fedora/attached_files.rb'
|
76
|
-
- 'lib/active_fedora/nested_attributes.rb'
|
77
70
|
|
78
71
|
Metrics/ClassLength:
|
79
72
|
Exclude:
|
@@ -83,13 +76,8 @@ Metrics/ClassLength:
|
|
83
76
|
- 'lib/active_fedora/qualified_dublin_core_datastream.rb'
|
84
77
|
- 'lib/active_fedora/file_configurator.rb'
|
85
78
|
- 'lib/active_fedora/file.rb'
|
86
|
-
- 'lib/active_fedora/associations/association.rb'
|
87
|
-
- 'lib/active_fedora/associations/builder/association.rb'
|
88
79
|
- 'lib/active_fedora/associations/collection_proxy.rb'
|
89
80
|
- 'lib/active_fedora/associations/collection_association.rb'
|
90
|
-
- 'lib/active_fedora/reflection.rb'
|
91
|
-
- 'lib/active_fedora/orders/ordered_list.rb'
|
92
|
-
- 'lib/active_fedora/solr_service.rb'
|
93
81
|
|
94
82
|
Metrics/MethodLength:
|
95
83
|
Enabled: false
|
@@ -113,7 +101,6 @@ Style/AccessorMethodName:
|
|
113
101
|
|
114
102
|
Style/PredicateName:
|
115
103
|
Exclude:
|
116
|
-
- 'lib/active_fedora/attribute_methods.rb'
|
117
104
|
- 'lib/active_fedora/relation/finder_methods.rb'
|
118
105
|
- 'lib/active_fedora/versionable.rb'
|
119
106
|
- 'lib/active_fedora/reflection.rb'
|
@@ -126,14 +113,10 @@ Style/PredicateName:
|
|
126
113
|
- 'lib/active_fedora/attached_files.rb'
|
127
114
|
- 'lib/active_fedora/associations.rb'
|
128
115
|
- 'lib/active_fedora/association_hash.rb'
|
129
|
-
- 'lib/active_fedora/aggregation/list_source.rb'
|
130
|
-
- 'lib/active_fedora/associations/builder/aggregation.rb'
|
131
116
|
|
132
117
|
Style/GuardClause:
|
133
118
|
Exclude:
|
134
119
|
- 'lib/active_fedora/autosave_association.rb'
|
135
|
-
- 'lib/active_fedora/associations/builder/belongs_to.rb'
|
136
|
-
- 'lib/active_fedora/associations/builder/has_and_belongs_to_many.rb'
|
137
120
|
|
138
121
|
Style/TrivialAccessors:
|
139
122
|
Exclude:
|
@@ -221,8 +204,10 @@ Style/FileName:
|
|
221
204
|
- 'spec/samples/hydra-mods_article_datastream.rb'
|
222
205
|
|
223
206
|
Style/ZeroLengthPredicate:
|
224
|
-
|
225
|
-
|
207
|
+
Enabled: false # https://github.com/bbatsov/rubocop/issues/2782
|
208
|
+
|
209
|
+
Performance/RedundantMerge:
|
210
|
+
Enabled: false # https://github.com/bbatsov/rubocop/issues/2781
|
226
211
|
|
227
212
|
Rails:
|
228
213
|
Enabled: true
|
@@ -237,9 +222,6 @@ Rails/Date:
|
|
237
222
|
Rails/TimeZone:
|
238
223
|
Enabled: false
|
239
224
|
|
240
|
-
RSpec/AnyInstance:
|
241
|
-
Enabled: false
|
242
|
-
|
243
225
|
RSpec/ExampleWording:
|
244
226
|
CustomTransform:
|
245
227
|
be: is
|
@@ -262,6 +244,3 @@ RSpec/DescribeClass:
|
|
262
244
|
RSpec/DescribedClass:
|
263
245
|
Exclude:
|
264
246
|
- 'spec/unit/finder_methods_spec.rb'
|
265
|
-
|
266
|
-
RSpec/NotToNot:
|
267
|
-
Enabled: false
|
data/History.txt
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
v9.
|
2
|
-
|
1
|
+
v9.8.0
|
2
|
+
2016-02-04: Remove unused files [Justin Coyne]
|
3
3
|
|
4
|
-
|
4
|
+
2016-02-03: Test on Solr 5 [Justin Coyne]
|
5
|
+
|
6
|
+
2016-02-04: Fix rubocop [Justin Coyne]
|
7
|
+
|
8
|
+
2016-01-29: Pass hash of options to index.as [Adam Wead]
|
5
9
|
|
6
10
|
v9.7.1
|
7
11
|
2016-01-22 : The jcr/mix versionable predicate is no longer used [Adam Wead]
|
data/README.md
CHANGED
@@ -63,12 +63,8 @@ You can test ActiveFedora using the same process as our continuous
|
|
63
63
|
integration server. To do that, unzip a copy of hydra-jetty first. This includes copies of Fedora and Solr which are
|
64
64
|
used during the testing process.
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
```
|
69
|
-
|
70
|
-
Once hydra-jetty is unzipped, the ci rake task will spin up jetty,
|
71
|
-
import the fixtures, and run the tests for you.
|
66
|
+
The `ci` rake task will download solr and fedora, start them,
|
67
|
+
and run the tests for you.
|
72
68
|
|
73
69
|
```bash
|
74
70
|
rake active_fedora:ci
|
@@ -76,18 +72,21 @@ rake active_fedora:ci
|
|
76
72
|
|
77
73
|
### Testing Manually
|
78
74
|
|
79
|
-
If you want to run the tests manually, follow these instructions
|
75
|
+
If you want to run the tests manually, follow these instructions:
|
76
|
+
|
77
|
+
```bash
|
78
|
+
solr_wrapper -d solr/config/ --collection_name hydra-test
|
79
|
+
```
|
80
|
+
|
81
|
+
You can switch `hydra-test` to `hydra-dev` if you want to create a collection for development.
|
80
82
|
|
81
|
-
|
82
|
-
working copy of
|
83
|
-
[hydra-jetty](https://github.com/projecthydra/hydra-jetty), cd into its
|
84
|
-
root and run:
|
83
|
+
To start FCRepo, open another shell and run:
|
85
84
|
|
86
85
|
```bash
|
87
|
-
|
86
|
+
fedora_wrapper -p 8984
|
88
87
|
```
|
89
88
|
|
90
|
-
Now you’re ready to run the tests. In the directory where
|
89
|
+
Now you’re ready to run the tests. In the directory where active\_fedora
|
91
90
|
is installed, run:
|
92
91
|
|
93
92
|
```bash
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ load "lib/tasks/active_fedora_dev.rake"
|
|
9
9
|
CLEAN.include %w(**/.DS_Store tmp *.log *.orig *.tmp **/*~)
|
10
10
|
|
11
11
|
desc 'setup jetty and run tests'
|
12
|
-
task ci: ['
|
12
|
+
task ci: ['active_fedora:ci']
|
13
13
|
desc 'run tests'
|
14
14
|
task spec: ['active_fedora:rubocop', 'active_fedora:rspec']
|
15
15
|
task rcov: ['active_fedora:rcov']
|
data/active-fedora.gemspec
CHANGED
@@ -27,13 +27,14 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_development_dependency "rdoc"
|
28
28
|
s.add_development_dependency "yard"
|
29
29
|
s.add_development_dependency "rake"
|
30
|
-
s.add_development_dependency "
|
30
|
+
s.add_development_dependency "solr_wrapper", "~> 0.4"
|
31
|
+
s.add_development_dependency 'fcrepo_wrapper', '~> 0.1'
|
31
32
|
s.add_development_dependency "rspec", "~> 3.0"
|
32
33
|
s.add_development_dependency "rspec-its"
|
33
34
|
s.add_development_dependency "equivalent-xml"
|
34
35
|
s.add_development_dependency "simplecov", '~> 0.7.1'
|
35
|
-
s.add_development_dependency "rubocop", '~> 0.
|
36
|
-
s.add_development_dependency "rubocop-rspec", '~> 1.
|
36
|
+
s.add_development_dependency "rubocop", '~> 0.34'
|
37
|
+
s.add_development_dependency "rubocop-rspec", '~> 1.3'
|
37
38
|
|
38
39
|
s.files = `git ls-files`.split("\n")
|
39
40
|
s.test_files = `git ls-files -- {spec}/*`.split("\n")
|
data/config/fedora.yml
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
development:
|
2
2
|
user: fedoraAdmin
|
3
3
|
password: fedoraAdmin
|
4
|
-
url: http://127.0.0.1:
|
4
|
+
url: http://127.0.0.1:8984/rest
|
5
5
|
base_path: /dev
|
6
6
|
test:
|
7
7
|
user: fedoraAdmin
|
8
8
|
password: fedoraAdmin
|
9
|
-
url: http://localhost:
|
9
|
+
url: http://localhost:8984/rest
|
10
10
|
base_path: /test
|
11
11
|
production:
|
12
12
|
user: fedoraAdmin
|
data/config/solr.yml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
development:
|
2
2
|
default:
|
3
|
-
url: http://localhost:8983/solr/
|
3
|
+
url: http://localhost:8983/solr/hydra-dev
|
4
4
|
full_text:
|
5
5
|
url: http://localhost:8983/solr/development
|
6
|
-
test:
|
6
|
+
test:
|
7
7
|
default:
|
8
|
-
url: http://localhost:8983/solr/test
|
8
|
+
url: http://localhost:8983/solr/hydra-test
|
9
9
|
full_text:
|
10
10
|
url: http://localhost:8983/solr/test
|
11
11
|
production:
|
12
12
|
default:
|
13
|
-
url: http://localhost:8080/solr/production
|
13
|
+
url: http://localhost:8080/solr/production
|
14
14
|
full_text:
|
15
|
-
url: http://localhost:8080/solr/production
|
15
|
+
url: http://localhost:8080/solr/production
|
@@ -75,7 +75,7 @@ module ActiveFedora
|
|
75
75
|
module AutosaveAssociation
|
76
76
|
extend ActiveSupport::Concern
|
77
77
|
|
78
|
-
ASSOCIATION_TYPES = %w(HasMany BelongsTo HasAndBelongsToMany DirectlyContains IndirectlyContains).freeze
|
78
|
+
ASSOCIATION_TYPES = %w( HasMany BelongsTo HasAndBelongsToMany DirectlyContains IndirectlyContains).freeze
|
79
79
|
|
80
80
|
module AssociationBuilderExtension #:nodoc:
|
81
81
|
def self.included(base)
|
data/lib/active_fedora/file.rb
CHANGED
@@ -252,7 +252,17 @@ module ActiveFedora
|
|
252
252
|
return @content if new_record?
|
253
253
|
|
254
254
|
@content ||= ensure_fetch ? remote_content : @ds_content
|
255
|
-
|
255
|
+
|
256
|
+
if behaves_like_io?(@content)
|
257
|
+
begin
|
258
|
+
@content.rewind
|
259
|
+
@content.read
|
260
|
+
ensure
|
261
|
+
@content.rewind
|
262
|
+
end
|
263
|
+
else
|
264
|
+
@content
|
265
|
+
end
|
256
266
|
@content
|
257
267
|
end
|
258
268
|
end
|
@@ -16,7 +16,7 @@ module ActiveFedora::Indexing
|
|
16
16
|
|
17
17
|
# this enables a cleaner API for solr integration
|
18
18
|
class IndexObject
|
19
|
-
attr_accessor :data_type, :behaviors
|
19
|
+
attr_accessor :data_type, :behaviors, :term
|
20
20
|
attr_reader :key
|
21
21
|
|
22
22
|
def initialize(name, &_block)
|
@@ -27,6 +27,7 @@ module ActiveFedora::Indexing
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def as(*args)
|
30
|
+
@term = args.last.is_a?(Hash) ? args.pop : {}
|
30
31
|
@behaviors = args
|
31
32
|
end
|
32
33
|
|
@@ -113,7 +113,7 @@ module ActiveFedora
|
|
113
113
|
|
114
114
|
# Attribute hash keys that should not be assigned as normal attributes.
|
115
115
|
# These hash keys are nested attributes implementation details.
|
116
|
-
UNASSIGNABLE_KEYS = %w(id _destroy).freeze
|
116
|
+
UNASSIGNABLE_KEYS = %w( id _destroy ).freeze
|
117
117
|
|
118
118
|
def assign_nested_attributes_for_collection_association(association_name, attributes_collection)
|
119
119
|
options = nested_attributes_options[association_name]
|
@@ -70,10 +70,12 @@ module ActiveFedora::RDF
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
# Builds a FieldMap entry for a resource such as an ActiveFedora::Base object and returns the uri as the value
|
73
|
+
# Builds a FieldMap entry for a resource such as an ActiveFedora::Base object and returns the uri as the value
|
74
|
+
# unless :using has been set as an option to the index.as block on the property in question. In that case, the
|
75
|
+
# symbol assigned to :using will used as the value.
|
74
76
|
class ResourceBuilder < Builder
|
75
77
|
def find_values
|
76
|
-
object.send(name).map(
|
78
|
+
object.send(name).map(&index_field_config.term.fetch(:using, :uri))
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
@@ -260,13 +260,13 @@ module ActiveFedora
|
|
260
260
|
# @param [Hash<Symbol,String>] conditions
|
261
261
|
# @return [Array<String>]
|
262
262
|
def create_query_from_hash(conditions)
|
263
|
-
conditions.map { |key, value| condition_to_clauses(key, value
|
263
|
+
conditions.map { |key, value| condition_to_clauses(key, value) }.compact
|
264
264
|
end
|
265
265
|
|
266
266
|
# @param [Symbol] key
|
267
267
|
# @param [String] value
|
268
|
-
def condition_to_clauses(key, value
|
269
|
-
SolrQueryBuilder.construct_query([[field_name_for(key), value]]
|
268
|
+
def condition_to_clauses(key, value)
|
269
|
+
SolrQueryBuilder.construct_query([[field_name_for(key), value]])
|
270
270
|
end
|
271
271
|
|
272
272
|
# If the key is a property name, turn it into a solr field
|
@@ -13,7 +13,6 @@ module ActiveFedora
|
|
13
13
|
#
|
14
14
|
# fruits = Fruit.all
|
15
15
|
# fruits = fruits.where(color: 'red') if options[:red_only]
|
16
|
-
# fruits = fruits.where(size: ['big', 'little']) # gets big or little fruit
|
17
16
|
# fruits = fruits.limit(10) if limited?
|
18
17
|
#
|
19
18
|
# You can define a scope that applies to all finders using
|
@@ -32,7 +32,7 @@ module ActiveFedora
|
|
32
32
|
# # => _query_:"{!raw f=has_model_ssim}info:fedora/afmodel:ComplexCollection" OR _query_:"{!raw f=has_model_ssim}info:fedora/afmodel:ActiveFedora_Base"
|
33
33
|
#
|
34
34
|
# construct_query_for_rel [[Book.reflect_on_association(:library), "foo/bar/baz"]]
|
35
|
-
def construct_query_for_rel(field_pairs, join_with =
|
35
|
+
def construct_query_for_rel(field_pairs, join_with = ' AND ')
|
36
36
|
field_pairs = field_pairs.to_a if field_pairs.is_a? Hash
|
37
37
|
construct_query(property_values_to_solr(field_pairs), join_with)
|
38
38
|
end
|
@@ -44,15 +44,8 @@ module ActiveFedora
|
|
44
44
|
# @example
|
45
45
|
# construct_query([['library_id_ssim', '123'], ['owner_ssim', 'Fred']])
|
46
46
|
# # => "_query_:\"{!raw f=library_id_ssim}123\" AND _query_:\"{!raw f=owner_ssim}Fred\""
|
47
|
-
def construct_query(field_pairs, join_with =
|
48
|
-
|
49
|
-
return "" if clauses.count == 0
|
50
|
-
return clauses.first if clauses.count == 1
|
51
|
-
"(#{clauses.join(join_with)})"
|
52
|
-
end
|
53
|
-
|
54
|
-
def default_join_with
|
55
|
-
' AND '
|
47
|
+
def construct_query(field_pairs, join_with = ' AND ')
|
48
|
+
pairs_to_clauses(field_pairs).join(join_with)
|
56
49
|
end
|
57
50
|
|
58
51
|
private
|
@@ -1,12 +1,12 @@
|
|
1
1
|
development:
|
2
2
|
user: fedoraAdmin
|
3
3
|
password: fedoraAdmin
|
4
|
-
url: http://127.0.0.1:
|
4
|
+
url: http://127.0.0.1:8984/rest
|
5
5
|
base_path: /dev
|
6
6
|
test:
|
7
7
|
user: fedoraAdmin
|
8
8
|
password: fedoraAdmin
|
9
|
-
url: http://localhost:
|
9
|
+
url: http://localhost:8984/rest
|
10
10
|
base_path: /test
|
11
11
|
production:
|
12
12
|
user: fedoraAdmin
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# This is a sample config file that points to a solr server for each environment
|
2
2
|
development:
|
3
|
-
url: http://localhost:8983/solr/
|
3
|
+
url: http://localhost:8983/solr/hydra-dev
|
4
4
|
test:
|
5
|
-
url: <%= "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8983}/solr/test" %>
|
5
|
+
url: <%= "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8983}/solr/hydra-test" %>
|
6
6
|
production:
|
7
7
|
url: http://your.production.server:8080/bl_solr/core0
|
@@ -1,6 +1,7 @@
|
|
1
1
|
APP_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../../")
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'solr_wrapper'
|
4
|
+
require 'fcrepo_wrapper'
|
4
5
|
|
5
6
|
namespace :active_fedora do
|
6
7
|
# Use yard to build docs
|
@@ -50,14 +51,18 @@ namespace :active_fedora do
|
|
50
51
|
desc "CI build"
|
51
52
|
task :ci do
|
52
53
|
ENV['environment'] = "test"
|
53
|
-
Rake::Task["active_fedora:configure_jetty"].invoke
|
54
|
-
jetty_params = Jettywrapper.load_config
|
55
|
-
|
56
|
-
|
54
|
+
# Rake::Task["active_fedora:configure_jetty"].invoke
|
55
|
+
# jetty_params = Jettywrapper.load_config
|
56
|
+
solr_params = { port: 8983, verbose: true, managed: true }
|
57
|
+
fcrepo_params = { port: 8984, verbose: true, managed: true }
|
58
|
+
error = nil
|
59
|
+
SolrWrapper.wrap(solr_params) do |solr|
|
60
|
+
solr.with_collection(name: 'hydra-test', dir: File.join(File.expand_path("../..", File.dirname(__FILE__)), "solr", "config")) do
|
61
|
+
FcrepoWrapper.wrap(fcrepo_params) do
|
62
|
+
Rake::Task['active_fedora:coverage'].invoke
|
63
|
+
end
|
64
|
+
end
|
57
65
|
end
|
58
|
-
raise "test failures: #{error}" if error
|
59
|
-
# Only create documentation if the tests have passed
|
60
|
-
Rake::Task["active_fedora:doc"].invoke
|
61
66
|
end
|
62
67
|
|
63
68
|
desc "Execute specs with coverage"
|