has_moderated 1.0.alpha2 → 1.0.beta

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 (59) hide show
  1. data/README.rdoc +36 -13
  2. data/lib/has_moderated/associations/base.rb +4 -4
  3. data/lib/has_moderated/associations/collection.rb +0 -1
  4. data/lib/has_moderated/carrier_wave.rb +69 -46
  5. data/lib/has_moderated/moderated_create.rb +1 -1
  6. data/lib/has_moderated/moderation_model.rb +7 -3
  7. data/lib/has_moderated/version.rb +1 -1
  8. data/lib/has_moderated.rb +2 -1
  9. data/test/dummy/Guardfile +0 -1
  10. data/test/dummy/app/models/photo.rb +4 -0
  11. data/test/dummy/db/development.sqlite3 +0 -0
  12. data/test/dummy/db/migrate/20120520215008_initial_schema.rb +48 -0
  13. data/test/dummy/db/migrate/20120520215224_create_photos.rb +13 -0
  14. data/test/dummy/db/schema.rb +11 -1
  15. data/test/dummy/db/test.sqlite3 +0 -0
  16. data/test/dummy/log/development.log +56 -0
  17. data/test/dummy/log/test.log +8211 -0
  18. data/test/dummy/public/uploads/{task_photo/photo → photo/avatar}/1/test.jpg +0 -0
  19. data/test/dummy/public/uploads/{task_photo/photo → photo/avatar}/1/thumb_test.jpg +0 -0
  20. data/test/dummy/spec/models/photo_spec.rb +95 -0
  21. data/test/dummy/spec/models/task_spec.rb +74 -4
  22. data/test/dummy/spec/support/photos.rb +6 -2
  23. metadata +15 -79
  24. data/lib/has_moderated/associations/has_many.rb +0 -15
  25. data/test/dummy/db/migrate/20110901013205_create_tasks.rb +0 -10
  26. data/test/dummy/db/migrate/20110901013228_create_subtasks.rb +0 -11
  27. data/test/dummy/db/migrate/20110901013618_create_moderations.rb +0 -15
  28. data/test/dummy/db/migrate/20110908025410_create_task_alls.rb +0 -10
  29. data/test/dummy/db/migrate/20110908025606_add_task_all_id_to_subtasks.rb +0 -5
  30. data/test/dummy/db/migrate/20111003205633_create_photos.rb +0 -9
  31. data/test/dummy/db/migrate/20111003234101_create_task_photos.rb +0 -10
  32. data/test/dummy/db/migrate/20111004153147_create_hook_tests.rb +0 -10
  33. data/test/dummy/db/migrate/20111004164509_create_photo_holders.rb +0 -10
  34. data/test/dummy/db/migrate/20111008195728_create_hone_tests.rb +0 -9
  35. data/test/dummy/db/migrate/20111008195809_create_hjoin_tests.rb +0 -13
  36. data/test/dummy/db/migrate/20111009193145_fix_join_table.rb +0 -8
  37. data/test/dummy/db/migrate/20111009201729_add_title_to_hone_tests.rb +0 -5
  38. data/test/dummy/db/migrate/20111009205517_create_hmanythrough_tests.rb +0 -9
  39. data/test/dummy/db/migrate/20111009205545_create_hmanythrough_joins.rb +0 -11
  40. data/test/dummy/db/migrate/20111018172409_create_hone_as_tests.rb +0 -11
  41. data/test/dummy/db/migrate/20111018174319_create_hmany_fk_tests.rb +0 -10
  42. data/test/dummy/db/migrate/20111018180207_create_habtm_name_tests.rb +0 -13
  43. data/test/dummy/db/migrate/20120209045206_create_photo_relateds.rb +0 -10
  44. data/test/dummy/db/migrate/20120515155730_create_moderations2.rb +0 -20
  45. data/test/dummy/db/migrate/20120515174306_prepare_for_new_tests.rb +0 -36
  46. data/test/dummy/db/migrate/20120515175621_remove_photo_relateds.rb +0 -8
  47. data/test/dummy/spec/factories/habtm_name_tests.rb +0 -7
  48. data/test/dummy/spec/factories/hjoin_tests.rb +0 -7
  49. data/test/dummy/spec/factories/hmany_fk_tests.rb +0 -8
  50. data/test/dummy/spec/factories/hmanythrough_joins.rb +0 -9
  51. data/test/dummy/spec/factories/hmanythrough_tests.rb +0 -7
  52. data/test/dummy/spec/factories/hone_as_tests.rb +0 -9
  53. data/test/dummy/spec/factories/hone_tests.rb +0 -7
  54. data/test/dummy/spec/factories/hook_tests.rb +0 -8
  55. data/test/dummy/spec/factories/photo_holders.rb +0 -7
  56. data/test/dummy/spec/factories/photo_relateds.rb +0 -8
  57. data/test/dummy/spec/factories/photos.rb +0 -7
  58. data/test/dummy/spec/factories/task_alls.rb +0 -8
  59. data/test/dummy/spec/factories/task_photos.rb +0 -7
@@ -1,36 +0,0 @@
1
- class PrepareForNewTests < ActiveRecord::Migration
2
- def up
3
- drop_table :task_alls
4
- drop_table :photos
5
- drop_table :photo_holders
6
- drop_table :hook_tests
7
- drop_table :hone_tests
8
- drop_table :hone_as_tests
9
- drop_table :hmanythrough_tests
10
- drop_table :hmanythrough_joins
11
- drop_table :hmany_fk_tests
12
- drop_table :hjoin_tests_tasks
13
- drop_table :hjoin_tests
14
- drop_table :habtm_name_tests_tasks
15
- drop_table :habtm_name_tests
16
-
17
- remove_column :subtasks, :task_all_id
18
- add_column :subtasks, :parentable_id, :integer
19
- add_column :subtasks, :parentable_type, :string
20
-
21
- create_table "tasks_jointable", :id => false do |t|
22
- t.integer :m1_id
23
- t.integer :m2_id
24
- end
25
-
26
- create_table "task_connections" do |t|
27
- t.string :title
28
- t.integer :m1_id
29
- t.integer :m2_id
30
- t.timestamps
31
- end
32
- end
33
-
34
- def down
35
- end
36
- end
@@ -1,8 +0,0 @@
1
- class RemovePhotoRelateds < ActiveRecord::Migration
2
- def up
3
- drop_table :photo_relateds
4
- end
5
-
6
- def down
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :habtm_name_test do
5
- title "MyString"
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :hjoin_test do
5
- title "MyString"
6
- end
7
- end
@@ -1,8 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :hmany_fk_test do
5
- something_id 1
6
- title "MyString"
7
- end
8
- end
@@ -1,9 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :hmanythrough_join do
5
- hmanythrough_test_id 1
6
- task_id 1
7
- exdata "MyString"
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :hmanythrough_test do
5
- title "MyString"
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :hone_as_test do
5
- testable_id 1
6
- testable_type "MyString"
7
- title "MyString"
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :hone_test do
5
- task_id 1
6
- end
7
- end
@@ -1,8 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :hook_test do
5
- title "MyString"
6
- foo "MyString"
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :photo_holder do
5
- title "MyString"
6
- end
7
- end
@@ -1,8 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :photo_related do
5
- photo_id 1
6
- data "MyString"
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :photo do
5
- photo "MyString"
6
- end
7
- end
@@ -1,8 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :task_all do
5
- title "MyString"
6
- value "MyString"
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- # Read about factories at http://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :task_photo do
5
- photo "MyString"
6
- end
7
- end