thinking-sphinx 3.1.4 → 6.0.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.
- checksums.yaml +5 -5
- data/.circleci/config.yml +99 -0
- data/.github/actions/test/action.yml +46 -0
- data/.github/workflows/ci.yml +75 -0
- data/.gitignore +7 -2
- data/.travis.yml +31 -16
- data/Appraisals +68 -12
- data/CHANGELOG.markdown +782 -0
- data/Gemfile +13 -4
- data/Procfile.support +2 -0
- data/README.textile +41 -27
- data/Rakefile +2 -0
- data/bin/console +15 -0
- data/bin/loadsphinx +99 -0
- data/bin/testmatrix +48 -0
- data/lib/thinking/sphinx.rb +2 -0
- data/lib/thinking-sphinx.rb +2 -0
- data/lib/thinking_sphinx/active_record/association.rb +2 -0
- data/lib/thinking_sphinx/active_record/association_proxy/attribute_finder.rb +3 -1
- data/lib/thinking_sphinx/active_record/association_proxy/attribute_matcher.rb +2 -0
- data/lib/thinking_sphinx/active_record/association_proxy.rb +3 -2
- data/lib/thinking_sphinx/active_record/attribute/sphinx_presenter.rb +3 -1
- data/lib/thinking_sphinx/active_record/attribute/type.rb +20 -4
- data/lib/thinking_sphinx/active_record/attribute/values.rb +2 -0
- data/lib/thinking_sphinx/active_record/attribute.rb +2 -0
- data/lib/thinking_sphinx/active_record/base.rb +43 -11
- data/lib/thinking_sphinx/active_record/callbacks/association_delta_callbacks.rb +21 -0
- data/lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb +15 -9
- data/lib/thinking_sphinx/active_record/callbacks/delta_callbacks.rb +20 -5
- data/lib/thinking_sphinx/active_record/callbacks/update_callbacks.rb +18 -4
- data/lib/thinking_sphinx/active_record/column.rb +2 -0
- data/lib/thinking_sphinx/active_record/column_sql_presenter.rb +7 -1
- data/lib/thinking_sphinx/active_record/database_adapters/abstract_adapter.rb +2 -0
- data/lib/thinking_sphinx/active_record/database_adapters/mysql_adapter.rb +9 -1
- data/lib/thinking_sphinx/active_record/database_adapters/postgresql_adapter.rb +2 -0
- data/lib/thinking_sphinx/active_record/database_adapters.rb +3 -1
- data/lib/thinking_sphinx/active_record/depolymorph/association_reflection.rb +32 -0
- data/lib/thinking_sphinx/active_record/depolymorph/base_reflection.rb +32 -0
- data/lib/thinking_sphinx/active_record/depolymorph/conditions_reflection.rb +40 -0
- data/lib/thinking_sphinx/active_record/depolymorph/overridden_reflection.rb +50 -0
- data/lib/thinking_sphinx/active_record/depolymorph/scoped_reflection.rb +26 -0
- data/lib/thinking_sphinx/active_record/field.rb +2 -0
- data/lib/thinking_sphinx/active_record/filter_reflection.rb +13 -71
- data/lib/thinking_sphinx/active_record/index.rb +7 -5
- data/lib/thinking_sphinx/active_record/interpreter.rb +6 -4
- data/lib/thinking_sphinx/active_record/join_association.rb +5 -1
- data/lib/thinking_sphinx/active_record/log_subscriber.rb +22 -3
- data/lib/thinking_sphinx/active_record/polymorpher.rb +2 -0
- data/lib/thinking_sphinx/active_record/property.rb +2 -0
- data/lib/thinking_sphinx/active_record/property_query.rb +4 -1
- data/lib/thinking_sphinx/active_record/property_sql_presenter.rb +2 -0
- data/lib/thinking_sphinx/active_record/simple_many_query.rb +2 -0
- data/lib/thinking_sphinx/active_record/source_joins.rb +68 -0
- data/lib/thinking_sphinx/active_record/sql_builder/clause_builder.rb +2 -0
- data/lib/thinking_sphinx/active_record/sql_builder/query.rb +13 -0
- data/lib/thinking_sphinx/active_record/sql_builder/statement.rb +2 -0
- data/lib/thinking_sphinx/active_record/sql_builder.rb +5 -18
- data/lib/thinking_sphinx/active_record/sql_source/template.rb +5 -3
- data/lib/thinking_sphinx/active_record/sql_source.rb +35 -9
- data/lib/thinking_sphinx/active_record.rb +14 -1
- data/lib/thinking_sphinx/attribute_types.rb +72 -0
- data/lib/thinking_sphinx/batched_search.rb +2 -0
- data/lib/thinking_sphinx/callbacks/appender.rb +63 -0
- data/lib/thinking_sphinx/callbacks.rb +29 -0
- data/lib/thinking_sphinx/capistrano/v2.rb +2 -0
- data/lib/thinking_sphinx/capistrano/v3.rb +2 -0
- data/lib/thinking_sphinx/capistrano.rb +2 -0
- data/lib/thinking_sphinx/commander.rb +27 -0
- data/lib/thinking_sphinx/commands/base.rb +53 -0
- data/lib/thinking_sphinx/commands/clear_real_time.rb +22 -0
- data/lib/thinking_sphinx/commands/clear_sql.rb +18 -0
- data/lib/thinking_sphinx/commands/configure.rb +15 -0
- data/lib/thinking_sphinx/commands/index_real_time.rb +15 -0
- data/lib/thinking_sphinx/commands/index_sql.rb +25 -0
- data/lib/thinking_sphinx/commands/merge.rb +27 -0
- data/lib/thinking_sphinx/commands/merge_and_update.rb +57 -0
- data/lib/thinking_sphinx/commands/prepare.rb +15 -0
- data/lib/thinking_sphinx/commands/rotate.rb +13 -0
- data/lib/thinking_sphinx/commands/running.rb +15 -0
- data/lib/thinking_sphinx/commands/start_attached.rb +22 -0
- data/lib/thinking_sphinx/commands/start_detached.rb +21 -0
- data/lib/thinking_sphinx/commands/stop.rb +24 -0
- data/lib/thinking_sphinx/commands.rb +20 -0
- data/lib/thinking_sphinx/configuration/consistent_ids.rb +2 -0
- data/lib/thinking_sphinx/configuration/defaults.rb +2 -0
- data/lib/thinking_sphinx/configuration/distributed_indices.rb +3 -1
- data/lib/thinking_sphinx/configuration/duplicate_names.rb +36 -0
- data/lib/thinking_sphinx/configuration/minimum_fields.rb +17 -12
- data/lib/thinking_sphinx/configuration.rb +90 -74
- data/lib/thinking_sphinx/connection/client.rb +74 -0
- data/lib/thinking_sphinx/connection/jruby.rb +58 -0
- data/lib/thinking_sphinx/connection/mri.rb +26 -0
- data/lib/thinking_sphinx/connection.rb +13 -114
- data/lib/thinking_sphinx/core/field.rb +2 -0
- data/lib/thinking_sphinx/core/index.rb +22 -2
- data/lib/thinking_sphinx/core/interpreter.rb +2 -0
- data/lib/thinking_sphinx/core/property.rb +2 -0
- data/lib/thinking_sphinx/core/settings.rb +2 -0
- data/lib/thinking_sphinx/core.rb +2 -0
- data/lib/thinking_sphinx/deletion.rb +33 -13
- data/lib/thinking_sphinx/deltas/default_delta.rb +3 -1
- data/lib/thinking_sphinx/deltas/delete_job.rb +16 -4
- data/lib/thinking_sphinx/deltas/index_job.rb +14 -2
- data/lib/thinking_sphinx/deltas.rb +2 -0
- data/lib/thinking_sphinx/distributed/index.rb +25 -3
- data/lib/thinking_sphinx/distributed.rb +2 -0
- data/lib/thinking_sphinx/errors.rb +47 -3
- data/lib/thinking_sphinx/excerpter.rb +2 -0
- data/lib/thinking_sphinx/facet.rb +4 -3
- data/lib/thinking_sphinx/facet_search.rb +4 -2
- data/lib/thinking_sphinx/float_formatter.rb +2 -0
- data/lib/thinking_sphinx/frameworks/plain.rb +2 -0
- data/lib/thinking_sphinx/frameworks/rails.rb +2 -0
- data/lib/thinking_sphinx/frameworks.rb +2 -0
- data/lib/thinking_sphinx/guard/file.rb +3 -1
- data/lib/thinking_sphinx/guard/files.rb +2 -0
- data/lib/thinking_sphinx/guard/none.rb +7 -0
- data/lib/thinking_sphinx/guard.rb +3 -0
- data/lib/thinking_sphinx/hooks/guard_presence.rb +34 -0
- data/lib/thinking_sphinx/index.rb +2 -0
- data/lib/thinking_sphinx/index_set.rb +27 -4
- data/lib/thinking_sphinx/indexing_strategies/all_at_once.rb +9 -0
- data/lib/thinking_sphinx/indexing_strategies/one_at_a_time.rb +16 -0
- data/lib/thinking_sphinx/interfaces/base.rb +13 -0
- data/lib/thinking_sphinx/interfaces/daemon.rb +27 -0
- data/lib/thinking_sphinx/interfaces/real_time.rb +46 -0
- data/lib/thinking_sphinx/interfaces/sql.rb +53 -0
- data/lib/thinking_sphinx/interfaces.rb +10 -0
- data/lib/thinking_sphinx/logger.rb +2 -0
- data/lib/thinking_sphinx/masks/group_enumerators_mask.rb +6 -4
- data/lib/thinking_sphinx/masks/pagination_mask.rb +2 -0
- data/lib/thinking_sphinx/masks/scopes_mask.rb +8 -0
- data/lib/thinking_sphinx/masks/weight_enumerator_mask.rb +3 -1
- data/lib/thinking_sphinx/masks.rb +2 -0
- data/lib/thinking_sphinx/middlewares/active_record_translator.rb +32 -9
- data/lib/thinking_sphinx/middlewares/geographer.rb +2 -0
- data/lib/thinking_sphinx/middlewares/glazier.rb +14 -1
- data/lib/thinking_sphinx/middlewares/ids_only.rb +2 -0
- data/lib/thinking_sphinx/middlewares/inquirer.rb +3 -1
- data/lib/thinking_sphinx/middlewares/middleware.rb +2 -0
- data/lib/thinking_sphinx/middlewares/sphinxql.rb +18 -16
- data/lib/thinking_sphinx/middlewares/stale_id_checker.rb +3 -1
- data/lib/thinking_sphinx/middlewares/stale_id_filter.rb +4 -2
- data/lib/thinking_sphinx/middlewares/valid_options.rb +25 -0
- data/lib/thinking_sphinx/middlewares.rb +7 -3
- data/lib/thinking_sphinx/panes/attributes_pane.rb +2 -0
- data/lib/thinking_sphinx/panes/distance_pane.rb +2 -0
- data/lib/thinking_sphinx/panes/excerpts_pane.rb +2 -0
- data/lib/thinking_sphinx/panes/weight_pane.rb +3 -1
- data/lib/thinking_sphinx/panes.rb +2 -0
- data/lib/thinking_sphinx/processor.rb +71 -0
- data/lib/thinking_sphinx/query.rb +2 -0
- data/lib/thinking_sphinx/railtie.rb +29 -2
- data/lib/thinking_sphinx/rake_interface.rb +14 -69
- data/lib/thinking_sphinx/real_time/attribute.rb +9 -1
- data/lib/thinking_sphinx/real_time/callbacks/real_time_callbacks.rb +17 -7
- data/lib/thinking_sphinx/real_time/field.rb +2 -0
- data/lib/thinking_sphinx/real_time/index/template.rb +19 -1
- data/lib/thinking_sphinx/real_time/index.rb +11 -5
- data/lib/thinking_sphinx/real_time/interpreter.rb +10 -6
- data/lib/thinking_sphinx/real_time/populator.rb +12 -14
- data/lib/thinking_sphinx/real_time/processor.rb +36 -0
- data/lib/thinking_sphinx/real_time/property.rb +3 -5
- data/lib/thinking_sphinx/real_time/transcribe_instance.rb +38 -0
- data/lib/thinking_sphinx/real_time/transcriber.rb +63 -15
- data/lib/thinking_sphinx/real_time/translator.rb +39 -0
- data/lib/thinking_sphinx/real_time.rb +22 -1
- data/lib/thinking_sphinx/scopes.rb +6 -0
- data/lib/thinking_sphinx/search/batch_inquirer.rb +2 -0
- data/lib/thinking_sphinx/search/context.rb +11 -0
- data/lib/thinking_sphinx/search/glaze.rb +2 -0
- data/lib/thinking_sphinx/search/merger.rb +2 -0
- data/lib/thinking_sphinx/search/query.rb +9 -1
- data/lib/thinking_sphinx/search/stale_ids_exception.rb +7 -3
- data/lib/thinking_sphinx/search.rb +30 -2
- data/lib/thinking_sphinx/settings.rb +128 -0
- data/lib/thinking_sphinx/sinatra.rb +3 -1
- data/lib/thinking_sphinx/subscribers/populator_subscriber.rb +19 -5
- data/lib/thinking_sphinx/tasks.rb +55 -28
- data/lib/thinking_sphinx/test.rb +3 -1
- data/lib/thinking_sphinx/utf8.rb +2 -0
- data/lib/thinking_sphinx/wildcard.rb +3 -1
- data/lib/thinking_sphinx/with_output.rb +13 -0
- data/lib/thinking_sphinx.rb +35 -4
- data/spec/acceptance/association_scoping_spec.rb +7 -5
- data/spec/acceptance/attribute_access_spec.rb +29 -12
- data/spec/acceptance/attribute_updates_spec.rb +5 -3
- data/spec/acceptance/batch_searching_spec.rb +6 -4
- data/spec/acceptance/big_integers_spec.rb +9 -7
- data/spec/acceptance/excerpts_spec.rb +11 -10
- data/spec/acceptance/facets_spec.rb +29 -16
- data/spec/acceptance/geosearching_spec.rb +22 -10
- data/spec/acceptance/grouping_by_attributes_spec.rb +30 -28
- data/spec/acceptance/index_options_spec.rb +18 -16
- data/spec/acceptance/indexing_spec.rb +5 -3
- data/spec/acceptance/merging_spec.rb +90 -0
- data/spec/acceptance/paginating_search_results_spec.rb +21 -3
- data/spec/acceptance/real_time_updates_spec.rb +103 -5
- data/spec/acceptance/remove_deleted_records_spec.rb +64 -8
- data/spec/acceptance/search_counts_spec.rb +4 -2
- data/spec/acceptance/search_for_just_ids_spec.rb +4 -2
- data/spec/acceptance/searching_across_models_spec.rb +15 -6
- data/spec/acceptance/searching_across_schemas_spec.rb +12 -10
- data/spec/acceptance/searching_on_fields_spec.rb +11 -9
- data/spec/acceptance/searching_with_filters_spec.rb +35 -20
- data/spec/acceptance/searching_with_sti_spec.rb +11 -9
- data/spec/acceptance/searching_within_a_model_spec.rb +44 -17
- data/spec/acceptance/sorting_search_results_spec.rb +21 -19
- data/spec/acceptance/spec_helper.rb +2 -13
- data/spec/acceptance/specifying_sql_spec.rb +118 -62
- data/spec/acceptance/sphinx_scopes_spec.rb +30 -21
- data/spec/acceptance/sql_deltas_spec.rb +35 -9
- data/spec/acceptance/support/database_cleaner.rb +3 -1
- data/spec/acceptance/support/sphinx_controller.rb +25 -9
- data/spec/acceptance/support/sphinx_helpers.rb +17 -2
- data/spec/acceptance/suspended_deltas_spec.rb +14 -12
- data/spec/fixtures/database.yml +1 -1
- data/spec/internal/app/indices/admin_person_index.rb +6 -0
- data/spec/internal/app/indices/album_index.rb +9 -0
- data/spec/internal/app/indices/animal_index.rb +2 -0
- data/spec/internal/app/indices/article_index.rb +10 -3
- data/spec/internal/app/indices/bird_index.rb +2 -0
- data/spec/internal/app/indices/book_index.rb +4 -1
- data/spec/internal/app/indices/car_index.rb +2 -0
- data/spec/internal/app/indices/city_index.rb +2 -0
- data/spec/internal/app/indices/colour_index.rb +7 -0
- data/spec/internal/app/indices/product_index.rb +3 -2
- data/spec/internal/app/indices/tee_index.rb +3 -1
- data/spec/internal/app/indices/user_index.rb +2 -0
- data/spec/internal/app/models/admin/person.rb +6 -0
- data/spec/internal/app/models/album.rb +25 -0
- data/spec/internal/app/models/animal.rb +3 -0
- data/spec/internal/app/models/article.rb +4 -0
- data/spec/internal/app/models/bird.rb +3 -0
- data/spec/internal/app/models/book.rb +9 -5
- data/spec/internal/app/models/car.rb +3 -1
- data/spec/internal/app/models/categorisation.rb +10 -1
- data/spec/internal/app/models/category.rb +2 -0
- data/spec/internal/app/models/city.rb +4 -0
- data/spec/internal/app/models/colour.rb +4 -0
- data/spec/internal/app/models/event.rb +2 -0
- data/spec/internal/app/models/flightless_bird.rb +2 -0
- data/spec/internal/app/models/genre.rb +2 -0
- data/spec/internal/app/models/hardcover.rb +2 -0
- data/spec/internal/app/models/mammal.rb +2 -0
- data/spec/internal/app/models/manufacturer.rb +2 -0
- data/spec/internal/app/models/product.rb +3 -1
- data/spec/internal/app/models/tag.rb +2 -0
- data/spec/internal/app/models/tagging.rb +2 -0
- data/spec/internal/app/models/tee.rb +7 -0
- data/spec/internal/app/models/tweet.rb +2 -0
- data/spec/internal/app/models/user.rb +4 -0
- data/spec/internal/config/database.yml +12 -1
- data/spec/internal/db/schema.rb +13 -1
- data/spec/spec_helper.rb +12 -1
- data/spec/support/json_column.rb +35 -0
- data/spec/support/multi_schema.rb +5 -1
- data/spec/support/mysql.rb +25 -0
- data/spec/support/sphinx_yaml_helpers.rb +8 -1
- data/spec/thinking_sphinx/active_record/association_spec.rb +3 -1
- data/spec/thinking_sphinx/active_record/attribute/type_spec.rb +43 -38
- data/spec/thinking_sphinx/active_record/base_spec.rb +31 -29
- data/spec/thinking_sphinx/active_record/callbacks/delete_callbacks_spec.rb +81 -10
- data/spec/thinking_sphinx/active_record/callbacks/delta_callbacks_spec.rb +56 -29
- data/spec/thinking_sphinx/active_record/callbacks/update_callbacks_spec.rb +27 -10
- data/spec/thinking_sphinx/active_record/column_spec.rb +15 -13
- data/spec/thinking_sphinx/active_record/column_sql_presenter_spec.rb +39 -0
- data/spec/thinking_sphinx/active_record/database_adapters/abstract_adapter_spec.rb +7 -5
- data/spec/thinking_sphinx/active_record/database_adapters/mysql_adapter_spec.rb +26 -12
- data/spec/thinking_sphinx/active_record/database_adapters/postgresql_adapter_spec.rb +15 -13
- data/spec/thinking_sphinx/active_record/database_adapters_spec.rb +50 -48
- data/spec/thinking_sphinx/active_record/field_spec.rb +9 -7
- data/spec/thinking_sphinx/active_record/filter_reflection_spec.rb +113 -80
- data/spec/thinking_sphinx/active_record/index_spec.rb +41 -37
- data/spec/thinking_sphinx/active_record/interpreter_spec.rb +62 -59
- data/spec/thinking_sphinx/active_record/polymorpher_spec.rb +16 -14
- data/spec/thinking_sphinx/active_record/property_sql_presenter_spec.rb +69 -67
- data/spec/thinking_sphinx/active_record/sql_builder_spec.rb +146 -154
- data/spec/thinking_sphinx/active_record/sql_source_spec.rb +185 -109
- data/spec/thinking_sphinx/attribute_types_spec.rb +52 -0
- data/spec/thinking_sphinx/commands/clear_real_time_spec.rb +46 -0
- data/spec/thinking_sphinx/commands/clear_sql_spec.rb +52 -0
- data/spec/thinking_sphinx/commands/configure_spec.rb +31 -0
- data/spec/thinking_sphinx/commands/index_real_time_spec.rb +33 -0
- data/spec/thinking_sphinx/commands/index_sql_spec.rb +86 -0
- data/spec/thinking_sphinx/commands/merge_and_update_spec.rb +106 -0
- data/spec/thinking_sphinx/commands/merge_spec.rb +48 -0
- data/spec/thinking_sphinx/commands/prepare_spec.rb +31 -0
- data/spec/thinking_sphinx/commands/running_spec.rb +30 -0
- data/spec/thinking_sphinx/commands/start_detached_spec.rb +67 -0
- data/spec/thinking_sphinx/commands/stop_spec.rb +63 -0
- data/spec/thinking_sphinx/configuration/minimum_fields_spec.rb +60 -0
- data/spec/thinking_sphinx/configuration_spec.rb +247 -94
- data/spec/thinking_sphinx/connection/mri_spec.rb +49 -0
- data/spec/thinking_sphinx/connection_spec.rb +15 -13
- data/spec/thinking_sphinx/deletion_spec.rb +17 -17
- data/spec/thinking_sphinx/deltas/default_delta_spec.rb +28 -21
- data/spec/thinking_sphinx/deltas_spec.rb +14 -12
- data/spec/thinking_sphinx/errors_spec.rb +59 -27
- data/spec/thinking_sphinx/excerpter_spec.rb +12 -9
- data/spec/thinking_sphinx/facet_search_spec.rb +24 -22
- data/spec/thinking_sphinx/hooks/guard_presence_spec.rb +30 -0
- data/spec/thinking_sphinx/index_set_spec.rb +59 -18
- data/spec/thinking_sphinx/index_spec.rb +28 -26
- data/spec/thinking_sphinx/interfaces/daemon_spec.rb +60 -0
- data/spec/thinking_sphinx/interfaces/real_time_spec.rb +109 -0
- data/spec/thinking_sphinx/interfaces/sql_spec.rb +122 -0
- data/spec/thinking_sphinx/masks/pagination_mask_spec.rb +22 -20
- data/spec/thinking_sphinx/masks/scopes_mask_spec.rb +20 -18
- data/spec/thinking_sphinx/middlewares/active_record_translator_spec.rb +45 -21
- data/spec/thinking_sphinx/middlewares/geographer_spec.rb +11 -9
- data/spec/thinking_sphinx/middlewares/glazier_spec.rb +12 -9
- data/spec/thinking_sphinx/middlewares/inquirer_spec.rb +9 -7
- data/spec/thinking_sphinx/middlewares/sphinxql_spec.rb +60 -58
- data/spec/thinking_sphinx/middlewares/stale_id_checker_spec.rb +7 -4
- data/spec/thinking_sphinx/middlewares/stale_id_filter_spec.rb +39 -17
- data/spec/thinking_sphinx/middlewares/valid_options_spec.rb +51 -0
- data/spec/thinking_sphinx/panes/attributes_pane_spec.rb +3 -1
- data/spec/thinking_sphinx/panes/distance_pane_spec.rb +6 -4
- data/spec/thinking_sphinx/panes/excerpts_pane_spec.rb +8 -6
- data/spec/thinking_sphinx/panes/weight_pane_spec.rb +4 -2
- data/spec/thinking_sphinx/rake_interface_spec.rb +17 -235
- data/spec/thinking_sphinx/real_time/attribute_spec.rb +15 -13
- data/spec/thinking_sphinx/real_time/callbacks/real_time_callbacks_spec.rb +114 -28
- data/spec/thinking_sphinx/real_time/field_spec.rb +16 -14
- data/spec/thinking_sphinx/real_time/index_spec.rb +83 -32
- data/spec/thinking_sphinx/real_time/interpreter_spec.rb +44 -42
- data/spec/thinking_sphinx/real_time/transcribe_instance_spec.rb +35 -0
- data/spec/thinking_sphinx/real_time/transcriber_spec.rb +109 -0
- data/spec/thinking_sphinx/real_time/translator_spec.rb +17 -0
- data/spec/thinking_sphinx/scopes_spec.rb +11 -5
- data/spec/thinking_sphinx/search/glaze_spec.rb +17 -15
- data/spec/thinking_sphinx/search/query_spec.rb +19 -10
- data/spec/thinking_sphinx/search_spec.rb +30 -28
- data/spec/thinking_sphinx/wildcard_spec.rb +18 -11
- data/spec/thinking_sphinx_spec.rb +10 -7
- data/thinking-sphinx.gemspec +17 -10
- metadata +157 -49
- data/HISTORY +0 -248
- data/gemfiles/.gitignore +0 -1
- data/gemfiles/rails_3_2.gemfile +0 -11
- data/gemfiles/rails_4_0.gemfile +0 -11
- data/gemfiles/rails_4_1.gemfile +0 -11
- data/gemfiles/rails_4_2.gemfile +0 -11
- data/lib/thinking_sphinx/controller.rb +0 -10
- data/lib/thinking_sphinx/middlewares/utf8.rb +0 -27
- data/lib/thinking_sphinx/sphinxql.rb +0 -23
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
RSpec.describe ThinkingSphinx::Middlewares::ValidOptions do
|
|
6
|
+
let(:app) { double 'app', :call => true }
|
|
7
|
+
let(:middleware) { ThinkingSphinx::Middlewares::ValidOptions.new app }
|
|
8
|
+
let(:context) { double 'context', :search => search }
|
|
9
|
+
let(:search) { double 'search', :options => {} }
|
|
10
|
+
|
|
11
|
+
before :each do
|
|
12
|
+
allow(ThinkingSphinx::Logger).to receive(:log)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
context 'with unknown options' do
|
|
16
|
+
before :each do
|
|
17
|
+
search.options[:foo] = :bar
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "adds a warning" do
|
|
21
|
+
expect(ThinkingSphinx::Logger).to receive(:log).
|
|
22
|
+
with(:caution, "Unexpected search options: [:foo]")
|
|
23
|
+
|
|
24
|
+
middleware.call [context]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'continues on' do
|
|
28
|
+
expect(app).to receive(:call).with([context])
|
|
29
|
+
|
|
30
|
+
middleware.call [context]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
context "with known options" do
|
|
35
|
+
before :each do
|
|
36
|
+
search.options[:ids_only] = true
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it "is silent" do
|
|
40
|
+
expect(ThinkingSphinx::Logger).to_not receive(:log)
|
|
41
|
+
|
|
42
|
+
middleware.call [context]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it 'continues on' do
|
|
46
|
+
expect(app).to receive(:call).with([context])
|
|
47
|
+
|
|
48
|
+
middleware.call [context]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ThinkingSphinx
|
|
2
4
|
module Panes; end
|
|
3
5
|
end
|
|
@@ -15,7 +17,7 @@ describe ThinkingSphinx::Panes::AttributesPane do
|
|
|
15
17
|
it "returns the object's sphinx attributes by default" do
|
|
16
18
|
raw['foo'] = 24
|
|
17
19
|
|
|
18
|
-
pane.sphinx_attributes.
|
|
20
|
+
expect(pane.sphinx_attributes).to eq({'foo' => 24})
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ThinkingSphinx
|
|
2
4
|
module Panes; end
|
|
3
5
|
end
|
|
@@ -15,13 +17,13 @@ describe ThinkingSphinx::Panes::DistancePane do
|
|
|
15
17
|
it "returns the object's geodistance attribute by default" do
|
|
16
18
|
raw['geodist'] = 123.45
|
|
17
19
|
|
|
18
|
-
pane.distance.
|
|
20
|
+
expect(pane.distance).to eq(123.45)
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
it "converts string geodistances to floats" do
|
|
22
24
|
raw['geodist'] = '123.450'
|
|
23
25
|
|
|
24
|
-
pane.distance.
|
|
26
|
+
expect(pane.distance).to eq(123.45)
|
|
25
27
|
end
|
|
26
28
|
end
|
|
27
29
|
|
|
@@ -29,13 +31,13 @@ describe ThinkingSphinx::Panes::DistancePane do
|
|
|
29
31
|
it "returns the object's geodistance attribute by default" do
|
|
30
32
|
raw['geodist'] = 123.45
|
|
31
33
|
|
|
32
|
-
pane.geodist.
|
|
34
|
+
expect(pane.geodist).to eq(123.45)
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
it "converts string geodistances to floats" do
|
|
36
38
|
raw['geodist'] = '123.450'
|
|
37
39
|
|
|
38
|
-
pane.geodist.
|
|
40
|
+
expect(pane.geodist).to eq(123.45)
|
|
39
41
|
end
|
|
40
42
|
end
|
|
41
43
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ThinkingSphinx
|
|
2
4
|
module Panes; end
|
|
3
5
|
end
|
|
@@ -13,7 +15,7 @@ describe ThinkingSphinx::Panes::ExcerptsPane do
|
|
|
13
15
|
let(:search) { double('search', :query => 'foo', :options => {}) }
|
|
14
16
|
|
|
15
17
|
before :each do
|
|
16
|
-
context.
|
|
18
|
+
allow(context).to receive_messages :search => search
|
|
17
19
|
end
|
|
18
20
|
|
|
19
21
|
describe '#excerpts' do
|
|
@@ -22,18 +24,18 @@ describe ThinkingSphinx::Panes::ExcerptsPane do
|
|
|
22
24
|
|
|
23
25
|
before :each do
|
|
24
26
|
stub_const 'ThinkingSphinx::Excerpter', double(:new => excerpter)
|
|
25
|
-
ThinkingSphinx::Panes::ExcerptsPane::Excerpts.
|
|
27
|
+
allow(ThinkingSphinx::Panes::ExcerptsPane::Excerpts).to receive_messages :new => excerpts
|
|
26
28
|
end
|
|
27
29
|
|
|
28
30
|
it "returns an excerpt glazing" do
|
|
29
|
-
pane.excerpts.
|
|
31
|
+
expect(pane.excerpts).to eq(excerpts)
|
|
30
32
|
end
|
|
31
33
|
|
|
32
34
|
it "creates an excerpter with the first index and the query and conditions values" do
|
|
33
35
|
context[:indices] = [double(:name => 'alpha'), double(:name => 'beta')]
|
|
34
36
|
context.search.options[:conditions] = {:baz => 'bar'}
|
|
35
37
|
|
|
36
|
-
ThinkingSphinx::Excerpter.
|
|
38
|
+
expect(ThinkingSphinx::Excerpter).to receive(:new).
|
|
37
39
|
with('alpha', 'foo bar', anything).and_return(excerpter)
|
|
38
40
|
|
|
39
41
|
pane.excerpts
|
|
@@ -42,8 +44,8 @@ describe ThinkingSphinx::Panes::ExcerptsPane do
|
|
|
42
44
|
it "passes through excerpts options" do
|
|
43
45
|
search.options[:excerpts] = {:before_match => 'foo'}
|
|
44
46
|
|
|
45
|
-
ThinkingSphinx::Excerpter.
|
|
46
|
-
with(anything, anything, :before_match => 'foo').and_return(excerpter)
|
|
47
|
+
expect(ThinkingSphinx::Excerpter).to receive(:new).
|
|
48
|
+
with(anything, anything, { :before_match => 'foo' }).and_return(excerpter)
|
|
47
49
|
|
|
48
50
|
pane.excerpts
|
|
49
51
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ThinkingSphinx
|
|
2
4
|
module Panes; end
|
|
3
5
|
end
|
|
@@ -12,9 +14,9 @@ describe ThinkingSphinx::Panes::WeightPane do
|
|
|
12
14
|
|
|
13
15
|
describe '#weight' do
|
|
14
16
|
it "returns the object's weight by default" do
|
|
15
|
-
raw[
|
|
17
|
+
raw["weight()"] = 101
|
|
16
18
|
|
|
17
|
-
pane.weight.
|
|
19
|
+
expect(pane.weight).to eq(101)
|
|
18
20
|
end
|
|
19
21
|
end
|
|
20
22
|
end
|
|
@@ -1,257 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe ThinkingSphinx::RakeInterface do
|
|
4
|
-
let(:
|
|
5
|
-
let(:
|
|
6
|
+
let(:interface) { ThinkingSphinx::RakeInterface.new }
|
|
7
|
+
let(:commander) { double :call => nil }
|
|
6
8
|
|
|
7
9
|
before :each do
|
|
8
|
-
ThinkingSphinx::
|
|
9
|
-
interface.stub(:puts => nil)
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
describe '#clear_all' do
|
|
13
|
-
let(:controller) { double 'controller' }
|
|
14
|
-
|
|
15
|
-
before :each do
|
|
16
|
-
configuration.stub(
|
|
17
|
-
:indices_location => '/path/to/indices',
|
|
18
|
-
:searchd => double(:binlog_path => '/path/to/binlog')
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
FileUtils.stub :rm_r => true
|
|
22
|
-
File.stub :exists? => true
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it "removes the directory for the index files" do
|
|
26
|
-
FileUtils.should_receive(:rm_r).with('/path/to/indices')
|
|
27
|
-
|
|
28
|
-
interface.clear_all
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
it "removes the directory for the binlog files" do
|
|
32
|
-
FileUtils.should_receive(:rm_r).with('/path/to/binlog')
|
|
33
|
-
|
|
34
|
-
interface.clear_all
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
describe '#clear_real_time' do
|
|
39
|
-
let(:controller) { double 'controller' }
|
|
40
|
-
let(:index) {
|
|
41
|
-
double(:type => 'rt', :render => true, :path => '/path/to/my/index')
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
before :each do
|
|
45
|
-
configuration.stub(
|
|
46
|
-
:indices => [double(:type => 'plain'), index],
|
|
47
|
-
:searchd => double(:binlog_path => '/path/to/binlog')
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
Dir.stub :[] => ['foo.a', 'foo.b']
|
|
51
|
-
FileUtils.stub :rm_r => true, :rm => true
|
|
52
|
-
File.stub :exists? => true
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
it 'finds each file for real-time indices' do
|
|
56
|
-
Dir.should_receive(:[]).with('/path/to/my/index.*').and_return([])
|
|
57
|
-
|
|
58
|
-
interface.clear_real_time
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
it "removes each file for real-time indices" do
|
|
62
|
-
FileUtils.should_receive(:rm).with('foo.a')
|
|
63
|
-
FileUtils.should_receive(:rm).with('foo.b')
|
|
64
|
-
|
|
65
|
-
interface.clear_real_time
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
it "removes the directory for the binlog files" do
|
|
69
|
-
FileUtils.should_receive(:rm_r).with('/path/to/binlog')
|
|
70
|
-
|
|
71
|
-
interface.clear_real_time
|
|
72
|
-
end
|
|
10
|
+
stub_const 'ThinkingSphinx::Commander', commander
|
|
73
11
|
end
|
|
74
12
|
|
|
75
13
|
describe '#configure' do
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
configuration.stub(
|
|
80
|
-
:configuration_file => '/path/to/foo.conf',
|
|
81
|
-
:render_to_file => true
|
|
82
|
-
)
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
it "renders the configuration to a file" do
|
|
86
|
-
configuration.should_receive(:render_to_file)
|
|
87
|
-
|
|
88
|
-
interface.configure
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
it "prints a message stating the file is being generated" do
|
|
92
|
-
interface.should_receive(:puts).
|
|
93
|
-
with('Generating configuration to /path/to/foo.conf')
|
|
14
|
+
it 'sends the configure command' do
|
|
15
|
+
expect(commander).to receive(:call).
|
|
16
|
+
with(:configure, anything, {:verbose => true})
|
|
94
17
|
|
|
95
18
|
interface.configure
|
|
96
19
|
end
|
|
97
20
|
end
|
|
98
21
|
|
|
99
|
-
describe '#
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
before :each do
|
|
103
|
-
ThinkingSphinx.stub :before_index_hooks => []
|
|
104
|
-
configuration.stub(
|
|
105
|
-
:configuration_file => '/path/to/foo.conf',
|
|
106
|
-
:render_to_file => true,
|
|
107
|
-
:indices_location => '/path/to/indices'
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
FileUtils.stub :mkdir_p => true
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
it "renders the configuration to a file by default" do
|
|
114
|
-
configuration.should_receive(:render_to_file)
|
|
115
|
-
|
|
116
|
-
interface.index
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
it "does not render the configuration if requested" do
|
|
120
|
-
configuration.should_not_receive(:render_to_file)
|
|
121
|
-
|
|
122
|
-
interface.index false
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
it "creates the directory for the index files" do
|
|
126
|
-
FileUtils.should_receive(:mkdir_p).with('/path/to/indices')
|
|
127
|
-
|
|
128
|
-
interface.index
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
it "calls all registered hooks" do
|
|
132
|
-
called = false
|
|
133
|
-
ThinkingSphinx.before_index_hooks << Proc.new { called = true }
|
|
134
|
-
|
|
135
|
-
interface.index
|
|
136
|
-
|
|
137
|
-
called.should be_true
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
it "indexes all indices verbosely" do
|
|
141
|
-
controller.should_receive(:index).with(:verbose => true)
|
|
142
|
-
|
|
143
|
-
interface.index
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
it "does not index verbosely if requested" do
|
|
147
|
-
controller.should_receive(:index).with(:verbose => false)
|
|
148
|
-
|
|
149
|
-
interface.index true, false
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
describe '#start' do
|
|
154
|
-
let(:controller) { double('controller', :start => true, :pid => 101) }
|
|
155
|
-
|
|
156
|
-
before :each do
|
|
157
|
-
controller.stub(:running?).and_return(false, true)
|
|
158
|
-
configuration.stub :indices_location => 'my/index/files'
|
|
159
|
-
|
|
160
|
-
FileUtils.stub :mkdir_p => true
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
it "creates the index files directory" do
|
|
164
|
-
FileUtils.should_receive(:mkdir_p).with('my/index/files')
|
|
165
|
-
|
|
166
|
-
interface.start
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
it "starts the daemon" do
|
|
170
|
-
controller.should_receive(:start)
|
|
171
|
-
|
|
172
|
-
interface.start
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
it "raises an error if the daemon is already running" do
|
|
176
|
-
controller.stub :running? => true
|
|
177
|
-
|
|
178
|
-
lambda {
|
|
179
|
-
interface.start
|
|
180
|
-
}.should raise_error(RuntimeError)
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
it "prints a success message if the daemon has started" do
|
|
184
|
-
controller.stub(:running?).and_return(false, true)
|
|
185
|
-
|
|
186
|
-
interface.should_receive(:puts).
|
|
187
|
-
with('Started searchd successfully (pid: 101).')
|
|
188
|
-
|
|
189
|
-
interface.start
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
it "prints a failure message if the daemon does not start" do
|
|
193
|
-
controller.stub(:running?).and_return(false, false)
|
|
194
|
-
|
|
195
|
-
interface.should_receive(:puts).
|
|
196
|
-
with('Failed to start searchd. Check the log files for more information.')
|
|
197
|
-
|
|
198
|
-
interface.start
|
|
22
|
+
describe '#daemon' do
|
|
23
|
+
it 'returns a daemon interface' do
|
|
24
|
+
expect(interface.daemon.class).to eq(ThinkingSphinx::Interfaces::Daemon)
|
|
199
25
|
end
|
|
200
26
|
end
|
|
201
27
|
|
|
202
|
-
describe '#
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
before :each do
|
|
206
|
-
controller.stub :running? => true
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
it "prints a message if the daemon is not already running" do
|
|
210
|
-
controller.stub :running? => false
|
|
211
|
-
|
|
212
|
-
interface.should_receive(:puts).with('searchd is not currently running.')
|
|
213
|
-
|
|
214
|
-
interface.stop
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
it "stops the daemon" do
|
|
218
|
-
controller.should_receive(:stop)
|
|
219
|
-
|
|
220
|
-
interface.stop
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
it "prints a message informing the daemon has stopped" do
|
|
224
|
-
interface.should_receive(:puts).with('Stopped searchd daemon (pid: 101).')
|
|
225
|
-
|
|
226
|
-
interface.stop
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
it "should retry stopping the daemon until it stops" do
|
|
230
|
-
controller.should_receive(:stop).twice.and_return(false, true)
|
|
231
|
-
|
|
232
|
-
interface.stop
|
|
28
|
+
describe '#rt' do
|
|
29
|
+
it 'returns a real-time interface' do
|
|
30
|
+
expect(interface.rt.class).to eq(ThinkingSphinx::Interfaces::RealTime)
|
|
233
31
|
end
|
|
234
32
|
end
|
|
235
33
|
|
|
236
|
-
describe '#
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
it "reports when the daemon is running" do
|
|
240
|
-
controller.stub :running? => true
|
|
241
|
-
|
|
242
|
-
interface.should_receive(:puts).
|
|
243
|
-
with('The Sphinx daemon searchd is currently running.')
|
|
244
|
-
|
|
245
|
-
interface.status
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
it "reports when the daemon is not running" do
|
|
249
|
-
controller.stub :running? => false
|
|
250
|
-
|
|
251
|
-
interface.should_receive(:puts).
|
|
252
|
-
with('The Sphinx daemon searchd is not currently running.')
|
|
253
|
-
|
|
254
|
-
interface.status
|
|
34
|
+
describe '#sql' do
|
|
35
|
+
it 'returns an SQL interface' do
|
|
36
|
+
expect(interface.sql.class).to eq(ThinkingSphinx::Interfaces::SQL)
|
|
255
37
|
end
|
|
256
38
|
end
|
|
257
39
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe ThinkingSphinx::RealTime::Attribute do
|
|
@@ -7,11 +9,11 @@ describe ThinkingSphinx::RealTime::Attribute do
|
|
|
7
9
|
describe '#name' do
|
|
8
10
|
it "uses the provided option by default" do
|
|
9
11
|
attribute = ThinkingSphinx::RealTime::Attribute.new column, :as => :foo
|
|
10
|
-
attribute.name.
|
|
12
|
+
expect(attribute.name).to eq('foo')
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
it "falls back to the column's name" do
|
|
14
|
-
attribute.name.
|
|
16
|
+
expect(attribute.name).to eq('created_at')
|
|
15
17
|
end
|
|
16
18
|
end
|
|
17
19
|
|
|
@@ -21,34 +23,34 @@ describe ThinkingSphinx::RealTime::Attribute do
|
|
|
21
23
|
let(:parent) { klass.new 'the parent name', nil }
|
|
22
24
|
|
|
23
25
|
it "returns the column's name if it's a string" do
|
|
24
|
-
column.
|
|
26
|
+
allow(column).to receive_messages :__name => 'value'
|
|
25
27
|
|
|
26
|
-
attribute.translate(object).
|
|
28
|
+
expect(attribute.translate(object)).to eq('value')
|
|
27
29
|
end
|
|
28
30
|
|
|
29
31
|
it "returns the column's name if it's an integer" do
|
|
30
|
-
column.
|
|
32
|
+
allow(column).to receive_messages :__name => 404
|
|
31
33
|
|
|
32
|
-
attribute.translate(object).
|
|
34
|
+
expect(attribute.translate(object)).to eq(404)
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
it "returns the object's method matching the column's name" do
|
|
36
|
-
object.
|
|
38
|
+
allow(object).to receive_messages :created_at => 'a time'
|
|
37
39
|
|
|
38
|
-
attribute.translate(object).
|
|
40
|
+
expect(attribute.translate(object)).to eq('a time')
|
|
39
41
|
end
|
|
40
42
|
|
|
41
43
|
it "uses the column's stack to navigate through the object tree" do
|
|
42
|
-
column.
|
|
44
|
+
allow(column).to receive_messages :__name => :name, :__stack => [:parent]
|
|
43
45
|
|
|
44
|
-
attribute.translate(object).
|
|
46
|
+
expect(attribute.translate(object)).to eq('the parent name')
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
it "returns zero if any element in the object tree is nil" do
|
|
48
|
-
column.
|
|
50
|
+
allow(column).to receive_messages :__name => :name, :__stack => [:parent]
|
|
49
51
|
object.parent = nil
|
|
50
52
|
|
|
51
|
-
attribute.translate(object).
|
|
53
|
+
expect(attribute.translate(object)).to be_zero
|
|
52
54
|
end
|
|
53
55
|
end
|
|
54
56
|
|
|
@@ -56,7 +58,7 @@ describe ThinkingSphinx::RealTime::Attribute do
|
|
|
56
58
|
it "returns the given type option" do
|
|
57
59
|
attribute = ThinkingSphinx::RealTime::Attribute.new column,
|
|
58
60
|
:type => :string
|
|
59
|
-
attribute.type.
|
|
61
|
+
expect(attribute.type).to eq(:string)
|
|
60
62
|
end
|
|
61
63
|
end
|
|
62
64
|
end
|