active-fedora 9.8.0 → 9.9.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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/History.txt +29 -0
  4. data/README.md +1 -1
  5. data/active-fedora.gemspec +2 -2
  6. data/config/fedora.yml +2 -2
  7. data/config/solr.yml +3 -3
  8. data/lib/active_fedora/associations/builder/belongs_to.rb +2 -5
  9. data/lib/active_fedora/associations/builder/has_and_belongs_to_many.rb +2 -5
  10. data/lib/active_fedora/config.rb +1 -1
  11. data/lib/active_fedora/fedora.rb +7 -1
  12. data/lib/active_fedora/file.rb +46 -32
  13. data/lib/active_fedora/file_configurator.rb +2 -1
  14. data/lib/active_fedora/rake_support.rb +33 -0
  15. data/lib/active_fedora/relation/finder_methods.rb +2 -1
  16. data/lib/active_fedora/solr_service.rb +6 -2
  17. data/lib/active_fedora/version.rb +1 -1
  18. data/lib/active_fedora.rb +1 -1
  19. data/lib/generators/active_fedora/config/fedora/templates/fedora.yml +2 -2
  20. data/lib/generators/active_fedora/config/solr/solr_generator.rb +1 -1
  21. data/lib/generators/active_fedora/config/solr/templates/solr/config/_rest_managed.json +3 -0
  22. data/lib/generators/active_fedora/config/solr/templates/solr/config/admin-extra.html +31 -0
  23. data/lib/generators/active_fedora/config/solr/templates/{solr_conf/solr.xml → solr/config/elevate.xml} +36 -35
  24. data/lib/generators/active_fedora/config/solr/templates/solr/config/mapping-ISOLatin1Accent.txt +246 -0
  25. data/lib/generators/active_fedora/config/solr/templates/solr/config/protwords.txt +21 -0
  26. data/lib/generators/active_fedora/config/solr/templates/{solr_conf/conf → solr/config}/schema.xml +217 -123
  27. data/lib/generators/active_fedora/config/solr/templates/solr/config/scripts.conf +24 -0
  28. data/lib/generators/active_fedora/config/solr/templates/solr/config/solrconfig.xml +297 -0
  29. data/lib/generators/active_fedora/config/solr/templates/solr/config/spellings.txt +2 -0
  30. data/lib/generators/active_fedora/config/solr/templates/solr/config/stopwords.txt +58 -0
  31. data/lib/generators/active_fedora/config/solr/templates/solr/config/stopwords_en.txt +58 -0
  32. data/lib/generators/active_fedora/config/solr/templates/solr/config/synonyms.txt +31 -0
  33. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example.xsl +132 -0
  34. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example_atom.xsl +67 -0
  35. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example_rss.xsl +66 -0
  36. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/luke.xsl +337 -0
  37. data/lib/generators/active_fedora/config/solr/templates/solr.yml +2 -2
  38. data/lib/tasks/active_fedora_dev.rake +12 -13
  39. data/solr/config/solrconfig.xml +60 -182
  40. data/spec/fixtures/rails_root/config/fedora.yml +8 -0
  41. data/spec/integration/date_time_properties_spec.rb +15 -4
  42. data/spec/unit/config_spec.rb +8 -3
  43. data/spec/unit/fedora_spec.rb +20 -0
  44. data/spec/unit/file_configurator_spec.rb +9 -0
  45. data/spec/unit/file_spec.rb +105 -0
  46. data/spec/unit/finder_methods_spec.rb +34 -0
  47. data/spec/unit/solr_service_spec.rb +25 -0
  48. metadata +24 -10
  49. data/config/jetty.yml +0 -6
  50. data/lib/generators/active_fedora/config/solr/templates/solr_conf/conf/solrconfig.xml +0 -218
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.8.0
4
+ version: 9.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-02-05 00:00:00.000000000 Z
13
+ date: 2016-02-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr
@@ -200,14 +200,14 @@ dependencies:
200
200
  requirements:
201
201
  - - "~>"
202
202
  - !ruby/object:Gem::Version
