muck-services 0.1.41 → 0.1.42

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.41
1
+ 0.1.42
@@ -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"
@@ -1,4 +1,4 @@
1
- <%= link_to related_entry.title + " (" + related_entry.collection + ")", "/r?id=#{related_entry.id}", :class => "title_link", :rel => "nofollow" %>
1
+ <%= link_to "#{related_entry.title} (#{related_entry.collection})", "/r?id=#{related_entry.recommendation_id}", :class => "title_link", :rel => "nofollow" %>
2
2
  - <%= link_to t('muck.services.related_resources'), resource_path(related_entry.dest_entry_id), :class => "related_resources_link", :rel => "nofollow" %>
3
- <% if !related_entry.direct_uri.nil? %> - <%= link_to t('muck.services.metadata'), "/r?id=#{related_entry.id}&target=metadata", :class => "catalog_link" %><% end %>
3
+ <% if !related_entry.direct_uri.nil? %> - <%= link_to t('muck.services.metadata'), "/r?id=#{related_entry.recommendation_id}&target=metadata", :class => "catalog_link" %><% end %>
4
4
  <% if related_entry.description.length > 0 %><br/><span class="description"><%= truncate_words(related_entry.description) %></span><% end %>
@@ -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>
@@ -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.41"
8
+ s.version = "0.1.42"
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-03-04}
12
+ s.date = %q{2010-03-12}
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 = [
@@ -135,6 +135,7 @@ Gem::Specification.new do |s|
135
135
  "app/views/service_templates/_zotero_group.html.erb",
136
136
  "app/views/services/_edit_service.html.erb",
137
137
  "app/views/services/_new_service.html.erb",
138
+ "app/views/services/_personal_recommendations.html.erb",
138
139
  "app/views/services/_summary.html.erb",
139
140
  "app/views/services/_view_service.html.erb",
140
141
  "app/views/services_mailer/notification_feed_added.text.ar.html.erb",
@@ -432,7 +433,7 @@ Gem::Specification.new do |s|
432
433
  s.rdoc_options = ["--charset=UTF-8"]
433
434
  s.require_paths = ["lib"]
434
435
  s.rubyforge_project = %q{muck-services}
435
- s.rubygems_version = %q{1.3.5}
436
+ s.rubygems_version = %q{1.3.6}
436
437
  s.summary = %q{Feeds, aggregations and services for muck}
437
438
  s.test_files = [
438
439
  "test/rails_root/app/controllers/application_controller.rb",
@@ -528,7 +529,6 @@ Gem::Specification.new do |s|
528
529
  "test/rails_root/test/unit/feed_test.rb",
529
530
  "test/rails_root/test/unit/identity_feed_test.rb",
530
531
  "test/rails_root/test/unit/oai_endpoint_test.rb",
531
- "test/rails_root/test/unit/one_test.rb",
532
532
  "test/rails_root/test/unit/personal_recommendation_test.rb",
533
533
  "test/rails_root/test/unit/recommendation_test.rb",
534
534
  "test/rails_root/test/unit/service_category_test.rb",
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.41
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 42
9
+ version: 0.1.42
5
10
  platform: ruby
6
11
  authors:
7
12
  - Joel Duffin
@@ -10,129 +15,153 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2010-03-04 00:00:00 -07:00
18
+ date: 2010-03-12 00:00:00 -07:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
17
22
  name: acts-as-taggable-on
18
- type: :runtime
19
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
21
25
  requirements:
22
26
  - - ">="
23
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
24
30
  version: "0"
25
- version:
31
+ type: :runtime
32
+ version_requirements: *id001
26
33
  - !ruby/object:Gem::Dependency
27
34
  name: will_paginate
28
- type: :runtime
29
- version_requirement:
30
- version_requirements: !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
31
37
  requirements:
32
38
  - - ">="
33
39
  - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
34
42
  version: "0"
35
- version:
43
+ type: :runtime
44
+ version_requirements: *id002
36
45
  - !ruby/object:Gem::Dependency
37
46
  name: httparty
38
- type: :runtime
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
47
+ prerelease: false
48
+ requirement: &id003 !ruby/object:Gem::Requirement
41
49
  requirements:
42
50
  - - ">="
43
51
  - !ruby/object:Gem::Version
52
+ segments:
53
+ - 0
44
54
  version: "0"
45
- version:
55
+ type: :runtime
56
+ version_requirements: *id003
46
57
  - !ruby/object:Gem::Dependency
47
58
  name: nokogiri
48
- type: :runtime
49
- version_requirement:
50
- version_requirements: !ruby/object:Gem::Requirement
59
+ prerelease: false
60
+ requirement: &id004 !ruby/object:Gem::Requirement
51
61
  requirements:
52
62
  - - ">="
53
63
  - !ruby/object:Gem::Version
64
+ segments:
65
+ - 0
54
66
  version: "0"
55
- version:
67
+ type: :runtime
68
+ version_requirements: *id004
56
69
  - !ruby/object:Gem::Dependency
57
70
  name: muck-feedbag
58
- type: :runtime
59
- version_requirement:
60
- version_requirements: !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id005 !ruby/object:Gem::Requirement
61
73
  requirements:
62
74
  - - ">="
63
75
  - !ruby/object:Gem::Version
76
+ segments:
77
+ - 0
64
78
  version: "0"
65
- version:
79
+ type: :runtime
80
+ version_requirements: *id005
66
81
  - !ruby/object:Gem::Dependency
67
82
  name: river
68
- type: :runtime
69
- version_requirement:
70
- version_requirements: !ruby/object:Gem::Requirement
83
+ prerelease: false
84
+ requirement: &id006 !ruby/object:Gem::Requirement
71
85
  requirements:
72
86
  - - ">="
73
87
  - !ruby/object:Gem::Version
88
+ segments:
89
+ - 0
74
90
  version: "0"
75
- version:
91
+ type: :runtime
92
+ version_requirements: *id006
76
93
  - !ruby/object:Gem::Dependency
77
94
  name: overlord
78
- type: :runtime
79
- version_requirement:
80
- version_requirements: !ruby/object:Gem::Requirement
95
+ prerelease: false
96
+ requirement: &id007 !ruby/object:Gem::Requirement
81
97
  requirements:
82
98
  - - ">="
83
99
  - !ruby/object:Gem::Version
100
+ segments:
101
+ - 0
84
102
  version: "0"
85
- version:
103
+ type: :runtime
104
+ version_requirements: *id007
86
105
  - !ruby/object:Gem::Dependency
87
106
  name: feedzirra
88
- type: :runtime
89
- version_requirement:
90
- version_requirements: !ruby/object:Gem::Requirement
107
+ prerelease: false
108
+ requirement: &id008 !ruby/object:Gem::Requirement
91
109
  requirements:
92
110
  - - ">="
93
111
  - !ruby/object:Gem::Version
112
+ segments:
113
+ - 0
94
114
  version: "0"
95
- version:
115
+ type: :runtime
116
+ version_requirements: *id008
96
117
  - !ruby/object:Gem::Dependency
97
118
  name: muck-engine
98
- type: :runtime
99
- version_requirement:
100
- version_requirements: !ruby/object:Gem::Requirement
119
+ prerelease: false
120
+ requirement: &id009 !ruby/object:Gem::Requirement
101
121
  requirements:
102
122
  - - ">="
103
123
  - !ruby/object:Gem::Version
124
+ segments:
125
+ - 0
104
126
  version: "0"
105
- version:
127
+ type: :runtime
128
+ version_requirements: *id009
106
129
  - !ruby/object:Gem::Dependency
107
130
  name: muck-users
108
- type: :runtime
109
- version_requirement:
110
- version_requirements: !ruby/object:Gem::Requirement
131
+ prerelease: false
132
+ requirement: &id010 !ruby/object:Gem::Requirement
111
133
  requirements:
112
134
  - - ">="
113
135
  - !ruby/object:Gem::Version
136
+ segments:
137
+ - 0
114
138
  version: "0"
115
- version:
139
+ type: :runtime
140
+ version_requirements: *id010
116
141
  - !ruby/object:Gem::Dependency
117
142
  name: muck-comments
118
- type: :runtime
119
- version_requirement:
120
- version_requirements: !ruby/object:Gem::Requirement
143
+ prerelease: false
144
+ requirement: &id011 !ruby/object:Gem::Requirement
121
145
  requirements:
122
146
  - - ">="
123
147
  - !ruby/object:Gem::Version
148
+ segments:
149
+ - 0
124
150
  version: "0"
125
- version:
151
+ type: :runtime
152
+ version_requirements: *id011
126
153
  - !ruby/object:Gem::Dependency
127
154
  name: shoulda
128
- type: :development
129
- version_requirement:
130
- version_requirements: !ruby/object:Gem::Requirement
155
+ prerelease: false
156
+ requirement: &id012 !ruby/object:Gem::Requirement
131
157
  requirements:
132
158
  - - ">="
133
159
  - !ruby/object:Gem::Version
160
+ segments:
161
+ - 0
134
162
  version: "0"
135
- version:
163
+ type: :development
164
+ version_requirements: *id012
136
165
  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
166
  email: justin@tatemae.com
138
167
  executables: []
@@ -261,6 +290,7 @@ files:
261
290
  - app/views/service_templates/_zotero_group.html.erb
262
291
  - app/views/services/_edit_service.html.erb
263
292
  - app/views/services/_new_service.html.erb
293
+ - app/views/services/_personal_recommendations.html.erb
264
294
  - app/views/services/_summary.html.erb
265
295
  - app/views/services/_view_service.html.erb
266
296
  - app/views/services_mailer/notification_feed_added.text.ar.html.erb
@@ -566,18 +596,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
566
596
  requirements:
567
597
  - - ">="
568
598
  - !ruby/object:Gem::Version
599
+ segments:
600
+ - 0
569
601
  version: "0"
570
- version:
571
602
  required_rubygems_version: !ruby/object:Gem::Requirement
572
603
  requirements:
573
604
  - - ">="
574
605
  - !ruby/object:Gem::Version
606
+ segments:
607
+ - 0
575
608
  version: "0"
576
- version:
577
609
  requirements: []
578
610
 
579
611
  rubyforge_project: muck-services
580
- rubygems_version: 1.3.5
612
+ rubygems_version: 1.3.6
581
613
  signing_key:
582
614
  specification_version: 3
583
615
  summary: Feeds, aggregations and services for muck
@@ -675,7 +707,6 @@ test_files:
675
707
  - test/rails_root/test/unit/feed_test.rb
676
708
  - test/rails_root/test/unit/identity_feed_test.rb
677
709
  - test/rails_root/test/unit/oai_endpoint_test.rb
678
- - test/rails_root/test/unit/one_test.rb
679
710
  - test/rails_root/test/unit/personal_recommendation_test.rb
680
711
  - test/rails_root/test/unit/recommendation_test.rb
681
712
  - test/rails_root/test/unit/service_category_test.rb
@@ -1,13 +0,0 @@
1
- require File.dirname(__FILE__) + '/../test_helper'
2
-
3
- class OneTest < ActiveSupport::TestCase
4
- context "entry instance" do
5
- setup do
6
- @entry = Factory(:entry)
7
- end
8
-
9
- subject { @entry }
10
-
11
-
12
- end
13
- end