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 CHANGED
@@ -5,3 +5,8 @@ gemspec
5
5
  gem 'ruby-debug', :platforms => :ruby_18
6
6
  gem 'ruby-debug19', :platforms => :ruby_19
7
7
 
8
+
9
+ gem 'rcov', :platform => :mri_18
10
+ gem 'simplecov', :platform => :mri_19
11
+ gem 'simplecov-rcov', :platform => :mri_19
12
+
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- solrizer (1.1.2)
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.6)
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.0)
29
- om (1.5.0)
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.0)
57
+ stomp (1.2.2)
58
58
  xml-simple (1.1.1)
59
59
  yard (0.7.2)
60
60
 
@@ -1,3 +1,8 @@
1
+ h2. 1.2.1
2
+ BUG: name mappings message is a "debug" message, not "info"
3
+ fixed rake tasks to include coverage properly
4
+ changed email, summary, description in gemspec
5
+
1
6
  h2. 1.2.0
2
7
  Upgrade to om 1.5.
3
8
  Now works with ruby 1.9
@@ -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 rakefile, version, or history.
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.info("SOLRIZER: loading field name mappings from #{File.expand_path(config_path)}")
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
@@ -1,3 +1,3 @@
1
1
  module Solrizer
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -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["solrizer:rspec"].invoke
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
- spec.pattern = FileList['spec/**/*_spec.rb']
51
- spec.rcov = true
52
- spec.rcov_opts = %q[--exclude "spec/*,gems/*" --rails]
72
+ Rake::Task['coverage']
53
73
  end
54
74
  end
@@ -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{matt.zumwalt@yourmediashelf.com}
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 from Fedora repository content or from other sources. You can run solrizer from within your apps, using the provided rake tasks, or as a JMS listener}
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 'rcov'
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 -- {test,spec,features}/*`.split("\n")
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",
@@ -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
- version: 1.2.0
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
- date: 2012-01-27 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-05-10 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: nokogiri
16
- requirement: &70317099885740 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70317099885740
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: om
27
- requirement: &70317099884780 !ruby/object:Gem::Requirement
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
- prerelease: false
35
- version_requirements: *70317099884780
36
- - !ruby/object:Gem::Dependency
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
37
51
  name: xml-simple
38
- requirement: &70317099884280 !ruby/object:Gem::Requirement
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
39
54
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
44
62
  type: :runtime
45
- prerelease: false
46
- version_requirements: *70317099884280
47
- - !ruby/object:Gem::Dependency
63
+ version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
48
65
  name: mediashelf-loggable
49
- requirement: &70317099883740 !ruby/object:Gem::Requirement
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
- prerelease: false
57
- version_requirements: *70317099883740
58
- - !ruby/object:Gem::Dependency
79
+ version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
59
81
  name: stomp
60
- requirement: &70317099883280 !ruby/object:Gem::Requirement
82
+ prerelease: false
83
+ requirement: &id005 !ruby/object:Gem::Requirement
61
84
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
66
92
  type: :runtime
67
- prerelease: false
68
- version_requirements: *70317099883280
69
- - !ruby/object:Gem::Dependency
93
+ version_requirements: *id005
94
+ - !ruby/object:Gem::Dependency
70
95
  name: daemons
71
- requirement: &70317099882720 !ruby/object:Gem::Requirement
96
+ prerelease: false
97
+ requirement: &id006 !ruby/object:Gem::Requirement
72
98
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
77
106
  type: :runtime
78
- prerelease: false
79
- version_requirements: *70317099882720
80
- - !ruby/object:Gem::Dependency
107
+ version_requirements: *id006
108
+ - !ruby/object:Gem::Dependency
81
109
  name: rspec
82
- requirement: &70317099881960 !ruby/object:Gem::Requirement
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
- version: '2.0'
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
- version_requirements: *70317099881960
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
- version: '0'
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ hash: 3
132
+ segments:
133
+ - 0
134
+ version: "0"
99
135
  type: :development
100
- prerelease: false
101
- version_requirements: *70317099881440
102
- - !ruby/object:Gem::Dependency
136
+ version_requirements: *id008
137
+ - !ruby/object:Gem::Dependency
103
138
  name: mocha
104
- requirement: &70317099880880 !ruby/object:Gem::Requirement
139
+ prerelease: false
140
+ requirement: &id009 !ruby/object:Gem::Requirement
105
141
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ hash: 3
146
+ segments:
147
+ - 0
148
+ version: "0"
110
149
  type: :development
111
- prerelease: false
112
- version_requirements: *70317099880880
113
- - !ruby/object:Gem::Dependency
150
+ version_requirements: *id009
151
+ - !ruby/object:Gem::Dependency
114
152
  name: yard
115
- requirement: &70317099880380 !ruby/object:Gem::Requirement
153
+ prerelease: false
154
+ requirement: &id010 !ruby/object:Gem::Requirement
116
155
  none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: '0'
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ hash: 3
160
+ segments:
161
+ - 0
162
+ version: "0"
121
163
  type: :development
122
- prerelease: false
123
- version_requirements: *70317099880380
124
- - !ruby/object:Gem::Dependency
164
+ version_requirements: *id010
165
+ - !ruby/object:Gem::Dependency
125
166
  name: RedCloth
126
- requirement: &70317099879900 !ruby/object:Gem::Requirement
167
+ prerelease: false
168
+ requirement: &id011 !ruby/object:Gem::Requirement
127
169
  none: false
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ hash: 3
174
+ segments:
175
+ - 0
176
+ version: "0"
132
177
  type: :development
133
- prerelease: false
134
- version_requirements: *70317099879900
135
- description: Use solrizer to populate solr indexes from Fedora repository content
136
- or from other sources. You can run solrizer from within your apps, using the provided
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
- extra_rdoc_files:
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
- require_paths:
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
- version: '0'
203
- required_rubygems_version: !ruby/object:Gem::Requirement
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
- version: '0'
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.10
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
File without changes