has_many_polymorphs 2.2 → 2.9
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.
- data/CHANGELOG +0 -9
- data/README +6 -52
- data/TODO +1 -0
- data/generators/tagging/tagging_generator.rb +1 -14
- data/generators/tagging/templates/tag_test.rb +3 -8
- data/generators/tagging/templates/tagging.rb +2 -2
- data/generators/tagging/templates/tagging_extensions.rb +13 -106
- data/generators/tagging/templates/tagging_test.rb +14 -41
- data/generators/tagging/templates/taggings.yml +3 -5
- data/generators/tagging/templates/tags.yml +2 -2
- data/has_many_polymorphs.gemspec +36 -29
- data/lib/has_many_polymorphs.rb +5 -6
- data/lib/has_many_polymorphs/association.rb +8 -9
- data/lib/has_many_polymorphs/autoload.rb +16 -52
- data/lib/has_many_polymorphs/base.rb +3 -13
- data/lib/has_many_polymorphs/class_methods.rb +102 -181
- data/lib/has_many_polymorphs/debugging_tools.rb +0 -2
- data/lib/has_many_polymorphs/dependencies.rb +36 -0
- data/lib/has_many_polymorphs/rake_task_redefine_task.rb +1 -9
- data/lib/has_many_polymorphs/reflection.rb +6 -7
- data/lib/has_many_polymorphs/support_methods.rb +4 -10
- data/test/fixtures/{fish.yml → aquatic/fish.yml} +0 -0
- data/test/fixtures/{little_whale_pupils.yml → aquatic/little_whale_pupils.yml} +0 -0
- data/test/fixtures/{whales.yml → aquatic/whales.yml} +0 -0
- data/test/models/aquatic/fish.rb +1 -2
- data/test/models/aquatic/whale.rb +0 -2
- data/test/models/eaters_foodstuff.rb +3 -1
- data/test/models/petfood.rb +1 -2
- data/test/schema.rb +0 -15
- data/test/test_helper.rb +18 -39
- data/test/unit/{has_many_polymorphs_test.rb → polymorph_test.rb} +109 -181
- metadata +92 -265
- data.tar.gz.sig +0 -1
- data/Manifest +0 -173
- data/Rakefile +0 -28
- data/examples/hmph.rb +0 -69
- data/lib/has_many_polymorphs/configuration.rb +0 -19
- data/test/fixtures/people.yml +0 -7
- data/test/generator/tagging_generator_test.rb +0 -42
- data/test/integration/app/README +0 -182
- data/test/integration/app/Rakefile +0 -19
- data/test/integration/app/app/controllers/application.rb +0 -7
- data/test/integration/app/app/controllers/bones_controller.rb +0 -5
- data/test/integration/app/app/helpers/addresses_helper.rb +0 -2
- data/test/integration/app/app/helpers/application_helper.rb +0 -3
- data/test/integration/app/app/helpers/bones_helper.rb +0 -2
- data/test/integration/app/app/helpers/sellers_helper.rb +0 -28
- data/test/integration/app/app/helpers/states_helper.rb +0 -2
- data/test/integration/app/app/helpers/users_helper.rb +0 -2
- data/test/integration/app/app/models/bone.rb +0 -2
- data/test/integration/app/app/models/double_sti_parent.rb +0 -2
- data/test/integration/app/app/models/double_sti_parent_relationship.rb +0 -2
- data/test/integration/app/app/models/organic_substance.rb +0 -2
- data/test/integration/app/app/models/single_sti_parent.rb +0 -4
- data/test/integration/app/app/models/single_sti_parent_relationship.rb +0 -4
- data/test/integration/app/app/models/stick.rb +0 -2
- data/test/integration/app/app/models/stone.rb +0 -2
- data/test/integration/app/app/views/addresses/edit.html.erb +0 -12
- data/test/integration/app/app/views/addresses/index.html.erb +0 -18
- data/test/integration/app/app/views/addresses/new.html.erb +0 -11
- data/test/integration/app/app/views/addresses/show.html.erb +0 -3
- data/test/integration/app/app/views/bones/index.rhtml +0 -5
- data/test/integration/app/app/views/layouts/addresses.html.erb +0 -17
- data/test/integration/app/app/views/layouts/sellers.html.erb +0 -17
- data/test/integration/app/app/views/layouts/states.html.erb +0 -17
- data/test/integration/app/app/views/layouts/users.html.erb +0 -17
- data/test/integration/app/app/views/sellers/edit.html.erb +0 -12
- data/test/integration/app/app/views/sellers/index.html.erb +0 -20
- data/test/integration/app/app/views/sellers/new.html.erb +0 -11
- data/test/integration/app/app/views/sellers/show.html.erb +0 -3
- data/test/integration/app/app/views/states/edit.html.erb +0 -12
- data/test/integration/app/app/views/states/index.html.erb +0 -19
- data/test/integration/app/app/views/states/new.html.erb +0 -11
- data/test/integration/app/app/views/states/show.html.erb +0 -3
- data/test/integration/app/app/views/users/edit.html.erb +0 -12
- data/test/integration/app/app/views/users/index.html.erb +0 -22
- data/test/integration/app/app/views/users/new.html.erb +0 -11
- data/test/integration/app/app/views/users/show.html.erb +0 -3
- data/test/integration/app/config/boot.rb +0 -110
- data/test/integration/app/config/database.yml +0 -17
- data/test/integration/app/config/environment.rb +0 -19
- data/test/integration/app/config/environment.rb.canonical +0 -19
- data/test/integration/app/config/environments/development.rb +0 -9
- data/test/integration/app/config/environments/production.rb +0 -18
- data/test/integration/app/config/environments/test.rb +0 -19
- data/test/integration/app/config/locomotive.yml +0 -6
- data/test/integration/app/config/routes.rb +0 -33
- data/test/integration/app/config/ultrasphinx/default.base +0 -56
- data/test/integration/app/config/ultrasphinx/development.conf.canonical +0 -155
- data/test/integration/app/db/migrate/001_create_sticks.rb +0 -11
- data/test/integration/app/db/migrate/002_create_stones.rb +0 -11
- data/test/integration/app/db/migrate/003_create_organic_substances.rb +0 -11
- data/test/integration/app/db/migrate/004_create_bones.rb +0 -8
- data/test/integration/app/db/migrate/005_create_single_sti_parents.rb +0 -11
- data/test/integration/app/db/migrate/006_create_double_sti_parents.rb +0 -11
- data/test/integration/app/db/migrate/007_create_single_sti_parent_relationships.rb +0 -13
- data/test/integration/app/db/migrate/008_create_double_sti_parent_relationships.rb +0 -14
- data/test/integration/app/db/migrate/009_create_library_model.rb +0 -11
- data/test/integration/app/doc/README_FOR_APP +0 -2
- data/test/integration/app/generators/commenting_generator_test.rb +0 -83
- data/test/integration/app/lib/library_model.rb +0 -2
- data/test/integration/app/public/404.html +0 -30
- data/test/integration/app/public/500.html +0 -30
- data/test/integration/app/public/dispatch.cgi +0 -10
- data/test/integration/app/public/dispatch.fcgi +0 -24
- data/test/integration/app/public/dispatch.rb +0 -10
- data/test/integration/app/public/favicon.ico +0 -0
- data/test/integration/app/public/images/rails.png +0 -0
- data/test/integration/app/public/index.html +0 -277
- data/test/integration/app/public/javascripts/application.js +0 -2
- data/test/integration/app/public/javascripts/controls.js +0 -833
- data/test/integration/app/public/javascripts/dragdrop.js +0 -942
- data/test/integration/app/public/javascripts/effects.js +0 -1088
- data/test/integration/app/public/javascripts/prototype.js +0 -2515
- data/test/integration/app/public/robots.txt +0 -1
- data/test/integration/app/public/stylesheets/scaffold.css +0 -74
- data/test/integration/app/script/about +0 -3
- data/test/integration/app/script/breakpointer +0 -3
- data/test/integration/app/script/console +0 -3
- data/test/integration/app/script/destroy +0 -3
- data/test/integration/app/script/generate +0 -3
- data/test/integration/app/script/performance/benchmarker +0 -3
- data/test/integration/app/script/performance/profiler +0 -3
- data/test/integration/app/script/plugin +0 -3
- data/test/integration/app/script/process/inspector +0 -3
- data/test/integration/app/script/process/reaper +0 -3
- data/test/integration/app/script/process/spawner +0 -3
- data/test/integration/app/script/runner +0 -3
- data/test/integration/app/script/server +0 -3
- data/test/integration/app/test/fixtures/double_sti_parent_relationships.yml +0 -7
- data/test/integration/app/test/fixtures/double_sti_parents.yml +0 -7
- data/test/integration/app/test/fixtures/organic_substances.yml +0 -5
- data/test/integration/app/test/fixtures/single_sti_parent_relationships.yml +0 -7
- data/test/integration/app/test/fixtures/single_sti_parents.yml +0 -7
- data/test/integration/app/test/fixtures/sticks.yml +0 -7
- data/test/integration/app/test/fixtures/stones.yml +0 -7
- data/test/integration/app/test/functional/addresses_controller_test.rb +0 -57
- data/test/integration/app/test/functional/bones_controller_test.rb +0 -8
- data/test/integration/app/test/functional/sellers_controller_test.rb +0 -57
- data/test/integration/app/test/functional/states_controller_test.rb +0 -57
- data/test/integration/app/test/functional/users_controller_test.rb +0 -57
- data/test/integration/app/test/test_helper.rb +0 -8
- data/test/integration/app/test/unit/bone_test.rb +0 -8
- data/test/integration/app/test/unit/double_sti_parent_relationship_test.rb +0 -8
- data/test/integration/app/test/unit/double_sti_parent_test.rb +0 -8
- data/test/integration/app/test/unit/organic_substance_test.rb +0 -8
- data/test/integration/app/test/unit/single_sti_parent_relationship_test.rb +0 -8
- data/test/integration/app/test/unit/single_sti_parent_test.rb +0 -8
- data/test/integration/app/test/unit/stick_test.rb +0 -8
- data/test/integration/app/test/unit/stone_test.rb +0 -8
- data/test/integration/server_test.rb +0 -43
- data/test/models/parentship.rb +0 -4
- data/test/models/person.rb +0 -9
- data/test/patches/symlinked_plugins_1.2.6.diff +0 -46
- data/test/setup.rb +0 -14
- metadata.gz.sig +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
|
2
|
-
require 'action_controller'
|
|
3
|
-
|
|
4
|
-
Rails::Initializer.run do |config|
|
|
5
|
-
|
|
6
|
-
if ActionController::Base.respond_to? 'session='
|
|
7
|
-
config.action_controller.session = {:session_key => '_app_session', :secret => '22cde4d5c1a61ba69a81795322cde4d5c1a61ba69a817953'}
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
config.load_paths << "#{RAILS_ROOT}/app/models/person" # moduleless model path
|
|
11
|
-
|
|
12
|
-
config.after_initialize do
|
|
13
|
-
config.has_many_polymorphs_options['requirements'] << "#{RAILS_ROOT}/lib/library_model"
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# Dependencies.log_activity = true
|
|
18
|
-
|
|
19
|
-
ENV['RAILS_ASSET_ID'] = Time.now.to_i.to_s
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
|
2
|
-
require 'action_controller'
|
|
3
|
-
|
|
4
|
-
Rails::Initializer.run do |config|
|
|
5
|
-
|
|
6
|
-
if ActionController::Base.respond_to? 'session='
|
|
7
|
-
config.action_controller.session = {:session_key => '_app_session', :secret => '22cde4d5c1a61ba69a81795322cde4d5c1a61ba69a817953'}
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
config.load_paths << "#{RAILS_ROOT}/app/models/person" # moduleless model path
|
|
11
|
-
|
|
12
|
-
config.after_initialize do
|
|
13
|
-
config.has_many_polymorphs_options['requirements'] << "#{RAILS_ROOT}/lib/library_model"
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# Dependencies.log_activity = true
|
|
18
|
-
|
|
19
|
-
ENV['RAILS_ASSET_ID'] = Time.now.to_i.to_s
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
config.cache_classes = ENV['PRODUCTION']
|
|
3
|
-
config.whiny_nils = true
|
|
4
|
-
config.action_controller.consider_all_requests_local = !ENV['PRODUCTION']
|
|
5
|
-
config.action_controller.perform_caching = ENV['PRODUCTION']
|
|
6
|
-
# The following has been deprecated in Rails 2.1 and removed in 2.2
|
|
7
|
-
config.action_view.cache_template_extensions = ENV['PRODUCTION'] if Rails::VERSION::MAJOR < 2 or Rails::VERSION::MAJOR == 2 && Rails::VERSION::MINOR < 1
|
|
8
|
-
config.action_view.debug_rjs = !ENV['PRODUCTION']
|
|
9
|
-
config.action_mailer.raise_delivery_errors = false
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
|
2
|
-
|
|
3
|
-
# The production environment is meant for finished, "live" apps.
|
|
4
|
-
# Code is not reloaded between requests
|
|
5
|
-
config.cache_classes = true
|
|
6
|
-
|
|
7
|
-
# Use a different logger for distributed setups
|
|
8
|
-
# config.logger = SyslogLogger.new
|
|
9
|
-
|
|
10
|
-
# Full error reports are disabled and caching is turned on
|
|
11
|
-
config.action_controller.consider_all_requests_local = false
|
|
12
|
-
config.action_controller.perform_caching = true
|
|
13
|
-
|
|
14
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
|
15
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
|
16
|
-
|
|
17
|
-
# Disable delivery errors, bad email addresses will be ignored
|
|
18
|
-
# config.action_mailer.raise_delivery_errors = false
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
|
2
|
-
|
|
3
|
-
# The test environment is used exclusively to run your application's
|
|
4
|
-
# test suite. You never need to work with it otherwise. Remember that
|
|
5
|
-
# your test database is "scratch space" for the test suite and is wiped
|
|
6
|
-
# and recreated between test runs. Don't rely on the data there!
|
|
7
|
-
config.cache_classes = true
|
|
8
|
-
|
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
|
10
|
-
config.whiny_nils = true
|
|
11
|
-
|
|
12
|
-
# Show full error reports and disable caching
|
|
13
|
-
config.action_controller.consider_all_requests_local = true
|
|
14
|
-
config.action_controller.perform_caching = false
|
|
15
|
-
|
|
16
|
-
# Tell ActionMailer not to deliver emails to the real world.
|
|
17
|
-
# The :test delivery method accumulates sent emails in the
|
|
18
|
-
# ActionMailer::Base.deliveries array.
|
|
19
|
-
config.action_mailer.delivery_method = :test
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
ActionController::Routing::Routes.draw do |map|
|
|
2
|
-
map.resources :states
|
|
3
|
-
|
|
4
|
-
map.resources :states
|
|
5
|
-
|
|
6
|
-
map.resources :addresses
|
|
7
|
-
|
|
8
|
-
map.resources :sellers
|
|
9
|
-
|
|
10
|
-
map.resources :users
|
|
11
|
-
|
|
12
|
-
# The priority is based upon order of creation: first created -> highest priority.
|
|
13
|
-
|
|
14
|
-
# Sample of regular route:
|
|
15
|
-
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
|
16
|
-
# Keep in mind you can assign values other than :controller and :action
|
|
17
|
-
|
|
18
|
-
# Sample of named route:
|
|
19
|
-
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
|
20
|
-
# This route can be invoked with purchase_url(:id => product.id)
|
|
21
|
-
|
|
22
|
-
# You can have the root of your site routed by hooking up ''
|
|
23
|
-
# -- just remember to delete public/index.html.
|
|
24
|
-
# map.connect '', :controller => "welcome"
|
|
25
|
-
|
|
26
|
-
# Allow downloading Web Service WSDL as a file with an extension
|
|
27
|
-
# instead of a file named 'wsdl'
|
|
28
|
-
map.connect ':controller/service.wsdl', :action => 'wsdl'
|
|
29
|
-
|
|
30
|
-
# Install the default route as the lowest priority.
|
|
31
|
-
map.connect ':controller/:action/:id.:format'
|
|
32
|
-
map.connect ':controller/:action/:id'
|
|
33
|
-
end
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Sphinx/Ultrasphinx user-configurable options.
|
|
3
|
-
#
|
|
4
|
-
# Copy this file to RAILS_ROOT/config/ultrasphinx.
|
|
5
|
-
# You can use individual namespaces if you want (e.g. "development.base").
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
indexer
|
|
9
|
-
{
|
|
10
|
-
# Indexer running options
|
|
11
|
-
mem_limit = 256M
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
searchd
|
|
15
|
-
{
|
|
16
|
-
# Daemon options
|
|
17
|
-
# What interface the search daemon should listen on and where to store its logs
|
|
18
|
-
address = 0.0.0.0
|
|
19
|
-
port = 3313
|
|
20
|
-
log = /tmp/sphinx/searchd.log
|
|
21
|
-
query_log = /tmp/sphinx/query.log
|
|
22
|
-
read_timeout = 5
|
|
23
|
-
max_children = 300
|
|
24
|
-
pid_file = /tmp/sphinx/searchd.pid
|
|
25
|
-
max_matches = 100000
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
client
|
|
29
|
-
{
|
|
30
|
-
# Client options
|
|
31
|
-
dictionary_name = ts
|
|
32
|
-
# How your application connects to the search daemon (not necessarily the same as above)
|
|
33
|
-
server_host = localhost
|
|
34
|
-
server_port = 3313
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
source
|
|
38
|
-
{
|
|
39
|
-
# Individual SQL source options
|
|
40
|
-
sql_range_step = 20000
|
|
41
|
-
strip_html = 0
|
|
42
|
-
index_html_attrs =
|
|
43
|
-
sql_query_post =
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
index
|
|
47
|
-
{
|
|
48
|
-
# Index building options
|
|
49
|
-
path = /tmp/sphinx/
|
|
50
|
-
docinfo = extern # just leave this alone
|
|
51
|
-
morphology = stem_en
|
|
52
|
-
stopwords = # /path/to/stopwords.txt
|
|
53
|
-
min_word_len = 1
|
|
54
|
-
charset_type = utf-8 # or sbcs (Single Byte Character Set)
|
|
55
|
-
charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
|
|
56
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Auto-generated at Wed Oct 03 03:57:12 -0400 2007.
|
|
3
|
-
# Hand modifications will be overwritten.
|
|
4
|
-
# /Users/eweaver/Desktop/projects/chow/vendor/plugins/ultrasphinx/test/integration/app/config/ultrasphinx/default.base
|
|
5
|
-
indexer {
|
|
6
|
-
mem_limit = 256M
|
|
7
|
-
}
|
|
8
|
-
searchd {
|
|
9
|
-
read_timeout = 5
|
|
10
|
-
max_children = 300
|
|
11
|
-
log = /tmp/sphinx/searchd.log
|
|
12
|
-
port = 3313
|
|
13
|
-
max_matches = 100000
|
|
14
|
-
query_log = /tmp/sphinx/query.log
|
|
15
|
-
pid_file = /tmp/sphinx/searchd.pid
|
|
16
|
-
address = 0.0.0.0
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
# Source configuration
|
|
20
|
-
|
|
21
|
-
source geo__states
|
|
22
|
-
{
|
|
23
|
-
strip_html = 0
|
|
24
|
-
sql_range_step = 20000
|
|
25
|
-
index_html_attrs =
|
|
26
|
-
sql_query_post =
|
|
27
|
-
|
|
28
|
-
type = mysql
|
|
29
|
-
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
|
30
|
-
sql_query_pre = SET NAMES utf8
|
|
31
|
-
|
|
32
|
-
sql_db = app_development
|
|
33
|
-
sql_host = localhost
|
|
34
|
-
sql_pass =
|
|
35
|
-
sql_user = root
|
|
36
|
-
sql_query_range = SELECT MIN(id), MAX(id) FROM states
|
|
37
|
-
sql_query = SELECT (states.id * 4 + 0) AS id, CAST(GROUP_CONCAT(addresses.name SEPARATOR ' ') AS CHAR) AS address_name, 0 AS capitalization, 'Geo::State' AS class, 0 AS class_id, '' AS company, '' AS company_name, 0 AS company_name_facet, '' AS content, UNIX_TIMESTAMP('1970-01-01 00:00:00') AS created_at, 0 AS deleted, '' AS email, '__empty_searchable__' AS empty_searchable, '' AS login, '' AS name, '' AS state, 0 AS user_id FROM states LEFT OUTER JOIN addresses ON states.id = addresses.state_id WHERE states.id >= $start AND states.id <= $end GROUP BY id
|
|
38
|
-
|
|
39
|
-
sql_group_column = capitalization
|
|
40
|
-
sql_group_column = class_id
|
|
41
|
-
sql_group_column = company_name_facet
|
|
42
|
-
sql_date_column = created_at
|
|
43
|
-
sql_group_column = deleted
|
|
44
|
-
sql_group_column = user_id
|
|
45
|
-
sql_query_info = SELECT * FROM states WHERE states.id = (($id - 0) / 4)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Source configuration
|
|
50
|
-
|
|
51
|
-
source sellers
|
|
52
|
-
{
|
|
53
|
-
strip_html = 0
|
|
54
|
-
sql_range_step = 20000
|
|
55
|
-
index_html_attrs =
|
|
56
|
-
sql_query_post =
|
|
57
|
-
|
|
58
|
-
type = mysql
|
|
59
|
-
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
|
60
|
-
sql_query_pre = SET NAMES utf8
|
|
61
|
-
|
|
62
|
-
sql_db = app_development
|
|
63
|
-
sql_host = localhost
|
|
64
|
-
sql_pass =
|
|
65
|
-
sql_user = root
|
|
66
|
-
sql_query_range = SELECT MIN(id), MAX(id) FROM sellers
|
|
67
|
-
sql_query = SELECT (sellers.id * 4 + 1) AS id, '' AS address_name, sellers.capitalization AS capitalization, 'Seller' AS class, 1 AS class_id, '' AS company, sellers.company_name AS company_name, CRC32(sellers.company_name) AS company_name_facet, '' AS content, UNIX_TIMESTAMP(sellers.created_at) AS created_at, 0 AS deleted, '' AS email, '__empty_searchable__' AS empty_searchable, '' AS login, '' AS name, '' AS state, sellers.user_id AS user_id FROM sellers WHERE sellers.id >= $start AND sellers.id <= $end GROUP BY id
|
|
68
|
-
|
|
69
|
-
sql_group_column = capitalization
|
|
70
|
-
sql_group_column = class_id
|
|
71
|
-
sql_group_column = company_name_facet
|
|
72
|
-
sql_date_column = created_at
|
|
73
|
-
sql_group_column = deleted
|
|
74
|
-
sql_group_column = user_id
|
|
75
|
-
sql_query_info = SELECT * FROM sellers WHERE sellers.id = (($id - 1) / 4)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# Source configuration
|
|
80
|
-
|
|
81
|
-
source geo__addresses
|
|
82
|
-
{
|
|
83
|
-
strip_html = 0
|
|
84
|
-
sql_range_step = 20000
|
|
85
|
-
index_html_attrs =
|
|
86
|
-
sql_query_post =
|
|
87
|
-
|
|
88
|
-
type = mysql
|
|
89
|
-
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
|
90
|
-
sql_query_pre = SET NAMES utf8
|
|
91
|
-
|
|
92
|
-
sql_db = app_development
|
|
93
|
-
sql_host = localhost
|
|
94
|
-
sql_pass =
|
|
95
|
-
sql_user = root
|
|
96
|
-
sql_query_range = SELECT MIN(id), MAX(id) FROM addresses
|
|
97
|
-
sql_query = SELECT (addresses.id * 4 + 2) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Address' AS class, 2 AS class_id, '' AS company, '' AS company_name, 0 AS company_name_facet, CONCAT_WS(' ', addresses.line_1, addresses.line_2, addresses.city, addresses.province_region, addresses.zip_postal_code) AS content, UNIX_TIMESTAMP('1970-01-01 00:00:00') AS created_at, 0 AS deleted, '' AS email, '__empty_searchable__' AS empty_searchable, '' AS login, addresses.name AS name, states.name AS state, 0 AS user_id FROM addresses LEFT OUTER JOIN states ON states.id = addresses.state_id WHERE addresses.id >= $start AND addresses.id <= $end GROUP BY id
|
|
98
|
-
|
|
99
|
-
sql_group_column = capitalization
|
|
100
|
-
sql_group_column = class_id
|
|
101
|
-
sql_group_column = company_name_facet
|
|
102
|
-
sql_date_column = created_at
|
|
103
|
-
sql_group_column = deleted
|
|
104
|
-
sql_group_column = user_id
|
|
105
|
-
sql_query_info = SELECT * FROM addresses WHERE addresses.id = (($id - 2) / 4)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
# Source configuration
|
|
110
|
-
|
|
111
|
-
source users
|
|
112
|
-
{
|
|
113
|
-
strip_html = 0
|
|
114
|
-
sql_range_step = 20000
|
|
115
|
-
index_html_attrs =
|
|
116
|
-
sql_query_post =
|
|
117
|
-
|
|
118
|
-
type = mysql
|
|
119
|
-
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
|
120
|
-
sql_query_pre = SET NAMES utf8
|
|
121
|
-
|
|
122
|
-
sql_db = app_development
|
|
123
|
-
sql_host = localhost
|
|
124
|
-
sql_pass =
|
|
125
|
-
sql_user = root
|
|
126
|
-
sql_query_range = SELECT MIN(id), MAX(id) FROM users
|
|
127
|
-
sql_query = SELECT (users.id * 4 + 3) AS id, '' AS address_name, 0 AS capitalization, 'User' AS class, 3 AS class_id, sellers.company_name AS company, '' AS company_name, 0 AS company_name_facet, '' AS content, UNIX_TIMESTAMP('1970-01-01 00:00:00') AS created_at, users.deleted AS deleted, users.email AS email, '__empty_searchable__' AS empty_searchable, users.login AS login, '' AS name, '' AS state, 0 AS user_id FROM users LEFT OUTER JOIN sellers ON users.id = sellers.user_id WHERE users.id >= $start AND users.id <= $end AND (deleted = 0) GROUP BY id
|
|
128
|
-
|
|
129
|
-
sql_group_column = capitalization
|
|
130
|
-
sql_group_column = class_id
|
|
131
|
-
sql_group_column = company_name_facet
|
|
132
|
-
sql_date_column = created_at
|
|
133
|
-
sql_group_column = deleted
|
|
134
|
-
sql_group_column = user_id
|
|
135
|
-
sql_query_info = SELECT * FROM users WHERE users.id = (($id - 3) / 4)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
# Index configuration
|
|
140
|
-
|
|
141
|
-
index complete
|
|
142
|
-
{
|
|
143
|
-
source = geo__addresses
|
|
144
|
-
source = geo__states
|
|
145
|
-
source = sellers
|
|
146
|
-
source = users
|
|
147
|
-
charset_type = utf-8
|
|
148
|
-
charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
|
|
149
|
-
min_word_len = 1
|
|
150
|
-
stopwords =
|
|
151
|
-
path = /tmp/sphinx//sphinx_index_complete
|
|
152
|
-
docinfo = extern
|
|
153
|
-
morphology = stem_en
|
|
154
|
-
}
|
|
155
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
class CreateSingleStiParentRelationships < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
create_table :single_sti_parent_relationships do |t|
|
|
4
|
-
t.column :the_bone_type, :string, :null => false
|
|
5
|
-
t.column :the_bone_id, :integer, :null => false
|
|
6
|
-
t.column :single_sti_parent_id, :integer, :null => false
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.down
|
|
11
|
-
drop_table :single_sti_parent_relationships
|
|
12
|
-
end
|
|
13
|
-
end
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
class CreateDoubleStiParentRelationships < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
create_table :double_sti_parent_relationships do |t|
|
|
4
|
-
t.column :the_bone_type, :string, :null => false
|
|
5
|
-
t.column :the_bone_id, :integer, :null => false
|
|
6
|
-
t.column :parent_type, :string, :null => false
|
|
7
|
-
t.column :parent_id, :integer, :null => false
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def self.down
|
|
12
|
-
drop_table :double_sti_parent_relationships
|
|
13
|
-
end
|
|
14
|
-
end
|