enju_news 0.1.1 → 0.2.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +3 -3
  3. data/app/controllers/news_feeds_controller.rb +11 -1
  4. data/app/controllers/news_posts_controller.rb +12 -2
  5. data/app/models/news_post.rb +12 -0
  6. data/app/policies/news_feed_policy.rb +21 -0
  7. data/app/policies/news_post_policy.rb +21 -0
  8. data/app/views/news_feeds/index.html.erb +4 -2
  9. data/app/views/news_posts/index.html.erb +3 -1
  10. data/lib/enju_news/engine.rb +1 -1
  11. data/lib/enju_news/version.rb +1 -1
  12. data/spec/controllers/news_feeds_controller_spec.rb +12 -12
  13. data/spec/controllers/news_posts_controller_spec.rb +10 -10
  14. data/spec/dummy/app/controllers/application_controller.rb +5 -2
  15. data/spec/dummy/app/models/user.rb +1 -2
  16. data/spec/dummy/config/application.rb +7 -24
  17. data/spec/dummy/config/environments/development.rb +25 -14
  18. data/spec/dummy/config/environments/production.rb +50 -31
  19. data/spec/dummy/config/environments/test.rb +23 -18
  20. data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
  21. data/spec/dummy/db/migrate/154_create_messages.rb +23 -0
  22. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +18 -0
  23. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
  24. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
  25. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  26. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +18 -0
  27. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +18 -0
  28. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  29. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  30. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  31. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +5 -0
  32. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
  33. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
  34. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
  35. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +5 -0
  36. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +9 -0
  37. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +9 -0
  38. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
  39. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +5 -0
  40. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +5 -0
  41. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +5 -0
  42. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +5 -0
  43. data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +9 -0
  44. data/spec/dummy/db/schema.rb +48 -5
  45. data/spec/fixtures/library_groups.yml +1 -6
  46. data/spec/models/news_feed_spec.rb +1 -1
  47. data/spec/models/news_post_spec.rb +1 -1
  48. data/spec/rails_helper.rb +60 -0
  49. data/spec/spec_helper.rb +84 -52
  50. data/spec/support/devise.rb +2 -2
  51. metadata +114 -17
  52. data/app/models/enju_news/ability.rb +0 -18
  53. data/spec/dummy/app/models/ability.rb +0 -18
  54. data/spec/dummy/config/application.yml +0 -42
@@ -1,18 +0,0 @@
1
- module EnjuNews
2
- class Ability
3
- include CanCan::Ability
4
-
5
- def initialize(user, ip_address = nil)
6
- case user.try(:role).try(:name)
7
- when 'Administrator'
8
- can :manage, [NewsFeed, NewsPost]
9
- when 'Librarian'
10
- can :read, [NewsFeed, NewsPost]
11
- when 'User'
12
- can :read, [NewsPost]
13
- else
14
- can :read, [NewsPost]
15
- end
16
- end
17
- end
18
- end
@@ -1,18 +0,0 @@
1
- #module EnjuNews
2
- class Ability
3
- include CanCan::Ability
4
-
5
- def initialize(user, ip_address = nil)
6
- case user.try(:role).try(:name)
7
- when 'Administrator'
8
- can :manage, [NewsFeed, NewsPost]
9
- when 'Librarian'
10
- can :read, [NewsFeed, NewsPost]
11
- when 'User'
12
- can :read, [NewsPost]
13
- else
14
- can :read, [NewsPost]
15
- end
16
- end
17
- end
18
- #end
@@ -1,42 +0,0 @@
1
- defaults: &defaults
2
- enju:
3
- web_hostname: localhost
4
- web_port_number: 3000
5
-
6
- family_name_first: true
7
- max_number_of_results: 500
8
- write_search_log_to_file: true
9
- csv_charset_conversion: true
10
-
11
- # Choose a locale from 'ca', 'de', 'fr', 'jp', 'uk', 'us'
12
- #AMAZON_AWS_HOSTNAME = 'ecs.amazonaws.com'
13
- amazon:
14
- aws_hostname: ecs.amazonaws.jp
15
- hostname: www.amazon.co.jp
16
- access_key: REPLACE_WITH_YOUR_AMAZON_ACCESS_KEY
17
- secret_access_key: REPLACE_WITH_YOUR_AMAZON_SECRET_ACCESS_KEY
18
-
19
- # :google, :amazon
20
- book_jacket:
21
- source: :google
22
- unknown_resource:
23
-
24
- # :mozshot, :simpleapi, :heartrails, :thumbalizr
25
- screenshot:
26
- generator: :mozshot
27
-
28
- uploaded_file:
29
- storage: :local
30
-
31
- manifestation:
32
- facet:
33
- pub_year_range_interval: 10
34
-
35
- development:
36
- <<: *defaults
37
-
38
- test:
39
- <<: *defaults
40
-
41
- production:
42
- <<: *defaults