solrizer 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -0
- data/Gemfile.lock +5 -5
- data/History.txt +5 -0
- data/README.textile +5 -3
- data/lib/solrizer/field_mapper.rb +1 -1
- data/lib/solrizer/version.rb +1 -1
- data/lib/tasks/solrizer.rake +24 -4
- data/solrizer.gemspec +5 -5
- data/spec/spec_helper.rb +10 -0
- metadata +163 -113
- data/spec/rcov.opts +0 -0
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
solrizer (1.
|
4
|
+
solrizer (1.2.0)
|
5
5
|
daemons
|
6
6
|
mediashelf-loggable (~> 0.4.7)
|
7
7
|
nokogiri
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
RedCloth (4.2.8)
|
16
16
|
archive-tar-minitar (0.5.2)
|
17
17
|
columnize (0.3.4)
|
18
|
-
daemons (1.1.
|
18
|
+
daemons (1.1.8)
|
19
19
|
diff-lcs (1.1.3)
|
20
20
|
linecache (0.46)
|
21
21
|
rbx-require-relative (> 0.0.4)
|
@@ -25,8 +25,8 @@ GEM
|
|
25
25
|
metaclass (0.0.1)
|
26
26
|
mocha (0.10.0)
|
27
27
|
metaclass (~> 0.0.1)
|
28
|
-
nokogiri (1.5.
|
29
|
-
om (1.
|
28
|
+
nokogiri (1.5.2)
|
29
|
+
om (1.6.0)
|
30
30
|
mediashelf-loggable
|
31
31
|
nokogiri (>= 1.4.2)
|
32
32
|
rbx-require-relative (0.0.5)
|
@@ -54,7 +54,7 @@ GEM
|
|
54
54
|
ruby-debug-base19 (>= 0.11.19)
|
55
55
|
ruby_core_source (0.1.5)
|
56
56
|
archive-tar-minitar (>= 0.5.2)
|
57
|
-
stomp (1.2.
|
57
|
+
stomp (1.2.2)
|
58
58
|
xml-simple (1.1.1)
|
59
59
|
yard (0.7.2)
|
60
60
|
|
data/History.txt
CHANGED
data/README.textile
CHANGED
@@ -4,8 +4,7 @@ A lightweight, configurable tool for indexing metadata into solr. Can be trigge
|
|
4
4
|
|
5
5
|
Solrizer provides the baseline and structures for the process of solrizing. In order to actually read objects from a
|
6
6
|
datasource and write solr documents into a solr instance, you need to use an implementation specific gem, such as
|
7
|
-
"solrizer-fedora":https://github.com/projecthydra/solrizer-fedora, which provides the
|
8
|
-
mechanics for reading from a fedora repository and writing to a solr instance.
|
7
|
+
"solrizer-fedora":https://github.com/projecthydra/solrizer-fedora, which provides the mechanics for reading from a fedora repository and writing to a solr instance.
|
9
8
|
|
10
9
|
|
11
10
|
h2. Installation
|
@@ -57,11 +56,14 @@ default_mapper.solr_name("foo",:integer,:facetable) # returns foo_facet
|
|
57
56
|
</pre>
|
58
57
|
|
59
58
|
FieldMapper provides some defaults:
|
59
|
+
|
60
60
|
<pre>
|
61
61
|
default_mapper.solr_names_and_values("foo","bar",:string,[:facetable]) # returns searchable and facetable by default => {"foo_facet"=>["bar"], "foo_t"=>["bar"]}
|
62
62
|
default_mapper.solr_names_and_values("foo","bar",:string,[:not_searchable, :facetable]) # returns just facetable => {"foo_facet"=>["bar"]}
|
63
63
|
</pre>
|
64
|
+
|
64
65
|
Which can be tweaked:
|
66
|
+
|
65
67
|
<pre>
|
66
68
|
default_mapper.default_index_types << :facetable
|
67
69
|
default_mapper.solr_names_and_values("foo","bar",:string,[]) # returns searchable and facetable by default => {"foo_facet"=>["bar"], "foo_t"=>["bar"]}
|
@@ -167,7 +169,7 @@ h2. Note on Patches/Pull Requests
|
|
167
169
|
* Make your feature addition or bug fix.
|
168
170
|
* Add tests for it. This is important so I don't break it in a
|
169
171
|
future version unintentionally.
|
170
|
-
* Commit, do not mess with
|
172
|
+
* Commit, do not mess with rake file, version, or history.
|
171
173
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
172
174
|
* Send me a pull request. Bonus points for topic branches.
|
173
175
|
|
@@ -160,7 +160,7 @@ module Solrizer
|
|
160
160
|
end
|
161
161
|
end
|
162
162
|
|
163
|
-
logger.
|
163
|
+
logger.debug("SOLRIZER: loading field name mappings from #{File.expand_path(config_path)}")
|
164
164
|
mappings_from_file = YAML::load(File.open(config_path))
|
165
165
|
|
166
166
|
self.clear_mappings
|
data/lib/solrizer/version.rb
CHANGED
data/lib/tasks/solrizer.rake
CHANGED
@@ -1,7 +1,29 @@
|
|
1
1
|
desc "Task to execute builds on a Hudson Continuous Integration Server."
|
2
2
|
task :hudson do
|
3
3
|
Rake::Task["doc"].invoke
|
4
|
-
Rake::Task["
|
4
|
+
Rake::Task["coverage:ci"].invoke
|
5
|
+
end
|
6
|
+
|
7
|
+
desc "Execute specs with coverage"
|
8
|
+
task :coverage do
|
9
|
+
# Put spec opts in a file named .rspec in root
|
10
|
+
ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
|
11
|
+
ENV['COVERAGE'] = 'true' unless ruby_engine == 'jruby'
|
12
|
+
|
13
|
+
|
14
|
+
Rake::Task['solrizer:rspec'].invoke
|
15
|
+
end
|
16
|
+
|
17
|
+
namespace :coverage do
|
18
|
+
desc "Execute ci build with coverage"
|
19
|
+
task :ci do
|
20
|
+
# Put spec opts in a file named .rspec in root
|
21
|
+
ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
|
22
|
+
ENV['COVERAGE'] = 'true' unless ruby_engine == 'jruby'
|
23
|
+
|
24
|
+
|
25
|
+
Rake::Task['hudson'].invoke
|
26
|
+
end
|
5
27
|
end
|
6
28
|
|
7
29
|
# Use yard to build docs
|
@@ -47,8 +69,6 @@ namespace :solrizer do
|
|
47
69
|
end
|
48
70
|
|
49
71
|
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
50
|
-
|
51
|
-
spec.rcov = true
|
52
|
-
spec.rcov_opts = %q[--exclude "spec/*,gems/*" --rails]
|
72
|
+
Rake::Task['coverage']
|
53
73
|
end
|
54
74
|
end
|
data/solrizer.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Solrizer::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Matt Zumwalt"]
|
10
|
-
s.email = %q{
|
10
|
+
s.email = %q{hydra-tech@googlegroups.com}
|
11
11
|
s.homepage = %q{http://github.com/projecthydra/solrizer}
|
12
|
-
s.summary = %q{A utility for building solr indexes, usually from Fedora repository content.}
|
13
|
-
s.description = %q{Use solrizer to populate solr indexes
|
12
|
+
s.summary = %q{A utility for building solr indexes, usually from Fedora repository content with solrizer-fedora extension gem.}
|
13
|
+
s.description = %q{Use solrizer to populate solr indexes. You can run solrizer from within your app, using the provided rake tasks, or as a JMS listener}
|
14
14
|
|
15
15
|
s.add_dependency "nokogiri"
|
16
16
|
s.add_dependency "om", ">=1.5.0"
|
@@ -19,13 +19,13 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_dependency "stomp"
|
20
20
|
s.add_dependency "daemons"
|
21
21
|
s.add_development_dependency 'rspec', '~>2.0'
|
22
|
-
s.add_development_dependency '
|
22
|
+
s.add_development_dependency 'rake'
|
23
23
|
s.add_development_dependency 'mocha'
|
24
24
|
s.add_development_dependency 'yard'
|
25
25
|
s.add_development_dependency 'RedCloth'
|
26
26
|
|
27
27
|
s.files = `git ls-files`.split("\n")
|
28
|
-
s.test_files = `git ls-files -- {
|
28
|
+
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
29
29
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
30
30
|
s.extra_rdoc_files = [
|
31
31
|
"LICENSE",
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
|
3
|
+
|
4
|
+
if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.9/
|
5
|
+
require 'simplecov'
|
6
|
+
require 'simplecov-rcov'
|
7
|
+
|
8
|
+
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
|
9
|
+
SimpleCov.start
|
10
|
+
end
|
11
|
+
|
2
12
|
require 'rspec'
|
3
13
|
require 'solrizer'
|
4
14
|
|
metadata
CHANGED
@@ -1,149 +1,192 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: solrizer
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Matt Zumwalt
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-05-10 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: nokogiri
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
22
32
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
26
35
|
name: om
|
27
|
-
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
38
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 1
|
45
|
+
- 5
|
46
|
+
- 0
|
32
47
|
version: 1.5.0
|
33
48
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
37
51
|
name: xml-simple
|
38
|
-
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
54
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
44
62
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
63
|
+
version_requirements: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
48
65
|
name: mediashelf-loggable
|
49
|
-
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
68
|
none: false
|
51
|
-
requirements:
|
69
|
+
requirements:
|
52
70
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 1
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
- 4
|
76
|
+
- 7
|
54
77
|
version: 0.4.7
|
55
78
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: *id004
|
80
|
+
- !ruby/object:Gem::Dependency
|
59
81
|
name: stomp
|
60
|
-
|
82
|
+
prerelease: false
|
83
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
84
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
hash: 3
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
66
92
|
type: :runtime
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
93
|
+
version_requirements: *id005
|
94
|
+
- !ruby/object:Gem::Dependency
|
70
95
|
name: daemons
|
71
|
-
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
98
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
version: "0"
|
77
106
|
type: :runtime
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
107
|
+
version_requirements: *id006
|
108
|
+
- !ruby/object:Gem::Dependency
|
81
109
|
name: rspec
|
82
|
-
|
110
|
+
prerelease: false
|
111
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
112
|
none: false
|
84
|
-
requirements:
|
113
|
+
requirements:
|
85
114
|
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
hash: 3
|
117
|
+
segments:
|
118
|
+
- 2
|
119
|
+
- 0
|
120
|
+
version: "2.0"
|
88
121
|
type: :development
|
122
|
+
version_requirements: *id007
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: rake
|
89
125
|
prerelease: false
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: rcov
|
93
|
-
requirement: &70317099881440 !ruby/object:Gem::Requirement
|
126
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
127
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
hash: 3
|
132
|
+
segments:
|
133
|
+
- 0
|
134
|
+
version: "0"
|
99
135
|
type: :development
|
100
|
-
|
101
|
-
|
102
|
-
- !ruby/object:Gem::Dependency
|
136
|
+
version_requirements: *id008
|
137
|
+
- !ruby/object:Gem::Dependency
|
103
138
|
name: mocha
|
104
|
-
|
139
|
+
prerelease: false
|
140
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
141
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: 3
|
146
|
+
segments:
|
147
|
+
- 0
|
148
|
+
version: "0"
|
110
149
|
type: :development
|
111
|
-
|
112
|
-
|
113
|
-
- !ruby/object:Gem::Dependency
|
150
|
+
version_requirements: *id009
|
151
|
+
- !ruby/object:Gem::Dependency
|
114
152
|
name: yard
|
115
|
-
|
153
|
+
prerelease: false
|
154
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
116
155
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
hash: 3
|
160
|
+
segments:
|
161
|
+
- 0
|
162
|
+
version: "0"
|
121
163
|
type: :development
|
122
|
-
|
123
|
-
|
124
|
-
- !ruby/object:Gem::Dependency
|
164
|
+
version_requirements: *id010
|
165
|
+
- !ruby/object:Gem::Dependency
|
125
166
|
name: RedCloth
|
126
|
-
|
167
|
+
prerelease: false
|
168
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
127
169
|
none: false
|
128
|
-
requirements:
|
129
|
-
- -
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
hash: 3
|
174
|
+
segments:
|
175
|
+
- 0
|
176
|
+
version: "0"
|
132
177
|
type: :development
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
rake tasks, or as a JMS listener
|
138
|
-
email: matt.zumwalt@yourmediashelf.com
|
139
|
-
executables:
|
178
|
+
version_requirements: *id011
|
179
|
+
description: Use solrizer to populate solr indexes. You can run solrizer from within your app, using the provided rake tasks, or as a JMS listener
|
180
|
+
email: hydra-tech@googlegroups.com
|
181
|
+
executables:
|
140
182
|
- solrizer
|
141
183
|
- solrizerd
|
142
184
|
extensions: []
|
143
|
-
|
185
|
+
|
186
|
+
extra_rdoc_files:
|
144
187
|
- LICENSE
|
145
188
|
- README.textile
|
146
|
-
files:
|
189
|
+
files:
|
147
190
|
- .gitignore
|
148
191
|
- .rvmrc
|
149
192
|
- Gemfile
|
@@ -181,7 +224,6 @@ files:
|
|
181
224
|
- spec/fixtures/druid-hc513kw4806-descMetadata.xml
|
182
225
|
- spec/fixtures/mods_articles/hydrangea_article1.xml
|
183
226
|
- spec/fixtures/test_solr_mappings.yml
|
184
|
-
- spec/rcov.opts
|
185
227
|
- spec/spec_helper.rb
|
186
228
|
- spec/units/extractor_spec.rb
|
187
229
|
- spec/units/field_mapper_spec.rb
|
@@ -190,29 +232,38 @@ files:
|
|
190
232
|
- spec/units/xml_terminology_based_solrizer_spec.rb
|
191
233
|
homepage: http://github.com/projecthydra/solrizer
|
192
234
|
licenses: []
|
235
|
+
|
193
236
|
post_install_message:
|
194
237
|
rdoc_options: []
|
195
|
-
|
238
|
+
|
239
|
+
require_paths:
|
196
240
|
- lib
|
197
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
241
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
198
242
|
none: false
|
199
|
-
requirements:
|
200
|
-
- -
|
201
|
-
- !ruby/object:Gem::Version
|
202
|
-
|
203
|
-
|
243
|
+
requirements:
|
244
|
+
- - ">="
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
hash: 3
|
247
|
+
segments:
|
248
|
+
- 0
|
249
|
+
version: "0"
|
250
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
251
|
none: false
|
205
|
-
requirements:
|
206
|
-
- -
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
|
252
|
+
requirements:
|
253
|
+
- - ">="
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
hash: 3
|
256
|
+
segments:
|
257
|
+
- 0
|
258
|
+
version: "0"
|
209
259
|
requirements: []
|
260
|
+
|
210
261
|
rubyforge_project:
|
211
|
-
rubygems_version: 1.8.
|
262
|
+
rubygems_version: 1.8.17
|
212
263
|
signing_key:
|
213
264
|
specification_version: 3
|
214
|
-
summary: A utility for building solr indexes, usually from Fedora repository content.
|
215
|
-
test_files:
|
265
|
+
summary: A utility for building solr indexes, usually from Fedora repository content with solrizer-fedora extension gem.
|
266
|
+
test_files:
|
216
267
|
- spec/fixtures/druid-bv448hq0314-descMetadata.xml
|
217
268
|
- spec/fixtures/druid-bv448hq0314-extProperties.xml
|
218
269
|
- spec/fixtures/druid-cm234kq4672-extProperties.xml
|
@@ -220,7 +271,6 @@ test_files:
|
|
220
271
|
- spec/fixtures/druid-hc513kw4806-descMetadata.xml
|
221
272
|
- spec/fixtures/mods_articles/hydrangea_article1.xml
|
222
273
|
- spec/fixtures/test_solr_mappings.yml
|
223
|
-
- spec/rcov.opts
|
224
274
|
- spec/spec_helper.rb
|
225
275
|
- spec/units/extractor_spec.rb
|
226
276
|
- spec/units/field_mapper_spec.rb
|
data/spec/rcov.opts
DELETED
File without changes
|