From 7379daad1c73bd3610ed296436250b417ac3673d Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 10 Feb 2011 14:19:00 +0100 Subject: removed thinking_sphinx plugin and replaced it with gem. also tuned dependencies --- .../plugins/thinking-sphinx/spec/fixtures/data.sql | 32 -------- .../spec/fixtures/database.yml.default | 3 - .../thinking-sphinx/spec/fixtures/models.rb | 94 --------------------- .../thinking-sphinx/spec/fixtures/structure.sql | 95 ---------------------- 4 files changed, 224 deletions(-) delete mode 100644 vendor/plugins/thinking-sphinx/spec/fixtures/data.sql delete mode 100644 vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default delete mode 100644 vendor/plugins/thinking-sphinx/spec/fixtures/models.rb delete mode 100644 vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql (limited to 'vendor/plugins/thinking-sphinx/spec/fixtures') diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/data.sql b/vendor/plugins/thinking-sphinx/spec/fixtures/data.sql deleted file mode 100644 index d5ec579f..00000000 --- a/vendor/plugins/thinking-sphinx/spec/fixtures/data.sql +++ /dev/null @@ -1,32 +0,0 @@ -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Ellie','K','Ford','38 Mills Street','Eagle Farm Bc','QLD','4009','Ellie.K.Ford@mailinator.com','1970/1/23 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Aaliyah','E','Allen','71 Murphy Street','Wyola West','WA','6407','Aaliyah.E.Allen@dodgit.com','1980/3/23 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Callum','C','Miah','89 Dalgarno Street','Bullawa Creek','NSW','2390','Callum.C.Miah@trashymail.com','1973/3/25 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Finley','L','Buckley','18 Queen Street','Manly Vale','NSW','2093','Finley.L.Buckley@spambob.com','1962/11/20 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Poppy','A','Hilton','36 Nerrigundah Drive','Nyora','VIC','3987','Poppy.A.Hilton@dodgit.com','1972/10/30 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Eloise','Z','Kennedy','18 Mt Berryman Road','Lilydale','QLD','4344','Eloise.Z.Kennedy@spambob.com','1973/9/28 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Shannon','L','Manning','60 Ocean Pde','Greenvale','QLD','4816','Shannon.L.Manning@dodgit.com','1956/6/13 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Oscar','C','Lawson','43 Feather Street','Battery Hill','QLD','4551','Oscar.C.Lawson@spambob.com','1979/10/17 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Sofia','K','Bray','26 Clifton Street','Pental Island','VIC','3586','Sofia.K.Bray@mailinator.com','1970/5/10 00:00:00', 3, 'CricketTeam'); -insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Andrew','N','Byrne','35 Cecil Street','Monash Park','NSW','2111','Andrew.N.Byrne@spambob.com','1983/2/16 00:00:00', 3, 'CricketTeam'); - -insert into `alphas` (name) values ('one'); -insert into `alphas` (name) values ('two'); -insert into `alphas` (name) values ('three'); -insert into `alphas` (name) values ('four'); -insert into `alphas` (name) values ('five'); -insert into `alphas` (name) values ('six'); -insert into `alphas` (name) values ('seven'); -insert into `alphas` (name) values ('eight'); -insert into `alphas` (name) values ('nine'); -insert into `alphas` (name) values ('ten'); - -insert into `betas` (name) values ('one'); -insert into `betas` (name) values ('two'); -insert into `betas` (name) values ('three'); -insert into `betas` (name) values ('four'); -insert into `betas` (name) values ('five'); -insert into `betas` (name) values ('six'); -insert into `betas` (name) values ('seven'); -insert into `betas` (name) values ('eight'); -insert into `betas` (name) values ('nine'); -insert into `betas` (name) values ('ten'); diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default b/vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default deleted file mode 100644 index dfad2a6d..00000000 --- a/vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default +++ /dev/null @@ -1,3 +0,0 @@ -username: root -password: -host: localhost \ No newline at end of file diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/models.rb b/vendor/plugins/thinking-sphinx/spec/fixtures/models.rb deleted file mode 100644 index 0e62906d..00000000 --- a/vendor/plugins/thinking-sphinx/spec/fixtures/models.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Person < ActiveRecord::Base - belongs_to :team, :polymorphic => :true - has_many :contacts - - has_many :friendships - has_many :friends, :through => :friendships - - has_many :tags - - has_many :football_teams, :through => :tags - - define_index do - indexes [first_name, middle_initial, last_name], :as => :name - indexes team.name, :as => :team_name - indexes contacts.phone_number, :as => :phone_numbers - indexes city, :prefixes => true - indexes state, :infixes => true - - has [first_name, middle_initial, last_name], :as => :name_sort - has team.name, :as => :team_name_sort - - has [:id, :team_id], :as => :ids - has team(:id), :as => :team_id - - has contacts.phone_number, :as => :phone_number_sort - has contacts(:id), :as => :contact_ids - - has birthday - - has friendships.person_id, :as => :friendly_ids - - set_property :delta => true - end -end - -class Parent < Person -end - -class Child < Person - belongs_to :parent - define_index do - indexes [parent.first_name, parent.middle_initial, parent.last_name], :as => :parent_name - end -end - -class Contact < ActiveRecord::Base - belongs_to :person -end - -class Tag < ActiveRecord::Base - belongs_to :person - belongs_to :football_team - belongs_to :cricket_team -end - -class FootballTeam < ActiveRecord::Base - has_many :tags -end - -class CricketTeam < ActiveRecord::Base - define_index do - indexes :name - has "SELECT cricket_team_id, id FROM tags", :source => :query, :as => :tags - end -end - -class Friendship < ActiveRecord::Base - belongs_to :person - belongs_to :friend, :class_name => "Person", :foreign_key => :friend_id - - define_index do - has person_id, friend_id - end -end - -class Alpha < ActiveRecord::Base - define_index do - indexes :name, :sortable => true - - set_property :field_weights => {"name" => 10} - end -end - -class Beta < ActiveRecord::Base - define_index do - indexes :name, :sortable => true - - set_property :delta => true - end -end - -class Search < ActiveRecord::Base - # -end \ No newline at end of file diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql b/vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql deleted file mode 100644 index 4ab390d9..00000000 --- a/vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql +++ /dev/null @@ -1,95 +0,0 @@ -DROP TABLE IF EXISTS `people`; - -CREATE TABLE `people` ( - `id` int(11) NOT NULL auto_increment, - `first_name` varchar(50) NULL, - `middle_initial` varchar(10) NULL, - `last_name` varchar(50) NULL, - `gender` varchar(10) NULL, - `street_address` varchar(200) NULL, - `city` varchar(100) NULL, - `state` varchar(100) NULL, - `postcode` varchar(10) NULL, - `email` varchar(100) NULL, - `birthday` datetime NULL, - `team_id` int(11) NULL, - `team_type` varchar(50) NULL, - `type` varchar(50) NULL, - `parent_id` varchar(50) NULL, - `delta` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `friendships`; - -CREATE TABLE `friendships` ( - `id` int(11) NOT NULL auto_increment, - `person_id` int(11) NOT NULL, - `friend_id` int(11) NOT NULL, - `created_at` datetime NOT NULL, - `updated_at` datetime NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `football_teams`; - -CREATE TABLE `football_teams` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(50) NOT NULL, - `state` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `cricket_teams`; - -CREATE TABLE `cricket_teams` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(50) NOT NULL, - `state` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `contacts`; - -CREATE TABLE `contacts` ( - `id` int(11) NOT NULL auto_increment, - `phone_number` varchar(50) NOT NULL, - `person_id` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `alphas`; - -CREATE TABLE `alphas` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `betas`; - -CREATE TABLE `betas` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(50) NOT NULL, - `delta` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `searches`; - -CREATE TABLE `searches` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `tags`; - -CREATE TABLE `tags` ( - `id` int(11) NOT NULL auto_increment, - `person_id` int(11) NOT NULL, - `football_team_id` int(11) NOT NULL, - `cricket_team_id` int(11) NOT NULL, - `name` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- cgit v1.3