easy_tag 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/Rakefile +16 -9
  4. data/app/models/easy_tag/tag.rb +0 -3
  5. data/app/models/easy_tag/tag_context.rb +0 -3
  6. data/lib/easy_tag/taggable.rb +5 -4
  7. data/lib/easy_tag/tagger.rb +1 -1
  8. data/lib/easy_tag/version.rb +1 -1
  9. data/lib/easy_tag.rb +2 -2
  10. data/test/dummy/README.rdoc +28 -0
  11. data/test/dummy/Rakefile +6 -0
  12. data/test/dummy/app/assets/javascripts/application.js +13 -0
  13. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  14. data/test/dummy/app/controllers/application_controller.rb +5 -0
  15. data/test/dummy/app/helpers/application_helper.rb +2 -0
  16. data/test/dummy/app/models/comment.rb +3 -0
  17. data/test/dummy/app/models/post.rb +3 -0
  18. data/test/dummy/app/models/user.rb +3 -0
  19. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  20. data/test/dummy/bin/bundle +3 -0
  21. data/test/dummy/bin/rails +4 -0
  22. data/test/dummy/bin/rake +4 -0
  23. data/test/dummy/config/application.rb +23 -0
  24. data/test/dummy/config/boot.rb +5 -0
  25. data/test/dummy/config/database.yml +25 -0
  26. data/test/dummy/config/environment.rb +5 -0
  27. data/test/dummy/config/environments/development.rb +29 -0
  28. data/test/dummy/config/environments/production.rb +80 -0
  29. data/test/dummy/config/environments/test.rb +36 -0
  30. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  31. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  32. data/test/dummy/config/initializers/inflections.rb +16 -0
  33. data/test/dummy/config/initializers/mime_types.rb +5 -0
  34. data/test/dummy/config/initializers/secret_token.rb +12 -0
  35. data/test/dummy/config/initializers/session_store.rb +3 -0
  36. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  37. data/test/dummy/config/locales/en.yml +23 -0
  38. data/test/dummy/config/routes.rb +56 -0
  39. data/test/dummy/config.ru +4 -0
  40. data/test/dummy/db/development.sqlite3 +0 -0
  41. data/test/dummy/db/migrate/20130113020203_create_users.rb +9 -0
  42. data/test/dummy/db/migrate/20130113020210_create_posts.rb +9 -0
  43. data/test/dummy/db/migrate/20130113020220_create_comments.rb +9 -0
  44. data/test/dummy/db/migrate/20130117032413_easy_tag_migration.rb +34 -0
  45. data/test/dummy/db/schema.rb +61 -0
  46. data/test/dummy/db/test.sqlite3 +0 -0
  47. data/test/dummy/log/development.log +847 -0
  48. data/test/dummy/log/test.log +92788 -0
  49. data/test/dummy/public/404.html +58 -0
  50. data/test/dummy/public/422.html +58 -0
  51. data/test/dummy/public/500.html +57 -0
  52. data/test/dummy/public/favicon.ico +0 -0
  53. data/test/dummy/test/foo_test.rb +8 -0
  54. data/test/dummy/test/models/easy_tag/tag_test.rb +72 -0
  55. data/test/dummy/test/models/easy_tag/taggable_test.rb +214 -0
  56. data/test/dummy/test/models/easy_tag/tagger_test.rb +58 -0
  57. data/test/test_helper.rb +30 -0
  58. data.tar.gz.sig +0 -0
  59. metadata +134 -22
  60. metadata.gz.sig +2 -0
@@ -0,0 +1,9 @@
1
+ class CreatePosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :posts do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateComments < ActiveRecord::Migration
2
+ def change
3
+ create_table :comments do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,34 @@
1
+ class EasyTagMigration < ActiveRecord::Migration
2
+
3
+ def change
4
+ create_table :easy_tag_tags do |t|
5
+ t.string :name
6
+
7
+ t.timestamps
8
+ end
9
+
10
+ create_table :easy_tag_tag_contexts do |t|
11
+ t.string :name
12
+
13
+ t.timestamps
14
+ end
15
+
16
+ create_table :easy_tag_taggings do |t|
17
+ t.references :tag
18
+ t.references :tag_context
19
+ t.references :tagger
20
+
21
+ # You should make sure that the column created is
22
+ # long enough to store the required class names.
23
+ t.references :taggable, :polymorphic => true
24
+
25
+ t.timestamps
26
+ end
27
+
28
+ add_index :easy_tag_taggings, :tag_id
29
+ add_index :easy_tag_taggings, :tagger_id
30
+ add_index :easy_tag_taggings, :tag_context_id
31
+ add_index :easy_tag_taggings, [:taggable_id, :taggable_type]
32
+ end
33
+
34
+ end
@@ -0,0 +1,61 @@
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 => 20130117032413) do
15
+
16
+ create_table "comments", :force => true do |t|
17
+ t.string "name"
18
+ t.datetime "created_at", :null => false
19
+ t.datetime "updated_at", :null => false
20
+ end
21
+
22
+ create_table "easy_tag_tag_contexts", :force => true do |t|
23
+ t.string "name"
24
+ t.datetime "created_at", :null => false
25
+ t.datetime "updated_at", :null => false
26
+ end
27
+
28
+ create_table "easy_tag_taggings", :force => true do |t|
29
+ t.integer "tag_id"
30
+ t.integer "tag_context_id"
31
+ t.integer "tagger_id"
32
+ t.integer "taggable_id"
33
+ t.string "taggable_type"
34
+ t.datetime "created_at", :null => false
35
+ t.datetime "updated_at", :null => false
36
+ end
37
+
38
+ add_index "easy_tag_taggings", ["tag_context_id"], :name => "index_easy_tag_taggings_on_tag_context_id"
39
+ add_index "easy_tag_taggings", ["tag_id"], :name => "index_easy_tag_taggings_on_tag_id"
40
+ add_index "easy_tag_taggings", ["taggable_id", "taggable_type"], :name => "index_easy_tag_taggings_on_taggable_id_and_taggable_type"
41
+ add_index "easy_tag_taggings", ["tagger_id"], :name => "index_easy_tag_taggings_on_tagger_id"
42
+
43
+ create_table "easy_tag_tags", :force => true do |t|
44
+ t.string "name"
45
+ t.datetime "created_at", :null => false
46
+ t.datetime "updated_at", :null => false
47
+ end
48
+
49
+ create_table "posts", :force => true do |t|
50
+ t.string "name"
51
+ t.datetime "created_at", :null => false
52
+ t.datetime "updated_at", :null => false
53
+ end
54
+
55
+ create_table "users", :force => true do |t|
56
+ t.string "name"
57
+ t.datetime "created_at", :null => false
58
+ t.datetime "updated_at", :null => false
59
+ end
60
+
61
+ end
Binary file