203
- version: '0.1'
203
+ version: '0.2'
204
204
  type: :development
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - "~>"
209
209
  - !ruby/object:Gem::Version
210
- version: '0.1'
210
+ version: '0.2'
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: rspec
213
213
  requirement: !ruby/object:Gem::Requirement
@@ -284,14 +284,14 @@ dependencies:
284
284
  requirements:
285
285
  - - "~>"
286
286
  - !ruby/object:Gem::Version
287
- version: '1.3'
287
+ version: 1.3.1
288
288
  type: :development
289
289
  prerelease: false
290
290
  version_requirements: !ruby/object:Gem::Requirement
291
291
  requirements:
292
292
  - - "~>"
293
293
  - !ruby/object:Gem::Version
294
- version: '1.3'
294
+ version: 1.3.1
295
295
  description: ActiveFedora provides for creating and managing objects in the Fedora
296
296
  Repository Architecture.
297
297
  email:
@@ -317,7 +317,6 @@ files:
317
317
  - Rakefile
318
318
  - active-fedora.gemspec
319
319
  - config/fedora.yml
320
- - config/jetty.yml
321
320
  - config/predicate_mappings.yml
322
321
  - config/service_mappings.yml
323
322
  - config/solr.yml
@@ -432,6 +431,7 @@ files:
432
431
  - lib/active_fedora/query_result_builder.rb
433
432
  - lib/active_fedora/querying.rb
434
433
  - lib/active_fedora/railtie.rb
434
+ - lib/active_fedora/rake_support.rb
435
435
  - lib/active_fedora/rdf.rb
436
436
  - lib/active_fedora/rdf/datastream_indexing.rb
437
437
  - lib/active_fedora/rdf/fcrepo.rb
@@ -479,9 +479,22 @@ files:
479
479
  - lib/generators/active_fedora/config/fedora/templates/fedora.yml
480
480
  - lib/generators/active_fedora/config/solr/solr_generator.rb
481
481
  - lib/generators/active_fedora/config/solr/templates/solr.yml
482
- - lib/generators/active_fedora/config/solr/templates/solr_conf/conf/schema.xml
483
- - lib/generators/active_fedora/config/solr/templates/solr_conf/conf/solrconfig.xml
484
- - lib/generators/active_fedora/config/solr/templates/solr_conf/solr.xml
482
+ - lib/generators/active_fedora/config/solr/templates/solr/config/_rest_managed.json
483
+ - lib/generators/active_fedora/config/solr/templates/solr/config/admin-extra.html
484
+ - lib/generators/active_fedora/config/solr/templates/solr/config/elevate.xml
485
+ - lib/generators/active_fedora/config/solr/templates/solr/config/mapping-ISOLatin1Accent.txt
486
+ - lib/generators/active_fedora/config/solr/templates/solr/config/protwords.txt
487
+ - lib/generators/active_fedora/config/solr/templates/solr/config/schema.xml
488
+ - lib/generators/active_fedora/config/solr/templates/solr/config/scripts.conf
489
+ - lib/generators/active_fedora/config/solr/templates/solr/config/solrconfig.xml
490
+ - lib/generators/active_fedora/config/solr/templates/solr/config/spellings.txt
491
+ - lib/generators/active_fedora/config/solr/templates/solr/config/stopwords.txt
492
+ - lib/generators/active_fedora/config/solr/templates/solr/config/stopwords_en.txt
493
+ - lib/generators/active_fedora/config/solr/templates/solr/config/synonyms.txt
494
+ - lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example.xsl
495
+ - lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example_atom.xsl
496
+ - lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example_rss.xsl
497
+ - lib/generators/active_fedora/config/solr/templates/solr/config/xslt/luke.xsl
485
498
  - lib/generators/active_fedora/model/USAGE
486
499
  - lib/generators/active_fedora/model/model_generator.rb
487
500
  - lib/generators/active_fedora/model/templates/datastream.rb.erb
@@ -598,6 +611,7 @@ files:
598
611
  - spec/unit/core/fedora_id_translator_spec.rb
599
612
  - spec/unit/core/fedora_uri_translator_spec.rb
