telvue-rsolr 2.2.2

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.
@@ -0,0 +1,14 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
@@ -0,0 +1,29 @@
1
+ # The ASF licenses this file to You under the Apache License, Version 2.0
2
+ # (the "License"); you may not use this file except in compliance with
3
+ # the License. You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ #-----------------------------------------------------------------------
14
+ #some test synonym mappings unlikely to appear in real input text
15
+ aaafoo => aaabar
16
+ bbbfoo => bbbfoo bbbbar
17
+ cccfoo => cccbar cccbaz
18
+ fooaaa,baraaa,bazaaa
19
+
20
+ # Some synonym groups specific to this example
21
+ GB,gib,gigabyte,gigabytes
22
+ MB,mib,megabyte,megabytes
23
+ Television, Televisions, TV, TVs
24
+ #notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
25
+ #after us won't split it into two words.
26
+
27
+ # Synonym mappings can be used for spelling correction too
28
+ pixima => pixma
29
+
@@ -0,0 +1,34 @@
1
+ require 'spec_helper'
2
+ require 'solr_wrapper'
3
+
4
+ RSpec.describe "Solr basic_configs" do
5
+ SOLR_INSTANCE = SolrWrapper.default_instance({})
6
+ before(:all) { SOLR_INSTANCE.start }
7
+ after(:all) { SOLR_INSTANCE.stop }
8
+
9
+ context "basic configs" do
10
+ subject { RSolr.connect url: "http://localhost:#{SOLR_INSTANCE.port}/solr/basic_configs/"}
11
+ around(:each) do |example|
12
+ SOLR_INSTANCE.with_collection(name: "basic_configs", dir: File.join(FIXTURES_DIR, "basic_configs")) do |coll|
13
+ example.run
14
+ end
15
+ end
16
+ describe "HEAD admin/ping" do
17
+ it "should not raise an exception" do
18
+ expect { subject.head('admin/ping') }.not_to raise_error
19
+ end
20
+
21
+ it "should not have a body" do
22
+ expect(subject.head('admin/ping')).to be_kind_of RSolr::HashWithResponse
23
+ end
24
+ end
25
+ end
26
+
27
+ context "error handling" do
28
+ subject { RSolr.connect url: "http://localhost:65432/solr/basic_configs/"}
29
+
30
+ it "wraps connection errors" do
31
+ expect { subject.head('admin/ping') }.to raise_error RSolr::Error::ConnectionRefused
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,94 @@
1
+ require 'simplecov'
2
+ SimpleCov.start do
3
+ add_filter "/spec/"
4
+ end
5
+
6
+ require 'rsolr'
7
+ require 'rspec'
8
+
9
+ FIXTURES_DIR = File.expand_path("fixtures", File.dirname(__FILE__))
10
+
11
+ RSpec.configure do |config|
12
+ # rspec-expectations config goes here. You can use an alternate
13
+ # assertion/expectation library such as wrong or the stdlib/minitest
14
+ # assertions if you prefer.
15
+ config.expect_with :rspec do |expectations|
16
+ # This option will default to `true` in RSpec 4. It makes the `description`
17
+ # and `failure_message` of custom matchers include text for helper methods
18
+ # defined using `chain`, e.g.:
19
+ # be_bigger_than(2).and_smaller_than(4).description
20
+ # # => "be bigger than 2 and smaller than 4"
21
+ # ...rather than:
22
+ # # => "be bigger than 2"
23
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
24
+ end
25
+
26
+ # rspec-mocks config goes here. You can use an alternate test double
27
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
28
+ config.mock_with :rspec do |mocks|
29
+ # Prevents you from mocking or stubbing a method that does not exist on
30
+ # a real object. This is generally recommended, and will default to
31
+ # `true` in RSpec 4.
32
+ mocks.verify_partial_doubles = true
33
+ end
34
+
35
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
36
+ # have no way to turn it off -- the option exists only for backwards
37
+ # compatibility in RSpec 3). It causes shared context metadata to be
38
+ # inherited by the metadata hash of host groups and examples, rather than
39
+ # triggering implicit auto-inclusion in groups with matching metadata.
40
+ config.shared_context_metadata_behavior = :apply_to_host_groups
41
+
42
+ # The settings below are suggested to provide a good initial experience
43
+ # with RSpec, but feel free to customize to your heart's content.
44
+
45
+ # This allows you to limit a spec run to individual examples or groups
46
+ # you care about by tagging them with `:focus` metadata. When nothing
47
+ # is tagged with `:focus`, all examples get run. RSpec also provides
48
+ # aliases for `it`, `describe`, and `context` that include `:focus`
49
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
50
+ config.filter_run_when_matching :focus
51
+
52
+ # Allows RSpec to persist some state between runs in order to support
53
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
54
+ # you configure your source control system to ignore this file.
55
+ config.example_status_persistence_file_path = 'spec/examples.txt'
56
+
57
+ # Limits the available syntax to the non-monkey patched syntax that is
58
+ # recommended. For more details, see:
59
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
60
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
61
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
62
+ config.disable_monkey_patching!
63
+
64
+ # This setting enables warnings. It's recommended, but in some cases may
65
+ # be too noisy due to issues in dependencies.
66
+ config.warnings = true
67
+
68
+ # Many RSpec users commonly either run the entire suite or an individual
69
+ # file, and it's useful to allow more verbose output when running an
70
+ # individual spec file.
71
+ if config.files_to_run.one?
72
+ # Use the documentation formatter for detailed output,
73
+ # unless a formatter has already been configured
74
+ # (e.g. via a command-line flag).
75
+ config.default_formatter = 'doc'
76
+ end
77
+
78
+ # Print the 10 slowest examples and example groups at the
79
+ # end of the spec run, to help surface which specs are running
80
+ # particularly slow.
81
+ config.profile_examples = 10
82
+
83
+ # Run specs in random order to surface order dependencies. If you find an
84
+ # order dependency and want to debug it, you can fix the order by providing
85
+ # the seed, which is printed after each run.
86
+ # --seed 1234
87
+ config.order = :random
88
+
89
+ # Seed global randomization in this process using the `--seed` CLI option.
90
+ # Setting this allows you to use `--seed` to deterministically reproduce
91
+ # test failures related to randomization by passing the same `--seed` value
92
+ # as the one that triggered the failure.
93
+ Kernel.srand config.seed
94
+ end
metadata ADDED
@@ -0,0 +1,232 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: telvue-rsolr
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.2
5
+ platform: ruby
6
+ authors:
7
+ - Antoine Latter
8
+ - Dmitry Lihachev
9
+ - Lucas Souza
10
+ - Peter Kieltyka
11
+ - Rob Di Marco
12
+ - Magnus Bergmark
13
+ - Jonathan Rochkind
14
+ - Chris Beer
15
+ - Craig Smith
16
+ - Randy Souza
17
+ - Colin Steele
18
+ - Peter Kieltyka
19
+ - Lorenzo Riccucci
20
+ - Mike Perham
21
+ - Mat Brown
22
+ - Shairon Toledo
23
+ - Matthew Rudy
24
+ - Fouad Mardini
25
+ - Jeremy Hinegardner
26
+ - Nathan Witmer
27
+ - Naomi Dushay
28
+ - '"shima"'
29
+ - Ben Liu
30
+ autorequire:
31
+ bindir: bin
32
+ cert_chain: []
33
+ date: 2019-10-02 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: builder
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 2.1.2
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 2.1.2
49
+ - !ruby/object:Gem::Dependency
50
+ name: faraday
51
+ requirement: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.9.0
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 0.9.0
63
+ - !ruby/object:Gem::Dependency
64
+ name: activesupport
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ - !ruby/object:Gem::Dependency
78
+ name: nokogiri
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 1.4.0
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 1.4.0
91
+ - !ruby/object:Gem::Dependency
92
+ name: rake
93
+ requirement: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '10.0'
98
+ type: :development
99
+ prerelease: false
100
+ version_requirements: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '10.0'
105
+ - !ruby/object:Gem::Dependency
106
+ name: rdoc
107
+ requirement: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '4.0'
112
+ type: :development
113
+ prerelease: false
114
+ version_requirements: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '4.0'
119
+ - !ruby/object:Gem::Dependency
120
+ name: rspec
121
+ requirement: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '3.0'
126
+ type: :development
127
+ prerelease: false
128
+ version_requirements: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '3.0'
133
+ - !ruby/object:Gem::Dependency
134
+ name: simplecov
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ type: :development
141
+ prerelease: false
142
+ version_requirements: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ - !ruby/object:Gem::Dependency
148
+ name: solr_wrapper
149
+ requirement: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ type: :development
155
+ prerelease: false
156
+ version_requirements: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ description: RSolr aims to provide a simple and extensible library for working with
162
+ Solr
163
+ email:
164
+ - bliu@telvue.com
165
+ executables: []
166
+ extensions: []
167
+ extra_rdoc_files: []
168
+ files:
169
+ - ".gitignore"
170
+ - ".rspec"
171
+ - ".travis.yml"
172
+ - CHANGES.txt
173
+ - Gemfile
174
+ - LICENSE
175
+ - README.rdoc
176
+ - Rakefile
177
+ - lib/rsolr.rb
178
+ - lib/rsolr/char.rb
179
+ - lib/rsolr/client.rb
180
+ - lib/rsolr/document.rb
181
+ - lib/rsolr/error.rb
182
+ - lib/rsolr/field.rb
183
+ - lib/rsolr/generator.rb
184
+ - lib/rsolr/json.rb
185
+ - lib/rsolr/response.rb
186
+ - lib/rsolr/uri.rb
187
+ - lib/rsolr/version.rb
188
+ - lib/rsolr/xml.rb
189
+ - rsolr.gemspec
190
+ - spec/api/client_spec.rb
191
+ - spec/api/document_spec.rb
192
+ - spec/api/error_spec.rb
193
+ - spec/api/json_spec.rb
194
+ - spec/api/pagination_spec.rb
195
+ - spec/api/rsolr_spec.rb
196
+ - spec/api/uri_spec.rb
197
+ - spec/api/xml_spec.rb
198
+ - spec/fixtures/basic_configs/_rest_managed.json
199
+ - spec/fixtures/basic_configs/currency.xml
200
+ - spec/fixtures/basic_configs/lang/stopwords_en.txt
201
+ - spec/fixtures/basic_configs/protwords.txt
202
+ - spec/fixtures/basic_configs/schema.xml
203
+ - spec/fixtures/basic_configs/solrconfig.xml
204
+ - spec/fixtures/basic_configs/stopwords.txt
205
+ - spec/fixtures/basic_configs/synonyms.txt
206
+ - spec/integration/solr5_spec.rb
207
+ - spec/spec_helper.rb
208
+ homepage: https://github.com/telvue/rsolr
209
+ licenses:
210
+ - Apache-2.0
211
+ metadata: {}
212
+ post_install_message:
213
+ rdoc_options: []
214
+ require_paths:
215
+ - lib
216
+ required_ruby_version: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - ">="
219
+ - !ruby/object:Gem::Version
220
+ version: 1.9.3
221
+ required_rubygems_version: !ruby/object:Gem::Requirement
222
+ requirements:
223
+ - - ">="
224
+ - !ruby/object:Gem::Version
225
+ version: '0'
226
+ requirements:
227
+ - Apache Solr
228
+ rubygems_version: 3.0.6
229
+ signing_key:
230
+ specification_version: 4
231
+ summary: A Ruby client for Apache Solr
232
+ test_files: []