muck-services 0.1.45 → 0.1.46

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.45
1
+ 0.1.46
@@ -6,7 +6,7 @@ class Muck::FeedsController < ApplicationController
6
6
  before_filter :get_owner, :except => ['index', 'show']
7
7
 
8
8
  def index
9
- @feeds = Aggregation.global_feeds(params[:order], params[:asc]).paginate(:page => @page, :per_page => @per_page)
9
+ @feeds = Feed.find(:all, :conditions => 'status >= 0', :order => (params[:order] || 'title') + (params[:asc] == 'false' ? ' DESC' : ' ASC') + ', title', :include => [:default_language]).paginate(:page => @page, :per_page => @per_page)
10
10
  respond_to do |format|
11
11
  format.html { render :template => 'feeds/index' }
12
12
  format.xml { render :xml => @feeds.to_xml }
@@ -56,15 +56,16 @@ class Muck::RecommendationsController < ApplicationController
56
56
  respond_to do |format|
57
57
  format.html do
58
58
  @uri = params[:u]
59
- @cache_key = "recommendations/real_time?u=#{CGI.escape(@uri)}"
59
+ @show_header = params[:show_header] == 'true'
60
+ @cache_key = "recommendations/real_time?show_header=#{@show_header}&u=#{CGI.escape(@uri)}"
60
61
  if !fragment_exist?(@cache_key)
61
- @recommendations = Entry.real_time_recommendations(@uri, I18n.locale.to_s, 5)
62
+ @recommendations = Entry.real_time_recommendations(@uri, I18n.locale.to_s, 5) rescue nil
62
63
  end
63
64
  render 'recommendations/real_time', :layout => false
64
65
  end
65
66
  end
66
67
  end
67
-
68
+
68
69
  protected
69
70
 
70
71
  def allowed_uri(uri)
@@ -14,18 +14,18 @@ module MuckServicesFeedsHelper
14
14
 
15
15
  def feed_contributor_link(feed)
16
16
  if feed.contributor_id.nil?
17
- # admin = Feed.find_by_login('admin')
17
+ admin = Feed.find_by_login('admin')
18
18
  'unknown'
19
19
  else
20
20
  link_to feed.contributor.display_name, profile_path(feed.contributor)
21
21
  end
22
22
  end
23
23
 
24
- def sort_feeds_url(current_order, current_asc, new_order, admin = false)
24
+ def sort_feeds_link(current_order, current_asc, new_order, admin = false)
25
25
  if admin == true
26
26
  admin_feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == 'true' || current_asc == nil)) ? 'false' : 'true')
27
27
  else
28
- feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == 'false' || current_asc == nil)) ? 'true' : 'false')
28
+ feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == 'true' || current_asc == nil)) ? 'false' : 'true')
29
29
  end
30
30
  end
31
31
 
@@ -30,21 +30,7 @@ class Aggregation < ActiveRecord::Base
30
30
  named_scope :recent, lambda { { :conditions => ['created_at > ?', 1.week.ago] } }
31
31
  named_scope :newest, :order => "created_at DESC"
32
32
 
33
-
34
- def self.global_feeds(order_field = 'title', ascending = 'true')
35
- allowed_fields = ['languages.english_name','status','entries_count','harvested_from_title','last_harvested_at','created_at','feed_contributor']
36
- order_direction = (ascending == 'false' ? ' DESC' : ' ASC')
37
- order_by = allowed_fields.include?(order_field) ? (order_field + order_direction + ', title') : ('title ' + order_direction)
38
-
39
- Feed.find_by_sql("SELECT users.id feed_contributor_id, users.login feed_contributor, languages.english_name default_language_name, feeds.*, aggregation_id <=> 1 FROM aggregations " +
40
- "INNER JOIN aggregation_feeds ON aggregations.id = aggregation_feeds.aggregation_id " +
41
- "RIGHT OUTER JOIN feeds ON aggregation_feeds.feed_id = feeds.id " +
42
- "INNER JOIN languages ON feeds.default_language_id = languages.id " +
43
- "LEFT OUTER JOIN users ON feeds.contributor_id = users.id " +
44
- # "WHERE aggregations.title = 'global_feeds' AND feeds.status >= 0 " +
45
- "ORDER BY #{order_by}")
46
- end
47
-
33
+
48
34
  # Builds and then adds feeds for a given terms
49
35
  # user: User to be associated with each feed. Default is nil which makes each feed global.
50
36
  # service_ids: An array of service ids. Nil will generate a feed for every available service.
@@ -13,14 +13,10 @@
13
13
  #
14
14
 
15
15
  class PersonalRecommendation < ActiveRecord::Base
16
- unloadable
17
-
16
+
18
17
  belongs_to :personal_recommendable, :polymorphic => true
19
18
  belongs_to :destination, :polymorphic => true