600
613
  - spec/unit/core_spec.rb
614
+ - spec/unit/fedora_spec.rb
601
615
  - spec/unit/file_configurator_spec.rb
602
616
  - spec/unit/file_path_builder_spec.rb
603
617
  - spec/unit/file_spec.rb
data/config/jetty.yml DELETED
@@ -1,6 +0,0 @@
1
- default:
2
- startup_wait: 90
3
- jetty_port: 8983
4
- java_opts:
5
- - "-Xmx512m"
6
- - "-XX:MaxPermSize=128m"
@@ -1,218 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <config>
3
- <!-- NOTE: various comments and unused configuration possibilities have been purged
4
- from this file. Please refer to http://wiki.apache.org/solr/SolrConfigXml,
5
- as well as the default solrconfig file included with Solr -->
6
-
7
- <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
8
-
9
- <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
10
-
11
- <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
12
-
13
- <!-- solr lib dirs -->
14
- <lib dir="../lib/contrib/analysis-extras/lib" />
15
- <lib dir="../lib/contrib/analysis-extras/lucene-libs" />
16
-
17
- <dataDir>${solr.data.dir:}</dataDir>
18
-
19
- <!-- The default high-performance update handler -->
20
- <updateHandler class="solr.DirectUpdateHandler2">
21
-
22
- <!-- Enables a transaction log, used for real-time get, durability, and
23
- and solr cloud replica recovery. The log can grow as big as
24
- uncommitted changes to the index, so use of a hard autoCommit
25
- is recommended (see below).
26
- "dir" - the target directory for transaction logs, defaults to the
27
- solr data directory. -->
28
- <updateLog>
29
- <str name="dir">${solr.ulog.dir:}</str>
30
- </updateLog>
31
-
32
- <!-- AutoCommit
33
-
34
- Perform a hard commit automatically under certain conditions.
35
- Instead of enabling autoCommit, consider using "commitWithin"
36
- when adding documents.
37
-
38
- http://wiki.apache.org/solr/UpdateXmlMessages
39
-
40
- maxDocs - Maximum number of documents to add since the last
41
- commit before automatically triggering a new commit.
42
-
43
- maxTime - Maximum amount of time in ms that is allowed to pass
44
- since a document was added before automatically
45
- triggering a new commit.
46
- openSearcher - if false, the commit causes recent index changes
47
- to be flushed to stable storage, but does not cause a new
48
- searcher to be opened to make those changes visible.
49
-
50
- If the updateLog is enabled, then it's highly recommended to
51
- have some sort of hard autoCommit to limit the log size.
52
- -->
53
- <autoCommit>
54
- <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
55
- <openSearcher>false</openSearcher>
56
- </autoCommit>
57
-
58
- <!-- softAutoCommit is like autoCommit except it causes a
59
- 'soft' commit which only ensures that changes are visible
60
- but does not ensure that data is synced to disk. This is
61
- faster and more near-realtime friendly than a hard commit.
62
- -->
63
-
64
- <autoSoftCommit>
65
- <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
66
- </autoSoftCommit>
67
-
68
- </updateHandler>
69
-
70
- <requestHandler name="search" class="solr.SearchHandler" default="true">
71
- <!-- default values for query parameters can be specified, these
72
- will be overridden by parameters in the request
73
- -->
74
- <lst name="defaults">
75
- <str name="defType">edismax</str>
76
- <str name="echoParams">explicit</str>
77
- <str name="q.alt">*:*</str>
78
- <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
79
- <int name="qs">1</int>
80
- <int name="ps">2</int>
81
- <float name="tie">0.01</float>
82
- <!-- this qf and pf are used by default, if not otherwise specified by
83
- client. The default blacklight_config will use these for the
84
- "keywords" search. See the author_qf/author_pf, title_qf, etc
85
- below, which the default blacklight_config will specify for
86
- those searches. You may also be interested in:
87
- http://wiki.apache.org/solr/LocalParams
88
- -->
89
- <str name="qf">
90
- id
91
- active_fedora_model_ssi
92
- title_tesim
93
- author_tesim
94
- subject_tesim
95
- </str>
96
- <str name="pf">
97
- all_text_timv^10
98
- </str>
99
-
100
- <str name="author_qf">
101
- author_tesim
102
- </str>
103
- <str name="author_pf">
104
- </str>
105
- <str name="title_qf">
106
- title_tesim
107
- </str>
108
- <str name="title_pf">
109
- </str>
110
- <str name="subject_qf">
111
- subject_tesim
112
- </str>
113
- <str name="subject_pf">
114
- </str>
115
-
116
- <str name="fl">
117
- *,
118
- score
119
- </str>
120
-
121
- <str name="facet">true</str>
122
- <str name="facet.mincount">1</str>
123
- <str name="facet.limit">10</str>
124
- <str name="facet.field">active_fedora_model_ssi</str>
125
- <str name="facet.field">subject_sim</str>
126
-
127
- <str name="spellcheck">true</str>
128
- <str name="spellcheck.dictionary">default</str>
129
- <str name="spellcheck.onlyMorePopular">true</str>
130
- <str name="spellcheck.extendedResults">true</str>
131
- <str name="spellcheck.collate">false</str>
132
- <str name="spellcheck.count">5</str>
133
-
134
- </lst>
135
- <arr name="last-components">
136
- <str>spellcheck</str>
137
- </arr>
138
- </requestHandler>
139
-
140
- <requestHandler name="permissions" class="solr.SearchHandler" >
141
- <lst name="defaults">
142
- <str name="facet">off</str>
143
- <str name="echoParams">all</str>
144
- <str name="rows">1</str>
145
- <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
146
- <str name="fl">
147
- id,
148
- access_ssim,
149
- discover_access_group_ssim,discover_access_person_ssim,
150
- read_access_group_ssim,read_access_person_ssim,
151
- edit_access_group_ssim,edit_access_person_ssim,
152
- depositor_ti,
153
- embargo_release_date_dtsi
154
- inheritable_access_ssim,
155
- inheritable_discover_access_group_ssim,inheritable_discover_access_person_ssim,
156
- inheritable_read_access_group_ssim,inheritable_read_access_person_ssim,
157
- inheritable_edit_access_group_ssim,inheritable_edit_access_person_ssim,
158
- inheritable_embargo_release_date_dtsi
159
- </str>
160
- </lst>
161
- </requestHandler>
162
-
163
- <requestHandler name="standard" class="solr.SearchHandler">
164
- <lst name="defaults">
165
- <str name="echoParams">explicit</str>
166
- <str name="defType">lucene</str>
167
- </lst>
168
- </requestHandler>
169
-
170
- <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
171
- <requestHandler name="document" class="solr.SearchHandler" >
172
- <lst name="defaults">
173
- <str name="echoParams">all</str>
174
- <str name="fl">*</str>
175
- <str name="rows">1</str>
176
- <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
177
- </lst>
178
- </requestHandler>
179
-
180
-
181
- <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
182
- <str name="queryAnalyzerFieldType">textSpell</str>
183
- <!-- Multiple "Spell Checkers" can be declared and used by this component
184
- (e.g. for title_spell field)
185
- -->
186
- <lst name="spellchecker">
187
- <str name="name">default</str>
188
- <str name="field">spell</str>
189
- <str name="spellcheckIndexDir">./spell</str>
190
- <str name="buildOnOptimize">true</str>
191
- </lst>
192
- </searchComponent>
193
-
194
- <requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
195
-
196
- <requestDispatcher handleSelect="true" >
197
- <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
198
- </requestDispatcher>
199
-
200
- <requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
201
- <requestHandler name="/update" class="solr.UpdateRequestHandler" />
202
- <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
203
-
204
- <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
205
- <lst name="invariants">
206
- <str name="q">solrpingquery</str>
207
- </lst>
208
- <lst name="defaults">
209
- <str name="echoParams">all</str>
210
- </lst>
211
- </requestHandler>
212
-
213
- <!-- config for the admin interface -->
214
- <admin>
215
- <defaultQuery>search</defaultQuery>
216
- </admin>
217
-
218
- </config>