search_solr_tools 3.2.0 → 3.2.1.pre2

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
  SHA1:
3
- metadata.gz: 29d43d4ba7d890aca12ff850bf34519570fef1ac
4
- data.tar.gz: 100eb3ee2af79f329a06e631a43a17f7cc59dfbc
3
+ metadata.gz: 93167b9c7cbc13f9415c75b7f11498863e71bca1
4
+ data.tar.gz: 0ec2c511ba85b1a3ea16967efb032296c4141a98
5
5
  SHA512:
6
- metadata.gz: 05d762332d649542b24557909059cb1b398d90319ce3025ac74720d72780179a809c08afba0976f0e09532ca99158cb6791857f1f7991c233a019e8baf966163
7
- data.tar.gz: ee8bd339599759bd0310e14513ca269f12c364c59e7a7d250fc4b8db24baec3c99c886d7187474fee376f6cf0dce37e441f2e57445a1369cbb0f10d35d159202
6
+ metadata.gz: b155435198dd89d63e441e6a66332a7db2e3d59f196dbcc574ac1aa3292f821b8648750391df3391eeaeed2811c1be2b40f3529b58700135988a13bb18db0efd
7
+ data.tar.gz: f738aa6f83a8717b68752a12a7b9439d6222e099a7754d23bb3276c7db1f3a39c213cfef653895f43e494ecd483483147cbe04aa89633c87e3422dcf38f25e8c
data/CHANGELOG.md CHANGED
@@ -1,4 +1,13 @@
1
- ## v3.2.0
1
+ ## v3.2.1
2
+
3
+ Bugfixes
4
+
5
+ - Catch a timeout error earlier in the stack to prevent an infinite loop of
6
+ retries; this bug caused the PDC harvester to attempt to access the feed 150
7
+ times, instead of simply failing after 3 failed
8
+ attempts. [Pivotal 103057378](https://www.pivotaltracker.com/story/show/103057378)
9
+
10
+ ## v3.2.0 (2015-07-01)
2
11
 
3
12
  New Features
4
13
 
@@ -7,20 +16,20 @@ New Features
7
16
  - Add subcommands `-v` and `--version` to display the installed version of the
8
17
  gem
9
18
 
10
- ## v3.1.2
19
+ ## v3.1.2 (2015-06-30)
11
20
 
12
21
  Changes
13
22
 
14
23
  - Gem is available via [RubyGems](https://rubygems.org)
15
24
 
16
- ## v3.1.1
25
+ ## v3.1.1 (2015-06-29)
17
26
 
18
27
  Bugfixes
19
28
 
20
29
  - Updated deletion constraints such that lucene special characters in
21
30
  dataset names do not cause deletion of that data provider's data to fail.
22
31
 
23
- ## v3.1.0
32
+ ## v3.1.0 (2015-06-25)
24
33
 
25
34
  Features
26
35
 
@@ -35,13 +44,13 @@ Bugfixes
35
44
  - Fix broken configuration, where production was attempting to use the Blue,
36
45
  rather than the the production, Solr host for harvesting. (see PCT-410)
37
46
 
38
- ## v3.0.1
47
+ ## v3.0.1 (2015-06-18)
39
48
 
40
49
  Bugfixes
41
50
 
42
51
  - Fix broken `delete_all` commands.
43
52
 
44
- ## v3.0.0
53
+ ## v3.0.0 (2015-06-15)
45
54
 
46
55
  - Packaged as a gem with a new executable file, providing a new interface to
47
56
  harvest feeds into solr.
@@ -50,7 +59,7 @@ Bugfixes
50
59
  the query to Solr was failing because the "/" character could not be
51
60
  correctly escaped.
52
61
 
53
- ## v2.0.0
62
+ ## v2.0.0 (2015-06-08)
54
63
 
55
64
  - Upgrade from Ruby version 1.9.3 to 2.2.2
56
65
  - Compliant with
@@ -52,7 +52,7 @@ class SolrHarvestCLI < Thor
52
52
  desc 'delete_by_data_center', 'Force deletion of documents for a specific data center with timestamps before the passed timestamp in format iso8601 (2014-07-14T21:49:21Z)'
53
53
  option :timestamp, required: true
54
54
  option :environment, required: true
55
- option :data_center, required: true
55
+ option :data_center, required: true
56
56
  def delete_by_data_center
57
57
  harvester = get_harvester_class(options[:data_center]).new options[:environment]
58
58
  harvester.delete_old_documents(options[:timestamp],
@@ -96,7 +96,7 @@ module SearchSolrTools
96
96
 
97
97
  # Some docs will cause solr to time out during the POST
98
98
  begin
99
- RestClient.post(url, doc_serialized, content_type: content_type) do |response, _request, _result|
99
+ RestClient.post(url, doc_serialized, content_type: content_type) do |response, _request, _result|
100
100
  success = response.code == 200
101
101
  puts "Error for #{doc_serialized}\n\n response: #{response.body}" unless success
102
102
  end
@@ -127,9 +127,9 @@ module SearchSolrTools
127
127
  begin
128
128
  puts "Request: #{request_url}"
129
129
  response = open(request_url, read_timeout: timeout, 'Content-Type' => content_type)
130
- rescue OpenURI::HTTPError, Timeout::Error => e
130
+ rescue OpenURI::HTTPError, Timeout::Error, Errno::ETIMEDOUT => e
131
131
  retries_left -= 1
132
- puts "## REQUEST FAILED ## Retrying #{retries_left} more times..."
132
+ puts "## REQUEST FAILED ## #{e.class} ## Retrying #{retries_left} more times..."
133
133
 
134
134
  retry if retries_left > 0
135
135
 
@@ -8,7 +8,7 @@ module SearchSolrTools
8
8
  def initialize(env = 'development', die_on_failure = false)
9
9
  super env, die_on_failure
10
10
  @translator = Translators::BcodmoJsonToSolr.new
11
- @wkt_parser = RGeo::WKRep::WKTParser.new(nil, {}) # (factory_generator_=nil,
11
+ @wkt_parser = RGeo::WKRep::WKTParser.new(nil, {}) # (factory_generator_=nil,
12
12
  end
13
13
 
14
14
  def harvest_and_delete
@@ -44,9 +44,7 @@ module SearchSolrTools
44
44
  end
45
45
 
46
46
  def open_xml_document(url)
47
- Nokogiri::XML(open(url)) do |config|
48
- config.strict
49
- end
47
+ Nokogiri::XML(open(url), &:strict)
50
48
  end
51
49
  end
52
50
  end
@@ -27,7 +27,7 @@ module SearchSolrTools
27
27
  begin
28
28
  insert_solr_docs(translated_docs(results))
29
29
  rescue => e
30
- puts "ERROR: #{e}"
30
+ puts "ERROR: #{e.class} #{e}"
31
31
  raise e if @die_on_failure
32
32
  end
33
33
  end
@@ -87,7 +87,7 @@ module SearchSolrTools
87
87
  text.encode!('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
88
88
  end
89
89
 
90
- text.gsub!("\u00BF", '') if text.respond_to?(:gsub!)
90
+ text.delete!("\u00BF") if text.respond_to?(:delete!)
91
91
 
92
92
  text
93
93
  end
@@ -25,7 +25,7 @@ module SearchSolrTools
25
25
  max_temporal_duration = SolrFormat.reduce_temporal_duration(temporal_durations)
26
26
  facet = SolrFormat.get_temporal_duration_facet(max_temporal_duration)
27
27
 
28
- { 'temporal_coverages' => temporal_display, 'temporal_duration' => max_temporal_duration, 'temporal' => temporal_index_str, 'facet_temporal_duration' => facet }
28
+ { 'temporal_coverages' => temporal_display, 'temporal_duration' => max_temporal_duration, 'temporal' => temporal_index_str, 'facet_temporal_duration' => facet }
29
29
  end
30
30
 
31
31
  def self.format_string(value)
@@ -72,7 +72,7 @@ module SearchSolrTools
72
72
  temporal_coverages: {
73
73
  xpaths: ['.//Collection/Temporal/RangeDateTime'],
74
74
  multivalue: true,
75
- format: Helpers::IsoToSolrFormat::TEMPORAL_DISPLAY_STRING_FORMATTED
75
+ format: Helpers::IsoToSolrFormat::TEMPORAL_DISPLAY_STRING_FORMATTED
76
76
  },
77
77
  temporal_duration: {
78
78
  xpaths: ['.//Collection/Temporal/RangeDateTime'],
@@ -75,7 +75,7 @@ module SearchSolrTools
75
75
  temporal: {
76
76
  xpaths: ['.//gmd:EX_TemporalExtent'],
77
77
  multivalue: true,
78
- format: Helpers::IsoToSolrFormat::TEMPORAL_INDEX_STRING
78
+ format: Helpers::IsoToSolrFormat::TEMPORAL_INDEX_STRING
79
79
  },
80
80
  sensors: {
81
81
  xpaths: ['.//gmi:acquisitionInformation/gmi:MI_AcquisitionInformation/gmi:instrument/gmi:MI_Instrument/gmi:citation/gmd:CI_Citation/gmd:title/gco:CharacterString'],
@@ -75,7 +75,7 @@ module SearchSolrTools
75
75
  temporal: {
76
76
  xpaths: ['.//gmd:EX_TemporalExtent'],
77
77
  multivalue: true,
78
- format: Helpers::IsoToSolrFormat::TEMPORAL_INDEX_STRING
78
+ format: Helpers::IsoToSolrFormat::TEMPORAL_INDEX_STRING
79
79
  },
80
80
  sensors: {
81
81
  xpaths: ['.//gmi:acquisitionInformation/gmi:MI_AcquisitionInformation/gmi:instrument/gmi:MI_Instrument/gmi:citation/gmd:CI_Citation/gmd:title/gco:CharacterString'],
@@ -81,7 +81,7 @@ module SearchSolrTools
81
81
  temporal: {
82
82
  xpaths: ['.//gmd:EX_Extent[@id="temporalExtent"]'],
83
83
  multivalue: false,
84
- format: Helpers::R2RFormat::TEMPORAL_INDEX_STRING
84
+ format: Helpers::R2RFormat::TEMPORAL_INDEX_STRING
85
85
  },
86
86
  sensors: {
87
87
  xpaths: ['.//gmi:acquisitionInformation/gmi:MI_AcquisitionInformation/gmi:instrument/gmi:MI_Instrument/gmi:type/gmx:Anchor'],
@@ -175,7 +175,7 @@ module SearchSolrTools
175
175
  end
176
176
 
177
177
  def generate_part_array(json, limit_values = nil)
178
- parts = []
178
+ parts = []
179
179
  json = json.select { |k, _v| limit_values.include?(k) } unless limit_values.nil? || limit_values.empty?
180
180
 
181
181
  json.each do |_k, v|
@@ -1,3 +1,3 @@
1
1
  module SearchSolrTools
2
- VERSION = '3.2.0'
2
+ VERSION = '3.2.1.pre2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_solr_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Chalstrom
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-07-01 00:00:00.000000000 Z
15
+ date: 2015-09-16 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: iso8601
@@ -336,9 +336,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
336
336
  version: '2.0'
337
337
  required_rubygems_version: !ruby/object:Gem::Requirement
338
338
  requirements:
339
- - - ">="
339
+ - - ">"
340
340
  - !ruby/object:Gem::Version
341
- version: '0'
341
+ version: 1.3.1
342
342
  requirements: []
343
343
  rubyforge_project:
344
344
  rubygems_version: 2.4.8