muck-raker 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.11
1
+ 0.1.12
data/app/models/entry.rb CHANGED
@@ -26,7 +26,7 @@ class Entry < ActiveRecord::Base
26
26
  end
27
27
 
28
28
  def recommendations(limit = 20, order = "relevance", details = false, omit_feeds = nil)
29
- sql = "SELECT recommendations.id, dest_entry_id, permalink, entries.title, relevance_calculated_at, relevance, clicks, avg_time_at_dest AS avg_time_on_target, direct_link, feeds.short_title AS collection "
29
+ sql = "SELECT recommendations.id AS recommendation_id, dest_entry_id AS id, permalink, entries.title, relevance_calculated_at, relevance, clicks, avg_time_at_dest AS avg_time_on_target, direct_link, feeds.short_title AS collection "
30
30
  sql << ", entries.description, author, published_at " if details == true
31
31
  sql << "FROM recommendations "
32
32
  sql << "INNER JOIN entries ON recommendations.dest_entry_id = entries.id "
@@ -1,17 +1,15 @@
1
- <h1><%= link_to @entry_title, @entry.permalink %> <%= link_to "(xml)", "/recommendations.xml?u=" + @entry.permalink, :class=> "catalog_link" %> related resources details</h1>
2
-
3
- <% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>
1
+ <h1><%= link_to @entry_title, @entry.permalink %> <%= link_to "(xml)", "/recommendations.xml?u=" + @entry.permalink, :class=> "catalog_link" %> - details</h1>
4
2
 
5
3
  <table border="1" cellpadding="3px">
6
4
  <tr>
7
- <th>Related Resource</th>
5
+ <th>Related Resources <span style="color:#888;font-weight:normal;">(<%= t('muck.raker.calculated') %> <%= @entry.relevance_calculated_at.strftime("%d %b %Y") %>)</span></th>
8
6
  <th>Relevance</th>
9
7
  <th>Clicks</th>
10
8
  <th>Avg Time<br/>(seconds)</th>
11
9
  </tr>
12
- <% @entry.ranked_recommendations(@limit, params[:order] || "mixed").each do |r| %>
10
+ <% @entry.ranked_recommendations(@limit, params[:order] || "relevance").each do |r| %>
13
11
  <tr>
14
- <td><%= link_to r["title"] + " (" + r["collection"] + ")", "/r?id=" + r["id"].to_s %></td>
12
+ <td><%= link_to r["title"] + " (" + r["collection"] + ")", "/r?id=" + r["recommendation_id"].to_s %></td>
15
13
  <td class="centered"><%= round(r["relevance"]) %></td>
16
14
  <td class="centered"><%= r["clicks"] %></td>
17
15
  <td class="centered"><%= r["avg_time_on_target"] %></td>
@@ -1,18 +1,9 @@
1
1
  <% link = @entry.direct_link.nil? ? @entry.permalink : @entry.direct_link %>
2
2
 
3
- <h1>Folksemantic - <%= t('muck.raker.related_resources_title') %></h1>
4
-
5
- <% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>
6
-
7
- <%#= render(:partial => "search/search_box") %>
8
-
9
- <p><b><%= link_to @entry_title, link %></b> <% if !@entry.direct_link.nil? %> - <%= link_to t('muck.raker.metadata'), @entry.permalink, :class => "catalog_link" %><% end %></p>
10
- <hr class="divider" />
11
-
12
- <p><b><%= t('muck.raker.related_resources_title') %></b> <span style="font-size:85%">(<%= t('muck.raker.calculated') %> <%= @entry.relevance_calculated_at.strftime("%d %b %Y") %>)</span> - <%= link_to t('muck.raker.details'), "?details=true", :class=> "catalog_link" %></p>
3
+ <h1 style="margin-bottom:20px;"><%= link_to @entry_title, link %> - <%= t('muck.raker.related_resources_title') %> - <%= link_to 'details', "?details=true", :class=> "catalog_link" %></h1>
13
4
 
14
5
  <div id="results">
15
- <%= render(:partial => "entries/result", :collection => @entry.ranked_recommendations(@limit, params[:order] || "mixed", true)) %>
6
+ <%= render(:partial => "entries/result", :collection => @entry.ranked_recommendations(@limit, params[:order] || "relevance", true)) %>
16
7
  </div>
17
8
 
18
9
  </body>
data/muck-raker.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{muck-raker}
5
- s.version = "0.1.11"
5
+ s.version = "0.1.12"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Joel Duffin Justin Ball"]
9
- s.date = %q{2009-07-07}
9
+ s.date = %q{2009-07-08}
10
10
  s.description = %q{The aggregation and recommendation engine for the muck system.}
11
11
  s.email = %q{justinball@gmail.com}
12
12
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-raker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Duffin Justin Ball
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-07 00:00:00 -06:00
12
+ date: 2009-07-08 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency