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.
- checksums.yaml +4 -4
- data/app/models/news_post.rb +6 -1
- data/lib/enju_news/engine.rb +1 -1
- data/lib/enju_news/version.rb +1 -1
- data/spec/cassette_library/NewsFeed/should_fetch_feeds.yml +496 -872
- data/spec/cassette_library/NewsFeed/should_get_content.yml +463 -806
- data/spec/cassette_library/NewsFeed/should_not_get_content_if_the_feed_is_invalid.yml +35 -68
- data/spec/cassette_library/NewsFeed/should_reload_content.yml +463 -806
- data/spec/dummy/app/controllers/application_controller.rb +2 -48
- data/spec/dummy/app/models/user.rb +5 -91
- data/spec/dummy/config/application.rb +1 -2
- data/spec/dummy/config/application.yml +42 -0
- data/spec/dummy/config/initializers/devise.rb +2 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
- data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -3
- data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
- data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -8
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
- data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
- data/spec/dummy/db/schema.rb +185 -15
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/library.rb +13 -0
- data/spec/factories/user.rb +33 -11
- data/spec/fixtures/libraries.yml +102 -0
- data/spec/fixtures/user_groups.yml +45 -0
- data/spec/spec_helper.rb +16 -17
- metadata +96 -53
- data/lib/generators/enju_news/views_generator.rb +0 -18
- data/spec/dummy/app/models/library_group.rb +0 -86
- data/spec/dummy/app/models/role.rb +0 -46
- data/spec/dummy/app/models/user_group.rb +0 -40
- data/spec/dummy/app/models/user_has_role.rb +0 -5
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/lib/master_model.rb +0 -19
- data/spec/dummy/lib/url_validator.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12dea60838871f4405ef0166becd355ee8632738
|
4
|
+
data.tar.gz: e83c72a44bfdaa508a448c2eef3039b50dd4ce3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc7d7e4b550785919fc40cfc3da1cffbda6c738bbbb46042225d9dcef29c1a998b1afd4325dc5756f833a5c8366d9ea148032548e799e35f684fe484988dab49
|
7
|
+
data.tar.gz: 97bfa7c134ae2021ca7ffaa92a66465dcee55cb10f0224de0ba23785d6df72a5c2330de70ee6ea133c246930cb76c83cdf4ed636670d8771042813fb5cc884f7
|
data/app/models/news_post.rb
CHANGED
@@ -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.
|
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
|
data/lib/enju_news/engine.rb
CHANGED
data/lib/enju_news/version.rb
CHANGED