muck-raker 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +21 -8
- data/Rakefile +6 -0
- data/VERSION +1 -1
- data/app/controllers/admin/{recommender → muck}/feeds_controller.rb +2 -2
- data/app/controllers/{recommender → muck}/entries_controller.rb +8 -5
- data/app/controllers/muck/feed_previews_controller.rb +33 -0
- data/app/controllers/muck/feeds_controller.rb +128 -0
- data/app/controllers/{recommender → muck}/recommendations_controller.rb +4 -1
- data/app/controllers/{recommender → muck}/search_controller.rb +3 -1
- data/app/helpers/muck_raker_feeds_helper.rb +24 -0
- data/app/models/attention.rb +13 -1
- data/app/models/click.rb +12 -0
- data/app/models/entry.rb +45 -11
- data/app/models/feed.rb +81 -7
- data/app/models/feed_parent.rb +18 -0
- data/app/models/language.rb +14 -0
- data/app/models/oai_endpoint.rb +12 -0
- data/app/models/raker_mailer.rb +16 -0
- data/app/models/recommendation.rb +13 -0
- data/app/models/service.rb +14 -0
- data/app/models/subject.rb +8 -0
- data/app/models/tag_cloud.rb +14 -1
- data/app/views/admin/feeds/index.html.erb +65 -0
- data/app/views/entries/_related_entry.html.erb +4 -0
- data/app/views/entries/_result_status.html.erb +3 -3
- data/app/views/entries/details.html.erb +19 -22
- data/app/views/entries/index.html.erb +1 -1
- data/app/views/entries/show.html.erb +4 -7
- data/app/views/feed_previews/new.html.erb +1 -0
- data/app/views/feed_previews/select_feeds.html.erb +6 -0
- data/app/views/feeds/_entry.html.erb +1 -0
- data/app/views/feeds/_feed.html.erb +9 -0
- data/app/views/feeds/index.html.erb +30 -94
- data/app/views/feeds/new.html.erb +1 -109
- data/app/views/feeds/new_extended.html.erb +1 -0
- data/app/views/feeds/show.html.erb +6 -0
- data/app/views/parts/_add_extended_feed.html.erb +31 -0
- data/app/views/parts/_add_feed.html.erb +20 -0
- data/app/views/parts/_add_single_feed.html.erb +21 -0
- data/app/views/parts/_select_feed.html.erb +4 -0
- data/app/views/raker_mailer/notification_feed_added.text.ar.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.ar.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.bg.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.bg.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.ca.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.ca.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.cs.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.cs.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.da.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.da.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.de.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.de.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.el.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.el.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.es.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.es.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.et.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.et.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.fa.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.fa.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.fi.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.fi.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.fr.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.fr.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.gl.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.gl.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.hi.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.hi.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.hr.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.hr.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.hu.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.hu.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.id.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.id.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.it.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.it.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.iw.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.iw.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.ja.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.ja.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.ko.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.ko.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.lt.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.lt.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.lv.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.lv.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.mt.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.mt.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.nl.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.nl.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.no.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.no.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.pl.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.pl.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.pt-PT.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.pt-PT.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.ro.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.ro.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.ru.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.ru.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.sk.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.sk.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.sl.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.sl.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.sq.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.sq.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.sr.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.sr.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.sv.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.sv.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.th.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.th.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.tl.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.tl.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.tr.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.tr.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.uk.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.uk.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.vi.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.vi.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.zh-CN.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.zh-CN.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.zh-TW.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.zh-TW.plain.erb +5 -0
- data/app/views/raker_mailer/notification_feed_added.text.zh.html.erb +3 -0
- data/app/views/raker_mailer/notification_feed_added.text.zh.plain.erb +5 -0
- data/app/views/recommendations/index.xml.builder +4 -4
- data/config/muck_raker_routes.rb +10 -13
- data/db/migrate/20090623181458_add_grain_size_to_entries.rb +6 -6
- data/db/migrate/20090623193525_add_grain_size_to_tag_clouds.rb +12 -0
- data/db/migrate/20090717175825_normalize_entries_subjects.rb +1 -0
- data/db/migrate/20090721043213_change_services_title_to_name.rb +9 -0
- data/db/migrate/20090721054927_remove_services_not_null_from_feeds.rb +9 -0
- data/db/migrate/20090723050510_create_feed_parents.rb +17 -0
- data/lib/active_record/acts/muck_feed_parent.rb +22 -0
- data/lib/muck_raker/muck_custom_form_builder.rb +22 -0
- data/lib/muck_raker/services.rb +6 -0
- data/lib/muck_raker/tasks.rb +8 -4
- data/lib/muck_raker.rb +7 -2
- data/locales/ar.yml +48 -15
- data/locales/bg.yml +48 -15
- data/locales/ca.yml +48 -15
- data/locales/cs.yml +48 -15
- data/locales/da.yml +48 -15
- data/locales/de.yml +48 -15
- data/locales/el.yml +48 -15
- data/locales/en.yml +46 -17
- data/locales/es.yml +48 -15
- data/locales/et.yml +48 -15
- data/locales/fa.yml +48 -15
- data/locales/fi.yml +49 -16
- data/locales/fr.yml +48 -15
- data/locales/gl.yml +48 -15
- data/locales/hi.yml +48 -15
- data/locales/hr.yml +48 -15
- data/locales/hu.yml +48 -15
- data/locales/id.yml +48 -15
- data/locales/it.yml +49 -16
- data/locales/iw.yml +48 -15
- data/locales/ja.yml +48 -15
- data/locales/ko.yml +48 -15
- data/locales/lt.yml +48 -15
- data/locales/lv.yml +48 -15
- data/locales/mt.yml +48 -15
- data/locales/nl.yml +48 -15
- data/locales/no.yml +48 -15
- data/locales/pl.yml +48 -15
- data/locales/pt-PT.yml +48 -15
- data/locales/ro.yml +48 -15
- data/locales/ru.yml +48 -15
- data/locales/sk.yml +48 -15
- data/locales/sl.yml +48 -15
- data/locales/sq.yml +48 -15
- data/locales/sr.yml +48 -15
- data/locales/sv.yml +48 -15
- data/locales/th.yml +48 -15
- data/locales/tl.yml +48 -15
- data/locales/tr.yml +48 -15
- data/locales/uk.yml +48 -15
- data/locales/vi.yml +48 -15
- data/locales/zh-CN.yml +48 -15
- data/locales/zh-TW.yml +48 -15
- data/locales/zh.yml +48 -15
- data/muck-raker.gemspec +298 -26
- data/rails/init.rb +0 -9
- data/test/rails_root/app/models/user.rb +31 -1
- data/test/rails_root/app/views/default/index.html.erb +15 -0
- data/test/rails_root/app/views/layouts/default.html.erb +38 -24
- data/test/rails_root/app/views/layouts/popup.html.erb +40 -0
- data/test/rails_root/config/database.yml +12 -11
- data/test/rails_root/config/environment.rb +4 -1
- data/test/rails_root/config/global_config.yml +3 -0
- data/test/rails_root/db/migrate/20090402234137_create_languages.rb +18 -0
- data/test/rails_root/db/migrate/20090426041056_create_countries.rb +15 -0
- data/test/rails_root/db/migrate/20090426041103_create_states.rb +18 -0
- data/test/rails_root/{migrate → db/migrate}/20090602191243_create_muck_raker.rb +0 -0
- data/test/rails_root/{migrate → db/migrate}/20090619211125_create_tag_clouds.rb +0 -0
- data/test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb +16 -0
- data/test/rails_root/db/migrate/20090623193525_add_grain_size_to_tag_clouds.rb +12 -0
- data/test/rails_root/{migrate → db/migrate}/20090703175825_denormalize_entries_subjects.rb +0 -0
- data/test/rails_root/db/migrate/20090716035935_change_tag_cloud_grain_sizes.rb +9 -0
- data/test/rails_root/db/migrate/20090717175825_normalize_entries_subjects.rb +18 -0
- data/test/rails_root/db/migrate/20090721043213_change_services_title_to_name.rb +9 -0
- data/test/rails_root/db/migrate/20090721054927_remove_services_not_null_from_feeds.rb +9 -0
- data/test/rails_root/db/migrate/20090723050510_create_feed_parents.rb +17 -0
- data/test/rails_root/db/schema.rb +289 -54
- data/test/rails_root/public/images/fancybox/fancy_closebox.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_left.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_progress.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_right.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_e.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_n.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_ne.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_nw.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_s.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_se.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_sw.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_w.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_title_left.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_title_main.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_title_right.png +0 -0
- data/test/rails_root/public/javascripts/jquery/jquery.easing.js +1 -0
- data/test/rails_root/public/javascripts/jquery/jquery.fancybox.js +9 -0
- data/test/rails_root/public/javascripts/muck.js +7 -3
- data/test/rails_root/public/stylesheets/application.css +1 -0
- data/test/rails_root/public/stylesheets/jquery/jquery.fancybox.css +44 -0
- data/test/rails_root/public/stylesheets/styles.css +6 -2
- data/test/rails_root/test/factories.rb +14 -1
- data/test/rails_root/test/functional/feed_previews_controller_test.rb +32 -0
- data/test/rails_root/test/functional/feeds_controller_test.rb +57 -5
- data/test/rails_root/test/shoulda_macros/controller.rb +5 -1
- data/test/rails_root/test/test_helper.rb +2 -0
- data/test/rails_root/test/unit/entry_test.rb +30 -5
- data/test/rails_root/test/unit/feed_parent_test.rb +10 -0
- data/test/rails_root/test/unit/feed_test.rb +55 -3
- data/test/rails_root/test/unit/raker_mailer_test.rb +26 -0
- data/test/rails_root/test/unit/tag_cloud_test.rb +16 -28
- data/test/rails_root/test/unit/user_test.rb +11 -0
- metadata +211 -18
- data/app/controllers/recommender/default_controller.rb +0 -15
- data/app/controllers/recommender/feeds_controller.rb +0 -64
- data/app/views/default/tour.html.erb +0 -15
- data/app/views/default/widgets.html.erb +0 -4
- data/test/rails_root/migrate/20090623181458_add_grain_size_to_entries.rb +0 -16
@@ -1,26 +1,40 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml"
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
3
|
+
<head>
|
4
|
+
<title><%= @page_title || GlobalConfig.application_name %></title>
|
5
|
+
<meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
|
6
|
+
<meta http-equiv="imagetoolbar" content="no" />
|
7
|
+
<meta name="distribution" content="all" />
|
8
|
+
<meta name="robots" content="all" />
|
9
|
+
<meta name="resource-type" content="document" />
|
10
|
+
<meta name="MSSmartTagsPreventParsing" content="true" />
|
11
|
+
<%= stylesheet_link_tag 'blueprint/print.css', :media => "print" %>
|
12
|
+
<!--[if IE]><link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
|
13
|
+
<%= stylesheet_link_tag %W{ reset blueprint/liquid_screen.css jquery/jquery.fancybox.css styles }, :cache => true %>
|
14
|
+
<%= stylesheet_link_tag 'application' %>
|
15
|
+
<%= javascript_include_tag %w{
|
16
|
+
jquery/jquery.js
|
17
|
+
jquery/jquery-ui.js
|
18
|
+
jquery/jrails.js
|
19
|
+
jquery/jquery.jgrowl.js
|
20
|
+
jquery/jquery.tips.js
|
21
|
+
jquery/jquery.easing.js
|
22
|
+
jquery/jquery.fancybox.js
|
23
|
+
muck.js
|
24
|
+
application.js }, :cache => 'all_js_cached' %>
|
25
|
+
<%= javascript_tag %[var AUTH_TOKEN = #{form_authenticity_token.inspect};] if protect_against_forgery? %>
|
26
|
+
<%= yield :head -%>
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<div id="wrapper" class="container">
|
30
|
+
<div id="content-wrapper">
|
19
31
|
<div id="content">
|
20
|
-
|
21
|
-
|
22
|
-
</div>
|
23
|
-
<div id="footer">
|
32
|
+
<%= yield :layout %>
|
33
|
+
</div>
|
24
34
|
</div>
|
25
|
-
</
|
26
|
-
|
35
|
+
</div>
|
36
|
+
<script type="text/javascript" language="JavaScript">
|
37
|
+
<%= yield :javascript %>
|
38
|
+
</script>
|
39
|
+
</body>
|
40
|
+
</html>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
3
|
+
<head>
|
4
|
+
<title><%= @page_title || GlobalConfig.application_name %></title>
|
5
|
+
<meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
|
6
|
+
<meta http-equiv="imagetoolbar" content="no" />
|
7
|
+
<meta name="distribution" content="all" />
|
8
|
+
<meta name="robots" content="all" />
|
9
|
+
<meta name="resource-type" content="document" />
|
10
|
+
<meta name="MSSmartTagsPreventParsing" content="true" />
|
11
|
+
<%= stylesheet_link_tag 'blueprint/print.css', :media => "print" %>
|
12
|
+
<!--[if IE]><link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
|
13
|
+
<%= stylesheet_link_tag %W{ reset blueprint/liquid_screen.css jquery/jquery.fancybox.css styles }, :cache => true %>
|
14
|
+
<%= stylesheet_link_tag 'application' %>
|
15
|
+
<%= javascript_include_tag %w{
|
16
|
+
jquery/jquery.js
|
17
|
+
jquery/jquery-ui.js
|
18
|
+
jquery/jrails.js
|
19
|
+
jquery/jquery.jgrowl.js
|
20
|
+
jquery/jquery.tips.js
|
21
|
+
jquery/jquery.easing.js
|
22
|
+
jquery/jquery.fancybox.js
|
23
|
+
muck.js
|
24
|
+
application.js }, :cache => 'all_js_cached' %>
|
25
|
+
<%= javascript_tag %[var AUTH_TOKEN = #{form_authenticity_token.inspect};] if protect_against_forgery? %>
|
26
|
+
<%= yield :head -%>
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<div id="popup_wrapper" class="container">
|
30
|
+
<div id="content-wrapper">
|
31
|
+
<div id="content">
|
32
|
+
<%= yield :layout %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<script type="text/javascript" language="JavaScript">
|
37
|
+
<%= yield :javascript %>
|
38
|
+
</script>
|
39
|
+
</body>
|
40
|
+
</html>
|
@@ -1,14 +1,15 @@
|
|
1
1
|
development:
|
2
|
-
adapter:
|
3
|
-
database:
|
4
|
-
|
2
|
+
adapter: mysql
|
3
|
+
database: muck_raker
|
4
|
+
username: root
|
5
|
+
password:
|
6
|
+
host: localhost
|
7
|
+
encoding: utf8
|
5
8
|
|
6
9
|
test:
|
7
|
-
adapter:
|
8
|
-
database:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
database: db/production.sqlite3
|
14
|
-
timeout: 5000
|
10
|
+
adapter: mysql
|
11
|
+
database: muck_raker_test
|
12
|
+
username: root
|
13
|
+
password:
|
14
|
+
host: localhost
|
15
|
+
encoding: utf8
|
@@ -1,4 +1,4 @@
|
|
1
|
-
RAILS_GEM_VERSION = '2.3.
|
1
|
+
RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION
|
2
2
|
|
3
3
|
require File.join(File.dirname(__FILE__), 'boot')
|
4
4
|
|
@@ -21,6 +21,9 @@ Rails::Initializer.run do |config|
|
|
21
21
|
config.gem "bcrypt-ruby", :lib => "bcrypt", :version => ">=2.0.5"
|
22
22
|
config.gem 'mbleigh-acts-as-taggable-on', :lib => "acts-as-taggable-on", :source => "http://gems.github.com"
|
23
23
|
config.gem "collectiveidea-awesome_nested_set", :lib => 'awesome_nested_set', :source => "http://gems.github.com"
|
24
|
+
config.gem "muck-feedbag", :lib => "feedbag", :source => "http://gems.github.com"
|
25
|
+
config.gem "pauldix-feedzirra", :lib => 'feedzirra', :source => "http://gems.github.com"
|
26
|
+
config.gem "httparty"
|
24
27
|
config.gem "friendly_id", :version => '>=2.1.3'
|
25
28
|
config.gem 'muck-engine', :lib => 'muck_engine'
|
26
29
|
config.gem 'muck-users', :lib => 'muck_users'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateLanguages < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :languages, :force => true do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :english_name
|
6
|
+
t.string :locale
|
7
|
+
t.boolean :supported, :default => true
|
8
|
+
t.integer :is_default, :default => false
|
9
|
+
end
|
10
|
+
add_index :languages, :name
|
11
|
+
add_index :languages, :locale
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :languages
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateCountries < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :countries, :force => true do |t|
|
4
|
+
t.string "name", :limit => 128, :default => "", :null => false
|
5
|
+
t.string "abbreviation", :limit => 3, :default => "", :null => false
|
6
|
+
t.integer "sort", :default => 1000, :null => false
|
7
|
+
end
|
8
|
+
add_index :countries, :name
|
9
|
+
add_index :countries, :abbreviation
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :countries
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateStates < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :states, :force => true do |t|
|
4
|
+
t.string "name", :limit => 128, :default => "", :null => false
|
5
|
+
t.string "abbreviation", :limit => 3, :default => "", :null => false
|
6
|
+
t.integer "country_id", :limit => 8, :null => false
|
7
|
+
end
|
8
|
+
|
9
|
+
add_index :states, :country_id
|
10
|
+
add_index :states, :name
|
11
|
+
add_index :states, :abbreviation
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table :states
|
17
|
+
end
|
18
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class AddGrainSizeToEntries < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :feeds, :default_grain_size, :string, :default => "unknown"
|
4
|
+
execute "UPDATE feeds SET default_grain_size = 'course' WHERE ocw = true"
|
5
|
+
remove_column :feeds, :ocw
|
6
|
+
|
7
|
+
add_column :entries, :grain_size, :string, :default => "unknown"
|
8
|
+
add_index "entries", ["grain_size"]
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.down
|
12
|
+
remove_column :feeds, :default_grain_size
|
13
|
+
remove_column :entries, :grain_size
|
14
|
+
add_column :fields, :ocw, :boolean, :default => false
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class AddGrainSizeToTagClouds < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :tag_clouds, :grain_size, :string, :default => "all"
|
4
|
+
remove_index "tag_clouds", ["language_id", "filter"]
|
5
|
+
add_index "tag_clouds", ["grain_size", "language_id", "filter"], {:unique => true}
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :tag_clouds, :grain_size
|
10
|
+
add_index "entries", ["grain_size"]
|
11
|
+
end
|
12
|
+
end
|
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class ChangeTagCloudGrainSizes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
execute "update tag_clouds set grain_size = 'all' where grain_size = 'unknown'"
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.down
|
7
|
+
execute "update tag_clouds set grain_size = 'unknown' where grain_size = 'all'"
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class NormalizeEntriesSubjects < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
|
4
|
+
remove_column :entries_subjects, :language_id
|
5
|
+
remove_column :entries_subjects, :grain_size
|
6
|
+
execute "delete from entries_subjects where entry_id IN (select entries.id from entries inner join feeds ON feeds.id = entries.feed_id where feeds.uri = 'http://ndr.nsdl.org/oai?verb=ListRecords&metadataPrefix=nsdl_dc&set=439869');"
|
7
|
+
execute "update feeds set last_harvested_at = '1969-01-01' where feeds.uri = 'http://ndr.nsdl.org/oai?verb=ListRecords&metadataPrefix=nsdl_dc&set=439869'"
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.down
|
11
|
+
add_column :entries_subjects, :language_id, :integer
|
12
|
+
add_column :entries_subjects, :grain_size, :string
|
13
|
+
add_index "entries_subjects", ["language_id"]
|
14
|
+
add_index "entries_subjects", ["grain_size"]
|
15
|
+
execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, language_id, grain_size, entry_id);"
|
16
|
+
execute "UPDATE entries_subjects AS es INNER JOIN entries AS e ON e.id = es.entry_id SET es.language_id = e.language_id, es.grain_size = e.grain_size"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateFeedParents < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :feed_parents, :force => true do |t|
|
4
|
+
t.integer :feed_id
|
5
|
+
t.integer :ownable_id
|
6
|
+
t.string :ownable_type
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
|
10
|
+
add_index :feed_parents, ["feed_id"]
|
11
|
+
add_index :feed_parents, ["ownable_id", "ownable_type"]
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :feed_parents
|
16
|
+
end
|
17
|
+
end
|