proclaim 0.3.1 → 0.4.0

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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +9 -0
  3. data/README.md +91 -10
  4. data/Rakefile +1 -1
  5. data/VERSION +1 -1
  6. data/app/assets/javascripts/proclaim/comments_handler.js.coffee +3 -0
  7. data/app/assets/stylesheets/proclaim/subscriptions.css.scss +33 -0
  8. data/app/controllers/proclaim/comments_controller.rb +3 -1
  9. data/app/controllers/proclaim/posts_controller.rb +10 -6
  10. data/app/controllers/proclaim/subscriptions_controller.rb +31 -14
  11. data/app/helpers/proclaim/application_helper.rb +3 -8
  12. data/app/models/proclaim/comment.rb +1 -0
  13. data/app/models/proclaim/post.rb +2 -0
  14. data/app/models/proclaim/subscription.rb +7 -6
  15. data/app/policies/proclaim/image_policy.rb +1 -1
  16. data/app/policies/proclaim/subscription_policy.rb +10 -6
  17. data/app/views/layouts/proclaim/subscription_mailer.html.erb +34 -4
  18. data/app/views/proclaim/posts/edit.html.erb +3 -1
  19. data/app/views/proclaim/posts/index.html.erb +2 -0
  20. data/app/views/proclaim/posts/new.html.erb +3 -1
  21. data/app/views/proclaim/posts/show.html.erb +3 -1
  22. data/app/views/proclaim/subscription_mailer/welcome_email.html.erb +9 -7
  23. data/app/views/proclaim/subscriptions/_form.html.erb +7 -2
  24. data/app/views/proclaim/subscriptions/index.html.erb +89 -0
  25. data/app/views/proclaim/subscriptions/new.html.erb +3 -1
  26. data/app/views/proclaim/subscriptions/show.html.erb +26 -0
  27. data/config/routes.rb +2 -6
  28. data/db/migrate/20150123115226_add_name_to_subscriptions.rb +7 -0
  29. data/lib/generators/proclaim/templates/initialize_proclaim.rb +19 -0
  30. data/lib/proclaim.rb +93 -0
  31. data/lib/proclaim/engine.rb +18 -0
  32. data/lib/proclaim/version.rb +1 -1
  33. data/test/controllers/proclaim/subscriptions_controller_test.rb +76 -21
  34. data/test/dummy/db/schema.rb +4 -3
  35. data/test/factories/proclaim/subscription.rb +1 -0
  36. data/test/integration/with_javascript/post_subscription_test.rb +29 -0
  37. data/test/integration/without_javascript/blog_subscription_test.rb +29 -2
  38. data/test/integration/without_javascript/manage_subscriptions_test.rb +37 -0
  39. data/test/integration/without_javascript/unsubscribe_test.rb +6 -6
  40. data/test/mailers/proclaim/subscription_mailer_test.rb +10 -6
  41. data/test/models/proclaim/subscription_test.rb +5 -0
  42. data/test/policies/proclaim/image_policy_test.rb +83 -0
  43. data/test/policies/proclaim/post_policy_test.rb +11 -0
  44. data/test/policies/proclaim/subscription_policy_test.rb +27 -15
  45. data/test/unit/proclaim/new_comment_callback_test.rb +62 -0
  46. data/test/unit/proclaim/new_subscription_callback_test.rb +62 -0
  47. data/test/unit/proclaim/post_published_callback_test.rb +74 -0
  48. metadata +15 -5
  49. data/app/views/proclaim/subscriptions/subscribed.html.erb +0 -7
  50. data/app/views/proclaim/subscriptions/unsubscribe.html.erb +0 -7
  51. data/app/views/proclaim/subscriptions/unsubscribed.html.erb +0 -3
@@ -1,7 +0,0 @@
1
- <p>
2
- Welcome! You'll now begin receiving emails whenever a post is published on
3
- this blog. You should receive a confirmation email soon, along with an
4
- unsubscribe link. Not that you'll need it.
5
-
6
- Thank you for your support!
7
- </p>
@@ -1,7 +0,0 @@
1
- <p>
2
- Are you sure you'd like to unsubscribe from this notification item? Note that
3
- if you've subscribed elsewhere (e.g. other comments), you'll still receive
4
- notifications for them unless you unsubscribe from them as well.
5
- </p>
6
-
7
- <%= link_to "Yes, unsubscribe", unsubscribe_path(@subscription.token), method: :delete %>
@@ -1,3 +0,0 @@
1
- <p>
2
- You have successfully unsubscribed from this item.
3
- </p>