20
-
21
- belongs_to :entry, :class_name => 'Entry', :foreign_key => 'destination_id', :include => :feed
22
- belongs_to :user, :class_name => 'User', :foreign_key => 'destination_id'
23
-
19
+
24
20
  named_scope :limit, lambda { |num| { :limit => num } }
25
21
  named_scope :recent, lambda { { :conditions => ['created_at > ?', 1.week.ago] } }
26
22
  named_scope :newest, :order => "created_at DESC"
@@ -7,14 +7,13 @@
7
7
  </p>
8
8
  <table class="feeds">
9
9
  <tr>
10
- <th><%= link_to t('muck.services.entries_count'), sort_feeds_url(params[:order], params[:asc], 'entries_count') %></th>
11
- <th><%= link_to t('muck.services.title'), sort_feeds_url(params[:order], params[:asc], 'title') %></th>
12
- <th><%= link_to t('muck.services.contributor'), sort_feeds_url(params[:order], params[:asc], 'feed_contributor') %></th>
13
- <th width="70px"><%= link_to t('muck.services.added_date'), sort_feeds_url(params[:order], params[:asc], 'created_at') %></th>
14
- <th width="120px"><%= link_to t('muck.services.harvested_at'), sort_feeds_url(params[:order], params[:asc], 'last_harvested_at') %></th>
15
- <th><%= link_to t('muck.services.default_language'), sort_feeds_url(params[:order], params[:asc], 'languages.english_name') %></th>
16
- <th><%= link_to t('muck.services.repository'), sort_feeds_url(params[:order], params[:asc], 'harvested_from_title') %></th>
17
- <th><%= link_to t('muck.services.status'), sort_feeds_url(params[:order], params[:asc], 'status') %></th>
10
+ <th><%= link_to t('muck.services.status'), sort_feeds_link(params[:order], params[:asc], 'status') %></th>
11
+ <th><%= link_to t('muck.services.default_language'), sort_feeds_link(params[:order], params[:asc], 'languages.english_name') %></th>
12
+ <th><%= link_to t('muck.services.entries_count'), sort_feeds_link(params[:order], params[:asc], 'entries_count') %></th>
13
+ <th><%= link_to t('muck.services.repository'), sort_feeds_link(params[:order], params[:asc], 'harvested_from_title') %></th>
14
+ <th><%= link_to t('muck.services.title'), sort_feeds_link(params[:order], params[:asc], 'title') %></th>
15
+ <th><%= link_to t('muck.services.harvested_at'), sort_feeds_link(params[:order], params[:asc], 'last_harvested_at') %></th>
16
+ <th><%= link_to t('muck.services.added_date'), sort_feeds_link(params[:order], params[:asc], 'created_at') %></th>
18
17
  </tr>
19
18
  <%= render :partial => 'feeds/feed_row', :collection => @feeds %>
20
19
  </table>
@@ -147,7 +147,7 @@ function special_website_url(url) {
147
147
  nEnd = url.indexOf("/", nEnd + 1);
148
148
  if (nEnd != -1)
149
149
  {
150
- url = url.substr(0, nEnd + 1) + "CourseHome/index.htm";
150
+ url = url.substr(0, nEnd);
151
151
  }
152
152
  }
153
153
  }
