merit 1.7.1 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -1
  3. data/Gemfile +7 -0
  4. data/README.md +31 -4
  5. data/app/models/merit/action.rb +2 -3
  6. data/app/models/merit/badge.rb +2 -2
  7. data/lib/generators/active_record/install_generator.rb +1 -1
  8. data/lib/generators/active_record/merit_generator.rb +2 -2
  9. data/lib/generators/active_record/remove_generator.rb +2 -2
  10. data/lib/generators/active_record/templates/create_badges_sashes.rb +1 -1
  11. data/lib/generators/active_record/templates/create_merit_actions.rb +3 -3
  12. data/lib/generators/active_record/templates/create_scores_and_points.rb +2 -2
  13. data/lib/generators/active_record/templates/remove_merit_tables.rb +1 -1
  14. data/lib/generators/merit/install_generator.rb +1 -1
  15. data/lib/generators/merit/merit_generator.rb +2 -3
  16. data/lib/generators/merit/remove_generator.rb +3 -3
  17. data/lib/generators/merit/templates/merit.rb +10 -4
  18. data/lib/merit.rb +43 -15
  19. data/lib/merit/base_target_finder.rb +1 -3
  20. data/lib/merit/judge.rb +26 -6
  21. data/lib/merit/model_additions.rb +10 -17
  22. data/lib/merit/models/active_record/merit/action.rb +1 -1
  23. data/lib/merit/models/active_record/merit/activity_log.rb +1 -0
  24. data/lib/merit/models/active_record/merit/badges_sash.rb +6 -10
  25. data/lib/merit/models/active_record/merit/sash.rb +2 -38
  26. data/lib/merit/models/active_record/merit/score.rb +6 -5
  27. data/lib/merit/models/base/merit/badges_sash.rb +15 -0
  28. data/lib/merit/models/base/merit/sash.rb +42 -0
  29. data/lib/merit/models/mongoid/merit/action.rb +8 -6
  30. data/lib/merit/models/mongoid/merit/activity_log.rb +11 -0
  31. data/lib/merit/models/mongoid/merit/badges_sash.rb +19 -0
  32. data/lib/merit/models/mongoid/merit/sash.rb +28 -0
  33. data/lib/merit/models/mongoid/merit/score.rb +41 -0
  34. data/lib/merit/reputation_change_observer.rb +11 -0
  35. data/lib/merit/rule.rb +1 -1
  36. data/lib/merit/rules_matcher.rb +0 -2
  37. data/lib/merit/rules_rank_methods.rb +1 -1
  38. data/lib/merit/target_finder.rb +1 -2
  39. data/merit.gemspec +2 -1
  40. data/test/dummy/app/models/comment.rb +16 -1
  41. data/test/dummy/app/models/dummy_observer.rb +3 -0
  42. data/test/dummy/app/models/user.rb +14 -1
  43. data/test/dummy/config/initializers/merit.rb +3 -4
  44. data/test/dummy/config/mongoid.yml +13 -0
  45. data/test/integration/navigation_test.rb +19 -2
  46. data/test/unit/merit_unit_test.rb +1 -1
  47. metadata +25 -56
  48. data/lib/merit/models/mongoid/sash.rb +0 -14
  49. data/lib/merit/observer.rb +0 -13
  50. data/test/dummy-mongoid/Rakefile +0 -7
  51. data/test/dummy-mongoid/app/controllers/application_controller.rb +0 -7
  52. data/test/dummy-mongoid/app/controllers/comments_controller.rb +0 -90
  53. data/test/dummy-mongoid/app/controllers/registrations_controller.rb +0 -15
  54. data/test/dummy-mongoid/app/controllers/users_controller.rb +0 -67
  55. data/test/dummy-mongoid/app/helpers/application_helper.rb +0 -2
  56. data/test/dummy-mongoid/app/models/comment.rb +0 -13
  57. data/test/dummy-mongoid/app/models/merit/badge_rules.rb +0 -49
  58. data/test/dummy-mongoid/app/models/merit/point_rules.rb +0 -20
  59. data/test/dummy-mongoid/app/models/merit/rank_rules.rb +0 -24
  60. data/test/dummy-mongoid/app/models/user.rb +0 -25
  61. data/test/dummy-mongoid/app/views/comments/_form.html.erb +0 -29
  62. data/test/dummy-mongoid/app/views/comments/edit.html.erb +0 -6
  63. data/test/dummy-mongoid/app/views/comments/index.html.erb +0 -35
  64. data/test/dummy-mongoid/app/views/comments/new.html.erb +0 -5
  65. data/test/dummy-mongoid/app/views/comments/show.html.erb +0 -23
  66. data/test/dummy-mongoid/app/views/layouts/application.html.erb +0 -24
  67. data/test/dummy-mongoid/app/views/users/_form.html.erb +0 -22
  68. data/test/dummy-mongoid/app/views/users/edit.html.erb +0 -6
  69. data/test/dummy-mongoid/app/views/users/index.html.erb +0 -26
  70. data/test/dummy-mongoid/app/views/users/new.html.erb +0 -5
  71. data/test/dummy-mongoid/app/views/users/show.html.erb +0 -18
  72. data/test/dummy-mongoid/config.ru +0 -4
  73. data/test/dummy-mongoid/config/application.rb +0 -22
  74. data/test/dummy-mongoid/config/boot.rb +0 -10
  75. data/test/dummy-mongoid/config/environment.rb +0 -5
  76. data/test/dummy-mongoid/config/environments/development.rb +0 -25
  77. data/test/dummy-mongoid/config/environments/production.rb +0 -49
  78. data/test/dummy-mongoid/config/environments/test.rb +0 -35
  79. data/test/dummy-mongoid/config/initializers/backtrace_silencers.rb +0 -7
  80. data/test/dummy-mongoid/config/initializers/inflections.rb +0 -10
  81. data/test/dummy-mongoid/config/initializers/merit.rb +0 -37
  82. data/test/dummy-mongoid/config/initializers/mime_types.rb +0 -5
  83. data/test/dummy-mongoid/config/initializers/secret_token.rb +0 -7
  84. data/test/dummy-mongoid/config/initializers/session_store.rb +0 -8
  85. data/test/dummy-mongoid/config/locales/en.yml +0 -5
  86. data/test/dummy-mongoid/config/mongoid.yml +0 -14
  87. data/test/dummy-mongoid/config/routes.rb +0 -9
  88. data/test/dummy-mongoid/db/seeds.rb +0 -17
  89. data/test/dummy-mongoid/public/404.html +0 -26
  90. data/test/dummy-mongoid/public/422.html +0 -26
  91. data/test/dummy-mongoid/public/500.html +0 -26
  92. data/test/dummy-mongoid/public/favicon.ico +0 -0
  93. data/test/dummy-mongoid/public/javascripts/application.js +0 -2
  94. data/test/dummy-mongoid/public/javascripts/controls.js +0 -965
  95. data/test/dummy-mongoid/public/javascripts/dragdrop.js +0 -974
  96. data/test/dummy-mongoid/public/javascripts/effects.js +0 -1123
  97. data/test/dummy-mongoid/public/javascripts/prototype.js +0 -6001
  98. data/test/dummy-mongoid/public/javascripts/rails.js +0 -191
  99. data/test/dummy-mongoid/public/stylesheets/.gitkeep +0 -0
  100. data/test/dummy-mongoid/public/stylesheets/scaffold.css +0 -56
  101. data/test/dummy-mongoid/script/rails +0 -6

There are too many changes on this page to be displayed.


The amount of changes on this page would crash your brower.

You can still verify the content by downloading the gem file manually.