mysql_simple_fulltext 0.0.1

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.
Files changed (82) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +23 -0
  3. data/Rakefile +38 -0
  4. data/lib/generators/mysql_simple_fulltext/USAGE +8 -0
  5. data/lib/generators/mysql_simple_fulltext/migration_generator.rb +27 -0
  6. data/lib/generators/mysql_simple_fulltext/migration_generator.rb~ +28 -0
  7. data/lib/generators/mysql_simple_fulltext/templates/migration.rb +11 -0
  8. data/lib/generators/mysql_simple_fulltext/templates/migration.rb~ +11 -0
  9. data/lib/mysql_simple_fulltext/version.rb +3 -0
  10. data/lib/mysql_simple_fulltext.rb +27 -0
  11. data/lib/mysql_simple_fulltext.rb~ +27 -0
  12. data/lib/tasks/mysql_simple_fulltext_tasks.rake +4 -0
  13. data/test/dummy/README.rdoc +261 -0
  14. data/test/dummy/Rakefile +7 -0
  15. data/test/dummy/app/assets/javascripts/application.js +15 -0
  16. data/test/dummy/app/assets/javascripts/posts.js +2 -0
  17. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  18. data/test/dummy/app/assets/stylesheets/posts.css +4 -0
  19. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  20. data/test/dummy/app/controllers/application_controller.rb +3 -0
  21. data/test/dummy/app/controllers/posts_controller.rb +83 -0
  22. data/test/dummy/app/controllers/posts_controller.rb~ +83 -0
  23. data/test/dummy/app/helpers/application_helper.rb +2 -0
  24. data/test/dummy/app/helpers/posts_helper.rb +2 -0
  25. data/test/dummy/app/models/post.rb +5 -0
  26. data/test/dummy/app/models/post.rb~ +3 -0
  27. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  28. data/test/dummy/app/views/posts/_form.html.erb +25 -0
  29. data/test/dummy/app/views/posts/edit.html.erb +6 -0
  30. data/test/dummy/app/views/posts/index.html.erb +29 -0
  31. data/test/dummy/app/views/posts/new.html.erb +5 -0
  32. data/test/dummy/app/views/posts/show.html.erb +15 -0
  33. data/test/dummy/config/application.rb +56 -0
  34. data/test/dummy/config/boot.rb +10 -0
  35. data/test/dummy/config/database.yml +28 -0
  36. data/test/dummy/config/environment.rb +5 -0
  37. data/test/dummy/config/environments/development.rb +37 -0
  38. data/test/dummy/config/environments/production.rb +67 -0
  39. data/test/dummy/config/environments/test.rb +37 -0
  40. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/test/dummy/config/initializers/inflections.rb +15 -0
  42. data/test/dummy/config/initializers/mime_types.rb +5 -0
  43. data/test/dummy/config/initializers/secret_token.rb +7 -0
  44. data/test/dummy/config/initializers/session_store.rb +8 -0
  45. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  46. data/test/dummy/config/locales/en.yml +5 -0
  47. data/test/dummy/config/routes.rb +61 -0
  48. data/test/dummy/config/routes.rb~ +60 -0
  49. data/test/dummy/config.ru +4 -0
  50. data/test/dummy/db/migrate/20120211200406_create_posts.rb +10 -0
  51. data/test/dummy/db/migrate/20120219133758_create_post_fulltext_index.rb +11 -0
  52. data/test/dummy/db/schema.rb +25 -0
  53. data/test/dummy/log/development.log +2658 -0
  54. data/test/dummy/public/404.html +26 -0
  55. data/test/dummy/public/422.html +26 -0
  56. data/test/dummy/public/500.html +25 -0
  57. data/test/dummy/public/favicon.ico +0 -0
  58. data/test/dummy/script/rails +6 -0
  59. data/test/dummy/test/fixtures/posts.yml +33 -0
  60. data/test/dummy/test/fixtures/posts.yml~ +34 -0
  61. data/test/dummy/test/functional/posts_controller_test.rb +49 -0
  62. data/test/dummy/test/unit/helpers/posts_helper_test.rb +4 -0
  63. data/test/dummy/test/unit/post_test.rb +7 -0
  64. data/test/dummy/tmp/cache/assets/C11/FC0/sprockets%2F43ed13529f28571f72100116a463544a +0 -0
  65. data/test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212 +0 -0
  66. data/test/dummy/tmp/cache/assets/CC7/220/sprockets%2Fd066c004d1fd26ae76a61303a7a18145 +0 -0
  67. data/test/dummy/tmp/cache/assets/CD5/B70/sprockets%2F416150dc3ac35079c94273cc46e90aa6 +0 -0
  68. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  69. data/test/dummy/tmp/cache/assets/CDC/A90/sprockets%2Fe6590f1d0f7409a9531f8044e620dac4 +0 -0
  70. data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
  71. data/test/dummy/tmp/cache/assets/D1A/310/sprockets%2F5384ad85f52d3272dbc64d46ef3876a4 +0 -0
  72. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  73. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  74. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  75. data/test/dummy/tmp/cache/assets/D9C/CD0/sprockets%2Fc85016e7bbd4f3adbb7635d01f85d39b +0 -0
  76. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  77. data/test/dummy/tmp/cache/assets/DDF/A20/sprockets%2F587fd30d0277bf7d8fd2ec94af9f2be3 +0 -0
  78. data/test/dummy/tmp/cache/assets/DF8/DE0/sprockets%2F0ab45e4a53efed4e3575d5f1fba03f8c +0 -0
  79. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  80. data/test/mysql_simple_fulltext_test.rb +7 -0
  81. data/test/test_helper.rb +10 -0
  82. metadata +218 -0