@@ -176,7 +176,7 @@ function identifySquatParent() {
176
176
  sRightMargin = "0px";
177
177
  } else {
178
178
  // MIT
179
- squatParent = getElementByClassName("div", "left-nav");
179
+ squatParent = document.getElementById("local_navigation");
180
180
  if (bMIT && squatParent) {
181
181
  ulTags = squatParent.getElementsByTagName("ul");
182
182
  if (ulTags)
@@ -14,7 +14,6 @@ function truncate(text, length) {
14
14
  if (nEnd < 200) return text;
15
15
  else return text.substring(0, nEnd) + " ...";
16
16
  }
17
- var once = true;
18
17
  var asMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
19
18
  function format_date(published_at) {
20
19
  date = new Date(Date.parse(published_at.substring(0,10).replace(/-/g,"/")));
@@ -1,13 +1,20 @@
1
1
  <% cache(@cache_key) do %>
2
2
  <html>
3
3
  <body style="margin:0;padding:0;">
4
- <div style="padding-bottom:5px;margin:0 1px 0 3px;background-color:white;border-left:1px solid black;border-right:1px solid black;border-bottom:1px solid black;">
4
+ <div style="padding-bottom:5px;margin:0 1px 0 3px;background-color:white;border-left:1px solid black;border-right:1px solid black;border-bottom:1px solid black;<%= @show_header == true ? "border-top:1px solid black;" : ""%>">
5
+ <% if @show_header == true %>
6
+ <div style="color:#777;font-weight:bold;font-size:14px;font-family:Arial,Helvetica,sans-serif;margin: 2px 3px 0 3px; padding: 2px;"><img src="/images/folksemantic/logo-folksemantic-gm.gif" style="margin-left:2px;vertical-align:middle;"/>Related Resources</div>
7
+ <% end %>
8
+ <% if !@recommendations.nil? && @recommendations.results.size > 0%>
5
9
  <ul style="margin:0 2px 2px;padding:0px;font-family:Arial,Helvetica,sans-serif;">
6
10
  <% @recommendations.results.each_with_index do |r, i| %>
7
11
  <li style="margin-left: 0px; padding: 3px; list-style-type: none; font-size: 12px; <%= (i % 2 == 0) ? 'background-color:#E6E6E6;' : '' %>">
8
12
  <%= link_to "#{r.title} (#{r.collection})", visit_path(r), :target => '_top' %></li>
9
13
  <% end %>
10
14
  </ul>
15
+ <% else %>
16
+ <p style="color:red;padding:6px 10px;">Unable to generate recommendations for the resource. Please try a different resource.</p>
17
+ <% end %>
11
18
  </div>
12
19
  </body>
13
20
  </html>
@@ -0,0 +1,5 @@
1
+ <ul>
2
+ <% recommendations.each do |r| -%>
3
+ <li><%= link_to r.destination.title, r.destination %></li>
4
+ <% end -%>
5
+ </ul>
@@ -28,7 +28,7 @@ ActionController::Routing::Routes.draw do |map|
28
28
 
29
29
  map.resources :feeds, :controller => 'muck/feeds', :collection => { :new_extended => :get, :new_oai_rss => :get }, :has_many => :entries
30
30
 
31
- map.connect 'recommendations/real_time', :controller => 'muck/recommendations', :action => 'real_time'
31
+ map.connect 'recommendations/real_time.:format', :controller => 'muck/recommendations', :action => 'real_time'
32
32
  map.connect 'recommendations/get_button', :controller => 'muck/recommendations', :action => 'get_button'
33
33
  map.connect 'recommendations/greasemonkey.user.js', :controller => 'muck/recommendations', :action => 'greasemonkey_script'
34
34
  map.resources :recommendations, :controller => 'muck/recommendations'
@@ -0,0 +1,13 @@
1
+ class AddDeadEntryFields < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :entries, :permalink_good, :boolean, :default => true
4
+ add_column :entries, :permalink_checked_at, :datetime, :default => '1971-01-01 01:01:01', :null => false
5
+ add_index :entries, :permalink_good
6
+ end
7
+
8
+ def self.down
9
+ remove_index :entries, :permalink_good
10
+ remove_column :entries, :permalink_good
11
+ remove_column :entries, :permalink_checked_at
12
+ end
13
+ end
@@ -11,8 +11,6 @@ module ActiveRecord
11
11
  # +has_muck_recommendations+ gives the class it is called on personalized recommendations
12
12
  def has_muck_recommendations
13
13
  has_many :personal_recommendations, :as => :personal_recommendable
14
- has_many :recommended_entries, :through => :personal_recommendations, :source => :entry,
15
- :conditions => "personal_recommendations.destination_type = 'Entry'"
16
14
  end
17
15
 
18
16
  def acts_as_muck_recommendation
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-services}
8
- s.version = "0.1.45"
8
+ s.version = "0.1.46"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joel Duffin", "Justin Ball"]
12
- s.date = %q{2010-06-01}
12
+ s.date = %q{2010-09-13}
13
13
  s.description = %q{This gem contains the rails specific code for dealing with feeds, aggregations and recommendations. It is meant to work with the muck-raker gem.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
@@ -125,8 +125,6 @@ Gem::Specification.new do |s|
125
125
  "app/views/recommendations/index.rss.builder",
126
126
  "app/views/recommendations/index.xml.builder",
127
127
  "app/views/recommendations/real_time.html.erb",
128
- "app/views/recommendations/real_time.pjs.erb",
129
- "app/views/recommendations/real_time.xml.builder",
130
128
  "app/views/service_templates/_facebook.html.erb",
131
129
  "app/views/service_templates/_friendfeed.html.erb",
132
130
  "app/views/service_templates/_goodreads.html.erb",
@@ -136,6 +134,7 @@ Gem::Specification.new do |s|
136
134
  "app/views/service_templates/_zotero_group.html.erb",
137
135
  "app/views/services/_edit_service.html.erb",
138
136
  "app/views/services/_new_service.html.erb",
137
+ "app/views/services/_personal_recommendations.html.erb",
139
138
  "app/views/services/_summary.html.erb",
140
139
  "app/views/services/_view_service.html.erb",
141
140
  "app/views/services_mailer/notification_feed_added.text.ar.html.erb",
@@ -366,6 +365,7 @@ Gem::Specification.new do |s|
366
365
  "db/migrate/20091115011828_add_aggregations_for_personal_recs.rb",
367
366
  "db/migrate/20091116094447_rename_action_table.rb",
368
367
  "db/migrate/20091118203605_add_default_feed_type_to_aggregation_feed.rb",
368
+ "db/migrate/20100903205928_add_dead_entry_fields.rb",
369
369
  "lib/active_record/acts/muck_aggregation_owner.rb",
370
370
  "lib/active_record/acts/muck_feed_owner.rb",
371
371
  "lib/active_record/acts/muck_feed_parent.rb",
@@ -433,7 +433,7 @@ Gem::Specification.new do |s|
433
433
  s.rdoc_options = ["--charset=UTF-8"]
434
434
  s.require_paths = ["lib"]
435
435
  s.rubyforge_project = %q{muck-services}
436
- s.rubygems_version = %q{1.3.5}
436
+ s.rubygems_version = %q{1.3.7}
437
437
  s.summary = %q{Feeds, aggregations and services for muck}
438
438
  s.test_files = [
439
439
  "test/rails_root/app/controllers/application_controller.rb",
@@ -550,7 +550,7 @@ Gem::Specification.new do |s|
550
550
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
551
551
  s.specification_version = 3
552
552
 
553
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
553
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
554
554
  s.add_runtime_dependency(%q<acts-as-taggable-on>, [">= 0"])
555
555
  s.add_runtime_dependency(%q<will_paginate>, [">= 0"])
556
556
  s.add_runtime_dependency(%q<httparty>, [">= 0"])
@@ -100,5 +100,5 @@ function initRecsPanel() {
100
100
  panel.append("<div id='rec_close_box' title='Close'>x</div>");
101
101
  jQuery("#rec_close_box").click(function() {jQuery("#recs_panel").hide();jQuery("#show_recommendations_link").show();return false;});
102
102
  panel.css("left", jQuery("#toolbar").width() - 250);
103
- panel.draggable();
103
+ if (panel.draggable) panel.draggable();
104
104
  }
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.45
4
+ hash: 71
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 46
10
+ version: 0.1.46
5
11
  platform: ruby
6
12
  authors:
7
13
  - Joel Duffin
@@ -10,129 +16,177 @@ autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
18
 
13
- date: 2010-06-01 00:00:00 -06:00
19
+ date: 2010-09-13 00:00:00 -06:00
14
20
  default_executable:
15
21
  dependencies:
16
22
  - !ruby/object:Gem::Dependency
17
23
  name: acts-as-taggable-on
18
- type: :runtime
19
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
21
27
  requirements:
22
28
  - - ">="
23
29
  - !ruby/object:Gem::Version
30
+ hash: 3
31
+ segments:
32
+ - 0
24
33
  version: "0"
25
- version:
34
+ type: :runtime
35
+ version_requirements: *id001
26
36
  - !ruby/object:Gem::Dependency
27
37
  name: will_paginate
28
- type: :runtime
29
- version_requirement:
30
- version_requirements: !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
31
41
  requirements:
32
42
  - - ">="
33
43
  - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
34
47
  version: "0"
35
- version:
48
+ type: :runtime
49
+ version_requirements: *id002
36
50
  - !ruby/object:Gem::Dependency
37
51
  name: httparty
38
- type: :runtime
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
41
55
  requirements:
42
56
  - - ">="
43
57
  - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
44
61
  version: "0"
45
- version:
62
+ type: :runtime
63
+ version_requirements: *id003
46
64
  - !ruby/object:Gem::Dependency
47
65
  name: nokogiri
48
- type: :runtime
49
- version_requirement:
50
- version_requirements: !ruby/object:Gem::Requirement
66
+ prerelease: false
67
+ requirement: &id004 !ruby/object:Gem::Requirement
68
+ none: false
51
69
  requirements:
52
70
  - - ">="
53
71
  - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
54
75
  version: "0"
55
- version:
76
+ type: :runtime
77
+ version_requirements: *id004
56
78
  - !ruby/object:Gem::Dependency
57
79
  name: muck-feedbag
58
- type: :runtime
59
- version_requirement:
60
- version_requirements: !ruby/object:Gem::Requirement
80
+ prerelease: false
81
+ requirement: &id005 !ruby/object:Gem::Requirement
82
+ none: false
61
83
  requirements:
62
84
  - - ">="
63
85
  - !ruby/object:Gem::Version
86
+ hash: 3
87
+ segments:
88
+ - 0
64
89
  version: "0"
65
- version:
90
+ type: :runtime
91
+ version_requirements: *id005
66
92
  - !ruby/object:Gem::Dependency
67
93
  name: river
68
- type: :runtime
69
- version_requirement:
70
- version_requirements: !ruby/object:Gem::Requirement
94
+ prerelease: false
95
+ requirement: &id006 !ruby/object:Gem::Requirement
96
+ none: false
71
97
  requirements:
72
98
  - - ">="
73
99
  - !ruby/object:Gem::Version
100
+ hash: 3
101
+ segments:
102
+ - 0
74
103
  version: "0"
75
- version:
104
+ type: :runtime
105
+ version_requirements: *id006
76
106
  - !ruby/object:Gem::Dependency
77
107
  name: overlord
78
- type: :runtime
79
- version_requirement:
80
- version_requirements: !ruby/object:Gem::Requirement
108
+ prerelease: false
109
+ requirement: &id007 !ruby/object:Gem::Requirement
110
+ none: false
81
111
  requirements:
82
112
  - - ">="
83
113
  - !ruby/object:Gem::Version
114
+ hash: 3
115
+ segments:
116
+ - 0
84
117
  version: "0"
85
- version:
118
+ type: :runtime
119
+ version_requirements: *id007
86
120
  - !ruby/object:Gem::Dependency
87
121
  name: feedzirra
88
- type: :runtime
89
- version_requirement:
90
- version_requirements: !ruby/object:Gem::Requirement
122
+ prerelease: false
123
+ requirement: &id008 !ruby/object:Gem::Requirement
124
+ none: false
91
125
  requirements:
92
126
  - - ">="
93
127
  - !ruby/object:Gem::Version
128
+ hash: 3
129
+ segments:
130
+ - 0
94
131
  version: "0"
95
- version:
132
+ type: :runtime
133
+ version_requirements: *id008
96
134
  - !ruby/object:Gem::Dependency
97
135
  name: muck-engine
98
- type: :runtime
99
- version_requirement:
100
- version_requirements: !ruby/object:Gem::Requirement
136
+ prerelease: false
137
+ requirement: &id009 !ruby/object:Gem::Requirement
138
+ none: false
101
139
  requirements:
102
140
  - - ">="
103
141
  - !ruby/object:Gem::Version
142
+ hash: 3
143
+ segments:
144
+ - 0
104
145
  version: "0"
105
- version:
146
+ type: :runtime
147
+ version_requirements: *id009
106
148
  - !ruby/object:Gem::Dependency
107
149
  name: muck-users
108
- type: :runtime
109
- version_requirement:
110
- version_requirements: !ruby/object:Gem::Requirement
150
+ prerelease: false
151
+ requirement: &id010 !ruby/object:Gem::Requirement
152
+ none: false
111
153
  requirements:
112
154
  - - ">="
113
155
  - !ruby/object:Gem::Version
156
+ hash: 3
157
+ segments:
158
+ - 0
114
159
  version: "0"
115
- version:
160
+ type: :runtime
161
+ version_requirements: *id010
116
162
  - !ruby/object:Gem::Dependency
117
163
  name: muck-comments
118
- type: :runtime
119
- version_requirement:
120
- version_requirements: !ruby/object:Gem::Requirement
164
+ prerelease: false
165
+ requirement: &id011 !ruby/object:Gem::Requirement
166
+ none: false
121
167
  requirements:
122
168
  - - ">="
123
169
  - !ruby/object:Gem::Version
170
+ hash: 3
171
+ segments:
172
+ - 0
124
173
  version: "0"
125
- version:
174
+ type: :runtime
175
+ version_requirements: *id011
126
176
  - !ruby/object:Gem::Dependency
127
177
  name: shoulda
128
- type: :development
129
- version_requirement:
130
- version_requirements: !ruby/object:Gem::Requirement
178
+ prerelease: false
179
+ requirement: &id012 !ruby/object:Gem::Requirement
180
+ none: false
131
181
  requirements:
132
182
  - - ">="
133
183
  - !ruby/object:Gem::Version
184
+ hash: 3
185
+ segments:
186
+ - 0
134
187
  version: "0"
135
- version:
188
+ type: :development
189
+ version_requirements: *id012
136
190
  description: This gem contains the rails specific code for dealing with feeds, aggregations and recommendations. It is meant to work with the muck-raker gem.
137
191
  email: justin@tatemae.com
138
192
  executables: []
@@ -251,8 +305,6 @@ files:
251
305
  - app/views/recommendations/index.rss.builder
252
306
  - app/views/recommendations/index.xml.builder
253
307
  - app/views/recommendations/real_time.html.erb
254
- - app/views/recommendations/real_time.pjs.erb
255
- - app/views/recommendations/real_time.xml.builder
256
308
  - app/views/service_templates/_facebook.html.erb
257
309
  - app/views/service_templates/_friendfeed.html.erb
258
310
  - app/views/service_templates/_goodreads.html.erb
@@ -262,6 +314,7 @@ files:
262
314
  - app/views/service_templates/_zotero_group.html.erb
263
315
  - app/views/services/_edit_service.html.erb
264
316
  - app/views/services/_new_service.html.erb
317
+ - app/views/services/_personal_recommendations.html.erb
265
318
  - app/views/services/_summary.html.erb
266
319
  - app/views/services/_view_service.html.erb
267
320
  - app/views/services_mailer/notification_feed_added.text.ar.html.erb
@@ -492,6 +545,7 @@ files:
492
545
  - db/migrate/20091115011828_add_aggregations_for_personal_recs.rb
493
546
  - db/migrate/20091116094447_rename_action_table.rb
494
547
  - db/migrate/20091118203605_add_default_feed_type_to_aggregation_feed.rb
548
+ - db/migrate/20100903205928_add_dead_entry_fields.rb
495
549
  - lib/active_record/acts/muck_aggregation_owner.rb
496
550
  - lib/active_record/acts/muck_feed_owner.rb
497
551
  - lib/active_record/acts/muck_feed_parent.rb
@@ -554,6 +608,114 @@ files:
554
608
  - public/stylesheets/frame.css
555
609
  - public/stylesheets/muck-services.css
556
610
  - rails/init.rb
611
+ - test/rails_root/app/controllers/application_controller.rb
612
+ - test/rails_root/app/controllers/default_controller.rb
613
+ - test/rails_root/app/helpers/application_helper.rb
614
+ - test/rails_root/app/models/activity.rb
615
+ - test/rails_root/app/models/comment.rb
616
+ - test/rails_root/app/models/share.rb
617
+ - test/rails_root/app/models/user.rb
618
+ - test/rails_root/app/models/user_session.rb
619
+ - test/rails_root/config/boot.rb
620
+ - test/rails_root/config/environment.rb
621
+ - test/rails_root/config/environments/cucumber.rb
622
+ - test/rails_root/config/environments/development.rb
623
+ - test/rails_root/config/environments/production.rb
624
+ - test/rails_root/config/environments/test.rb
625
+ - test/rails_root/config/initializers/inflections.rb
626
+ - test/rails_root/config/initializers/mime_types.rb
627
+ - test/rails_root/config/initializers/requires.rb
628
+ - test/rails_root/config/initializers/session_store.rb
629
+ - test/rails_root/config/routes.rb
630
+ - test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
631
+ - test/rails_root/db/migrate/20090327231918_create_users.rb
632
+ - test/rails_root/db/migrate/20090402033319_add_muck_activities.rb
633
+ - test/rails_root/db/migrate/20090402234137_create_languages.rb
634
+ - test/rails_root/db/migrate/20090426041056_create_countries.rb
635
+ - test/rails_root/db/migrate/20090426041103_create_states.rb
636
+ - test/rails_root/db/migrate/20090602191243_create_muck_raker.rb
637
+ - test/rails_root/db/migrate/20090613173314_create_comments.rb
638
+ - test/rails_root/db/migrate/20090619211125_create_tag_clouds.rb
639
+ - test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
640
+ - test/rails_root/db/migrate/20090623193525_add_grain_size_to_tag_clouds.rb
641
+ - test/rails_root/db/migrate/20090703175825_denormalize_entries_subjects.rb
642
+ - test/rails_root/db/migrate/20090704220055_create_slugs.rb
643
+ - test/rails_root/db/migrate/20090716035935_change_tag_cloud_grain_sizes.rb
644
+ - test/rails_root/db/migrate/20090717173900_add_contributor_to_feeds.rb
645
+ - test/rails_root/db/migrate/20090717175825_normalize_entries_subjects.rb
646
+ - test/rails_root/db/migrate/20090721043213_change_services_title_to_name.rb
647
+ - test/rails_root/db/migrate/20090721054927_remove_services_not_null_from_feeds.rb
648
+ - test/rails_root/db/migrate/20090723050510_create_feed_parents.rb
649
+ - test/rails_root/db/migrate/20090728165716_add_etag_to_feeds.rb
650
+ - test/rails_root/db/migrate/20090730044139_add_comment_cache.rb
651
+ - test/rails_root/db/migrate/20090730045848_add_comment_cache_to_entries.rb
652
+ - test/rails_root/db/migrate/20090730154102_allow_null_user.rb
653
+ - test/rails_root/db/migrate/20090803185323_create_shares.rb
654
+ - test/rails_root/db/migrate/20090804184247_add_comment_count_to_shares.rb
655
+ - test/rails_root/db/migrate/20090804211240_add_entry_id_to_shares.rb
656
+ - test/rails_root/db/migrate/20090804231857_add_shares_uri_index.rb
657
+ - test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb
658
+ - test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb
659
+ - test/rails_root/db/migrate/20090826220530_change_services_sequence_to_sort.rb
660
+ - test/rails_root/db/migrate/20090826225652_create_identity_feeds.rb
661
+ - test/rails_root/db/migrate/20090827005105_add_identity_fields_to_services.rb
662
+ - test/rails_root/db/migrate/20090827015308_create_service_categories.rb
663
+ - test/rails_root/db/migrate/20090827221502_add_prompt_and_template_to_services.rb
664
+ - test/rails_root/db/migrate/20090915041650_aggregations_to_polymorphic.rb
665
+ - test/rails_root/db/migrate/20090922174200_update_oai_endpoints.rb
666
+ - test/rails_root/db/migrate/20090922231552_add_dates_to_oai_endpoints.rb
667
+ - test/rails_root/db/migrate/20090923150807_rename_name_in_aggregation.rb
668
+ - test/rails_root/db/migrate/20090924200750_add_uri_data_template_to_services.rb
669
+ - test/rails_root/db/migrate/20091006183742_add_feed_count_to_aggregation.rb
670
+ - test/rails_root/db/migrate/20091022150615_add_uri_key_to_services.rb
671
+ - test/rails_root/db/migrate/20091115011828_add_aggregations_for_personal_recs.rb
672
+ - test/rails_root/db/migrate/20091116094447_rename_action_table.rb
673
+ - test/rails_root/db/migrate/20091118203605_add_default_feed_type_to_aggregation_feed.rb
674
+ - test/rails_root/db/migrate/20100123035450_create_access_codes.rb
675
+ - test/rails_root/db/migrate/20100123233654_create_access_code_requests.rb
676
+ - test/rails_root/db/schema.rb
677
+ - test/rails_root/features/step_definitions/common_steps.rb
678
+ - test/rails_root/features/step_definitions/visit_steps.rb
679
+ - test/rails_root/features/step_definitions/webrat_steps.rb
680
+ - test/rails_root/features/support/env.rb
681
+ - test/rails_root/features/support/paths.rb
682
+ - test/rails_root/public/dispatch.rb
683
+ - test/rails_root/script/create_project.rb
684
+ - test/rails_root/test/factories.rb
685
+ - test/rails_root/test/functional/admin/feeds_controller_test.rb
686
+ - test/rails_root/test/functional/admin/oai_endpoints_controller_test.rb
687
+ - test/rails_root/test/functional/aggregation_feeds_controller_test.rb
688
+ - test/rails_root/test/functional/aggregations_controller_test.rb
689
+ - test/rails_root/test/functional/feed_previews_controller_test.rb
690
+ - test/rails_root/test/functional/feeds_controller_test.rb
691
+ - test/rails_root/test/functional/identity_feeds_controller_test.rb
692
+ - test/rails_root/test/functional/oai_endpoints_controller_test.rb
693
+ - test/rails_root/test/functional/topics_controller_test.rb
694
+ - test/rails_root/test/functional/visits_controller_test.rb
695
+ - test/rails_root/test/test_helper.rb
696
+ - test/rails_root/test/unit/aggregation_feed_test.rb
697
+ - test/rails_root/test/unit/aggregation_test.rb
698
+ - test/rails_root/test/unit/comment_test.rb
699
+ - test/rails_root/test/unit/entry_test.rb
700
+ - test/rails_root/test/unit/feed_parent_test.rb
701
+ - test/rails_root/test/unit/feed_test.rb
702
+ - test/rails_root/test/unit/identity_feed_test.rb
703
+ - test/rails_root/test/unit/oai_endpoint_test.rb
704
+ - test/rails_root/test/unit/one_test.rb
705
+ - test/rails_root/test/unit/personal_recommendation_test.rb
706
+ - test/rails_root/test/unit/recommendation_test.rb
707
+ - test/rails_root/test/unit/service_category_test.rb
708
+ - test/rails_root/test/unit/service_test.rb
709
+ - test/rails_root/test/unit/services_mailer_test.rb
710
+ - test/rails_root/test/unit/share_test.rb
711
+ - test/rails_root/test/unit/tag_cloud_test.rb
712
+ - test/rails_root/test/unit/user_test.rb
713
+ - test/rails_root/vendor/plugins/jrails/init.rb
714
+ - test/rails_root/vendor/plugins/jrails/install.rb
715
+ - test/rails_root/vendor/plugins/jrails/lib/jrails.rb
716
+ - test/rails_root/vendor/plugins/jrails/rails/init.rb
717
+ - test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb
718
+ - test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb
557
719
  has_rdoc: true
558
720
  homepage: http://github.com/tatemae/muck-services
559
721
  licenses: []
@@ -564,21 +726,27 @@ rdoc_options:
564
726
  require_paths:
565
727
  - lib
566
728
  required_ruby_version: !ruby/object:Gem::Requirement
729
+ none: false
567
730
  requirements:
568
731
  - - ">="
569
732
  - !ruby/object:Gem::Version
733
+ hash: 3
734
+ segments:
735
+ - 0
570
736
  version: "0"
571
- version:
572
737
  required_rubygems_version: !ruby/object:Gem::Requirement
738
+ none: false
573
739
  requirements:
574
740
  - - ">="
575
741
  - !ruby/object:Gem::Version
742
+ hash: 3
743
+ segments:
744
+ - 0
576
745
  version: "0"
577
- version:
578
746
  requirements: []
579
747
 
580
748
  rubyforge_project: muck-services
581
- rubygems_version: 1.3.5
749
+ rubygems_version: 1.3.7
582
750
  signing_key:
583
751
  specification_version: 3
584
752
  summary: Feeds, aggregations and services for muck
@@ -1,45 +0,0 @@
1
- <%
2
- # TODO: Update this (see real_time.html.erb)
3
- @json_recommendations = @entry.json_recommendations(@limit, params[:order] || "mixed", true, params[:omit_feeds] || nil)
4
- if !@json_recommendations.nil?
5
- @direct_link_text = params[:direct_link_text] || t('muck.services.direct_link')
6
- %>
7
- var catalog_page = <%= !@entry.direct_link.nil? and @uri == @entry.permalink %>;
8
- var document_host = '<%= @host %>';
9
- var recs = <%= @json_recommendations %>.solr_data.docs;
10
- var app = "http://folksemantic.com/";
11
- <% if @details == true -%>
12
- function truncate(text, length) {
13
- nEnd = text.indexOf(" ", 200);
14
- if (nEnd < 200) return text;
15
- else return text.substring(0, nEnd) + " ...";
16
- }
17
- var asMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
18
- function format_date(published_at) {
19
- date = new Date();
20
- date.setTime(Date.parse(published_at));
21
- return date.getDate() + " " + asMonths[date.getMonth()] + " " + date.getUTCFullYear();
22
- }
23
- <% end %>
24
- document.write('<div class="oer_recommender_container">');
25
- <% if params[:title] %>document.write('<div class="oer_recommender_title"><%= t('muck.services.gm_title') %></div>');<% end %>
26
- document.write('<div class="oer_recommender_list">');
27
- for(nRec = 0; nRec < recs.length; nRec++) {
28
- r = recs[nRec].entry;
29
- metadata_link = catalog_page && document_host == r.uri.substring(0, document_host.length);
30
- direct_link = metadata_link && r.direct_link;
31
- document.write('<p class="oer_recommender_item">');
32
- document.write('<a class="oer_recommender_recommendation_link" href="' + app + 'visits/' + r.id +'">' + r.title + ' (' + r.collection + ')</a>');
33
- if (direct_link) document.write(' <a class="oer_recommender_direct_link" href="' + app + 'visits/' + r.id + '?target=direct_link"><%= @direct_link_text %></a>');
34
- <% if @details == true -%>
35
- document.write(' <span class="oer_recommender_published_at">(' + format_date(r.published_at) + ')</span>');
36
- document.write(' <span class="oer_recommender_relevance_score"><%= t('muck.services.relevance')%>: ' + Math.round(r.relevance*100)/100 + '</span>');
37
- document.write('<br/><span class="oer_recommender_description">' + truncate(r.description) + '</span>');
38
- document.write('<br/><span class="oer_recommender_uri">' + r.uri + '</span>');
39
- <% end -%>
40
- document.write('</p>');
41
- }
42
- document.write('</div>');
43
- <% if params[:more_link] %>document.write('<div class="oer_recommender_more_link"><a href="' + app + 'documents/<%= @entry.id %>"><%= t('muck.services.gm_more_prompt') %></a></div>');<% end %>
44
- document.write('</div>');
45
- <% end %>
@@ -1,26 +0,0 @@
1
- # TODO: Update this (see real_time.html.erb)
2
- xml.instruct!
3
-
4
- if @entry.nil?
5
- xml.recommendations
6
- else
7
- @recommendations = @entry.ranked_recommendations(@limit, params[:order] || "mixed", @details)
8
- xml.recommendations(:document_id => @entry.nil? ? "" : @entry.id, :uri => @uri, :title => t("muck.services.gm_title"), :more_prompt => t("muck.services.gm_more_prompt"), :direct_link_text => t("muck.services.direct_link")) do
9
- @recommendations.results.each do |recommendation|
10
- xml.recommendation do
11
- xml.title recommendation["title"]
12
- xml.collection recommendation["collection"]
13
- xml.link "http://www.folksemantic.com/visits/" + recommendation["id"].to_s
14
-
15
- if @details == true
16
- xml.description recommendation["description"]
17
- xml.relevance round(recommendation["score"])
18
- xml.published_at recommendation["published_at"]
19
- xml.author recommendation["author"]
20
- else
21
- xml.description ""
22
- end
23
- end
24
- end
25
- end
26
- end