enju_message 0.1.14.pre14 → 0.1.14.pre15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/message_requests_controller.rb +5 -5
  3. data/app/controllers/messages_controller.rb +17 -17
  4. data/app/models/message.rb +34 -24
  5. data/app/models/message_request.rb +25 -30
  6. data/app/models/message_request_state_machine.rb +12 -0
  7. data/app/models/message_request_transition.rb +20 -0
  8. data/app/models/message_state_machine.rb +24 -0
  9. data/app/models/message_template.rb +3 -3
  10. data/app/models/message_transition.rb +20 -0
  11. data/app/views/layouts/messages.html.erb +3 -3
  12. data/app/views/message_requests/edit.html.erb +1 -1
  13. data/app/views/message_requests/index.html.erb +8 -8
  14. data/app/views/message_requests/new.html.erb +2 -2
  15. data/app/views/message_requests/show.html.erb +2 -2
  16. data/app/views/message_templates/_form.html.erb +4 -4
  17. data/app/views/message_templates/edit.html.erb +1 -1
  18. data/app/views/message_templates/index.html.erb +3 -3
  19. data/app/views/message_templates/new.html.erb +1 -1
  20. data/app/views/message_templates/show.html.erb +1 -1
  21. data/app/views/messages/_form.html.erb +0 -4
  22. data/app/views/messages/edit.html.erb +5 -5
  23. data/app/views/messages/index.atom.builder +2 -2
  24. data/app/views/messages/index.html.erb +7 -7
  25. data/app/views/messages/index.rss.builder +9 -9
  26. data/app/views/messages/new.html.erb +7 -7
  27. data/app/views/messages/show.html.erb +5 -5
  28. data/app/views/notifier/message_notification.en.text.erb +1 -1
  29. data/app/views/notifier/message_notification.ja.text.erb +1 -1
  30. data/config/initializers/statesman.rb +3 -0
  31. data/db/migrate/154_create_messages.rb +0 -1
  32. data/db/migrate/20080819181903_create_message_requests.rb +0 -2
  33. data/db/migrate/20140518111006_create_message_transitions.rb +14 -0
  34. data/db/migrate/20140518135713_create_message_request_transitions.rb +14 -0
  35. data/lib/enju_message/engine.rb +1 -1
  36. data/lib/enju_message/user.rb +2 -2
  37. data/lib/enju_message/version.rb +1 -1
  38. data/lib/generators/enju_message/setup/setup_generator.rb +2 -0
  39. data/lib/generators/enju_message/setup/templates/db/fixtures/message_templates.yml +41 -20
  40. data/lib/tasks/enju_message_tasks.rake +10 -0
  41. data/lib/tasks/message_template.rb +13 -0
  42. data/spec/controllers/message_requests_controller_spec.rb +15 -15
  43. data/spec/controllers/message_templates_controller_spec.rb +21 -21
  44. data/spec/controllers/messages_controller_spec.rb +7 -13
  45. data/spec/dummy/app/mailers/notifier.rb +6 -6
  46. data/spec/dummy/db/migrate/001_create_agents.rb +0 -2
  47. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
  48. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
  49. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
  50. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
  51. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  52. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
  53. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
  54. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
  55. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
  56. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
  57. data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
  58. data/spec/dummy/db/schema.rb +105 -8
  59. data/spec/dummy/db/test.sqlite3 +0 -0
  60. data/spec/dummy/solr/default/data/index/_oj.fdt +0 -0
  61. data/spec/dummy/solr/default/data/index/{_n.si → _oj.si} +0 -0
  62. data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.tim → _oj_Lucene41_0.tim} +0 -0
  63. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  64. data/spec/dummy/solr/default/data/index/segments_14v +0 -0
  65. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001460 +0 -0
  66. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001461 +0 -0
  67. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001462 +0 -0
  68. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001463 +0 -0
  69. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001464 +0 -0
  70. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001465 +0 -0
  71. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001466 +0 -0
  72. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001467 +0 -0
  73. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001468 +0 -0
  74. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001469 +0 -0
  75. data/spec/factories/message.rb +2 -2
  76. data/spec/factories/profile.rb +10 -0
  77. data/spec/fixtures/agents.yml +0 -12
  78. data/spec/fixtures/message_requests.yml +0 -3
  79. data/spec/fixtures/messages.yml +0 -5
  80. data/spec/fixtures/profiles.yml +98 -0
  81. data/spec/fixtures/users.yml +3 -23
  82. data/spec/models/message_request_spec.rb +0 -2
  83. data/spec/models/message_spec.rb +2 -4
  84. data/spec/spec_helper.rb +3 -0
  85. metadata +95 -47
  86. data/spec/dummy/solr/default/data/index/_n.fdt +0 -0
  87. data/spec/dummy/solr/default/data/index/segments_15 +0 -0
  88. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000030 +0 -0
  89. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000031 +0 -0
  90. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000032 +0 -0
  91. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000033 +0 -0
  92. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000034 +0 -0
  93. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000035 +0 -0
  94. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000036 +0 -0
  95. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000037 +0 -0
  96. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000038 +0 -0
  97. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000039 +0 -0
  98. /data/spec/dummy/solr/default/data/index/{_n.fdx → _oj.fdx} +0 -0
  99. /data/spec/dummy/solr/default/data/index/{_n.fnm → _oj.fnm} +0 -0
  100. /data/spec/dummy/solr/default/data/index/{_n.nvd → _oj.nvd} +0 -0
  101. /data/spec/dummy/solr/default/data/index/{_n.nvm → _oj.nvm} +0 -0
  102. /data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.doc → _oj_Lucene41_0.doc} +0 -0
  103. /data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.pos → _oj_Lucene41_0.pos} +0 -0
  104. /data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.tip → _oj_Lucene41_0.tip} +0 -0