mysql_simple_fulltext 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +23 -0
- data/Rakefile +38 -0
- data/lib/generators/mysql_simple_fulltext/USAGE +8 -0
- data/lib/generators/mysql_simple_fulltext/migration_generator.rb +27 -0
- data/lib/generators/mysql_simple_fulltext/migration_generator.rb~ +28 -0
- data/lib/generators/mysql_simple_fulltext/templates/migration.rb +11 -0
- data/lib/generators/mysql_simple_fulltext/templates/migration.rb~ +11 -0
- data/lib/mysql_simple_fulltext/version.rb +3 -0
- data/lib/mysql_simple_fulltext.rb +27 -0
- data/lib/mysql_simple_fulltext.rb~ +27 -0
- data/lib/tasks/mysql_simple_fulltext_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/javascripts/posts.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/posts.css +4 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/posts_controller.rb +83 -0
- data/test/dummy/app/controllers/posts_controller.rb~ +83 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/posts_helper.rb +2 -0
- data/test/dummy/app/models/post.rb +5 -0
- data/test/dummy/app/models/post.rb~ +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/posts/_form.html.erb +25 -0
- data/test/dummy/app/views/posts/edit.html.erb +6 -0
- data/test/dummy/app/views/posts/index.html.erb +29 -0
- data/test/dummy/app/views/posts/new.html.erb +5 -0
- data/test/dummy/app/views/posts/show.html.erb +15 -0
- data/test/dummy/config/application.rb +56 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +28 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +61 -0
- data/test/dummy/config/routes.rb~ +60 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20120211200406_create_posts.rb +10 -0
- data/test/dummy/db/migrate/20120219133758_create_post_fulltext_index.rb +11 -0
- data/test/dummy/db/schema.rb +25 -0
- data/test/dummy/log/development.log +2658 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/posts.yml +33 -0
- data/test/dummy/test/fixtures/posts.yml~ +34 -0
- data/test/dummy/test/functional/posts_controller_test.rb +49 -0
- data/test/dummy/test/unit/helpers/posts_helper_test.rb +4 -0
- data/test/dummy/test/unit/post_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/C11/FC0/sprockets%2F43ed13529f28571f72100116a463544a +0 -0
- data/test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/CC7/220/sprockets%2Fd066c004d1fd26ae76a61303a7a18145 +0 -0
- data/test/dummy/tmp/cache/assets/CD5/B70/sprockets%2F416150dc3ac35079c94273cc46e90aa6 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CDC/A90/sprockets%2Fe6590f1d0f7409a9531f8044e620dac4 +0 -0
- data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/D1A/310/sprockets%2F5384ad85f52d3272dbc64d46ef3876a4 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D9C/CD0/sprockets%2Fc85016e7bbd4f3adbb7635d01f85d39b +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DDF/A20/sprockets%2F587fd30d0277bf7d8fd2ec94af9f2be3 +0 -0
- data/test/dummy/tmp/cache/assets/DF8/DE0/sprockets%2F0ab45e4a53efed4e3575d5f1fba03f8c +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/mysql_simple_fulltext_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +218 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
2
|
+
|
3
|
+
1:
|
4
|
+
title: The standard Lorem Ipsum passage, used since the 1500s
|
5
|
+
content: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
6
|
+
|
7
|
+
2:
|
8
|
+
title: Section 1.10.32 of de Finibus Bonorum et Malorum, written by Cicero in 45 BC
|
9
|
+
content: Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
|
10
|
+
|
11
|
+
3:
|
12
|
+
title: 1914 translation by H. Rackham
|
13
|
+
content: But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
|
14
|
+
|
15
|
+
4:
|
16
|
+
title: Section 1.10.33 of de Finibus Bonorum et Malorum, written by Cicero in 45 BC
|
17
|
+
content: At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat
|
18
|
+
|
19
|
+
5:
|
20
|
+
title: 1914 translation by H. Rackham
|
21
|
+
content: On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains
|
22
|
+
|
23
|
+
6:
|
24
|
+
title: Lorem ipsum
|
25
|
+
content: Lorem ipsum dolor sit amet, consectetur adipiscing elit. In consectetur enim eget velit vestibulum aliquam. In ac dui sapien. Aliquam elit ante, cursus et laoreet vel, ultrices vel libero. Aenean vehicula viverra ullamcorper. Mauris sit amet velit non orci ullamcorper bibendum eu at nisl. Suspendisse sed bibendum risus. Vestibulum odio magna, ullamcorper vel facilisis ac, porttitor vitae velit. In eu erat turpis. Mauris mattis iaculis pellentesque.
|
26
|
+
|
27
|
+
7:
|
28
|
+
title: Phasellus eget eros tortor
|
29
|
+
content: Phasellus eget eros tortor. Duis tincidunt dui vel felis pulvinar sit amet tempor dolor sodales. Duis ut tempus lectus. Aliquam erat volutpat. Mauris ultricies sapien vel ligula consectetur quis porta metus vulputate. Mauris mauris elit, mattis sit amet ultrices sit amet, tempor eget ipsum. Donec elementum magna quis quam placerat venenatis. Phasellus pellentesque justo sit amet eros auctor posuere. Donec tincidunt eros feugiat velit luctus vehicula.
|
30
|
+
|
31
|
+
8:
|
32
|
+
title: Pellentesque consequat
|
33
|
+
content: Pellentesque consequat ipsum et turpis placerat non molestie arcu consequat. Maecenas non iaculis tellus. Aenean ac urna sit amet urna blandit malesuada. Duis placerat faucibus metus quis tristique. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent condimentum, augue sit amet rutrum feugiat, nunc risus vehicula felis, id hendrerit tortor justo at ligula. Ut tempus lorem ac urna vehicula blandit. Nullam tincidunt magna non massa ullamcorper hendrerit.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
2
|
+
|
3
|
+
1:
|
4
|
+
title: The standard Lorem Ipsum passage, used since the 1500s
|
5
|
+
content: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
6
|
+
|
7
|
+
2:
|
8
|
+
title: Section 1.10.32 of de Finibus Bonorum et Malorum, written by Cicero in 45 BC
|
9
|
+
content: Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
|
10
|
+
|
11
|
+
3:
|
12
|
+
title: 1914 translation by H. Rackham
|
13
|
+
content: But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
|
14
|
+
|
15
|
+
|
16
|
+
4:
|
17
|
+
title: Section 1.10.33 of de Finibus Bonorum et Malorum, written by Cicero in 45 BC
|
18
|
+
content: At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat
|
19
|
+
|
20
|
+
5:
|
21
|
+
title: 1914 translation by H. Rackham
|
22
|
+
content: On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains
|
23
|
+
|
24
|
+
6:
|
25
|
+
title: Lorem ipsum
|
26
|
+
content: Lorem ipsum dolor sit amet, consectetur adipiscing elit. In consectetur enim eget velit vestibulum aliquam. In ac dui sapien. Aliquam elit ante, cursus et laoreet vel, ultrices vel libero. Aenean vehicula viverra ullamcorper. Mauris sit amet velit non orci ullamcorper bibendum eu at nisl. Suspendisse sed bibendum risus. Vestibulum odio magna, ullamcorper vel facilisis ac, porttitor vitae velit. In eu erat turpis. Mauris mattis iaculis pellentesque.
|
27
|
+
|
28
|
+
7:
|
29
|
+
title: Phasellus eget eros tortor
|
30
|
+
content: Phasellus eget eros tortor. Duis tincidunt dui vel felis pulvinar sit amet tempor dolor sodales. Duis ut tempus lectus. Aliquam erat volutpat. Mauris ultricies sapien vel ligula consectetur quis porta metus vulputate. Mauris mauris elit, mattis sit amet ultrices sit amet, tempor eget ipsum. Donec elementum magna quis quam placerat venenatis. Phasellus pellentesque justo sit amet eros auctor posuere. Donec tincidunt eros feugiat velit luctus vehicula.
|
31
|
+
|
32
|
+
8:
|
33
|
+
title: Pellentesque consequat
|
34
|
+
content: Pellentesque consequat ipsum et turpis placerat non molestie arcu consequat. Maecenas non iaculis tellus. Aenean ac urna sit amet urna blandit malesuada. Duis placerat faucibus metus quis tristique. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent condimentum, augue sit amet rutrum feugiat, nunc risus vehicula felis, id hendrerit tortor justo at ligula. Ut tempus lorem ac urna vehicula blandit. Nullam tincidunt magna non massa ullamcorper hendrerit.
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PostsControllerTest < ActionController::TestCase
|
4
|
+
setup do
|
5
|
+
@post = posts(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get :index
|
10
|
+
assert_response :success
|
11
|
+
assert_not_nil assigns(:posts)
|
12
|
+
end
|
13
|
+
|
14
|
+
test "should get new" do
|
15
|
+
get :new
|
16
|
+
assert_response :success
|
17
|
+
end
|
18
|
+
|
19
|
+
test "should create post" do
|
20
|
+
assert_difference('Post.count') do
|
21
|
+
post :create, post: @post.attributes
|
22
|
+
end
|
23
|
+
|
24
|
+
assert_redirected_to post_path(assigns(:post))
|
25
|
+
end
|
26
|
+
|
27
|
+
test "should show post" do
|
28
|
+
get :show, id: @post
|
29
|
+
assert_response :success
|
30
|
+
end
|
31
|
+
|
32
|
+
test "should get edit" do
|
33
|
+
get :edit, id: @post
|
34
|
+
assert_response :success
|
35
|
+
end
|
36
|
+
|
37
|
+
test "should update post" do
|
38
|
+
put :update, id: @post, post: @post.attributes
|
39
|
+
assert_redirected_to post_path(assigns(:post))
|
40
|
+
end
|
41
|
+
|
42
|
+
test "should destroy post" do
|
43
|
+
assert_difference('Post.count', -1) do
|
44
|
+
delete :destroy, id: @post
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_redirected_to posts_path
|
48
|
+
end
|
49
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
|
7
|
+
Rails.backtrace_cleaner.remove_silencers!
|
8
|
+
|
9
|
+
# Load support files
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
metadata
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mysql_simple_fulltext
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Gilles ROUSTAN
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-03-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: &76062440 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.2.1
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *76062440
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: mysql2
|
27
|
+
requirement: &76062210 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *76062210
|
36
|
+
description: MysqlSimpleFulltext lets you make simple MySQL fulltext searches a simple
|
37
|
+
way without writing SQL queries in your ActiveRecord.
|
38
|
+
email:
|
39
|
+
- gilles.roustan@gmail.com
|
40
|
+
executables: []
|
41
|
+
extensions: []
|
42
|
+
extra_rdoc_files: []
|
43
|
+
files:
|
44
|
+
- lib/mysql_simple_fulltext.rb
|
45
|
+
- lib/tasks/mysql_simple_fulltext_tasks.rake
|
46
|
+
- lib/generators/mysql_simple_fulltext/USAGE
|
47
|
+
- lib/generators/mysql_simple_fulltext/migration_generator.rb
|
48
|
+
- lib/generators/mysql_simple_fulltext/migration_generator.rb~
|
49
|
+
- lib/generators/mysql_simple_fulltext/templates/migration.rb~
|
50
|
+
- lib/generators/mysql_simple_fulltext/templates/migration.rb
|
51
|
+
- lib/mysql_simple_fulltext/version.rb
|
52
|
+
- lib/mysql_simple_fulltext.rb~
|
53
|
+
- MIT-LICENSE
|
54
|
+
- Rakefile
|
55
|
+
- README.rdoc
|
56
|
+
- test/test_helper.rb
|
57
|
+
- test/dummy/tmp/cache/assets/DDF/A20/sprockets%2F587fd30d0277bf7d8fd2ec94af9f2be3
|
58
|
+
- test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2
|
59
|
+
- test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
|
60
|
+
- test/dummy/tmp/cache/assets/CC7/220/sprockets%2Fd066c004d1fd26ae76a61303a7a18145
|
61
|
+
- test/dummy/tmp/cache/assets/D9C/CD0/sprockets%2Fc85016e7bbd4f3adbb7635d01f85d39b
|
62
|
+
- test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
|
63
|
+
- test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
|
64
|
+
- test/dummy/tmp/cache/assets/C11/FC0/sprockets%2F43ed13529f28571f72100116a463544a
|
65
|
+
- test/dummy/tmp/cache/assets/CDC/A90/sprockets%2Fe6590f1d0f7409a9531f8044e620dac4
|
66
|
+
- test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
|
67
|
+
- test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
|
68
|
+
- test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
|
69
|
+
- test/dummy/tmp/cache/assets/DF8/DE0/sprockets%2F0ab45e4a53efed4e3575d5f1fba03f8c
|
70
|
+
- test/dummy/tmp/cache/assets/CD5/B70/sprockets%2F416150dc3ac35079c94273cc46e90aa6
|
71
|
+
- test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212
|
72
|
+
- test/dummy/tmp/cache/assets/D1A/310/sprockets%2F5384ad85f52d3272dbc64d46ef3876a4
|
73
|
+
- test/dummy/config/locales/en.yml
|
74
|
+
- test/dummy/config/environments/development.rb
|
75
|
+
- test/dummy/config/environments/test.rb
|
76
|
+
- test/dummy/config/environments/production.rb
|
77
|
+
- test/dummy/config/boot.rb
|
78
|
+
- test/dummy/config/database.yml
|
79
|
+
- test/dummy/config/application.rb
|
80
|
+
- test/dummy/config/routes.rb~
|
81
|
+
- test/dummy/config/environment.rb
|
82
|
+
- test/dummy/config/initializers/secret_token.rb
|
83
|
+
- test/dummy/config/initializers/mime_types.rb
|
84
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
85
|
+
- test/dummy/config/initializers/session_store.rb
|
86
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
87
|
+
- test/dummy/config/initializers/inflections.rb
|
88
|
+
- test/dummy/config/routes.rb
|
89
|
+
- test/dummy/test/fixtures/posts.yml
|
90
|
+
- test/dummy/test/fixtures/posts.yml~
|
91
|
+
- test/dummy/test/unit/post_test.rb
|
92
|
+
- test/dummy/test/unit/helpers/posts_helper_test.rb
|
93
|
+
- test/dummy/test/functional/posts_controller_test.rb
|
94
|
+
- test/dummy/script/rails
|
95
|
+
- test/dummy/app/views/posts/show.html.erb
|
96
|
+
- test/dummy/app/views/posts/_form.html.erb
|
97
|
+
- test/dummy/app/views/posts/new.html.erb
|
98
|
+
- test/dummy/app/views/posts/index.html.erb
|
99
|
+
- test/dummy/app/views/posts/edit.html.erb
|
100
|
+
- test/dummy/app/views/layouts/application.html.erb
|
101
|
+
- test/dummy/app/assets/stylesheets/application.css
|
102
|
+
- test/dummy/app/assets/stylesheets/posts.css
|
103
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
104
|
+
- test/dummy/app/assets/javascripts/posts.js
|
105
|
+
- test/dummy/app/assets/javascripts/application.js
|
106
|
+
- test/dummy/app/controllers/posts_controller.rb~
|
107
|
+
- test/dummy/app/controllers/posts_controller.rb
|
108
|
+
- test/dummy/app/controllers/application_controller.rb
|
109
|
+
- test/dummy/app/helpers/application_helper.rb
|
110
|
+
- test/dummy/app/helpers/posts_helper.rb
|
111
|
+
- test/dummy/app/models/post.rb
|
112
|
+
- test/dummy/app/models/post.rb~
|
113
|
+
- test/dummy/public/favicon.ico
|
114
|
+
- test/dummy/public/500.html
|
115
|
+
- test/dummy/public/422.html
|
116
|
+
- test/dummy/public/404.html
|
117
|
+
- test/dummy/Rakefile
|
118
|
+
- test/dummy/config.ru
|
119
|
+
- test/dummy/README.rdoc
|
120
|
+
- test/dummy/db/migrate/20120211200406_create_posts.rb
|
121
|
+
- test/dummy/db/migrate/20120219133758_create_post_fulltext_index.rb
|
122
|
+
- test/dummy/db/schema.rb
|
123
|
+
- test/dummy/log/development.log
|
124
|
+
- test/mysql_simple_fulltext_test.rb
|
125
|
+
homepage: https://github.com/groustan/mysql_simple_fulltext
|
126
|
+
licenses: []
|
127
|
+
post_install_message:
|
128
|
+
rdoc_options: []
|
129
|
+
require_paths:
|
130
|
+
- lib
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
none: false
|
133
|
+
requirements:
|
134
|
+
- - ! '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
requirements: []
|
144
|
+
rubyforge_project:
|
145
|
+
rubygems_version: 1.8.15
|
146
|
+
signing_key:
|
147
|
+
specification_version: 3
|
148
|
+
summary: MysqlSimpleFulltext
|
149
|
+
test_files:
|
150
|
+
- test/test_helper.rb
|
151
|
+
- test/dummy/tmp/cache/assets/DDF/A20/sprockets%2F587fd30d0277bf7d8fd2ec94af9f2be3
|
152
|
+
- test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2
|
153
|
+
- test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
|
154
|
+
- test/dummy/tmp/cache/assets/CC7/220/sprockets%2Fd066c004d1fd26ae76a61303a7a18145
|
155
|
+
- test/dummy/tmp/cache/assets/D9C/CD0/sprockets%2Fc85016e7bbd4f3adbb7635d01f85d39b
|
156
|
+
- test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
|
157
|
+
- test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
|
158
|
+
- test/dummy/tmp/cache/assets/C11/FC0/sprockets%2F43ed13529f28571f72100116a463544a
|
159
|
+
- test/dummy/tmp/cache/assets/CDC/A90/sprockets%2Fe6590f1d0f7409a9531f8044e620dac4
|
160
|
+
- test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
|
161
|
+
- test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
|
162
|
+
- test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
|
163
|
+
- test/dummy/tmp/cache/assets/DF8/DE0/sprockets%2F0ab45e4a53efed4e3575d5f1fba03f8c
|
164
|
+
- test/dummy/tmp/cache/assets/CD5/B70/sprockets%2F416150dc3ac35079c94273cc46e90aa6
|
165
|
+
- test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212
|
166
|
+
- test/dummy/tmp/cache/assets/D1A/310/sprockets%2F5384ad85f52d3272dbc64d46ef3876a4
|
167
|
+
- test/dummy/config/locales/en.yml
|
168
|
+
- test/dummy/config/environments/development.rb
|
169
|
+
- test/dummy/config/environments/test.rb
|
170
|
+
- test/dummy/config/environments/production.rb
|
171
|
+
- test/dummy/config/boot.rb
|
172
|
+
- test/dummy/config/database.yml
|
173
|
+
- test/dummy/config/application.rb
|
174
|
+
- test/dummy/config/routes.rb~
|
175
|
+
- test/dummy/config/environment.rb
|
176
|
+
- test/dummy/config/initializers/secret_token.rb
|
177
|
+
- test/dummy/config/initializers/mime_types.rb
|
178
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
179
|
+
- test/dummy/config/initializers/session_store.rb
|
180
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
181
|
+
- test/dummy/config/initializers/inflections.rb
|
182
|
+
- test/dummy/config/routes.rb
|
183
|
+
- test/dummy/test/fixtures/posts.yml
|
184
|
+
- test/dummy/test/fixtures/posts.yml~
|
185
|
+
- test/dummy/test/unit/post_test.rb
|
186
|
+
- test/dummy/test/unit/helpers/posts_helper_test.rb
|
187
|
+
- test/dummy/test/functional/posts_controller_test.rb
|
188
|
+
- test/dummy/script/rails
|
189
|
+
- test/dummy/app/views/posts/show.html.erb
|
190
|
+
- test/dummy/app/views/posts/_form.html.erb
|
191
|
+
- test/dummy/app/views/posts/new.html.erb
|
192
|
+
- test/dummy/app/views/posts/index.html.erb
|
193
|
+
- test/dummy/app/views/posts/edit.html.erb
|
194
|
+
- test/dummy/app/views/layouts/application.html.erb
|
195
|
+
- test/dummy/app/assets/stylesheets/application.css
|
196
|
+
- test/dummy/app/assets/stylesheets/posts.css
|
197
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
198
|
+
- test/dummy/app/assets/javascripts/posts.js
|
199
|
+
- test/dummy/app/assets/javascripts/application.js
|
200
|
+
- test/dummy/app/controllers/posts_controller.rb~
|
201
|
+
- test/dummy/app/controllers/posts_controller.rb
|
202
|
+
- test/dummy/app/controllers/application_controller.rb
|
203
|
+
- test/dummy/app/helpers/application_helper.rb
|
204
|
+
- test/dummy/app/helpers/posts_helper.rb
|
205
|
+
- test/dummy/app/models/post.rb
|
206
|
+
- test/dummy/app/models/post.rb~
|
207
|
+
- test/dummy/public/favicon.ico
|
208
|
+
- test/dummy/public/500.html
|
209
|
+
- test/dummy/public/422.html
|
210
|
+
- test/dummy/public/404.html
|
211
|
+
- test/dummy/Rakefile
|
212
|
+
- test/dummy/config.ru
|
213
|
+
- test/dummy/README.rdoc
|
214
|
+
- test/dummy/db/migrate/20120211200406_create_posts.rb
|
215
|
+
- test/dummy/db/migrate/20120219133758_create_post_fulltext_index.rb
|
216
|
+
- test/dummy/db/schema.rb
|
217
|
+
- test/dummy/log/development.log
|
218
|
+
- test/mysql_simple_fulltext_test.rb
|