enju_news 0.1.0.pre3 → 0.1.0.pre4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/news_post.rb +6 -1
  3. data/lib/enju_news/engine.rb +1 -1
  4. data/lib/enju_news/version.rb +1 -1
  5. data/spec/cassette_library/NewsFeed/should_fetch_feeds.yml +496 -872
  6. data/spec/cassette_library/NewsFeed/should_get_content.yml +463 -806
  7. data/spec/cassette_library/NewsFeed/should_not_get_content_if_the_feed_is_invalid.yml +35 -68
  8. data/spec/cassette_library/NewsFeed/should_reload_content.yml +463 -806
  9. data/spec/dummy/app/controllers/application_controller.rb +2 -48
  10. data/spec/dummy/app/models/user.rb +5 -91
  11. data/spec/dummy/config/application.rb +1 -2
  12. data/spec/dummy/config/application.yml +42 -0
  13. data/spec/dummy/config/initializers/devise.rb +2 -0
  14. data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
  15. data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
  16. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -3
  17. data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
  18. data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
  19. data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
  20. data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
  21. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  22. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
  23. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
  24. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
  25. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
  26. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  27. data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -8
  28. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
  29. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
  30. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
  31. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  32. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
  33. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  34. data/spec/dummy/db/schema.rb +185 -15
  35. data/spec/dummy/db/test.sqlite3 +0 -0
  36. data/spec/factories/library.rb +13 -0
  37. data/spec/factories/user.rb +33 -11
  38. data/spec/fixtures/libraries.yml +102 -0
  39. data/spec/fixtures/user_groups.yml +45 -0
  40. data/spec/spec_helper.rb +16 -17
  41. metadata +96 -53
  42. data/lib/generators/enju_news/views_generator.rb +0 -18
  43. data/spec/dummy/app/models/library_group.rb +0 -86
  44. data/spec/dummy/app/models/role.rb +0 -46
  45. data/spec/dummy/app/models/user_group.rb +0 -40
  46. data/spec/dummy/app/models/user_has_role.rb +0 -5
  47. data/spec/dummy/db/development.sqlite3 +0 -0
  48. data/spec/dummy/lib/master_model.rb +0 -19
  49. data/spec/dummy/lib/url_validator.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5697b218da9d2850ccad0aed81b690dead11367a
4
- data.tar.gz: 7ac66fa6bb03f51c1987483fdaaafcf0903e3468
3
+ metadata.gz: 12dea60838871f4405ef0166becd355ee8632738
4
+ data.tar.gz: e83c72a44bfdaa508a448c2eef3039b50dd4ce3f
5
5
  SHA512:
6
- metadata.gz: 97ea6d0013f698d6f65f8035b40a410b2267dcd70f787574855c0ac13f23a15116eec01d779162d6508ded1a4ea2282ae1e805bafa97b2e3095b7a8ae65900a2
7
- data.tar.gz: 3ffc2306d269efe8772b95916696540c24bbbcbfc35b43f17ad0212f52c5a3e0b3f5466997a288698457fcfb473d38adda73706e28735d151bf2039a251b7d5b
6
+ metadata.gz: cc7d7e4b550785919fc40cfc3da1cffbda6c738bbbb46042225d9dcef29c1a998b1afd4325dc5756f833a5c8366d9ea148032548e799e35f684fe484988dab49
7
+ data.tar.gz: 97bfa7c134ae2021ca7ffaa92a66465dcee55cb10f0224de0ba23785d6df72a5c2330de70ee6ea133c246930cb76c83cdf4ed636670d8771042813fb5cc884f7
@@ -1,7 +1,7 @@
1
1
  class NewsPost < ActiveRecord::Base
2
2
  attr_accessible :title, :body
3
3
  scope :published, where(:draft => false)
4
- default_scope order('news_posts.id DESC')
4
+ default_scope order('news_posts.start_date DESC')
5
5
  belongs_to :user
6
6
  belongs_to :required_role, :class_name => 'Role', :foreign_key => 'required_role_id', :validate => true
7
7
 
@@ -10,6 +10,11 @@ class NewsPost < ActiveRecord::Base
10
10
 
11
11
  acts_as_list
12
12
 
13
+ searchable do
14
+ text :title, :body
15
+ time :start_date, :end_date
16
+ end
17
+
13
18
  def self.per_page
14
19
  10
15
20
  end
@@ -1,4 +1,4 @@
1
- require 'enju_core'
1
+ require 'enju_seed'
2
2
 
3
3
  module EnjuNews
4
4
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module EnjuNews
2
- VERSION = "0.1.0.pre3"
2
+ VERSION = "0.1.0.pre4"
3
3
  end