muck-services 0.1.38 → 0.1.39
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +16 -16
- data/VERSION +1 -1
- data/app/controllers/muck/entries_controller.rb +5 -1
- data/app/controllers/muck/feeds_controller.rb +1 -1
- data/app/controllers/muck/recommendations_controller.rb +1 -1
- data/app/controllers/muck/topics_controller.rb +9 -9
- data/app/models/entry.rb +1 -1
- data/app/models/feed.rb +1 -0
- data/app/views/entries/_result_status.html.erb +1 -1
- data/app/views/entries/browse_by_tags.html.erb +1 -1
- data/app/views/entries/search.pjs.erb +18 -0
- data/app/views/entries/search.rdf.builder +36 -0
- data/app/views/entries/search.rss.builder +33 -0
- data/app/views/entries/search.xml.builder +17 -0
- data/{public/javascripts/recommenderextension.user.js → app/views/recommendations/greasemonkey.user.js.erb} +8 -6
- data/app/views/recommendations/index.pjs.erb +1 -1
- data/app/views/recommendations/real_time.pjs.erb +1 -0
- data/app/views/recommendations/real_time.xml.builder +1 -0
- data/app/views/services_mailer/notification_feed_added.text.html.erb +1 -1
- data/app/views/services_mailer/notification_feed_added.text.plain.erb +1 -1
- data/config/muck_services_routes.rb +2 -0
- data/lib/muck_services/tasks.rb +26 -25
- data/locales/ar.yml +2 -0
- data/locales/bg.yml +2 -0
- data/locales/ca.yml +3 -1
- data/locales/cs.yml +2 -0
- data/locales/da.yml +4 -2
- data/locales/de.yml +2 -0
- data/locales/el.yml +2 -0
- data/locales/en.yml +1 -1
- data/locales/es.yml +2 -0
- data/locales/et.yml +2 -0
- data/locales/fa.yml +2 -0
- data/locales/fi.yml +2 -0
- data/locales/fr.yml +2 -0
- data/locales/gl.yml +4 -2
- data/locales/hi.yml +2 -0
- data/locales/hr.yml +2 -0
- data/locales/hu.yml +2 -0
- data/locales/id.yml +3 -1
- data/locales/it.yml +3 -1
- data/locales/iw.yml +2 -0
- data/locales/ja.yml +2 -0
- data/locales/ko.yml +2 -0
- data/locales/lt.yml +2 -0
- data/locales/lv.yml +2 -0
- data/locales/mt.yml +2 -0
- data/locales/nl.yml +2 -0
- data/locales/no.yml +2 -0
- data/locales/pl.yml +2 -0
- data/locales/pt-PT.yml +2 -0
- data/locales/ro.yml +2 -0
- data/locales/ru.yml +2 -0
- data/locales/sk.yml +2 -0
- data/locales/sl.yml +2 -0
- data/locales/sq.yml +2 -0
- data/locales/sr.yml +2 -0
- data/locales/sv.yml +2 -0
- data/locales/th.yml +159 -157
- data/locales/tl.yml +2 -0
- data/locales/tr.yml +2 -0
- data/locales/uk.yml +2 -0
- data/locales/vi.yml +2 -0
- data/locales/zh-CN.yml +3 -1
- data/locales/zh-TW.yml +14 -12
- data/locales/zh.yml +3 -1
- data/muck-services.gemspec +8 -14
- data/test/rails_root/test/functional/feeds_controller_test.rb +4 -3
- data/test/rails_root/test/unit/feed_test.rb +1 -0
- metadata +89 -64
- data/app/views/search/_languages.html.erb +0 -6
- data/app/views/search/_result.html.erb +0 -9
- data/app/views/search/_search_box.html.erb +0 -9
- data/app/views/search/index.html.erb +0 -5
- data/app/views/search/results.atom.builder +0 -27
- data/app/views/search/results.html.erb +0 -35
- data/app/views/search/results.pjs.erb +0 -13
- data/app/views/search/results.rdf.builder +0 -24
- data/app/views/search/results.rss.builder +0 -31
- data/app/views/search/results.xml.builder +0 -19
data/README.rdoc
CHANGED
@@ -47,27 +47,27 @@ Muck raker aggregates data feeds and analyzes the results to make recommendation
|
|
47
47
|
=== environment.rb
|
48
48
|
Add the following to environment.rb to include all the required gems:
|
49
49
|
|
50
|
-
config.gem "muck-feedbag", :lib => "feedbag", :source => "http://gems.github.com"
|
51
|
-
config.gem "pauldix-feedzirra", :lib => 'feedzirra', :source => "http://gems.github.com"
|
52
|
-
config.gem 'muck-engine', :lib => 'muck_engine'
|
53
|
-
config.gem 'muck-users', :lib => 'muck_users'
|
54
|
-
config.gem 'muck-solr', :lib => 'acts_as_solr'
|
55
|
-
|
56
|
-
|
57
|
-
config.gem 'muck-
|
58
|
-
config.gem 'muck-
|
59
|
-
config.gem 'muck-
|
50
|
+
config.gem "muck-feedbag", :lib => "feedbag", :source => "http://gems.github.com"
|
51
|
+
config.gem "pauldix-feedzirra", :lib => 'feedzirra', :source => "http://gems.github.com"
|
52
|
+
config.gem 'muck-engine', :lib => 'muck_engine'
|
53
|
+
config.gem 'muck-users', :lib => 'muck_users'
|
54
|
+
config.gem 'muck-solr', :lib => 'acts_as_solr'
|
55
|
+
|
56
|
+
The following are optional but almost always used so you may as well pull them in.
|
57
|
+
config.gem 'muck-comments', :lib => 'muck_comments'
|
58
|
+
config.gem 'muck-activities', :lib => 'muck_activities'
|
59
|
+
config.gem 'muck-shares', :lib => 'muck_shares'
|
60
|
+
config.gem 'muck-raker', :lib => 'muck_raker'
|
60
61
|
|
61
62
|
=== Database
|
62
63
|
There are a number of rake tasks meant to help you get your database setup:
|
63
|
-
rake muck:services:db:bootstrap # Loads some feeds oai endpoints to get things started
|
64
|
-
rake muck:services:db:bootstrap_services # Deletes and reloads all services and service categories
|
65
|
-
rake muck:services:db:populate # Flags the languages that the muck raker supports
|
66
|
-
rake muck:services:import_attention # Imports attention data for use in testing
|
64
|
+
rake muck:services:db:bootstrap # Loads some feeds oai endpoints to get things started
|
65
|
+
rake muck:services:db:bootstrap_services # Deletes and reloads all services and service categories
|
66
|
+
rake muck:services:db:populate # Flags the languages that the muck raker supports
|
67
|
+
rake muck:services:import_attention # Imports attention data for use in testing
|
67
68
|
|
68
69
|
=== Bring in required files - migrations etc:
|
69
|
-
rake muck:services:sync # Sync files from muck services.
|
70
|
-
|
70
|
+
rake muck:services:sync # Sync files from muck services.
|
71
71
|
|
72
72
|
=== Identity Feeds
|
73
73
|
Specific feeds can be attached to objects. For example, a user might produce a blog or a flickr photo stream. The identity feed system associated the resulting
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.39
|
@@ -28,11 +28,15 @@ class Muck::EntriesController < ApplicationController
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def search
|
31
|
-
@search = params[:q]
|
31
|
+
@search = params[:q] || params[:terms]
|
32
32
|
@grain_size = params[:grain_size] || 'all'
|
33
33
|
_search
|
34
34
|
respond_to do |format|
|
35
35
|
format.html { render :template => 'entries/search' }
|
36
|
+
format.pjs { render :template => 'entries/search', :layout => false }
|
37
|
+
format.rdf { render :template => 'entries/search', :layout => false }
|
38
|
+
format.rss { render :template => 'entries/search', :layout => false }
|
39
|
+
format.xml { render :template => 'entries/search', :layout => false }
|
36
40
|
end
|
37
41
|
end
|
38
42
|
|
@@ -15,7 +15,7 @@ class Muck::FeedsController < ApplicationController
|
|
15
15
|
|
16
16
|
# pass layout=popup to remove most of the chrome
|
17
17
|
def show
|
18
|
-
@feed = Feed.find(params[:id])
|
18
|
+
@feed = Feed.find(params[:id], :include => :contributor)
|
19
19
|
@entries = @feed.entries.paginate(:page => @page, :per_page => @per_page)
|
20
20
|
respond_to do |format|
|
21
21
|
format.html { render :template => 'feeds/show', :layout => get_layout_by_params }
|
@@ -21,7 +21,7 @@ class Muck::RecommendationsController < ApplicationController
|
|
21
21
|
@limit = params[:limit] ? params[:limit].to_i : 5
|
22
22
|
@limit = 25 if @limit > 25
|
23
23
|
@omit_feeds = params[:omit_feeds]
|
24
|
-
@order = params[:order] || "rank"
|
24
|
+
@order = params[:order] == 'relevance' ? 'relevance desc' : (params[:order] || "rank asc, relevance desc")
|
25
25
|
|
26
26
|
Entry.track_time_on_page(session, @uri)
|
27
27
|
@entry = Entry.recommender_entry(@uri)
|
@@ -81,17 +81,17 @@ class Muck::TopicsController < ApplicationController
|
|
81
81
|
@terms = CGI.unescape(params[:id])
|
82
82
|
@page_title = @title = @terms.titleize
|
83
83
|
|
84
|
-
@photo_feeds = Service.build_photo_feeds(@terms, current_user, params[:service_ids])
|
85
|
-
@video_feeds = Service.build_video_feeds(@terms, current_user, params[:service_ids])
|
86
|
-
@bookmark_feeds = Service.build_bookmark_feeds(@terms, current_user, params[:service_ids])
|
87
|
-
@music_feeds = Service.build_music_feeds(@terms, current_user, params[:service_ids])
|
88
|
-
@news_feeds = Service.build_news_feeds(@terms, current_user, params[:service_ids])
|
89
|
-
@blog_feeds = Service.build_blog_feeds(@terms, current_user, params[:service_ids])
|
90
|
-
@search_feeds = Service.build_search_feeds(@terms, current_user, params[:service_ids])
|
84
|
+
@photo_feeds = Service.build_photo_feeds(@terms, current_user, params[:service_ids]) || []
|
85
|
+
@video_feeds = Service.build_video_feeds(@terms, current_user, params[:service_ids]) || []
|
86
|
+
@bookmark_feeds = Service.build_bookmark_feeds(@terms, current_user, params[:service_ids]) || []
|
87
|
+
@music_feeds = Service.build_music_feeds(@terms, current_user, params[:service_ids]) || []
|
88
|
+
@news_feeds = Service.build_news_feeds(@terms, current_user, params[:service_ids]) || []
|
89
|
+
@blog_feeds = Service.build_blog_feeds(@terms, current_user, params[:service_ids]) || []
|
90
|
+
@search_feeds = Service.build_search_feeds(@terms, current_user, params[:service_ids]) || []
|
91
91
|
|
92
|
-
@general_feeds = Service.build_general_feeds(@terms, current_user, params[:service_ids])
|
92
|
+
@general_feeds = Service.build_general_feeds(@terms, current_user, params[:service_ids]) || []
|
93
93
|
|
94
|
-
@discovered_feeds = Overlord::GoogleFeedRequest.find_feeds(@terms)
|
94
|
+
@discovered_feeds = Overlord::GoogleFeedRequest.find_feeds(@terms) || []
|
95
95
|
|
96
96
|
@feeds = @photo_feeds + @video_feeds + @bookmark_feeds + @music_feeds + @news_feeds + @blog_feeds + @search_feeds + @general_feeds + @discovered_feeds
|
97
97
|
|
data/app/models/entry.rb
CHANGED
@@ -37,7 +37,7 @@ class Entry < ActiveRecord::Base
|
|
37
37
|
|
38
38
|
has_many :related_to, :foreign_key => 'entry_id', :class_name => 'Recommendation'
|
39
39
|
has_many :related_entries, :through => :related_to, :source => :dest_entry do
|
40
|
-
def top(details=false, limit=5, omit_feeds=nil, order='rank
|
40
|
+
def top(details=false, limit=5, omit_feeds=nil, order='rank asc, relevance desc')
|
41
41
|
select = 'entries.feed_id, recommendations.id recommendation_id, recommendations.relevance, ' +
|
42
42
|
'entries.title, feeds.short_title collection, recommendations.dest_entry_id '
|
43
43
|
select << ', entries.author, entries.published_at, recommendations.clicks, entries.permalink, ' +
|
data/app/models/feed.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<%= link_to('[' + t('muck.services.show_tagged_courses') + ']', @tag_filter.nil? ? {:q => @search, :grain_size => 'course'} : {:grain_size => 'course'}) %>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
<%= link_to('[' + t('muck.services.explore'
|
13
|
+
<%= link_to('[' + t('muck.services.explore') + ']', topic_path(safe_id(@search))) rescue '' %>
|
14
14
|
</span>
|
15
15
|
</div>
|
16
16
|
</div>
|
@@ -11,6 +11,6 @@
|
|
11
11
|
</div>
|
12
12
|
<% else %>
|
13
13
|
<p><%= @grain_size == 'all' ? t('muck.services.no_tagged_resources', :tags => @search) : t('muck.services.no_tagged_courses', :tags => @tag_filter.split('/').join(', ')) %></p>
|
14
|
-
<p><%= link_to('[' + t('muck.services.explore', :topic => @search.titleize) + ']', topic_path(safe_id(@search))) %></p>
|
14
|
+
<p><%= link_to('[' + t('muck.services.explore', :topic => @search.titleize) + ']', topic_path(safe_id(@search))) if @search %></p>
|
15
15
|
<% end %>
|
16
16
|
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if !@results.blank? %>
|
2
|
+
<% cache({:locale => Language.locale_id, :format => 'pjs', :limit => @limit, :q => @query, :omit_feeds => @omit_feeds}) do %>
|
3
|
+
var recs = <%= @results.to_json %>;
|
4
|
+
var app = "<%= request.protocol + request.host_with_port + '/' %>";
|
5
|
+
document.write('<div class="oer_recommender_container">');
|
6
|
+
document.write('<div class="oer_recommender_list">');
|
7
|
+
for(nRec = 0; nRec < recs.length; nRec++) {
|
8
|
+
r = recs[nRec].entry;
|
9
|
+
if (r == null) r = recs[nRec].attributes;
|
10
|
+
if (r == null) r = recs[nRec];
|
11
|
+
document.write('<p class="oer_recommender_item">');
|
12
|
+
document.write('<a class="oer_recommender_recommendation_link" href="' + app + 'visits/' + r.id + '">' + r.title + ' (' + r.collection + ')</a>');
|
13
|
+
document.write('</p>');
|
14
|
+
}
|
15
|
+
document.write('</div>');
|
16
|
+
document.write('</div>');
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
headers["Content-Type"] = "application/rdf+xml"
|
2
|
+
xml.instruct!
|
3
|
+
|
4
|
+
xml.RDF :RDF, "xmlns:RDF" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "xmlns:result" => "http://www.folksemantic.com/rdf#" do
|
5
|
+
|
6
|
+
xml.RDF :Description, "RDF:about"=>"http://www.folksemantic.com/about/search/rdf" do
|
7
|
+
xml.result :name do
|
8
|
+
xml.text! 'Results for ' + html_escape(request.env["REQUEST_URI"])
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
@base_uri = request.protocol + request.host_with_port + '/visits/'
|
13
|
+
@results.each do |result|
|
14
|
+
uri = "#{@base_uri}#{result.id}"
|
15
|
+
xml.RDF :Description, "RDF:about" => uri do
|
16
|
+
xml.result :title do
|
17
|
+
xml.text! result.title
|
18
|
+
end
|
19
|
+
xml.result :uri do
|
20
|
+
xml.text! uri
|
21
|
+
end
|
22
|
+
xml.result :description do
|
23
|
+
xml.text! result.description
|
24
|
+
end
|
25
|
+
xml.result :permalink do
|
26
|
+
xml.text! result.permalink
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
xml.RDF :Seq, "RDF:about" => url_for(:only_path => false, :controller => 'entries') do
|
32
|
+
@results.each do |result|
|
33
|
+
xml.RDF :li, "RDF:resource" => "#{@base_uri}#{result.id}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
headers["Content-Type"] = "application/rss+xml"
|
2
|
+
xml.instruct! :xml, :version=>"1.0"
|
3
|
+
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
4
|
+
xml.channel do
|
5
|
+
|
6
|
+
xml.title 'Folksemantic - Search Results for: ' + URI.unescape(@search)
|
7
|
+
xml.link url_for(request.env["REQUEST_URI"])
|
8
|
+
xml.pubDate CGI.rfc1123_date Time.now
|
9
|
+
xml.description 'Folksemanic - Search Results for: ' + URI.unescape(@search)
|
10
|
+
xml.generator 'Folksemantic'
|
11
|
+
|
12
|
+
xml.image do
|
13
|
+
xml.title 'Folksemantic'
|
14
|
+
xml.url 'http://www.folksemantic.com/images/folksemantic/logo-folksemantic-sm.gif'
|
15
|
+
xml.link 'http://www.folksemantic.com/'
|
16
|
+
xml.description 'Search, recommend, collaborate, and remix open educational resources'
|
17
|
+
end
|
18
|
+
|
19
|
+
@base_uri = request.protocol + request.host_with_port + '/visits/'
|
20
|
+
@results.each do |result|
|
21
|
+
xml.item do
|
22
|
+
xml.title result.title
|
23
|
+
uri = "#{@base_uri}#{result.id}"
|
24
|
+
xml.link uri
|
25
|
+
xml.guid uri
|
26
|
+
xml.pubDate result.published_at
|
27
|
+
xml.description truncate_words(result.description)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
headers["Content-Type"] = "application/xml"
|
2
|
+
xml.instruct!
|
3
|
+
|
4
|
+
xml.results(:search => URI.unescape(params[:terms]), :hits => @hit_count, :offset => @offset, :limit => @per_page)do
|
5
|
+
@base_uri = request.protocol + request.host_with_port + '/visits/'
|
6
|
+
@results.each do |result|
|
7
|
+
xml.result(:published_at => result.published_at, :relevance => result.solr_score) do
|
8
|
+
xml.id result.id
|
9
|
+
xml.title result.title
|
10
|
+
xml.description truncate_words(result.description)
|
11
|
+
xml.uri "#{@base_uri}#{result.id}"
|
12
|
+
xml.permalink result.permalink
|
13
|
+
xml.direct_link result.direct_link
|
14
|
+
xml.collection result.collection
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// ==UserScript==
|
2
|
-
// @name
|
3
|
-
// @namespace
|
4
|
-
// @description
|
2
|
+
// @name Folksemantic Recommender
|
3
|
+
// @namespace folksemantic.com
|
4
|
+
// @description Displays links to resources related to the web page a user is looking at.
|
5
5
|
// @include *
|
6
6
|
// ==/UserScript==
|
7
7
|
|
@@ -324,7 +324,7 @@ function positionSquatter(recommendersquat, bRealTime) {
|
|
324
324
|
|
325
325
|
function squatterHeader(sTitle, bFrame) {
|
326
326
|
border = bFrame ? "border-top:1px solid black;border-right:1px solid black;border-left:1px solid black;width:240px;" : "border:none;";
|
327
|
-
return '<div id="recommendertop" style="color:#777;background-color:white;font-weight:bold;font-size:14px;font-family:Arial,Helvetica,sans-serif;margin: 2px 3px 0 3px; padding: 2px;' + border + '"><img src="' + sBaseUrl + '/images/folksemantic/logo-folksemantic-gm.gif" style="vertical-align:middle;"/> ' + sTitle + '</div>';
|
327
|
+
return '<div id="recommendertop" style="text-align:left;color:#777;background-color:white;font-weight:bold;font-size:14px;font-family:Arial,Helvetica,sans-serif;margin: 2px 3px 0 3px; padding: 2px;' + border + '"><img src="' + sBaseUrl + '/images/folksemantic/logo-folksemantic-gm.gif" style="margin-left:2px;vertical-align:middle;"/> ' + sTitle + '</div>';
|
328
328
|
}
|
329
329
|
|
330
330
|
function squatterContent(root, recommendations) {
|
@@ -366,8 +366,7 @@ function getRecs(sUrl) {
|
|
366
366
|
});
|
367
367
|
}
|
368
368
|
|
369
|
-
var sBaseUrl = '
|
370
|
-
//var sBaseUrl = 'http://localhost:3000/';
|
369
|
+
var sBaseUrl = '<%= request.protocol + request.host_with_port + '/' %>';
|
371
370
|
var sServiceUrl = sBaseUrl + 'recommendations.xml?';
|
372
371
|
var sShowDocUrl = sBaseUrl + 'resources/';
|
373
372
|
var squatParent = null;
|
@@ -396,3 +395,6 @@ if (sUrlToGetRecsFor.indexOf('http') == 0 && bodyTags && bodyTags.length > 0)
|
|
396
395
|
getRecs(sServiceUrl + "u=" + sUrlToGetRecsFor);
|
397
396
|
}
|
398
397
|
}
|
398
|
+
|
399
|
+
|
400
|
+
|
@@ -39,7 +39,7 @@ for(nRec = 0; nRec < recs.length; nRec++) {
|
|
39
39
|
document.write('<br/><span class="oer_recommender_description">' + truncate(r.description) + '</span>');
|
40
40
|
document.write('<br/><span class="oer_recommender_uri">' + r.permalink + '</span>');
|
41
41
|
<% end -%>
|
42
|
-
document.write('</
|
42
|
+
document.write('</p>');
|
43
43
|
}
|
44
44
|
document.write('</div>');
|
45
45
|
<% if params[:more_link] %>document.write('<div class="oer_recommender_more_link"><a href="' + app + 'resources/<%= @entry.id %>"><%= t('muck.services.gm_more_prompt') %></a></div>');<% end %>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%
|
2
|
+
# TODO: Update this (see real_time.html.erb)
|
2
3
|
@json_recommendations = @entry.json_recommendations(@limit, params[:order] || "mixed", true, params[:omit_feeds] || nil)
|
3
4
|
if !@json_recommendations.nil?
|
4
5
|
@direct_link_text = params[:direct_link_text] || t('muck.services.direct_link')
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<h2>A new feed has been added to <%= @application_name %></h2>
|
2
2
|
<p>Title: <%= @feed.title %></p>
|
3
3
|
<p>Uri: <%= @feed.uri %></p>
|
4
|
-
<p>Manage feeds: <%= link_to
|
4
|
+
<p>Manage feeds: <%= link_to feeds_url(:order => 'created_at', :asc => 'false'), feeds_url(:order => 'created_at', :asc => 'false') %></p>
|
@@ -8,6 +8,7 @@ ActionController::Routing::Routes.draw do |map|
|
|
8
8
|
map.connect '/feed_list', :controller => 'muck/feeds', :action => 'selection_list'
|
9
9
|
|
10
10
|
map.connect 'resources/search', :controller => 'muck/entries', :action => 'search'
|
11
|
+
map.connect 'resources/search.:format', :controller => 'muck/entries', :action => 'search'
|
11
12
|
map.connect 'resources/tags/*tags', :controller => 'muck/entries', :action => 'browse_by_tags'
|
12
13
|
map.resources :resources, :controller => 'muck/entries'
|
13
14
|
|
@@ -28,6 +29,7 @@ ActionController::Routing::Routes.draw do |map|
|
|
28
29
|
|
29
30
|
map.connect 'recommendations/real_time', :controller => 'muck/recommendations', :action => 'real_time'
|
30
31
|
map.connect 'recommendations/get_button', :controller => 'muck/recommendations', :action => 'get_button'
|
32
|
+
map.connect 'recommendations/greasemonkey.user.js', :controller => 'muck/recommendations', :action => 'greasemonkey_script'
|
31
33
|
map.resources :recommendations, :controller => 'muck/recommendations'
|
32
34
|
|
33
35
|
map.resources :identity_feeds, :controller => 'muck/identity_feeds'
|
data/lib/muck_services/tasks.rb
CHANGED
@@ -12,16 +12,18 @@ module MuckServices
|
|
12
12
|
def define
|
13
13
|
|
14
14
|
namespace :muck do
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Fixtures.new(Attention.connection,"attention",Attention,yml).insert_fixtures
|
15
|
+
|
16
|
+
desc "Sync files from muck services."
|
17
|
+
namespace :sync do
|
18
|
+
task :services do
|
19
|
+
path = File.join(File.dirname(__FILE__), *%w[.. ..])
|
20
|
+
system "rsync -ruv #{path}/db ."
|
21
|
+
system "rsync -ruv #{path}/public ."
|
22
|
+
puts "Copied migrations and public files from muck-services"
|
24
23
|
end
|
24
|
+
end
|
25
|
+
|
26
|
+
namespace :services do
|
25
27
|
|
26
28
|
namespace :db do
|
27
29
|
|
@@ -53,14 +55,7 @@ module MuckServices
|
|
53
55
|
yml = File.join(File.dirname(__FILE__), '..', '..', 'db', 'bootstrap',"feeds")
|
54
56
|
Fixtures.new(Feed.connection,"feeds",Feed,yml).insert_fixtures
|
55
57
|
|
56
|
-
|
57
|
-
yml = File.join(File.dirname(__FILE__), '..', '..', 'db', 'bootstrap',"service_categories")
|
58
|
-
Fixtures.new(Service.connection,"service_categories",ServiceCategory,yml).insert_fixtures
|
59
|
-
|
60
|
-
Service.delete_all
|
61
|
-
yml = File.join(File.dirname(__FILE__), '..', '..', 'db', 'bootstrap',"services")
|
62
|
-
Fixtures.new(Service.connection,"services",Service,yml).insert_fixtures
|
63
|
-
|
58
|
+
puts "Added some feeds and oai endpoints to the database"
|
64
59
|
end
|
65
60
|
|
66
61
|
desc "Deletes and reloads all services and service categories"
|
@@ -75,7 +70,7 @@ module MuckServices
|
|
75
70
|
Service.delete_all
|
76
71
|
yml = File.join(File.dirname(__FILE__), '..', '..', 'db', 'bootstrap',"services")
|
77
72
|
Fixtures.new(Service.connection,"services",Service,yml).insert_fixtures
|
78
|
-
|
73
|
+
puts "Added services and service categories"
|
79
74
|
end
|
80
75
|
|
81
76
|
desc "Creates a global feeds aggregation and adds all existing feeds to it"
|
@@ -84,18 +79,14 @@ module MuckServices
|
|
84
79
|
global_feeds_id = Aggregation.create(:title => 'global_feeds', :terms => 'global_feeds',
|
85
80
|
:description => 'Feeds included in the site indexes.').id
|
86
81
|
Feed.find(:all).each { |feed| AggregationFeed.create(:feed_id => feed.id, :aggregation_id => global_feeds_id) }
|
82
|
+
puts "Added a global feed aggregation and added all existing feeds to it"
|
83
|
+
else
|
84
|
+
puts "The global_feeds aggregation already exists. Delete the global aggregation and try again."
|
87
85
|
end
|
88
86
|
end
|
89
87
|
|
90
88
|
end
|
91
89
|
|
92
|
-
desc "Sync files from muck services."
|
93
|
-
task :sync do
|
94
|
-
path = File.join(File.dirname(__FILE__), *%w[.. ..])
|
95
|
-
system "rsync -ruv #{path}/db ."
|
96
|
-
system "rsync -ruv #{path}/public ."
|
97
|
-
end
|
98
|
-
|
99
90
|
desc "Add attention types"
|
100
91
|
task :add_attention_types => :environment do
|
101
92
|
AttentionType.create(:id => AttentionType::WRITE, :name => 'write', :default_weight => 10)
|
@@ -104,6 +95,16 @@ module MuckServices
|
|
104
95
|
AttentionType.create(:id => AttentionType::CLICK, :name => 'click', :default_weight => 4)
|
105
96
|
AttentionType.create(:id => AttentionType::SHARE, :name => 'share', :default_weight => 6)
|
106
97
|
AttentionType.create(:id => AttentionType::DISCUSS, :name => 'discuss', :default_weight => 7)
|
98
|
+
puts "Added attention types"
|
99
|
+
end
|
100
|
+
|
101
|
+
desc "Imports attention data for use in testing"
|
102
|
+
task :import_attention => :environment do
|
103
|
+
require 'active_record/fixtures'
|
104
|
+
ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
|
105
|
+
yml = File.join(RAILS_ROOT, 'db', 'bootstrap', 'attention')
|
106
|
+
Fixtures.new(Attention.connection,"attention",Attention,yml).insert_fixtures
|
107
|
+
puts "Added attention data"
|
107
108
|
end
|
108
109
|
|
109
110
|
end
|
data/locales/ar.yml
CHANGED
@@ -72,6 +72,7 @@ ar:
|
|
72
72
|
entries_count: الإدخالات
|
73
73
|
entry_commment_contents: "وعلق على {{resource}}"
|
74
74
|
explore: "البحث عن {{topic}}"
|
75
|
+
facebook: فيسبوك
|
75
76
|
facebook_instructions: "على بلدي صلة صفحة ، انقر بالزر الايمن على 'بلدي صلة' ونسخ الارتباط. نحن سوف تدرج تلقائيا ، والوضع ، وصلات والملاحظات."
|
76
77
|
facebook_link: "يمكنك العثور على عنوان موقعك الخاص بك على صفحة فيسبوك بلدي صلة. {{link}}ثم انقر على 'بلدي صلة'"
|
77
78
|
facebook_notes: "فيسبوك الحواشي"
|
@@ -209,6 +210,7 @@ ar:
|
|
209
210
|
topic_generated: "النتائج ل`{{terms}}`."
|
210
211
|
type_of_metadata: "النوع من البيانات الوصفية :"
|
211
212
|
uri: رابط
|
213
|
+
url_not_in_index: "<a href='{{uri}}'>والموارد المطلوبة لتوصيات</a> لم يتم فهرستها. الرجاء إضافة مستودع يحتوي على البيانات الوصفية للمورد لإضافته إلى المؤشر."
|
212
214
|
validate_feed: "علامة تغذية كصالح"
|
213
215
|
videos: "أشرطة الفيديو"
|
214
216
|
visit: زيارة
|
data/locales/bg.yml
CHANGED
@@ -72,6 +72,7 @@ bg:
|
|
72
72
|
entries_count: Влизания
|
73
73
|
entry_commment_contents: "коментира {{resource}}"
|
74
74
|
explore: "Търсене на {{topic}}"
|
75
|
+
facebook: Facebook
|
75
76
|
facebook_instructions: "На страницата,, Моят Връзки, щракнете с десния бутон върху "Моите връзки" и копие на връзката. Ние автоматично ще включва, статус, линкове и бележки."
|
76
77
|
facebook_link: "Можете да намерите вашия URL на вашия Facebook Моята страница Връзки. {{link}} И след това кликнете на "Моите връзки""
|
77
78
|
facebook_notes: "Facebook отбелязва,"
|
@@ -209,6 +210,7 @@ bg:
|
|
209
210
|
topic_generated: "Резултати за `{{terms}}`."
|
210
211
|
type_of_metadata: "Вид на метаданни:"
|
211
212
|
uri: Url
|
213
|
+
url_not_in_index: "В <a href='{{uri}}'>ресурс, който заявихте препоръки</a> не са индексирани. Моля, добавете хранилище, съдържащи метаданни за ресурса да го добавите към индекса."
|
212
214
|
validate_feed: "Марк фуражи, както е валиден"
|
213
215
|
videos: Видео
|
214
216
|
visit: посещение
|
data/locales/ca.yml
CHANGED
@@ -72,6 +72,7 @@ ca:
|
|
72
72
|
entries_count: Entrades
|
73
73
|
entry_commment_contents: "va escriure sobre {{resource}}"
|
74
74
|
explore: "Cerca {{topic}}"
|
75
|
+
facebook: Facebook
|
75
76
|
facebook_instructions: "A la pàgina Els meus vincles, feu clic als "Enllaços" i copia l'enllaç. Ens inclourà automàticament, l'estat, enllaços i notes."
|
76
77
|
facebook_link: "Vostè pot trobar la seva adreça a la seva pàgina de Facebook, My Links. {{link}} I després feu clic als "Enllaços""
|
77
78
|
facebook_notes: "Pren nota de Facebook"
|
@@ -209,9 +210,10 @@ ca:
|
|
209
210
|
topic_generated: "Resultats de `{{terms}}`."
|
210
211
|
type_of_metadata: "Tipus de Metadades:"
|
211
212
|
uri: Url
|
213
|
+
url_not_in_index: "El <a href='{{uri}}'>recurs sol.licitat recomanacions per</a> que no s'ha indexat. Si us plau, afegir un dipòsit que conté les metadades dels recursos per afegir-lo a l'índex."
|
212
214
|
validate_feed: "Marcar com a vàlids els pinsos"
|
213
215
|
videos: Videos
|
214
216
|
visit: visita
|
215
217
|
xml: XML
|
216
218
|
zotero_group_prompt: "Grup Zotero URL"
|
217
|
-
zotero_group_rss: "
|
219
|
+
zotero_group_rss: "El seu grup Zotero URL és així: http://www.zotero.org/groups/adventures_in_library_instruction/items"
|
data/locales/cs.yml
CHANGED
@@ -72,6 +72,7 @@ cs:
|
|
72
72
|
entries_count: Příspěvky
|
73
73
|
entry_commment_contents: "komentoval {{resource}}"
|
74
74
|
explore: "Hledat {{topic}}"
|
75
|
+
facebook: Facebook
|
75
76
|
facebook_instructions: "Na stránce Mé odkazy, pravým-klikněte na 'My Links' a zkopírovat odkaz. Budeme automaticky zahrnují stav, odkazy a poznámky."
|
76
77
|
facebook_link: "Můžete najít URL na vaší stránce Facebook My Links. {{link}} A poté klikněte na 'My Links'"
|
77
78
|
facebook_notes: "Facebook Notes"
|
@@ -209,6 +210,7 @@ cs:
|
|
209
210
|
topic_generated: "Výsledky za `{{terms}}`."
|
210
211
|
type_of_metadata: "Typ Metadata:"
|
211
212
|
uri: Url
|
213
|
+
url_not_in_index: "<a href='{{uri}}'>Vámi požadovaný zdroj doporučení</a> nebyla indexována. Prosím, přidejte úložiště obsahuje metadata pro zdroj přidat do indexu."
|
212
214
|
validate_feed: "Mark krmivo jako platný"
|
213
215
|
videos: Videa
|
214
216
|
visit: navštivte
|
data/locales/da.yml
CHANGED
@@ -28,7 +28,7 @@ da:
|
|
28
28
|
all_resources: "Alle ressourcer"
|
29
29
|
already_added_uri_feed: "Du har allerede tilføjet den url {{uri}}"
|
30
30
|
already_added_username_feed: "Du har allerede tilføjet en {{service}} konto med brugernavnet {{username}}"
|
31
|
-
already_shared: "Du har
|
31
|
+
already_shared: "Du tidligere har delt denne side."
|
32
32
|
amazon_prompt: "Indtast den e-mail, du bruger med Amazon.com"
|
33
33
|
approval_status: Godkendt
|
34
34
|
atom: Atom
|
@@ -72,6 +72,7 @@ da:
|
|
72
72
|
entries_count: Entries
|
73
73
|
entry_commment_contents: "kommenterede {{resource}}"
|
74
74
|
explore: "Søg efter {{topic}}"
|
75
|
+
facebook: Facebook
|
75
76
|
facebook_instructions: "På Mine Links side, højre-klik på 'Mine Links' og kopiere linket. Vi vil automatisk omfatte, status, links og noter."
|
76
77
|
facebook_link: "Du kan finde din webadresse på din Facebook Mine links side. {{link}} Og derefter klikke på 'My Links'"
|
77
78
|
facebook_notes: "Facebook Noter"
|
@@ -122,7 +123,7 @@ da:
|
|
122
123
|
login_to_comment: "Log ind for at tilføje en kommentar"
|
123
124
|
metadata: metadata
|
124
125
|
metadata_prefix: "Metadata Præfiks"
|
125
|
-
my_identity: "Min
|
126
|
+
my_identity: "Min identitet"
|
126
127
|
my_services: "Min Service"
|
127
128
|
narrow_further: "indsnævre resultaterne yderligere"
|
128
129
|
netflix_prompt: "Netflix Kø RSS URL"
|
@@ -209,6 +210,7 @@ da:
|
|
209
210
|
topic_generated: "Resultater for `{{terms}}`."
|
210
211
|
type_of_metadata: "Type Metadata:"
|
211
212
|
uri: Url
|
213
|
+
url_not_in_index: "Den <a href='{{uri}}'>ressource, du anmodede om anbefalinger om</a> ikke er blevet indekseret. Please add et arkiv, som indeholder metadata for den ressource for at føje den til indekset."
|
212
214
|
validate_feed: "Mark foder som gyldige"
|
213
215
|
videos: Videoer
|
214
216
|
visit: visit
|
data/locales/de.yml
CHANGED
@@ -72,6 +72,7 @@ de:
|
|
72
72
|
entries_count: Einträge
|
73
73
|
entry_commment_contents: "kommentierte {{resource}}"
|
74
74
|
explore: "Suche nach {{topic}}"
|
75
|
+
facebook: Facebook
|
75
76
|
facebook_instructions: "Auf der Seite Meine Links mit der rechten Maustaste klicken Sie auf "Meine Links" und kopieren Sie den Link. Wir werden automatisch auch, Status, Links und Notizen."
|
76
77
|
facebook_link: "Sie können Ihre URL finden Sie auf Ihrem Facebook Meine Links Seite. {{link}} Und klicken Sie dann auf "Meine Links""
|
77
78
|
facebook_notes: "Facebook stellt fest,"
|
@@ -209,6 +210,7 @@ de:
|
|
209
210
|
topic_generated: "Ergebnisse für `{{terms}}`."
|
210
211
|
type_of_metadata: "Art der Metadaten:"
|
211
212
|
uri: URL
|
213
|
+
url_not_in_index: "Die <a href='{{uri}}'>angeforderte Ressource Empfehlungen für die</a> noch nicht indiziert. Bitte fügen Sie ein Repository mit Metadaten für die Ressource, die es in den Index aufnehmen zu können."
|
212
214
|
validate_feed: "Mark-Feed als gültig"
|
213
215
|
videos: Videos
|
214
216
|
visit: Besuch
|
data/locales/el.yml
CHANGED
@@ -72,6 +72,7 @@ el:
|
|
72
72
|
entries_count: Ενδείξεις
|
73
73
|
entry_commment_contents: "σχολίασε {{resource}}"
|
74
74
|
explore: "Αναζήτηση για {{topic}}"
|
75
|
+
facebook: Facebook
|
75
76
|
facebook_instructions: "Στη σελίδα μου Links, κάντε δεξί κλικ στο «Σύνδεσμοι μου 'και να αντιγράψετε το σύνδεσμο. Θα περιλαμβάνει αυτόματα, το καθεστώς, συνδέσεις και σημειώσεις."
|
76
77
|
facebook_link: "Μπορείτε να βρείτε το URL σας στο Facebook μου σελίδα σας Links. {{link}} Και στη συνέχεια κάντε κλικ στο «Σύνδεσμοι μου"
|
77
78
|
facebook_notes: "Facebook Σημειώσεις"
|
@@ -209,6 +210,7 @@ el:
|
|
209
210
|
topic_generated: "Αποτελέσματα για `{{terms}}`."
|
210
211
|
type_of_metadata: "Τύπος της Μεταδεδομένα:"
|
211
212
|
uri: Url
|
213
|
+
url_not_in_index: "Ο <a href='{{uri}}'>πόρος που ζητήσατε συστάσεις για</a> να μην έχει ευρετήριο. Παρακαλείσθε να προσθέσετε μια αποθήκη που περιέχει μετα-δεδομένα για τον πόρο για να το προσθέσετε στο ευρετήριο."
|
212
214
|
validate_feed: "Mark ζωοτροφών ως έγκυρα"
|
213
215
|
videos: Βίντεο
|
214
216
|
visit: επίσκεψη
|
data/locales/en.yml
CHANGED
@@ -83,7 +83,7 @@ en:
|
|
83
83
|
add_rss: Add Rss
|
84
84
|
already_added_username_feed: You've already added a {{service}} account with the username {{username}}
|
85
85
|
topic_feeds_for: Feeds for {{terms}}
|
86
|
-
explore: Search
|
86
|
+
explore: Search the Web
|
87
87
|
videos: Videos
|
88
88
|
terms_instructions: Add as many tags or phrases as you'd like. Separate each with a comma. ie food, recipes, best places to eat, organic
|
89
89
|
failed_harvests: Failed harvests
|
data/locales/es.yml
CHANGED
@@ -72,6 +72,7 @@ es:
|
|
72
72
|
entries_count: Entradas
|
73
73
|
entry_commment_contents: "escribió sobre {{resource}}"
|
74
74
|
explore: "Buscar {{topic}}"
|
75
|
+
facebook: Facebook
|
75
76
|
facebook_instructions: "En la página Mis vínculos, haga clic en "Mis Enlaces" y copia el enlace. Nos incluirá automáticamente, el estado, enlaces y notas."
|
76
77
|
facebook_link: "Usted puede encontrar su dirección en su página de Facebook, My Links. {{link}} Y luego haga clic en "Mis Enlaces""
|
77
78
|
facebook_notes: "Toma nota de Facebook"
|
@@ -209,6 +210,7 @@ es:
|
|
209
210
|
topic_generated: "Resultados de `{{terms}}`."
|
210
211
|
type_of_metadata: "Tipo de Metadatos:"
|
211
212
|
uri: Url
|
213
|
+
url_not_in_index: "El <a href='{{uri}}'>recurso solicitado recomendaciones para</a> que no se ha indexado. Por favor, añadir un depósito que contiene los metadatos de los recursos para añadirlo al índice."
|
212
214
|
validate_feed: "Marcar como válidos los piensos"
|
213
215
|
videos: Videos
|
214
216
|
visit: visita
|