@@ -0,0 +1,60 @@
1
+ Dummy::Application.routes.draw do
2
+ resources :posts
3
+ root :to => "posts#index"
4
+ # The priority is based upon order of creation:
5
+ # first created -> highest priority.
6
+
7
+ # Sample of regular route:
8
+ # match 'products/:id' => 'catalog#view'
9
+ # Keep in mind you can assign values other than :controller and :action
10
+
11
+ # Sample of named route:
12
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
13
+ # This route can be invoked with purchase_url(:id => product.id)
14
+
15
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
16
+ # resources :products
17
+
18
+ # Sample resource route with options:
19
+ # resources :products do
20
+ # member do
21
+ # get 'short'
22
+ # post 'toggle'
23
+ # end
24
+ #
25
+ # collection do
26
+ # get 'sold'
27
+ # end
28
+ # end
29
+
30
+ # Sample resource route with sub-resources:
31
+ # resources :products do
32
+ # resources :comments, :sales
33
+ # resource :seller
34
+ # end
35
+
36
+ # Sample resource route with more complex sub-resources
37
+ # resources :products do
38
+ # resources :comments
39
+ # resources :sales do
40
+ # get 'recent', :on => :collection
41
+ # end
42
+ # end
43
+
44
+ # Sample resource route within a namespace:
45
+ # namespace :admin do
46
+ # # Directs /admin/products/* to Admin::ProductsController
47
+ # # (app/controllers/admin/products_controller.rb)
48
+ # resources :products
49
+ # end
50
+
51
+ # You can have the root of your site routed with "root"
52
+ # just remember to delete public/index.html.
53
+ # root :to => 'welcome#index'
54
+
55
+ # See how all your routes lay out with "rake routes"
56
+
57
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
58
+ # Note: This route will make all actions in every controller accessible via GET requests.
59
+ # match ':controller(/:action(/:id))(.:format)'
60
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,10 @@
1
+ class CreatePosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :posts do |t|
4
+ t.string :title
5
+ t.text :content
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreatePostFulltextIndex < ActiveRecord::Migration
2
+ def self.up
3
+ execute 'ALTER TABLE posts ENGINE = MyISAM'
4
+ execute 'CREATE FULLTEXT INDEX fulltext_posts ON posts (title,content)'
5
+ end
6
+
7
+ def self.down
8
+ execute 'ALTER TABLE posts ENGINE = InnoDB'
9
+ execute 'DROP INDEX fulltext_posts ON posts'
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120219133758) do
15
+
16
+ create_table "posts", :force => true do |t|
17
+ t.string "title"
18
+ t.text "content"
19
+ t.datetime "created_at", :null => false
20
+ t.datetime "updated_at", :null => false
21
+ end
22
+
23
+ add_index "posts", ["title", "content"], :name => "fulltext_posts"
24
+
25
+ end